diff --git a/.coveragerc b/.coveragerc index c44b590a..7016ba48 100644 --- a/.coveragerc +++ b/.coveragerc @@ -8,3 +8,7 @@ source = omit = # Generated code muscle_manager_protocol/muscle_manager_protocol_pb2* + +[xml] + +output = cobertura.xml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 00000000..80ba2e99 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,32 @@ +# Run Continuous Integration on every push +name: continuous_integration +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python 3.6 + uses: actions/setup-python@v1 + with: + python-version: 3.6 + + - name: Install dependencies + run: | + sudo apt-get install -y build-essential cmake gfortran libopenmpi-dev pkg-config wget + sudo apt-get install -y libssl-dev zlib1g-dev + pip install ymmsl==0.10.1 + + - name: Build and run the test suite + env: + MUSCLE_ENABLE_MPI: 1 + run: | + cd $GITHUB_WORKSPACE + make test + + - name: Upload coverage report to Codacy + uses: codacy/codacy-coverage-reporter-action@master + with: + project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} diff --git a/.github/workflows/ci_python3.5.1.yaml b/.github/workflows/ci_python3.5.1.yaml new file mode 100644 index 00000000..57799ba5 --- /dev/null +++ b/.github/workflows/ci_python3.5.1.yaml @@ -0,0 +1,19 @@ +# Run Continuous Integration on every push +# This version tests only Python, but on all supported versions of it. +name: python_compatibility_3.5.1 +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Python 3.5.1 eggs + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/.eggs + key: python-compatibility-3.5.1-eggs + + - name: Run Python tests on 3.5.1 latest + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" python:3.5.1 /bin/bash -c 'cd /home/muscle3 && pip install -U pip setuptools wheel ymmsl==0.10.1 && make test_python_only' diff --git a/.github/workflows/ci_python3.5.yaml b/.github/workflows/ci_python3.5.yaml new file mode 100644 index 00000000..bb4232eb --- /dev/null +++ b/.github/workflows/ci_python3.5.yaml @@ -0,0 +1,19 @@ +# Run Continuous Integration on every push +# This version tests only Python, but on all supported versions of it. +name: python_compatibility_3.5 +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Python 3.5 eggs + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/.eggs + key: python-compatibility-3.5-eggs + + - name: Run Python tests on 3.5 latest + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" python:3.5 /bin/bash -c 'cd /home/muscle3 && pip install ymmsl==0.10.1 && make test_python_only' diff --git a/.github/workflows/ci_python3.6.1.yaml b/.github/workflows/ci_python3.6.1.yaml new file mode 100644 index 00000000..75fe0a25 --- /dev/null +++ b/.github/workflows/ci_python3.6.1.yaml @@ -0,0 +1,19 @@ +# Run Continuous Integration on every push +# This version tests only Python, but on all supported versions of it. +name: python_compatibility_3.6.1 +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Python 3.6.1 eggs + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/.eggs + key: python-compatibility-3.6.1-eggs + + - name: Run Python tests on 3.6.1 latest + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" python:3.6.1 /bin/bash -c 'cd /home/muscle3 && pip install -U pip setuptools wheel ymmsl==0.10.1 && make test_python_only' diff --git a/.github/workflows/ci_python3.6.yaml b/.github/workflows/ci_python3.6.yaml new file mode 100644 index 00000000..eab001e9 --- /dev/null +++ b/.github/workflows/ci_python3.6.yaml @@ -0,0 +1,19 @@ +# Run Continuous Integration on every push +# This version tests only Python, but on all supported versions of it. +name: python_compatibility_3.6 +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Python 3.6 eggs + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/.eggs + key: python-compatibility-3.6-eggs + + - name: Run Python tests on 3.6 latest + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" python:3.6 /bin/bash -c 'cd /home/muscle3 && pip install ymmsl==0.10.1 && make test_python_only' diff --git a/.github/workflows/ci_python3.7.yaml b/.github/workflows/ci_python3.7.yaml new file mode 100644 index 00000000..88fbd066 --- /dev/null +++ b/.github/workflows/ci_python3.7.yaml @@ -0,0 +1,19 @@ +# Run Continuous Integration on every push +# This version tests only Python, but on all supported versions of it. +name: python_compatibility_3.7 +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Python 3.7 eggs + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/.eggs + key: python-compatibility-3.7-eggs + + - name: Run Python tests on 3.7 latest + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" python:3.7 /bin/bash -c 'cd /home/muscle3 && pip install ymmsl==0.10.1 && make test_python_only' diff --git a/.github/workflows/ci_python3.8.yaml b/.github/workflows/ci_python3.8.yaml new file mode 100644 index 00000000..549b2d38 --- /dev/null +++ b/.github/workflows/ci_python3.8.yaml @@ -0,0 +1,19 @@ +# Run Continuous Integration on every push +# This version tests only Python, but on all supported versions of it. +name: python_compatibility_3.8 +on: [push, pull_request] +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Cache Python 3.8 eggs + uses: actions/cache@v1 + with: + path: ${{ github.workspace }}/.eggs + key: python-compatibility-3.8-eggs + + - name: Run Python tests on 3.8 latest + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" python:3.8 /bin/bash -c 'cd /home/muscle3 && pip install ymmsl==0.10.1 && make test_python_only' diff --git a/.github/workflows/ci_ubuntu16.04.yaml b/.github/workflows/ci_ubuntu16.04.yaml new file mode 100644 index 00000000..1b29991f --- /dev/null +++ b/.github/workflows/ci_ubuntu16.04.yaml @@ -0,0 +1,15 @@ +# Run Continuous Integration for the latest Ubuntu release +# This mainly checks for issues/regressions in the native build +name: native_compatibility_ubuntu16.04 +on: + schedule: + - cron: '0 1 * * 0' +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run tests on Ubuntu 16.04 + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" --env LC_ALL=C.UTF-8 --env LANG=C.UTF-8 --env DEBIAN_FRONTEND=noninteractive ubuntu:16.04 /bin/bash -c 'apt-get update && apt-get -y dist-upgrade && apt-get -y install build-essential cmake gfortran libopenmpi-dev pkg-config python3 python3-pip python3-venv curl && apt-get -y remove libssl-dev zlib1g-dev && pip3 install -U pip setuptools wheel && cd /home/muscle3 && pip3 install ymmsl==0.10.1 && make test_examples' diff --git a/.github/workflows/ci_ubuntu18.04.yaml b/.github/workflows/ci_ubuntu18.04.yaml new file mode 100644 index 00000000..86c79e8c --- /dev/null +++ b/.github/workflows/ci_ubuntu18.04.yaml @@ -0,0 +1,15 @@ +# Run Continuous Integration for the latest Ubuntu release +# This mainly checks for issues/regressions in the native build +name: native_compatibility_ubuntu18.04 +on: + schedule: + - cron: '0 2 * * 0' +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run tests on Ubuntu 18.04 + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" --env LC_ALL=C.UTF-8 --env LANG=C.UTF-8 --env DEBIAN_FRONTEND=noninteractive ubuntu:18.04 /bin/bash -c 'apt-get update && apt-get -y dist-upgrade && apt-get -y install build-essential cmake gfortran libopenmpi-dev pkg-config python3 python3-pip python3-venv curl && apt-get -y remove libssl-dev zlib1g-dev && pip3 install -U pip setuptools wheel && cd /home/muscle3 && pip3 install ymmsl==0.10.1 && make test_examples' diff --git a/.github/workflows/ci_ubuntu19.10.yaml b/.github/workflows/ci_ubuntu19.10.yaml new file mode 100644 index 00000000..6f220106 --- /dev/null +++ b/.github/workflows/ci_ubuntu19.10.yaml @@ -0,0 +1,15 @@ +# Run Continuous Integration for the latest Ubuntu release +# This mainly checks for issues/regressions in the native build +name: native_compatibility_ubuntu19.10 +on: + schedule: + - cron: '0 3 * * 0' +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run tests on Ubuntu 19.10 + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" --env LC_ALL=C.UTF-8 --env LANG=C.UTF-8 --env DEBIAN_FRONTEND=noninteractive ubuntu:19.10 /bin/bash -c 'apt-get update && apt-get -y dist-upgrade && apt-get -y install build-essential cmake gfortran libopenmpi-dev pkg-config python3 python3-pip python3-venv curl && apt-get -y remove libssl-dev zlib1g-dev && pip3 install -U pip setuptools wheel && cd /home/muscle3 && pip3 install ymmsl==0.10.1 && make test_examples' diff --git a/.github/workflows/ci_ubuntu20.04.yaml b/.github/workflows/ci_ubuntu20.04.yaml new file mode 100644 index 00000000..c46af0f9 --- /dev/null +++ b/.github/workflows/ci_ubuntu20.04.yaml @@ -0,0 +1,15 @@ +# Run Continuous Integration for the latest Ubuntu release +# This mainly checks for issues/regressions in the native build +name: native_compatibility_ubuntu20.04 +on: + schedule: + - cron: '0 4 * * 0' +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Run tests on Ubuntu 20.04 + run: docker run -v "${GITHUB_WORKSPACE}:/home/muscle3" --env LC_ALL=C.UTF-8 --env LANG=C.UTF-8 --env DEBIAN_FRONTEND=noninteractive ubuntu:20.04 /bin/bash -c 'apt-get update && apt-get -y dist-upgrade && apt-get -y install build-essential cmake gfortran libopenmpi-dev pkg-config python3 python3-pip python3-venv curl && apt-get -y remove libssl-dev zlib1g-dev && pip3 install -U pip setuptools wheel && cd /home/muscle3 && pip3 install ymmsl==0.10.1 && make test_examples' diff --git a/.gitignore b/.gitignore index 0d4a9847..86766ea7 100644 --- a/.gitignore +++ b/.gitignore @@ -11,7 +11,7 @@ htmlcov .coverage -coverage.xml +cobertura.xml docs/doxygen docs/apidocs diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 776d1aa6..00000000 --- a/.travis.yml +++ /dev/null @@ -1,21 +0,0 @@ -dist: xenial -language: python -python: - - "3.6" - - "3.7" - -# Travis comes with an old pytest that does not work with pytest-flake8 -# So upgrade that first, and also install dependencies from binaries as much -# as possible to speed things up. We also need a Fortran compiler. -before_install: - - sudo apt-get install -y libssl-dev zlib1g-dev gfortran - - pip install --upgrade pytest - - pip install ymmsl==0.10.0 - -install: - - pip install codacy-coverage - -script: make test - -after_success: - - python-codacy-coverage -r coverage.xml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 6d74216d..25dbf0d2 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,30 @@ Change Log All notable changes to this project will be documented in this file. This project adheres to `Semantic Versioning `_. +0.3.1 +***** + +Added +----- + +* Support for sending and receiving multidimensional grids/arrays +* Support for Python 3.8 + +Improved +-------- + +* Python 3.5.1 support +* Build compatibility on more operating systems + +Thanks +------ + +* Olivier for testing, reporting and fixing build issues +* Pavel for testing and reporting build issues +* Hamid for testing and reporting build issues +* Ben for testing and reporting build issues + + 0.3.0 ***** diff --git a/CITATION.cff b/CITATION.cff index 390458b8..d576d1a0 100644 --- a/CITATION.cff +++ b/CITATION.cff @@ -4,7 +4,7 @@ authors: - family-names: Veen given-names: Lourens - orcid: "https://orcid.org/000-0002-6311-1168" + orcid: "https://orcid.org/0000-0002-6311-1168" cff-version: "1.1.0" doi: "10.5281/zenodo.3258864" keywords: diff --git a/Doxyfile b/Doxyfile index 214e6ed4..f0c512dd 100644 --- a/Doxyfile +++ b/Doxyfile @@ -2099,7 +2099,7 @@ INCLUDE_FILE_PATTERNS = # recursively expanded use the := operator instead of the = operator. # This tag requires that the tag ENABLE_PREPROCESSING is set to YES. -PREDEFINED = MUSCLE_ENABLE_MPI +PREDEFINED = MUSCLE_ENABLE_MPI DOXYGEN_SHOULD_SKIP_THIS # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/Makefile b/Makefile index bf6baef1..dff04cad 100644 --- a/Makefile +++ b/Makefile @@ -1,4 +1,11 @@ -cpp_test_files := libmuscle/cpp/build/ymmsl/tests/test_* libmuscle/cpp/build/libmuscle/tests/test_* +export TOOLDIR := $(CURDIR)/scripts/gmake + +version_file := $(CURDIR)/VERSION +export muscle_version := $(shell cat $(version_file)) +export major_version := $(shell sed -e 's/^\([0-9]*\)\..*/\1/' $(version_file)) +export minor_version := $(shell sed -e 's/^[0-9]*\.\([0-9]*\)\..*/\1/' $(version_file)) +export patch_version := $(shell sed -e 's/^[0-9]*\.[0-9]*\.\([0-9]*\).*/\1/' $(version_file)) + .PHONY: all all: cpp fortran @@ -11,22 +18,35 @@ all: cpp fortran .PHONY: test test: test_python test_scripts test_cpp test_fortran +.PHONY: test_python_only +test_python_only: + MUSCLE_TEST_PYTHON_ONLY=1 python3 setup.py test + .PHONY: test_python test_python: cpp_tests fortran_tests python3 setup.py test .PHONY: test_cpp -test_cpp: +test_cpp: cpp cd libmuscle/cpp && $(MAKE) test .PHONY: test_fortran -test_fortran: +test_fortran: fortran_tests cd libmuscle/fortran && $(MAKE) test .PHONY: test_scripts test_scripts: cd scripts && $(MAKE) test +.PHONY: test_install +test_install: + PREFIX=$(CURDIR)/libmuscle/build/test_install $(MAKE) install + +.PHONY: test_examples +test_examples: test_install + export MUSCLE3_HOME=$(CURDIR)/libmuscle/build/test_install && $(MAKE) -C docs/source/examples test + + .PHONY: install install: all cd libmuscle/cpp && $(MAKE) install @@ -61,6 +81,12 @@ install: all @echo " Linking: -L$(PREFIX)/lib -lymmsl_fortran" @echo " -lmuscle_mpi_fortran -lymmsl -lmuscle_mpi" @echo '* *' + @echo '* *' + @echo " You can also use pkg-config. Add $(PREFIX)/lib/pkgconfig" + @echo '* to your PKG_CONFIG_PATH environment variable and use module *' + @echo '* names libmuscle, libmuscle_mpi, libmuscle_fortran or *' + @echo '* libmuscle_mpi_fortran. *' + @echo '* *' @echo '* If the directory you installed MUSCLE 3 in is not in your *' @echo "* system's library search path, then you have to set *" @echo '* LD_LIBRARY_PATH before compiling, linking or running: *' @@ -88,12 +114,16 @@ clean: cd libmuscle/cpp && $(MAKE) clean cd libmuscle/fortran && $(MAKE) clean cd scripts && $(MAKE) clean + cd docs/source/examples && $(MAKE) clean + rm -rf ./build .PHONY: distclean distclean: cd libmuscle/cpp && $(MAKE) distclean cd libmuscle/fortran && $(MAKE) distclean cd scripts && $(MAKE) distclean + cd docs/source/examples && $(MAKE) clean + rm -rf ./build .PHONY: fortran fortran: cpp diff --git a/README.rst b/README.rst index 18fa4867..9ec89a33 100644 --- a/README.rst +++ b/README.rst @@ -1,12 +1,12 @@ -.. image:: https://github.com/multiscale/muscle3/raw/develop/docs/source/muscle3_logo_readme.png +.. image:: https://github.com/multiscale/muscle3/raw/master/docs/source/muscle3_logo_readme.png :alt: MUSCLE 3 .. image:: https://readthedocs.org/projects/muscle3/badge/?version=master :target: https://muscle3.readthedocs.io/en/develop/?badge=master :alt: Documentation Build Status -.. image:: https://api.travis-ci.org/multiscale/muscle3.svg?branch=master - :target: https://travis-ci.org/multiscale/muscle3 +.. image:: https://github.com/multiscale/muscle3/workflows/continuous_integration/badge.svg?branch=master + :target: https://github.com/multiscale/muscle3/actions :alt: Build Status .. image:: https://api.codacy.com/project/badge/Coverage/ea0c833cf1ce4e13840c6498dfe27ff8 diff --git a/VERSION b/VERSION index 0d91a54c..9e11b32f 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.3.0 +0.3.1 diff --git a/docs/requirements.txt b/docs/requirements.txt index 31233dac..999c52c9 100644 --- a/docs/requirements.txt +++ b/docs/requirements.txt @@ -1,9 +1,10 @@ breathe -grpcio==1.17.1 -grpcio-tools==1.17.1 +grpcio==1.24.3 +grpcio-tools==1.24.3 msgpack==0.6.1 netifaces -protobuf==3.8.0 +numpy>=1.12 +protobuf==3.10.0 sphinx-fortran typing==3.6.6 ymmsl diff --git a/docs/source/.gitignore b/docs/source/.gitignore index fd4c02c3..a710b7ff 100644 --- a/docs/source/.gitignore +++ b/docs/source/.gitignore @@ -1 +1,2 @@ /apidocs +installing.rst diff --git a/docs/source/conf.py b/docs/source/conf.py index 652540de..33e813ca 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -89,7 +89,7 @@ # List of patterns, relative to source directory, that match files and # directories to ignore when looking for source files. # This patterns also effect to html_static_path and html_extra_path -exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] +exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store', 'examples/python/build/venv'] # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' @@ -107,6 +107,17 @@ breathe_default_members = ('members',) +# -- Patch version into installation instructions -- +def patch_installation_version(): + with open('installing.rst', 'w') as out_file: + with open('installing.rst.in', 'r') as in_file: + in_text = in_file.read() + out_text = in_text.replace('%%VERSION%%', release.strip()) + out_file.write(out_text) + +patch_installation_version() + + # -- Run doxygen manually, as readthedocs doesn't support it -- import subprocess subprocess.call('cd ../.. ; doxygen', shell=True) diff --git a/docs/source/cplusplus.rst b/docs/source/cplusplus.rst index 3e60702f..6b49f09f 100644 --- a/docs/source/cplusplus.rst +++ b/docs/source/cplusplus.rst @@ -2,7 +2,7 @@ MUSCLE and C++ ============== This section shows how to use MUSCLE 3 from C++, based on the same -reaction-diffusion model given in the Python tutorial. +reaction-diffusion model as given in the Python tutorial. `The source code for the examples in this section is here `_. You can also go to ``docs/source/examples/cpp`` in the source directory (that's @@ -14,7 +14,7 @@ Building and running the examples If you've just built and installed the C++ version of libmuscle, then you're all set to build the examples. To do that, go into the ``docs/source/examples`` -subdirectory, and run Make: +subdirectory, and run Make, passing the installed location of MUSCLE 3: .. code-block:: bash @@ -192,10 +192,8 @@ message on our ``F_INIT`` port with the initial state: .. code-block:: cpp auto msg = instance.receive("initial_state"); - DataConstRef data = msg.data(); - std::vector U(data.size()); - for (int i = 0; i < data.size(); ++i) - U[i] = data[i].as(); + auto data_ptr = msg.data().elements(); + std::vector U(data_ptr, data_ptr + msg.data().size()); Calling the ``receive`` method on an instance yields an object of type @@ -230,18 +228,30 @@ contain data of many different types, and that's what ``Data`` and type. In the code here, we don't bother with a check. Instead, we blindly assume that -we've been sent a list of doubles. If that's not the case, an exception will be -thrown and our program will halt. That's okay, because it means that there's +we've been sent a 1D grid of doubles. If there is no grid, an exception will +be thrown and our program will halt. That's okay, because it means that there's something wrong somewhere that we need to fix. MUSCLE is designed to let you get away with being a bit sloppy as long as things actually go right, but it will check for problems and let you know if something goes wrong. -If a ``DataConstRef`` contains a list of some kind, then its ``size()`` member -function can be used to determine the length of that list. We use that to create -a ``std::vector`` of the correct length, and then extract each item in the -received list into the vector. Note that items in a list can be accessed through -``data[i]``, and that each item is itself a ``DataConstRef``, now (hopefully) -containing a ``double`` value that we can extract using ``as()``. +A grid in MUSCLE 3 is an n-dimensional array of numbers or booleans. It has a +shape (size in each dimension), a size (total number of elements), a storage +order which says in which order the elements are arranged in memory, and +optionally names for the indexes. + +Here, we expect a 1D grid of doubles, which is just a vector of numbers. Storage +order is irrelevant then. We'll use the standard C++ ``std::vector`` class to +contain our state. It has a constructor that takes a pointer to an array of +objects of the appropriate type and the number of them, and copies those objects +into itself. We use the :cpp:func:`DataConstRef::elements` to get a pointer to +the elements, and :cpp:func:`DataConstRef::size` to get the number of elements, +and that's all we need to create our state vector ``U``. + +Note that MUSCLE 3 will in this case check that we have the right type of +elements (doubles), but it cannot know and therefore will not check that we're +expecting a 1D grid. We could check that by hand by checking the length of +``msg.data().shape()`` to see if it's 1. See the diffusion model below for an +example. .. code-block:: cpp @@ -267,24 +277,24 @@ Sending messages and Data .. code-block:: cpp // O_F - auto result = Data::nils(U.size()); - for (int i = 0; i < U.size(); ++i) - result[i] = U[i]; + auto result = Data::grid(U.data(), {U.size()}, {"x"}); instance.send("final_state", Message(t_cur, result)); Having computed our final state, we will send it to the outside world on the -``final_state`` port. In this case, we need to send a list of doubles, which we -first need to wrap up into a ``Data`` object. A ``Data`` object works just like -a ``DataConstRef``, except that it isn't constant, and can thus be modified. (It -is in fact a reference, like ``DataConstRef``, despite the name, and it has -automatic memory management as well.) - -Here, we start by creating a ``Data`` containing a list of `U.size()` nil (null, -None) values. This allocates enough space in the list for all of our doubles. We -can then simply use ``result[i]`` to assign our double values to each list item. -Note that there's no need to explicitly specify that this is a double, the -compiler knows and will do the right thing. +``final_state`` port. In this case, we need to send a 1D grid of doubles, which +we first need to wrap up into a ``Data`` object. A ``Data`` object works just +like a ``DataConstRef``, except that it isn't constant, and can thus be +modified. (It is in fact a reference, like ``DataConstRef``, despite the name, +and it has automatic memory management as well.) + +Here, we create a ``Data`` containing a grid. We pass it a pointer to the +numbers in ``U``, and the shape of our grid, which is a 1-element array because +the grid is 1-dimensional. The third argument contains the names of the indexes, +which helps to avoid confusion over which index is x and which is y (or +row/column, or latitude/longitude, or... you get the idea). You are not +required to add these (and MUSCLE 3 doesn't use them), but you or someone else +using your code will be very grateful you did at some point in the future. With our data item constructed, we can send a ``Message`` containing the current timestamp and the data to the ``final_state`` port. Note that there are diff --git a/docs/source/examples/Makefile b/docs/source/examples/Makefile index 958043aa..6a1ed60a 100644 --- a/docs/source/examples/Makefile +++ b/docs/source/examples/Makefile @@ -4,9 +4,29 @@ $(error MUSCLE3_HOME is not defined, use 'MUSCLE3_HOME=/path/to/muscle3 make (); + if (msg.data().shape().size() != 1u || msg.data().size() != U.size()) { + auto msg = "Received state of incorrect shape or size!"; + instance.error_shutdown(msg); + throw std::runtime_error(msg); + } + std::copy_n(msg.data().elements(), msg.data().size(), U.begin()); std::vector dU(U.size()); auto lpl = laplacian(U, dx); @@ -87,9 +88,7 @@ void diffusion(int argc, char * argv[]) { } // O_F - auto data = Data::nils(U.size()); - for (std::size_t i = 0u; i < U.size(); ++i) - data[i] = U[i]; + auto data = Data::grid(U.data(), {U.size()}, {"x"}); instance.send("final_state_out", Message(t_cur, data)); std::cerr << "All done" << std::endl; } diff --git a/docs/source/examples/cpp/mc_driver.cpp b/docs/source/examples/cpp/mc_driver.cpp index ad416d55..3f9b6dc0 100644 --- a/docs/source/examples/cpp/mc_driver.cpp +++ b/docs/source/examples/cpp/mc_driver.cpp @@ -89,12 +89,10 @@ void mc_driver(int argc, char * argv[]) { std::cerr << "Entering S" << std::endl; double t_max = 0.0; for (int sample = 0; sample < n_samples; ++sample) { - std::cerr << "Receiving states_in" << std::endl; + std::cerr << "Receiving states_in[" << sample << "]" << std::endl; Message msg = instance.receive_with_settings("states_in", sample); - std::cerr << "Received states_in: " << msg.data().size() << std::endl; - std::vector U(msg.data().size()); - for (std::size_t i = 0u; i < msg.data().size(); ++i) - U[i] = msg.data()[i].as(); + auto data_ptr = msg.data().elements(); + std::vector U(data_ptr, data_ptr + msg.data().size()); Us.push_back(U); t_max = std::max(t_max, msg.timestamp()); diff --git a/docs/source/examples/cpp/reaction.cpp b/docs/source/examples/cpp/reaction.cpp index aae2afc1..e5f52349 100644 --- a/docs/source/examples/cpp/reaction.cpp +++ b/docs/source/examples/cpp/reaction.cpp @@ -26,10 +26,8 @@ void reaction(int argc, char * argv[]) { double k = instance.get_setting_as("k"); auto msg = instance.receive("initial_state"); - DataConstRef data(msg.data()); - std::vector U(data.size()); - for (int i = 0; i < data.size(); ++i) - U[i] = data[i].as(); + auto data_ptr = msg.data().elements(); + std::vector U(data_ptr, data_ptr + msg.data().size()); double t_cur = msg.timestamp(); while (t_cur + dt < msg.timestamp() + t_max) { @@ -42,9 +40,7 @@ void reaction(int argc, char * argv[]) { } // O_F - auto result = Data::nils(U.size()); - for (int i = 0; i < U.size(); ++i) - result[i] = U[i]; + auto result = Data::grid(U.data(), {U.size()}, {"x"}); instance.send("final_state", Message(t_cur, result)); } } diff --git a/docs/source/examples/cpp/reaction_mpi.cpp b/docs/source/examples/cpp/reaction_mpi.cpp index da99b0d9..92077217 100644 --- a/docs/source/examples/cpp/reaction_mpi.cpp +++ b/docs/source/examples/cpp/reaction_mpi.cpp @@ -39,10 +39,9 @@ void reaction(int argc, char * argv[]) { auto msg = instance.receive("initial_state"); if (rank == root_rank) { - DataConstRef data(msg.data()); - U_all.resize(data.size()); - for (int i = 0; i < data.size(); ++i) - U_all[i] = data[i].as(); + auto data_ptr = msg.data().elements(); + U_all.resize(msg.data().size()); + std::copy_n(data_ptr, msg.data().size(), U_all.begin()); t_cur = msg.timestamp(); t_end = t_cur + t_max; @@ -77,9 +76,7 @@ void reaction(int argc, char * argv[]) { root_rank, MPI_COMM_WORLD); if (rank == root_rank) { - auto result = Data::nils(U_all.size()); - for (int i = 0; i < U_all.size(); ++i) - result[i] = U_all[i]; + auto result = Data::grid(U_all.data(), {U_all.size()}, {"x"}); instance.send("final_state", Message(t_cur, result)); } } diff --git a/docs/source/examples/fortran/build/Makefile b/docs/source/examples/fortran/build/Makefile index 181257f4..049d7948 100644 --- a/docs/source/examples/fortran/build/Makefile +++ b/docs/source/examples/fortran/build/Makefile @@ -1,8 +1,9 @@ FC ?= gfortran -FFLAGS += -std=f2003 -g -I$(MUSCLE3_HOME)/include +MPIFC ?= mpifort +FFLAGS += -std=f2003 -g $(shell pkg-config --cflags libmuscle_fortran) -MPI_LDFLAGS := -L$(MUSCLE3_HOME)/lib -lymmsl_fortran -lmuscle_mpi_fortran -lymmsl -lmuscle_mpi -LDFLAGS := -L$(MUSCLE3_HOME)/lib -lymmsl_fortran -lmuscle_fortran -lymmsl -lmuscle +MPI_LDFLAGS := $(shell pkg-config --libs libmuscle_mpi_fortran) +LDFLAGS := $(shell pkg-config --libs libmuscle_fortran) binaries := reaction diffusion mc_driver load_balancer @@ -25,5 +26,5 @@ clean: LD_LIBRARY_PATH=$(MUSCLE3_HOME)/lib:$(LD_LIBRARY_PATH) $(FC) $(FFLAGS) -o $@ $^ $(LDFLAGS) %_mpi: ../%_mpi.f03 - LD_LIBRARY_PATH=$(MUSCLE3_HOME)/lib:$(LD_LIBRARY_PATH) mpi$(FC) $(FFLAGS) -o $@ $^ $(MPI_LDFLAGS) + LD_LIBRARY_PATH=$(MUSCLE3_HOME)/lib:$(LD_LIBRARY_PATH) $(MPIFC) $(FFLAGS) -o $@ $^ $(MPI_LDFLAGS) diff --git a/docs/source/examples/fortran/diffusion.f03 b/docs/source/examples/fortran/diffusion.f03 index 34c47264..0f7015bc 100644 --- a/docs/source/examples/fortran/diffusion.f03 +++ b/docs/source/examples/fortran/diffusion.f03 @@ -20,7 +20,7 @@ program diffusion type(LIBMUSCLE_Data) :: sdata real (selected_real_kind(15)) :: t_cur, t_next, t_max, dt, x_max, dx, d - integer (LIBMUSCLE_size) :: i, U_size, n_steps, iteration + integer (LIBMUSCLE_size) :: U_size, n_steps, iteration real (selected_real_kind(15)), dimension(:), allocatable :: U, dU real (selected_real_kind(15)), dimension(:, :), allocatable :: Us @@ -57,12 +57,9 @@ program diffusion do while (t_cur + dt < t_max) print *, 't_cur: ', t_cur, 't_max: ', t_max ! O_I - sdata = LIBMUSCLE_Data_create_nils(U_size) - do i = 1, U_size - call LIBMUSCLE_Data_set_item(sdata, i, U(i)) - end do - + sdata = LIBMUSCLE_Data_create_grid(U, 'x') smsg = LIBMUSCLE_Message_create(t_cur, sdata) + call LIBMUSCLE_Data_free(sdata) t_next = t_cur + dt if (t_next + dt <= t_max) then call LIBMUSCLE_Message_set_next_timestamp(smsg, t_next) @@ -72,15 +69,10 @@ program diffusion ! S rmsg = LIBMUSCLE_Instance_receive(instance, 'state_in', smsg) rdata = LIBMUSCLE_Message_get_data(rmsg) - do i = 1, U_size - item = LIBMUSCLE_DataConstRef_get_item(rdata, i) - U(i) = LIBMUSCLE_DataConstRef_as_real8(item) - call LIBMUSCLE_DataConstRef_free(item) - end do + call LIBMUSCLE_DataConstRef_elements(rdata, U) call LIBMUSCLE_DataConstRef_free(rdata) call LIBMUSCLE_Message_free(rmsg) call LIBMUSCLE_Message_free(smsg) - call LIBMUSCLE_Data_free(sdata) dU(2:U_size-1) = d * laplacian(U, dx) * dt dU(1) = dU(2) @@ -94,14 +86,9 @@ program diffusion end do ! O_F - sdata = LIBMUSCLE_Data_create_nils(U_size) - do i = 1, U_size - call LIBMUSCLE_Data_set_item(sdata, i, U(i)) - end do - + sdata = LIBMUSCLE_Data_create_grid(U, 'x') smsg = LIBMUSCLE_Message_create(t_cur, sdata) call LIBMUSCLE_Instance_send(instance, 'final_state_out', smsg) - call LIBMUSCLE_Message_free(smsg) call LIBMUSCLE_Data_free(sdata) deallocate (U, dU, Us) diff --git a/docs/source/examples/fortran/mc_driver.f03 b/docs/source/examples/fortran/mc_driver.f03 index 6ed57909..142156dc 100644 --- a/docs/source/examples/fortran/mc_driver.f03 +++ b/docs/source/examples/fortran/mc_driver.f03 @@ -102,9 +102,7 @@ program mc_driver allocate (Us(n_samples, U_size)) end if - do i = 1, U_size - Us(sample, i) = LIBMUSCLE_DataConstRef_as_real8(LIBMUSCLE_DataConstRef_get_item(rdata, i)) - end do + call LIBMUSCLE_DataConstRef_elements(rdata, Us(sample, :)) t_max = max(t_max, LIBMUSCLE_Message_timestamp(rmsg)) call LIBMUSCLE_DataConstRef_free(rdata) @@ -112,11 +110,7 @@ program mc_driver end do ! calculate mean - means = LIBMUSCLE_Data_create_nils(U_size) - - do i = 1, U_size - call LIBMUSCLE_Data_set_item(means, i, sum(Us(:, i)) / n_samples) - end do + means = LIBMUSCLE_Data_create_grid(sum(Us, 1) / n_samples, 'x') smsg = LIBMUSCLE_Message_create(t_max, means) call LIBMUSCLE_Instance_send(instance, 'mean_out', smsg) diff --git a/docs/source/examples/fortran/reaction.f03 b/docs/source/examples/fortran/reaction.f03 index d7b6ad00..5013d748 100644 --- a/docs/source/examples/fortran/reaction.f03 +++ b/docs/source/examples/fortran/reaction.f03 @@ -14,7 +14,6 @@ program reaction type(LIBMUSCLE_Data) :: sdata real (selected_real_kind(15)) :: t_cur, t_max, dt, k - integer (LIBMUSCLE_size) :: i, U_size real (selected_real_kind(15)), dimension(:), allocatable :: U @@ -32,14 +31,8 @@ program reaction rmsg = LIBMUSCLE_Instance_receive(instance, 'initial_state') rdata = LIBMUSCLE_Message_get_data(rmsg) - - U_size = LIBMUSCLE_DataConstRef_size(rdata) - allocate (U(U_size)) - do i = 1, U_size - item = LIBMUSCLE_DataConstRef_get_item(rdata, i) - U(i) = LIBMUSCLE_DataConstRef_as_real8(item) - call LIBMUSCLE_DataConstRef_free(item) - end do + allocate (U(LIBMUSCLE_DataConstRef_size(rdata))) + call LIBMUSCLE_DataConstRef_elements(rdata, U) call LIBMUSCLE_DataConstRef_free(rdata) t_cur = LIBMUSCLE_Message_timestamp(rmsg) @@ -55,14 +48,9 @@ program reaction end do ! O_F - sdata = LIBMUSCLE_Data_create_nils(U_size) - do i = 1, U_size - call LIBMUSCLE_Data_set_item(sdata, i, U(i)) - end do - + sdata = LIBMUSCLE_Data_create_grid(U, 'x') smsg = LIBMUSCLE_Message_create(t_cur, sdata) call LIBMUSCLE_Instance_send(instance, 'final_state', smsg) - call LIBMUSCLE_Message_free(smsg) call LIBMUSCLE_Data_free(sdata) deallocate (U) diff --git a/docs/source/examples/fortran/reaction_mpi.f03 b/docs/source/examples/fortran/reaction_mpi.f03 index 4dbb0977..8dcdacdc 100644 --- a/docs/source/examples/fortran/reaction_mpi.f03 +++ b/docs/source/examples/fortran/reaction_mpi.f03 @@ -42,11 +42,7 @@ program reaction_mpi rdata = LIBMUSCLE_Message_get_data(rmsg) U_all_size = LIBMUSCLE_DataConstRef_size(rdata) allocate (U_all(U_all_size)) - do i = 1, U_all_size - item = LIBMUSCLE_DataConstRef_get_item(rdata, int(i, LIBMUSCLE_size)) - U_all(i) = LIBMUSCLE_DataConstRef_as_real8(item) - call LIBMUSCLE_DataConstRef_free(item) - end do + call LIBMUSCLE_DataConstRef_elements(rdata, U_all) call LIBMUSCLE_DataConstRef_free(rdata) t_cur = LIBMUSCLE_Message_timestamp(rmsg) @@ -84,11 +80,7 @@ program reaction_mpi root_rank, MPI_COMM_WORLD, ierr) if (rank == root_rank) then - sdata = LIBMUSCLE_Data_create_nils(int(U_all_size, LIBMUSCLE_size)) - do i = 1, U_all_size - call LIBMUSCLE_Data_set_item(sdata, int(i, LIBMUSCLE_size), U_all(i)) - end do - + sdata = LIBMUSCLE_Data_create_grid(U_all, 'x') smsg = LIBMUSCLE_Message_create(t_cur, sdata) call LIBMUSCLE_Instance_send(instance, 'final_state', smsg) diff --git a/docs/source/examples/python/build/Makefile b/docs/source/examples/python/build/Makefile index bf19818b..f8892e12 100644 --- a/docs/source/examples/python/build/Makefile +++ b/docs/source/examples/python/build/Makefile @@ -1,3 +1,7 @@ +python_version := $(word 2, $(shell python3 --version)) +not_python_3_5 := $(patsubst 3.5%,,$(python_version)) +reqs := $(if $(not_python_3_5), ../requirements.txt, ../requirements_3.5.txt) + .PHONY: all all: venv @@ -9,4 +13,4 @@ clean: venv: python3 -m venv venv - . venv/bin/activate && pip3 install -r ../requirements.txt + . venv/bin/activate && pip3 install -U pip setuptools wheel && pip3 install -r $(reqs) && pip3 install $(CURDIR)/../../../../../ diff --git a/docs/source/examples/python/diffusion.py b/docs/source/examples/python/diffusion.py index 7eb255b2..df151bd4 100644 --- a/docs/source/examples/python/diffusion.py +++ b/docs/source/examples/python/diffusion.py @@ -3,7 +3,7 @@ import numpy as np -from libmuscle import Instance, Message +from libmuscle import Grid, Instance, Message from ymmsl import Operator @@ -55,14 +55,14 @@ def diffusion() -> None: t_next = t_cur + dt if t_next + dt > t_max: t_next = None - cur_state_msg = Message(t_cur, t_next, U.tolist()) + cur_state_msg = Message(t_cur, t_next, Grid(U, ['x'])) instance.send('state_out', cur_state_msg) # S msg = instance.receive('state_in', default=cur_state_msg) if msg.timestamp > t_cur + dt: logger.warning('Received a message from the future!') - U = np.array(msg.data) + np.copyto(U, msg.data.array) dU = np.zeros_like(U) dU[1:-1] = d * laplacian(U, dx) * dt diff --git a/docs/source/examples/python/reaction.py b/docs/source/examples/python/reaction.py index cc6c051e..0b65ae81 100644 --- a/docs/source/examples/python/reaction.py +++ b/docs/source/examples/python/reaction.py @@ -1,6 +1,6 @@ import numpy as np -from libmuscle import Instance, Message +from libmuscle import Grid, Instance, Message from ymmsl import Operator @@ -18,7 +18,7 @@ def reaction() -> None: k = instance.get_setting('k', 'float') msg = instance.receive('initial_state') - U = np.array(msg.data) + U = msg.data.array.copy() t_cur = msg.timestamp while t_cur + dt < msg.timestamp + t_max: @@ -29,7 +29,7 @@ def reaction() -> None: t_cur += dt # O_F - instance.send('final_state', Message(t_cur, None, U.tolist())) + instance.send('final_state', Message(t_cur, None, Grid(U, ['x']))) if __name__ == '__main__': diff --git a/docs/source/examples/python/reaction_diffusion.py b/docs/source/examples/python/reaction_diffusion.py index a84969aa..db469282 100644 --- a/docs/source/examples/python/reaction_diffusion.py +++ b/docs/source/examples/python/reaction_diffusion.py @@ -4,7 +4,7 @@ import numpy as np -from libmuscle import Instance, Message +from libmuscle import Grid, Instance, Message from libmuscle.runner import run_simulation from ymmsl import (ComputeElement, Conduit, Configuration, Model, Operator, Settings) @@ -24,7 +24,7 @@ def reaction() -> None: k = instance.get_setting('k', 'float') msg = instance.receive('initial_state') - U = np.array(msg.data) + U = msg.data.array.copy() t_cur = msg.timestamp while t_cur + dt < msg.timestamp + t_max: @@ -35,7 +35,7 @@ def reaction() -> None: t_cur += dt # O_F - instance.send('final_state', Message(t_cur, None, U.tolist())) + instance.send('final_state', Message(t_cur, None, Grid(U, ['x']))) def laplacian(Z: np.array, dx: float) -> np.array: @@ -85,14 +85,14 @@ def diffusion() -> None: t_next = t_cur + dt if t_next + dt > t_max: t_next = None - cur_state_msg = Message(t_cur, t_next, U.tolist()) + cur_state_msg = Message(t_cur, t_next, Grid(U, ['x'])) instance.send('state_out', cur_state_msg) # S msg = instance.receive('state_in', default=cur_state_msg) if msg.timestamp > t_cur + dt: logging.warning('Received a message from the future!') - U = np.array(msg.data) + np.copyto(U, msg.data.array) dU = np.zeros_like(U) dU[1:-1] = d * laplacian(U, dx) * dt diff --git a/docs/source/examples/python/reaction_diffusion_qmc.py b/docs/source/examples/python/reaction_diffusion_qmc.py index 5d36d839..9a98e3c6 100644 --- a/docs/source/examples/python/reaction_diffusion_qmc.py +++ b/docs/source/examples/python/reaction_diffusion_qmc.py @@ -4,7 +4,7 @@ import numpy as np import sobol_seq -from libmuscle import Instance, Message +from libmuscle import Grid, Instance, Message from libmuscle.runner import run_simulation from ymmsl import (ComputeElement, Conduit, Configuration, Model, Operator, Settings) @@ -24,7 +24,7 @@ def reaction() -> None: k = instance.get_setting('k', 'float') msg = instance.receive('initial_state') - U = np.array(msg.data) + U = msg.data.array.copy() t_cur = msg.timestamp while t_cur + dt < msg.timestamp + t_max: @@ -35,7 +35,7 @@ def reaction() -> None: t_cur += dt # O_F - instance.send('final_state', Message(t_cur, None, U.tolist())) + instance.send('final_state', Message(t_cur, None, Grid(U, ['x']))) def laplacian(Z: np.array, dx: float) -> np.array: @@ -86,14 +86,14 @@ def diffusion() -> None: t_next = t_cur + dt if t_next + dt > t_max: t_next = None - cur_state_msg = Message(t_cur, t_next, U.tolist()) + cur_state_msg = Message(t_cur, t_next, Grid(U, ['x'])) instance.send('state_out', cur_state_msg) # S msg = instance.receive('state_in', default=cur_state_msg) if msg.timestamp > t_cur + dt: logger.warning('Received a message from the future!') - U = np.array(msg.data) + np.copyto(U, msg.data.array) dU = np.zeros_like(U) dU[1:-1] = d * laplacian(U, dx) * dt @@ -105,7 +105,7 @@ def diffusion() -> None: t_cur += dt # O_F - instance.send('final_state_out', Message(t_cur, None, U.tolist())) + instance.send('final_state_out', Message(t_cur, None, Grid(U, ['x']))) def load_balancer() -> None: @@ -206,7 +206,7 @@ def qmc_driver() -> None: # S for sample in range(n_samples): msg = instance.receive_with_settings('states_in', sample) - U = np.array(msg.data) + U = msg.data.array # accumulate if Us is None: Us = U diff --git a/docs/source/examples/python/requirements.txt b/docs/source/examples/python/requirements.txt index 6ee8f812..f9218745 100644 --- a/docs/source/examples/python/requirements.txt +++ b/docs/source/examples/python/requirements.txt @@ -1,4 +1,3 @@ matplotlib -muscle3 numpy sobol_seq diff --git a/docs/source/examples/python/requirements_3.5.txt b/docs/source/examples/python/requirements_3.5.txt new file mode 100644 index 00000000..f5edc789 --- /dev/null +++ b/docs/source/examples/python/requirements_3.5.txt @@ -0,0 +1,3 @@ +matplotlib<3 +numpy +sobol_seq diff --git a/docs/source/examples/reaction_diffusion_cpp.sh b/docs/source/examples/reaction_diffusion_cpp.sh index 31ff5cc0..4e421527 100755 --- a/docs/source/examples/reaction_diffusion_cpp.sh +++ b/docs/source/examples/reaction_diffusion_cpp.sh @@ -6,6 +6,8 @@ if [ -z "$MUSCLE3_HOME" ] ; then exit 1 fi +echo 'Running reaction-diffusion in C++' + . python/build/venv/bin/activate muscle_manager reaction_diffusion.ymmsl & diff --git a/docs/source/examples/reaction_diffusion_fortran.sh b/docs/source/examples/reaction_diffusion_fortran.sh index 31ff5cc0..bdce14eb 100755 --- a/docs/source/examples/reaction_diffusion_fortran.sh +++ b/docs/source/examples/reaction_diffusion_fortran.sh @@ -6,13 +6,15 @@ if [ -z "$MUSCLE3_HOME" ] ; then exit 1 fi +echo 'Running reaction-diffusion in Fortran' + . python/build/venv/bin/activate muscle_manager reaction_diffusion.ymmsl & manager_pid=$! export LD_LIBRARY_PATH=$MUSCLE3_HOME/lib:$LD_LIBRARY_PATH -BINDIR=cpp/build +BINDIR=fortran/build $BINDIR/reaction --muscle-instance=micro >'micro.log' 2>&1 & $BINDIR/diffusion --muscle-instance=macro >'macro.log' 2>&1 & diff --git a/docs/source/examples/reaction_diffusion_mc_cpp.sh b/docs/source/examples/reaction_diffusion_mc_cpp.sh index a543f819..962a921e 100755 --- a/docs/source/examples/reaction_diffusion_mc_cpp.sh +++ b/docs/source/examples/reaction_diffusion_mc_cpp.sh @@ -6,6 +6,8 @@ if [ -z "$MUSCLE3_HOME" ] ; then exit 1 fi +echo 'Running MC reaction-diffusion in C++' + . python/build/venv/bin/activate muscle_manager reaction_diffusion_mc.ymmsl & diff --git a/docs/source/examples/reaction_diffusion_mc_fortran.sh b/docs/source/examples/reaction_diffusion_mc_fortran.sh index 7f8971b2..b5c3cefc 100755 --- a/docs/source/examples/reaction_diffusion_mc_fortran.sh +++ b/docs/source/examples/reaction_diffusion_mc_fortran.sh @@ -6,6 +6,8 @@ if [ -z "$MUSCLE3_HOME" ] ; then exit 1 fi +echo 'Running MC reaction-diffusion in Fortran' + . python/build/venv/bin/activate muscle_manager reaction_diffusion_mc.ymmsl & diff --git a/docs/source/examples/reaction_diffusion_mpi_cpp.sh b/docs/source/examples/reaction_diffusion_mpi_cpp.sh index a4f9cd9b..dcc18da1 100755 --- a/docs/source/examples/reaction_diffusion_mpi_cpp.sh +++ b/docs/source/examples/reaction_diffusion_mpi_cpp.sh @@ -6,6 +6,8 @@ if [ -z "$MUSCLE3_HOME" ] ; then exit 1 fi +echo 'Running reaction-diffusion with MPI in C++' + . python/build/venv/bin/activate muscle_manager reaction_diffusion.ymmsl & diff --git a/docs/source/examples/reaction_diffusion_mpi_fortran.sh b/docs/source/examples/reaction_diffusion_mpi_fortran.sh index 0e707c5f..acdd6566 100755 --- a/docs/source/examples/reaction_diffusion_mpi_fortran.sh +++ b/docs/source/examples/reaction_diffusion_mpi_fortran.sh @@ -6,6 +6,8 @@ if [ -z "$MUSCLE3_HOME" ] ; then exit 1 fi +echo 'Running reaction-diffusion MPI in Fortran' + . python/build/venv/bin/activate muscle_manager reaction_diffusion.ymmsl & diff --git a/docs/source/examples/reaction_diffusion_python.sh b/docs/source/examples/reaction_diffusion_python.sh index facded6c..843dbf11 100755 --- a/docs/source/examples/reaction_diffusion_python.sh +++ b/docs/source/examples/reaction_diffusion_python.sh @@ -7,6 +7,8 @@ manager_pid=$! BINDIR=python +echo 'Running reaction-diffusion in Python' + python $BINDIR/reaction.py --muscle-instance=micro >'micro.log' 2>&1 & python $BINDIR/diffusion.py --muscle-instance=macro >'macro.log' 2>&1 & diff --git a/docs/source/examples/reaction_diffusion_python_cpp.sh b/docs/source/examples/reaction_diffusion_python_cpp.sh new file mode 100755 index 00000000..f04c0276 --- /dev/null +++ b/docs/source/examples/reaction_diffusion_python_cpp.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +if [ -z "$MUSCLE3_HOME" ] ; then + echo 'Error: MUSCLE3_HOME is not set.' + echo "Use 'MUSCLE3_HOME=/path/to/muscle3 $0' to run the example" + exit 1 +fi + +echo 'Running reaction-diffusion in Python and C++' + +. python/build/venv/bin/activate +muscle_manager reaction_diffusion.ymmsl & + +manager_pid=$! + +export LD_LIBRARY_PATH=$MUSCLE3_HOME/lib:$LD_LIBRARY_PATH + +python python/reaction.py --muscle-instance=micro >'micro.log' 2>&1 & +cpp/build/diffusion --muscle-instance=macro >'macro.log' 2>&1 & + +touch muscle3_manager.log +tail -f muscle3_manager.log --pid=${manager_pid} + +wait + diff --git a/docs/source/examples/reaction_diffusion_python_fortran.sh b/docs/source/examples/reaction_diffusion_python_fortran.sh new file mode 100755 index 00000000..5aef427a --- /dev/null +++ b/docs/source/examples/reaction_diffusion_python_fortran.sh @@ -0,0 +1,25 @@ +#!/bin/bash + +if [ -z "$MUSCLE3_HOME" ] ; then + echo 'Error: MUSCLE3_HOME is not set.' + echo "Use 'MUSCLE3_HOME=/path/to/muscle3 $0' to run the example" + exit 1 +fi + +echo 'Running reaction-diffusion in Python and Fortran' + +. python/build/venv/bin/activate +muscle_manager reaction_diffusion.ymmsl & + +manager_pid=$! + +export LD_LIBRARY_PATH=$MUSCLE3_HOME/lib:$LD_LIBRARY_PATH + +python python/reaction.py --muscle-instance=micro >'micro.log' 2>&1 & +fortran/build/diffusion --muscle-instance=macro >'macro.log' 2>&1 & + +touch muscle3_manager.log +tail -f muscle3_manager.log --pid=${manager_pid} + +wait + diff --git a/docs/source/fortran.rst b/docs/source/fortran.rst index e78d4ac3..cd817464 100644 --- a/docs/source/fortran.rst +++ b/docs/source/fortran.rst @@ -154,7 +154,6 @@ Variables type(LIBMUSCLE_Data) :: sdata real (selected_real_kind(15)) :: t_cur, t_max, dt, k - integer (LIBMUSCLE_size) :: i, U_size real (selected_real_kind(15)), dimension(:), allocatable :: U @@ -172,14 +171,7 @@ may want to use. Eagle-eyed readers will have noticed that ``dx`` and ``x_max`` are missing. That is because we'll derive the size of the state vector of the model (``U``) from -the state we receive, rather than from the configuration. To facilitate that, -the index variable ``i`` and the size ``U_size`` are now of integer kind -``LIBMUSCLE_size``. Both the default integer kind and ``LIBMUSCLE_size`` are -easily large enough to accomodate any reasonable state size, so this doesn't -matter much, but MUSCLE 3 uses the ``LIBMUSCLE_size`` kind for sizes and so -we'll use it here too. If that doesn't work for your model, then you can use the -standard Fortran ``int()`` function to convert between the different kinds. - +the state we receive, rather than from the configuration. Creating an Instance ```````````````````` @@ -242,21 +234,15 @@ message on our ``F_INIT`` port with the initial state: rmsg = LIBMUSCLE_Instance_receive(instance, 'initial_state') rdata = LIBMUSCLE_Message_get_data(rmsg) - - U_size = LIBMUSCLE_DataConstRef_size(rdata) - allocate (U(U_size)) - do i = 1, U_size - item = LIBMUSCLE_DataConstRef_get_item(rdata, i) - U(i) = LIBMUSCLE_DataConstRef_as_real8(item) - call LIBMUSCLE_DataConstRef_free(item) - end do + allocate (U(LIBMUSCLE_DataConstRef_size(rdata))) + call LIBMUSCLE_DataConstRef_elements(rdata, U) call LIBMUSCLE_DataConstRef_free(rdata) Calling the :f:func:`LIBMUSCLE_Instance_receive` function with an instance and a port name yields an object of type :f:type:`LIBMUSCLE_Message` containing the received message. As always when using MUSCLE from Fortran, we have to remember -to free the returned Message object when we are done with it. That's not yet +to free the returned Message object when we are done with it. That's not yet the case though, because we still need to get the received data out. In Python, Message is a very simple class with several public members. In Fortran, objects are always accessed and manipulated through LIBMUSCLE functions, in this case @@ -265,36 +251,35 @@ object. Again, since MUSCLE gave us an object, we have to remember to free it when we're done. First though, we'll use the data to initialise our state. We are going to assume -that we'll receive a list of numbers, just like in the equivalent examples in +that we'll receive a 1D grid of numbers, just like in the equivalent examples in the other supported languages. :f:func:`LIBMUSCLE_DataConstRef_size` will return -the size of the list that we received (or print an error and stop if we received -something else that doesn't have a size, see below for handling errors +the size of the array that we received (or print an error and stop if we +received something else that doesn't have a size, see below for handling errors differently). We use that to allocate the ``U`` array to the same size as the -received state, and then we copy the values from the received list into ``U``. -To get the values out, we use :f:func:`LIBMUSCLE_DataConstRef_get_item` to get a -DataConstRef object containing the item, and then we use -:f:func:`LIBMUSCLE_DataConstRef_as_real8` to extract a double precision real -value from that. And then, of course, we need to free the returned ``item`` -object. +received state, and then we copy the elements of the array into ``U`` using +:f:func:`LIBMUSCLE_DataConstRef_elements`. We can then free the ``rdata`` +object, since we don't need it any longer. We'll hold on to the ``rmsg`` a bit +longer, since we'll need it later. If all this freeing objects is starting to sound tedious, that's because it is, and it's why more modern languages like Python and C++ do this for you. Unfortunately, for Fortran, it has to be done manually. -Note that item indices start at 1, as usual in Fortran. MUSCLE 3 follows the -language in which you're using it and automatically translates, so if this list -was sent from Python or C++, then received item 1 corresponds to sent item 0. +Note that indices for the received array start at 1, as usual in Fortran. MUSCLE +3 follows the language in which you're using it and automatically translates, so +if this grid was sent from Python or C++, then received item 1 corresponds to +sent item 0. If you have a DataConstRef object, then you can check which kind of value it -contains, e.g. using :f:func:`LIBMUSCLE_DataConstRef_is_a_real8`. Here, we don't -bother with a check. Instead, we blindly assume that we've been sent a list of -doubles. If that's not the case, an error will be printed and our program will -halt. That's okay, because it means that there's something wrong somewhere that -we need to fix. MUSCLE is designed to let you get away with being a bit sloppy -as long as things actually go right, but it will check for problems and let you -know if something goes wrong. If you want to make a submodel or component that -can handle different kinds of messages, then these inspection functions will -help you do so however. +contains, e.g. using :f:func:`LIBMUSCLE_DataConstRef_is_a_grid_of_real8`. Here, +we don't bother with a check. Instead, we blindly assume that we've been sent a +1D grid of doubles. If that's not the case, an error will be printed and our +program will halt. That's okay, because it means that there's something wrong +somewhere that we need to fix. MUSCLE is designed to let you get away with being +a bit sloppy as long as things actually go right, but it will check for problems +and let you know if something goes wrong. If you want to make a submodel or +component that can handle different kinds of messages, then these inspection +functions will help you do so however. .. code-block:: fortran @@ -326,14 +311,9 @@ Sending messages and Data .. code-block:: fortran ! O_F - sdata = LIBMUSCLE_Data_create_nils(U_size) - do i = 1, U_size - call LIBMUSCLE_Data_set_item(sdata, i, U(i)) - end do - + sdata = LIBMUSCLE_Data_create_grid(U, 'x') smsg = LIBMUSCLE_Message_create(t_cur, sdata) call LIBMUSCLE_Instance_send(instance, 'final_state', smsg) - call LIBMUSCLE_Message_free(smsg) call LIBMUSCLE_Data_free(sdata) deallocate (U) @@ -343,24 +323,20 @@ Sending messages and Data Having computed our final state, we will send it to the outside world on the -``final_state`` port. In this case, we need to send a list of doubles, which we -first need to wrap up into a ``Data`` object. A ``Data`` object works just like -a ``DataConstRef``, except that it isn't constant, and can thus be modified. - -Here, we start by creating a ``Data`` containing a list of ``U_size`` nil (null, -None) values. This allocates enough space in the list for all of our reals. We -can then use :f:func:`LIBMUSCLE_Data_set_item` to assign the value to each list -item. Note that there's no need to explicitly specify the type here; it will be -inferred from the type of the value that we're passing. Indexes range from 1 to -the size of the array, as usual in Fortran. - -Having put our data into the list, we can then put the list into a new -:f:type:`LIBMUSCLE_Message` object, and call the +``final_state`` port. In this case, we need to send a vector of doubles, which +we first need to wrap up into a ``Data`` object. A ``Data`` object works just +like a ``DataConstRef``, except that it isn't constant, and can thus be +modified. We do this by creating a ``Data`` object containing a grid value, with +the array ``U`` and the index name ``x``. + +Having put our data into the ``Data`` object is a grid, we can then put the grid +into a new :f:type:`LIBMUSCLE_Message` object, and call the :f:func:`LIBMUSCLE_Instance_send` function to send it. Finally, we free the Message and Data objects that we created, and deallocate the state as in the -original non-MUSCLE version. That concludes the reuse loop. When we're done -running the model, the reuse loop will finish, and we can free our Instance -object before we quit. +original non-MUSCLE version. + +That concludes the reuse loop. When we're done running the model, the reuse loop +will finish, and we can free our Instance object before we quit. :f:type:`LIBMUSCLE_Data` is quite versatile, and makes it easier to send data of various types between submodels. Here are some other examples of creating @@ -406,11 +382,7 @@ your model!): As you can see, sending complex data types with MUSCLE is a bit more difficult -in Fortran than in Python, but it is not too burdensome. One thing that's still -missing is sending and receiving multidimensional arrays of numbers. We hope to -add that in a future version; for now you'll need to put them into a list of -numbers manually. - +in Fortran than in Python, but it is not too burdensome. Handling errors ``````````````` diff --git a/docs/source/fortran_api.rst b/docs/source/fortran_api.rst index 9487fc87..febc3bb1 100644 --- a/docs/source/fortran_api.rst +++ b/docs/source/fortran_api.rst @@ -162,6 +162,44 @@ LIBMUSCLE_Data :r obj: The new Data object. :rtype obj: LIBMUSCLE_Data +.. f:function:: LIBMUSCLE_Data_create_grid(data_array) + + Creates a Data object containing a grid (array). + + The argument must be an array of type ``logical`` and default kind, + an array of type ``integer`` and kind ``LIBMUSCLE_int4`` or + ``LIBMUSCLE_int8``, or an array of type ``real`` and kind + ``LIBMUSCLE_real4`` or kind ``LIBMUSCLE_real8``. + + Grids created with this function have no index names. + + :p array data_array: The array of data to represent. + :r obj: The new Data object. + :rtype obj: LIBMUSCLE_Data + +.. f:function:: LIBMUSCLE_Data_create_grid(data_array, index_name, ...) + + Creates a Data object containing a grid (array). + + The ``data_array`` argument must be an array of type ``logical`` and + default kind, an array of type ``integer`` and kind ``LIBMUSCLE_int4`` + or ``LIBMUSCLE_int8``, or an array of type ``real`` and kind + ``LIBMUSCLE_real4`` or kind ``LIBMUSCLE_real8``. + + If an ``n``-dimensional array is passed as the first argument, then + there must be ``n`` additional arguments of type ``character``, giving + the names of the indexes in order. For instance, if your 2D array + represents a table and you index it ``data_array(row, column)`` then + ``"row"`` and ``"column"`` would be reasonable index names here. Note + that MUSCLE 3 does not use these names, they are here to make it + easier to understand the message on the receiver side, or if it is + saved and analysed later. + + :p array data_array: The array of data to represent. + :p character index_name: The names of the grid's indexes. + :r obj: The new Data object. + :rtype obj: LIBMUSCLE_Data + .. f:function:: LIBMUSCLE_Data_create_dict() Creates a Data object containing an empty dictionary. @@ -371,6 +409,50 @@ LIBMUSCLE_Data :r is: True if the object contains a list. :rtype is: logical +.. f:function:: LIBMUSCLE_Data_is_a_grid_of_logical(self) + + Determine whether the Data object contains a grid of logical values. + + :p LIBMUSCLE_Data self: The Data object to inspect. + :r is: True if the object contains a grid of logical. + :rtype is: logical + +.. f:function:: LIBMUSCLE_Data_is_a_grid_of_int4(self) + + Determine whether the Data object contains a grid of integer values + of kind ``LIBMUSCLE_int4``. + + :p LIBMUSCLE_Data self: The Data object to inspect. + :r is: True if the object contains a grid of int4. + :rtype is: logical + +.. f:function:: LIBMUSCLE_Data_is_a_grid_of_int8(self) + + Determine whether the Data object contains a grid of integer values + of kind ``LIBMUSCLE_int8``. + + :p LIBMUSCLE_Data self: The Data object to inspect. + :r is: True if the object contains a grid of int8. + :rtype is: logical + +.. f:function:: LIBMUSCLE_Data_is_a_grid_of_real4(self) + + Determine whether the Data object contains a grid of real values + of kind ``LIBMUSCLE_real4``. + + :p LIBMUSCLE_Data self: The Data object to inspect. + :r is: True if the object contains a grid of real4. + :rtype is: logical + +.. f:function:: LIBMUSCLE_Data_is_a_grid_of_real8(self) + + Determine whether the Data object contains a grid of real8 values + of kind ``LIBMUSCLE_real8``. + + :p LIBMUSCLE_Data self: The Data object to inspect. + :r is: True if the object contains a grid of real8. + :rtype is: logical + .. f:function:: LIBMUSCLE_Data_is_a_byte_array(self) Determine whether the Data object contains a byte array value. @@ -1080,6 +1162,84 @@ LIBMUSCLE_Data :r value: The value at the given index :rtype value: LIBMUSCLE_Data +.. f:function:: LIBMUSCLE_Data_num_dims(self, err_code, err_msg) + + Get the number of dimensions of a grid-valued Data object. + + This function is only valid for Data objects containing a grid. You + can use :f:func:`LIBMUSCLE_Data_is_a_grid_of_logical` and similar + functions to check that it is a grid. If the Data object does not + contain a grid, ``err_code`` will be set to + ``LIBMUSCLE_runtime_error``. + + :p LIBMUSCLE_Data self: The Data object to get the number of + dimensions for. + :p integer err_code: An error code output (optional). + :p character err_msg: An error message output (allocatable, optional). + :r num_dims: The number of dimensions + :rtype num_dims: integer (LIBMUSCLE_size) + +.. f:subroutine:: LIBMUSCLE_Data_shape(self, shp, err_code, err_msg) + + Get the shape of the array of a grid-valued Data object. + + The array passed to receive the shape must be one-dimensional, and + at least of length `n`, where `n` is the number of dimensions of + the grid. + + This function is only valid for Data objects containing a grid. You + can use :f:func:`LIBMUSCLE_Data_is_a_grid_of_logical` and similar + functions to check that it is a grid. If the Data object does not + contain a grid, ``err_code`` will be set to + ``LIBMUSCLE_runtime_error``. + + :p LIBMUSCLE_Data self: The data object to get the shape of. + :p integer shp: A 1D array of integer (LIBMUSCLE_size) to put the + shape into (intent (out)). + :p integer err_code: An error code output (optional). + :p character err_msg: An error message output (allocatable, optional). + +.. f:function:: LIBMUSCLE_Data_has_indexes(self, err_code, err_msg) + + Check whether a grid has index names. + + Returns ``.true.`` if the grid has index names, ``.false.`` otherwise. + + This function is only valid for Data objects containing a grid. You + can use :f:func:`LIBMUSCLE_Data_is_a_grid_of_logical` and similar + functions to check that it is a grid. If the Data object does not + contain a grid, ``err_code`` will be set to + ``LIBMUSCLE_runtime_error``. + + :p LIBMUSCLE_Data self: The data object to check for indexes. + :p integer err_code: An error code output (optional). + :p character err_msg: An error message output (allocatable, optional). + :r has_indexes: Whether there are indexes. + :rtype has_indexes: logical + +.. f:function:: LIBMUSCLE_Data_index(self, i, err_code, err_msg) + + Return the name of the i'th index. + + The value of ``i`` ranges from 1 to the number of dimensions. + + This function is only valid for Data objects containing a grid. You + can use :f:func:`LIBMUSCLE_Data_is_a_grid_of_logical` and similar + functions to check that it is a grid. If the Data object does not + contain a grid, ``err_code`` will be set to + ``LIBMUSCLE_runtime_error``. If the index is zero, negative, or + larger than the number of dimensions, ``err_code`` will be set to + ``LIBMUSCLE_out_of_range``. + + :p LIBMUSCLE_Data self: The data object to get the index of. + :p integer i: The index of the index to get the name of (LIBMUSCLE_size). + :p integer err_code: An error code output (optional). + :p character err_msg: An error message output (allocatable, optional). + :r index_name: The name of the index (allocatable) + :rtype index_name: logical + + + LIBMUSCLE_Message ````````````````` .. f:type:: LIBMUSCLE_Message diff --git a/docs/source/installing.rst b/docs/source/installing.rst.in similarity index 53% rename from docs/source/installing.rst rename to docs/source/installing.rst.in index a4bc2138..e2173f25 100644 --- a/docs/source/installing.rst +++ b/docs/source/installing.rst.in @@ -10,8 +10,7 @@ Python Installing MUSCLE 3 on Python will install all the Python-based components of the system, i.e. the Python version of libmuscle, the YMMSL Python library, and -the MUSCLE Manager. This requires Python 3.5, 3.6 or 3.7; 3.8 may work but is -untested. +the MUSCLE Manager. This requires at least Python 3.5. MUSCLE 3 is on PyPI as an ordinary Python package, so it can be installed via Pip in the usual way. It's normally a good idea to make a virtual environment @@ -21,18 +20,30 @@ Pip in the usual way. It's normally a good idea to make a virtual environment ~$ python3 -m venv muscle3_venv ~$ . muscle3_venv/bin/activate + (muscle3_venv)~$ pip install -U pip setuptools wheel (muscle3_venv)~$ pip install muscle3 This will create a Python virtualenv in a directory named ``muscle3_venv`` in -your home directory, activate it, and then install MUSCLE 3 inside of it. You -can then use MUSCLE 3 whenever you have the virtualenv activated. This will also -install the Python YMMSL library, and any required dependencies. +your home directory, and then activate it. This means that when you run Python, +it will use the version of Python in the virtual environment, and see the +packages you have installed there. + +Next, we upgrade ``pip``, the Python package installer (most systems have an old +version, and old versions sometimes give problems), ``setuptools`` (same thing) +and we install ``wheel`` (which can cause packages to fail to install if it's +not there). + +Having made a good environment, we can then install MUSCLE 3 inside of it. Once +that's done, you can use MUSCLE 3 whenever you have the virtualenv activated. +This will also install the Python YMMSL library, and any required dependencies. You can also install MUSCLE 3 without a virtualenv if your system allows that. The advantage of virtual environments is that you can keep different programs separate, and reduce the chance of library version mismatches. On the other -hand, not having to activate the virtual environment saves you a step. +hand, not having to activate the virtual environment saves you a step. If you +get any error messages, try upgrading pip, setuptools and wheel as shown above, +and then try again. If you want to install the Python YMMSL library without installing MUSCLE 3, then you can use @@ -53,17 +64,21 @@ slightly easier than) installing most C++ libraries. Prerequisites ````````````` -To build libmuscle, we're going to need some tools. In particular, we need a C++ -compiler and GNU make. MUSCLE 3 uses C++14, so you need at least g++ 4.9.3. -Clang is expected to work, but that's not been tested, nor has any other -compiler. If you want to try, go right ahead, we'd love to have feedback on -this. Building has been tested with gmake 3.82 and 4.1. +To build libmuscle, we're going to need some tools. In particular, we need a +C++ compiler and GNU make. MUSCLE 3 uses C++14, so you need at least g++ 4.9.3. +Clang is expected to work, but that's not been tested. Using the Intel +toolchain currently does not work, due to issues with building gRPC with it +(but see below for information about building submodels with the Intel tools). +Other compilers have not been tested. If you want to try, go right ahead, we'd +love to have feedback on this. Building has been tested with gmake 3.82 and +4.1. If you're doing C++ development on a reasonably modern Linux, then you probably already have a suitable compiler installed. If not, on a Debian (or Ubuntu) -based system, ``sudo apt-get install build-essential`` should get you set up. On -a cluster, there is usually a ``module load g++`` or similar command available -that sets you up with g++ and associated tools. The exact command will vary from +based system, ``sudo apt-get install build-essential cmake gfortran pkg-config +wget`` should get you set up. On a cluster, there is usually a ``module load +g++`` or similar command available that sets you up with g++ and associated +tools, and similar for a Fortran compiler. The exact command will vary from machine to machine, so consult the documentation for your cluster and/or ask the helpdesk. @@ -84,18 +99,22 @@ not, MUSCLE 3 will **download and install them automatically**. The dependencies are: - c-ares 1.11.0 or later -- gRPC 1.17.1 or later +- gRPC 1.24.3 - MessagePack 3.2.0 or later - OpenSSL 1.0.2 or later -- Protobuf 3.7.1 or later +- Protobuf 3.10.0 - zlib 1.2.x If your model uses any of these dependencies directly, then it's best to install that dependency on your system, either via the package manager or from source, -and then link both your library and MUSCLE 3 to the dependency. This avoids -having two different versions around and active at the same time. Otherwise, -it's easier to rely on the automatic installation. +and then link both your library and MUSCLE 3 to the dependency. (See below for +how t opoint the build to your installation.) This avoids having two different +versions around and active at the same time. Otherwise, it's easier to rely on +the automatic installation. Note that the gRPC and Protobuf dependencies are +exact; getting them to install and work correctly on all systems is +unfortunately hard enough already if you limit yourself to a single version, so +that is what we do. Downloading MUSCLE 3 ```````````````````` @@ -108,9 +127,9 @@ archive and enter the main directory: ~$ mkdir muscle3_source ~$ cd muscle3_source - ~/muscle3_source$ wget https://github.com/multiscale/muscle3/archive/0.2.0/muscle3-0.2.0.tar.gz - ~/muscle3_source$ tar xf muscle3-0.2.0.tar.gz - ~/muscle3_source$ cd muscle3-0.2.0 + ~/muscle3_source$ wget https://github.com/multiscale/muscle3/archive/%%VERSION%%/muscle3-%%VERSION%%.tar.gz + ~/muscle3_source$ tar xf muscle3-%%VERSION%%.tar.gz + ~/muscle3_source$ cd muscle3-%%VERSION%% Of course, you can put the source anywhere you like. @@ -123,7 +142,7 @@ The basic command for building MUSCLE 3 is: .. code-block:: bash - ~/muscle3_source/muscle3-0.2.0$ make + ~/muscle3_source/muscle3-%%VERSION%%$ make There are a few options that can be added by setting them as environment @@ -154,29 +173,78 @@ TAR= This overrides the command used to unpack dependencies, which by default is ``tar``. +protobuf_ROOT= + Also look in the given directory when detecting the ProtoBuf library. This + should be the top of the installation tree, so it will have `include/`, + `lib/` and `bin/` subdirectories. + +grpc_ROOT= + Also look in the given directory when detecting the gRPC library. + +msgpack_ROOT= + Also look in the given directory when detecting the MsgPack library. + +googletest_ROOT= + Also look in the given directory when detecting the GoogleTest library. + +c-ares_ROOT= + Also look in the given directory when detecting the c-ares library. + +zlib_ROOT= + Also look in the given directory when detecting zlib. + +openssl_ROOT= + Also look in the given directory when detecting OpenSSL. + As an example, to build libmuscle with MPI support, and using 2 cores, you would do: .. code-block:: bash - ~/muscle3_source/muscle3-0.2.0$ MUSCLE_ENABLE_MPI=1 NCORES=2 make + ~/muscle3_source/muscle3-%%VERSION%%$ MUSCLE_ENABLE_MPI=1 NCORES=2 make This will take ten minutes or so (including building the dependencies), depending on the speed of your machine. + +Getting help +```````````` + +The plan is for this to always magically work, but operating systems being as +diverse as they are (especially on HPC machines), it's possible that the build +will fail. In that case, have a look at the output to see if you can identify +an error message, and then go to +`the MUSCLE 3 issues on GitHub `_ +to see if the problem has been reported already, and if there's a work-around. + +If not, please make a new issue with a description of the problem (preferably +mention the error in the issue title, so that others can find it), and attach a +log of the build. You can make a build log using: + +.. code-block:: bash + + ~/muscle3_source/muscle3-%%VERSION%%$ make distclean + ~/muscle3_source/muscle3-%%VERSION%%$ make >make.log 2>&1 + + +This will produce a file named ``make.log`` with the build output in it. To +attach it to a GitHub issue, drag it into the text box from your file manager. + + Installing libmuscle C++ ```````````````````````` -Finally, we need to install MUSCLE 3. We recommend installing it into a -subdirectory of your home directory for now, as opposed to ``/usr/local/bin`` or -something similar (although ``/opt/muscle3`` would be okay), since there is no -uninstall command yet that will cleanly remove it. That goes like this: +Once MUSCLE 3 has been compiled, we need to install it. We recommend installing +it into a subdirectory of your home directory for now, as opposed to +``/usr/local/bin`` or something similar (although ``/opt/muscle3`` would be +okay), since there is no uninstall command yet that will cleanly remove it. That +goes like this: .. code-block:: bash - ~/muscle3_source/muscle3-0.2.0$ PREFIX=~/muscle3 make install + ~/muscle3_source/muscle3-%%VERSION%%$ PREFIX=~/muscle3 make install This command will install the C++ version of MUSCLE 3 into the directory @@ -231,6 +299,14 @@ to the command line, or for MPI compute elements: -L/lib -lymmsl -lmuscle_mpi +You're most likely linking dynamically, but ``libmuscle`` does install static +libraries in case you need them. If you link statically, then you must add the +``-pthread`` option, as ``libmuscle`` uses background threads for communication. + +MUSCLE 3 also supports ``pkg-config``. To use ``pkg-config``, add +``/lib/pkgconfig`` to your ``PKG_CONFIG_PATH`` and use the module names +``libmuscle`` or ``libmuscle_mpi``. + There's one more thing: the directory that you've installed MUSCLE into is probably not in your system's library search path, and as a result the dynamic linker won't be able to find the libraries when you run your program. In order @@ -246,6 +322,35 @@ If you have just installed MUSCLE 3, then the above bits are currently on your screen, with ```` filled out already, so you can just copy-paste them from there. +Intel C++ compiler +`````````````````` + +Compiling MUSCLE 3 with the Intel compiler is currently not supported. One issue +here is that gRPC does not compile with the Intel compiler, and it's a required +dependency. If you're willing and able to do some manual work, you may be able +to manually install gRPC using the GNU toolchain, and then compile MUSCLE 3 +with the Intel compiler, which may or may not work (if you encounter any +problems, please make an issue on GitHub). + +However, in a typical multiscale simulation, only a small amount of time is +spent communicating through MUSCLE 3. Your submodels will spend most of their +time either computing or waiting. Therefore, it helps to compile the submodels +with the Intel compiler for extra performance, but using the Intel compiler for +MUSCLE 3 doesn't add much anyway. + +To compile your submodels with the Intel compiler, first use the GNU compiler +to install MUSCLE 3. Then, switch to the Intel compiler, and use it to compile +and link it to MUSCLE 3 as described above. The compilers are link-compatible, +so this should work. (See below if your model is written in Fortran, you need +to do it slightly differently there.) + +Note that since the Intel toolchain is proprietary, continuous testing cannot be +done easily, and support for it is a bit experimental still. Nevertheless, the +Intel tools are widely used in computational science, so we very much want them +to work. If you encounter a problem, please make an issue on GitHub and we'll +try to figure out a solution. + + Fortran ------- @@ -290,6 +395,10 @@ the libmuscle library instead: -L/lib -lymmsl_fortran -lmuscle_mpi_fortran -lymmsl -lmuscle_mpi +MUSCLE 3 also supports ``pkg-config``. To use ``pkg-config``, add +``/lib/pkgconfig`` to your ``PKG_CONFIG_PATH`` and use the module names +``libmuscle_fortran`` or ``libmuscle_mpi_fortran``. + There's one more thing: the directory that you've installed MUSCLE into is probably not in your system's library search path, and as a result the dynamic linker won't be able to find the libraries when you run your program. In order @@ -305,3 +414,25 @@ If you have just installed MUSCLE 3, then the above bits are currently on your screen, with ```` filled out already, so you can just copy-paste them from there. +Intel Fortran compiler +`````````````````````` + +MUSCLE 3 cannot currently be compiled with the Intel toolchain (see above under +C++ for details). You can however compile your submodel with the Intel compiler +and link it to the GNU-compiled MUSCLE 3 library, because the compilers are +almost compatible. The one issue is that the ``.mod`` files created by the GNU +compiler (and installed when you install ``libmuscle``) cannot be read by the +Intel compiler. + +To solve this, you need to use the corresponding ``.f03`` files instead. These +are installed by in ``/include``, and are called ``libmuscle.f03``, +``ymmsl.f03``, and ``libmuscle_mpi.f03``. You compile these as you would any +other source file in your submodel, and then link them with rest of the submodel +and the shared library as described above. + +Note that since the Intel toolchain is proprietary, continuous testing cannot be +done easily, and support for it is a bit experimental still. Nevertheless, the +Intel tools are widely used in computational science, so we very much want them +to work. If you encounter a problem, please make an issue on GitHub and we'll +try to figure out a solution. + diff --git a/docs/source/tutorial.rst b/docs/source/tutorial.rst index bcfc7608..67b71c0a 100644 --- a/docs/source/tutorial.rst +++ b/docs/source/tutorial.rst @@ -69,7 +69,7 @@ Importing headers import numpy as np - from libmuscle import Instance, Message + from libmuscle import Grid, Instance, Message from libmuscle.runner import run_simulation from ymmsl import (ComputeElement, Conduit, Configuration, Model, Operator, Settings) @@ -152,7 +152,7 @@ Initialisation: Settings and receiving messages k = instance.get_setting('k', 'float') msg = instance.receive('initial_state') - U = np.array(msg.data) + U = msg.data.array.copy() t_cur = msg.timestamp @@ -175,11 +175,18 @@ be received, not sent, so that declaration makes ``initial_state`` a receiving port. The message that we receive contains several bits of information. Here, we are -interested in the ``data`` attribute, which we assume to be an array of floats -containing our initial state, which we'll call ``U``. We'll initialise our -simulation time to the time at which that state is valid, which is contained in -the ``timestamp`` attribute. This is a double-precision float containing the -number of simulated (not wall-clock) seconds since the whole simulation started. +interested in the ``data`` attribute, which we assume to be a grid of floats +containing our initial state, which we'll call ``U``. The ``msg.data`` attribute +holds an object of type :class:`libmuscle.Grid`, which holds a read-only NumPy +array and optionally a list of index names. Here, we take the array and make a +copy of it for ``U``, so that we can modify ``U`` in our upcoming state update. +Without calling ``.copy()``, ``U`` would end up pointing to the same read-only +array, and we'd get an error message if we tried to modify it. + +Finally, we'll initialise our simulation time to the time at which that state is +valid, which is contained in the ``timestamp`` attribute. This is a +double-precision float containing the number of simulated (not wall-clock) +seconds since the whole simulation started. The state update loop --------------------- @@ -222,7 +229,7 @@ Sending the final result .. code-block:: python # O_F - instance.send('final_state', Message(t_cur, None, U.tolist())) + instance.send('final_state', Message(t_cur, None, Grid(U, ['x']))) After the update loop is done, the model has arrived at its final state. We @@ -255,8 +262,11 @@ document, for each port, which data type you're expecting or sending! Your future colleagues (and possibly your future self) will thank you. MessagePack is an extensible format, and since sending grids is very common in -these kinds of models it would be nice if NumPy arrays could be sent directly. -That's not yet implemented, but should be in a future version of MUSCLE 3. +these kinds of models MUSCLE 3 supports sending NumPy arrays directly. Here, we +wrap our array U into a :class:`libmuscle.Grid` object, so that we can add the +name of the dimensions. In this case there's only one, and ``x`` is not very +descriptive, so we could have also passed ``U`` directly, in which case MUSCLE +would have sent a :class:`libmuscle.Grid` without index names automatically. Finally, if you want to use your own encoding, you can just send a ``bytes`` object, which will be transmitted as-is, with minimal overhead. @@ -281,20 +291,20 @@ O_I operator. t_next = t_cur + dt if t_next + dt > t_max: t_next = None - cur_state_msg = Message(t_cur, t_next, U.tolist()) + cur_state_msg = Message(t_cur, t_next, Grid(U, ['x'])) instance.send('state_out', cur_state_msg) Since the diffusion model is the macro-submodel in this model, it needs to send its state to the outside world on every timestep. This is done in the O_I -operator. The message simply contains the state, converted to a standard Python -list, and it is sent on the ``state_out`` port, which was declared for the O_I -operator when we made the :class:`libmuscle.Instance` for this model. The -message is sent with the current simulation time, and a second timestamp that -gives the simulation time for the next message that will be sent on this port. -Since our time steps are fixed, this is easy to calculate. We do need to take -care to send ``None`` if this is the final message on this port however, since -there won't be another message in that case. +operator. The message simply contains the state, converted to a +:class:`libmuscle.Grid`, and it is sent on the ``state_out`` port, which was +declared for the O_I operator when we made the :class:`libmuscle.Instance` for +this model. The message is sent with the current simulation time, and a second +timestamp that gives the simulation time for the next message that will be sent +on this port. Since our time steps are fixed, this is easy to calculate. We do +need to take care to send ``None`` if this is the final message on this port +however, since there won't be another message in that case. This deserves a bit more explanation. First, MUSCLE 3 does not use the timestamps that are attached to the messages for anything, and in this @@ -326,7 +336,7 @@ Receiving messages with a default msg = instance.receive('state_in', default=cur_state_msg) if msg.timestamp > t_cur + dt: logger.warning('Received a message from the future!') - U = np.array(msg.data) + np.copyto(U, msg.data.array) The diffusion model being the macro-model, it will need to receive input for its @@ -335,7 +345,7 @@ state update from the micro-model, which it does by calling are passing a default message. The default message is returned if this port is not connected. We are cleverly passing the message containing our current state, so that if this port is not connected, the model continues from its -current state. Since MUSCLE 3 will simply ignore a send command on a +current state. Since MUSCLE 3 will simply ignore a send command on a disconnected port, this makes it possible to run the diffusion model without a micro-model attached. @@ -347,17 +357,26 @@ if the micro-model runs for longer than our macro-model timestep. In this case, the number of steps is fixed, so that this warning will never be emitted. However, if the micro-model runs until it detects convergence, then it can happen that it runs for longer than the timestep of the macro-model, and that -would indicate that there is no timescale overlap anymore. In that case, the +would indicate that there is no timescale separation anymore. In that case, the result could be wrong, and a warning is appropriate. -The S operator here calls the ``laplacian()`` function. There is no requirement -for a submodel to be a single function, you can split it up, call library -functions, and so on. There has to be a top-level function however if you want -to run more than one submodel in a single Python program. Also, you cannot share -any data with other components, other than by sending and receiving messages. In -particular, you can't use global variables to communicate between models. This -is intentional, because it doesn't work if you're running as separate programs -on different computers. +Then, we copy the received data into our state array. The received +:class:`libmuscle.Grid` object contains a read-only array, and just writing ``U += msg.data.array`` would discard the state we have in ``U``, and instead make +the variable ``U`` refer to the received read-only array. We would then get an +error message when trying to update the state. The ``np.copyto`` function +instead copies the (read-only) contents of ``msg.data.array`` into the existing +(writable) array referred to by ``U``. This way, we can do our state update, and +it's also a bit more efficient than reallocating memory all the time. + +The S operator here calls the ``laplacian()`` function (not shown). There is no +requirement for a submodel to be a single function, you can split it up, call +library functions, and so on. There has to be a top-level function however if +you want to run more than one submodel in a single Python program. Also, you +cannot share any data with other components, other than by sending and receiving +messages. In particular, you can't use global variables to communicate between +models. This is intentional, because it doesn't work if you're running as +separate programs on different computers. Connecting it all together diff --git a/integration_test/conftest.py b/integration_test/conftest.py index f829a490..46bac069 100644 --- a/integration_test/conftest.py +++ b/integration_test/conftest.py @@ -1,5 +1,6 @@ import logging import multiprocessing as mp +import os import sys from typing import Generator @@ -16,6 +17,11 @@ from libmuscle.manager.topology_store import TopologyStore +skip_if_python_only = pytest.mark.skipif( + 'MUSCLE_TEST_PYTHON_ONLY' in os.environ, + reason='Python-only tests requested') + + @pytest.fixture def yatiml_log_warning(): yatiml.logger.setLevel(logging.WARNING) diff --git a/integration_test/test_all.py b/integration_test/test_all.py index ee3e9d2b..780c0b32 100644 --- a/integration_test/test_all.py +++ b/integration_test/test_all.py @@ -2,11 +2,12 @@ import sys from typing import List +import numpy as np import pytest from ymmsl import (ComputeElement, Conduit, Configuration, Model, Operator, Reference, Settings) -from libmuscle import Instance, Message +from libmuscle import Grid, Instance, Message from libmuscle.runner import run_simulation @@ -29,7 +30,11 @@ def macro(): # s/b for slot in range(10): msg = instance.receive('in', slot) - assert msg.data == 'testing back' + assert msg.data['string'] == 'testing back' + assert msg.data['int'] == 42 + assert msg.data['float'] == 3.1416 + assert msg.data['grid'].array.dtype == np.float64 + assert msg.data['grid'].array[0, 1] == 34.0 def micro(): @@ -49,7 +54,12 @@ def micro(): assert msg.data == 'testing' # o_f - instance.send('out', Message(0.1, None, 'testing back')) + result = { + 'string': 'testing back', + 'int': 42, + 'float': 3.1416, + 'grid': Grid(np.array([[12.0, 34.0, 56.0], [1.0, 2.0, 3.0]]))} + instance.send('out', Message(0.1, None, result)) def test_all(log_file_in_tmpdir): diff --git a/integration_test/test_cpp_macro_micro.py b/integration_test/test_cpp_macro_micro.py index 80b9b7d0..b06e6e48 100644 --- a/integration_test/test_cpp_macro_micro.py +++ b/integration_test/test_cpp_macro_micro.py @@ -3,9 +3,13 @@ import subprocess import sys +import numpy as np + from libmuscle import Instance, Message from ymmsl import Operator +from .conftest import skip_if_python_only + def run_macro(instance_id: str): sys.argv.append('--muscle-instance={}'.format(instance_id)) @@ -23,14 +27,24 @@ def macro(): for i in range(2): # o_i - instance.send('out', Message(i * 10.0, (i + 1) * 10.0, 'testing')) + test_array = np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]) + assert test_array.shape == (2, 3) + assert test_array.flags.c_contiguous + data = { + 'message': 'testing', + 'test_grid': test_array} + instance.send('out', Message(i * 10.0, (i + 1) * 10.0, data)) # s/b msg = instance.receive('in') - assert msg.data == 'testing back {}'.format(i) + assert msg.data['reply'] == 'testing back {}'.format(i) + assert msg.data['test_grid'].array.dtype.kind == 'i' + assert msg.data['test_grid'].array.dtype.itemsize == 8 + assert msg.data['test_grid'].array[0][1] == 2 assert msg.timestamp == i * 10.0 +@skip_if_python_only def test_cpp_macro_micro(mmp_server_process_simple): # create C++ micro model # see libmuscle/cpp/src/libmuscle/tests/micro_model_test.cpp diff --git a/integration_test/test_cpp_mmp_client.py b/integration_test/test_cpp_mmp_client.py index 5b0036d7..29b31b1f 100644 --- a/integration_test/test_cpp_mmp_client.py +++ b/integration_test/test_cpp_mmp_client.py @@ -14,6 +14,8 @@ from libmuscle.mmp_client import MMPClient from libmuscle.operator import Operator +from .conftest import skip_if_python_only + def do_mmp_client_test(caplog): ymmsl_text = ( @@ -80,7 +82,6 @@ def mock_remove(name: Reference): result = subprocess.run([str(cpp_test_client)], env=env) # check that C++-side checks were successful - print(result.stderr, flush=True) assert result.returncode == 0 # check submit_log_message @@ -104,6 +105,7 @@ def mock_remove(name: Reference): server.stop() +@skip_if_python_only def test_mmp_client(log_file_in_tmpdir, caplog): process = mp.Process(target=do_mmp_client_test, args=(caplog,)) process.start() diff --git a/integration_test/test_cpp_tcp_client.py b/integration_test/test_cpp_tcp_client.py index 26ec416b..23c61f19 100644 --- a/integration_test/test_cpp_tcp_client.py +++ b/integration_test/test_cpp_tcp_client.py @@ -11,6 +11,8 @@ from ymmsl import Reference, Settings +from .conftest import skip_if_python_only + def tcp_server_process(control_pipe): control_pipe[0].close() @@ -38,6 +40,7 @@ def get_message(receiver): server.close() +@skip_if_python_only def test_cpp_tcp_client(log_file_in_tmpdir): # create server process server_pipe = mp.Pipe() diff --git a/integration_test/test_cpp_tcp_server.py b/integration_test/test_cpp_tcp_server.py index 03a343b7..cd1a4e2f 100644 --- a/integration_test/test_cpp_tcp_server.py +++ b/integration_test/test_cpp_tcp_server.py @@ -9,7 +9,10 @@ from ymmsl import Reference, Settings +from .conftest import skip_if_python_only + +@skip_if_python_only def test_cpp_tcp_server(log_file_in_tmpdir): # create C++ server # it serves a message for us to receive diff --git a/integration_test/test_fortran_macro_micro.py b/integration_test/test_fortran_macro_micro.py index 1837b986..c8f2caa1 100644 --- a/integration_test/test_fortran_macro_micro.py +++ b/integration_test/test_fortran_macro_micro.py @@ -3,9 +3,13 @@ import subprocess import sys +import numpy as np + from libmuscle import Instance, Message from ymmsl import Operator +from .conftest import skip_if_python_only + def run_macro(instance_id: str): sys.argv.append('--muscle-instance={}'.format(instance_id)) @@ -23,17 +27,28 @@ def macro(): for i in range(2): # o_i - instance.send('out', Message(i * 10.0, (i + 1) * 10.0, 'testing')) + test_array = np.array([[1.0, 2.0, 3.0], [4.0, 5.0, 6.0]]) + assert test_array.shape == (2, 3) + assert test_array.flags.c_contiguous + data = { + 'message': 'testing', + 'test_grid': test_array} + instance.send('out', Message(i * 10.0, (i + 1) * 10.0, data)) # s/b msg = instance.receive('in') - assert msg.data == 'testing back {}'.format(i) + assert msg.data['reply'] == 'testing back {}'.format(i) + assert msg.data['test_grid'].array.shape == (2, 3) + assert msg.data['test_grid'].array.flags.f_contiguous + assert (msg.data['test_grid'].array == + np.array([[1, 2, 3], [4, 5, 6]])).all() assert msg.timestamp == i * 10.0 -def test_cpp_macro_micro(mmp_server_process_simple): +@skip_if_python_only +def test_fortran_macro_micro(mmp_server_process_simple): # create C++ micro model - # see libmuscle/cpp/src/libmuscle/tests/fortran_micro_model_test.f03 + # see libmuscle/fortran/src/libmuscle/tests/fortran_micro_model_test.f03 cpp_build_dir = Path(__file__).parents[1] / 'libmuscle' / 'cpp' / 'build' lib_paths = [ cpp_build_dir / 'grpc' / 'c-ares' / 'c-ares' / 'lib', diff --git a/integration_test/test_mpi_macro_micro.py b/integration_test/test_mpi_macro_micro.py index e7ac2b01..a4ab66df 100644 --- a/integration_test/test_mpi_macro_micro.py +++ b/integration_test/test_mpi_macro_micro.py @@ -8,6 +8,8 @@ from libmuscle import Instance, Message from ymmsl import Operator +from .conftest import skip_if_python_only + def run_macro(instance_id: str): sys.argv.append('--muscle-instance={}'.format(instance_id)) @@ -33,6 +35,7 @@ def macro(): assert msg.timestamp == i * 10.0 +@skip_if_python_only def test_cpp_macro_micro(mmp_server_process_simple): # only run this if MPI is enabled if 'MUSCLE_ENABLE_MPI' not in os.environ: diff --git a/libmuscle/build/.gitignore b/libmuscle/build/.gitignore new file mode 100644 index 00000000..d6b7ef32 --- /dev/null +++ b/libmuscle/build/.gitignore @@ -0,0 +1,2 @@ +* +!.gitignore diff --git a/libmuscle/cpp/build/Makefile b/libmuscle/cpp/build/Makefile index 19524f87..6c03d710 100644 --- a/libmuscle/cpp/build/Makefile +++ b/libmuscle/cpp/build/Makefile @@ -1,6 +1,5 @@ include check_tools.make - .PHONY: all all: muscle_manager_protocol ymmsl libmuscle @@ -10,12 +9,9 @@ test: tests $(MAKE) -C libmuscle test .PHONY: install -install: all +install: all protobuf_install grpc_install msgpack_install $(MAKE) -C ymmsl install $(MAKE) -C libmuscle install - $(MAKE) -C protobuf install - $(MAKE) -C grpc install - $(MAKE) -C msgpack install .PHONY: clean clean: @@ -37,37 +33,48 @@ distclean: $(MAKE) -C ymmsl distclean $(MAKE) -C libmuscle distclean +# Find dependencies or set up build dep_name := protobuf -dep_min_version := 3.7.1 -dep_version := 3.7.1 +dep_version_constraint := = 3.10.0 +dep_version := 3.10.0 dep_pkgconfig_name := protobuf -include make_available.make - -export protobuf_ROOT # make available to grpc as well +dep_install := 1 +include $(TOOLDIR)/make_available.make dep_name := grpc -dep_min_version := 1.17.1 -dep_version := 1.17.1 -dep_pkgconfig_name := grpc -include make_available.make +dep_version_constraint := = 1.24.3 +dep_version := 1.24.3 +dep_pkgconfig_name := grpc++ +dep_install := 1 +include $(TOOLDIR)/make_available.make + +# If gRPC is available but we're building our own protobuf, then we should +# build our own gRPC as well, linked against our own protobuf, to avoid having +# two versions of protobuf in the same process. +ifeq (grpc_AVAILABLE, 1) + ifneq (protobuf_AVAILABLE, 1) + include $(TOOLDIR)/dep_build.make + endif +endif grpc: protobuf dep_name := msgpack -dep_min_version := 3.1.0 +dep_version_constraint := >= 3.1.0 dep_version := 3.2.0 dep_pkgconfig_name := msgpack -include make_available.make +dep_install := 1 +include $(TOOLDIR)/make_available.make dep_name := googletest -dep_min_version := 1.8.1 +dep_version_constraint := >= 1.8.1 dep_version := 1.8.1 dep_pkgconfig_name := gtest -include make_available.make - -export googletest_ROOT +dep_install := 0 +include $(TOOLDIR)/make_available.make +# Directories where local builds will be available DEP_DIRS := $(CURDIR)/protobuf/protobuf DEP_DIRS += $(CURDIR)/grpc/c-ares/c-ares diff --git a/libmuscle/cpp/build/check_tools.make b/libmuscle/cpp/build/check_tools.make index b3142c04..892f4dde 100644 --- a/libmuscle/cpp/build/check_tools.make +++ b/libmuscle/cpp/build/check_tools.make @@ -1,69 +1,87 @@ # Make module that verifies that we have all needed tools -$(info Checking for tools...) +$(info ) -# Check C++ compiler -ifndef CXX - _gcc_version := $(shell g++ --version || echo NOTFOUND) - ifneq ($(_gcc_version), NOTFOUND) - export CXX = g++ - $(info Found g++ version $(shell g++ --version | head -n 1)) - endif +# Check Python version +$(info Looking for Python...) +_python_version := $(shell python3 --version || echo NOTFOUND) +ifneq ($(_python_version), NOTFOUND) + $(info - Found Python version $(_python_version)) +else + $(info - Python 3 not found) endif -ifndef CXX - _clang_version := $(shell clang++ --version || echo NOTFOUND) - ifneq ($(_clang_version), NOTFOUND) - export CXX = clang++ - $(info Found clang version $(shell clang++ --version | head -n 1)) - endif -endif +# Check C++ compiler +$(info ) +$(info Looking for C++ compiler...) +tool_var := CXX +include $(TOOLDIR)/check_override.make + +tool_command := g++ +include $(TOOLDIR)/detect_tool_implicit.make +tool_command := clang++ +include $(TOOLDIR)/detect_tool_implicit.make ifndef CXX - $(error No C++ compiler found! Please install either gcc or clang.) + $(error - No C++ compiler found! Please install either gcc or clang.) else - $(info - Will compile C++ files using $(CXX); set CXX to override.) + $(info - Will compile C++ files using $(CXX).) endif +# Check MPI C++ compiler, if MPI is enabled +ifdef MUSCLE_ENABLE_MPI + $(info ) + $(info Looking for MPI C++ compiler...) + tool_var := MPICXX + include $(TOOLDIR)/check_override.make -# Check download tool (for downloading dependencies) -ifndef DOWNLOAD - _wget_version := $(shell wget --version || echo NOTFOUND) - ifneq ($(_wget_version), NOTFOUND) - export DOWNLOAD = wget - $(info Found wget version $(shell wget --version | head -n 1).) + tool_command := mpi$(CXX) + include $(TOOLDIR)/detect_tool.make + tool_command := mpic++ + include $(TOOLDIR)/detect_tool.make + + ifndef MPICXX + $(error - No MPI C++ compiler found! Maybe there's no MPI installed?) + else + $(info - Will compile MPI C++ files using $(MPICXX).) endif endif -ifndef DOWNLOAD - _curl_version := $(shell curl --version || echo NOTFOUND) - ifneq ($(_curl_version), NOTFOUND) - export DOWNLOAD = curl - $(info Found curl version $(shell curl --version | head -n 1).) - endif +# Check download tool (for downloading dependencies) +$(info ) +$(info Looking for download tool...) +tool_var := DOWNLOAD +include $(TOOLDIR)/check_override.make + +tool_command := wget +include $(TOOLDIR)/detect_tool.make +tool_command := curl +include $(TOOLDIR)/detect_tool.make + +ifeq ($(DOWNLOAD), curl) + export DOWNLOAD := curl -LO endif ifndef DOWNLOAD - $(warning Could not find either wget or curl, so I won't be able to download dependencies.) - $(warning To fix this, set DOWNLOAD to a command that can download http links.) + $(warning - Could not find either wget or curl, so I won't be able to download dependencies.) + $(warning - To fix this, install wget or curl, or set DOWNLOAD to a command that can download http links.) else - $(info - Will download files using $(DOWNLOAD); set DOWNLOAD to override.) + $(info - Will download files using $(DOWNLOAD).) endif - # Check tar tool (for unpacking dependencies) -ifndef TAR - _tar_version := $(shell tar --version || echo NOTFOUND) - ifneq ($(_tar_version), NOTFOUND) - export TAR = tar - $(info Found tar version $(shell tar --version | head -n 1).) - endif -endif +$(info ) +$(info Looking for tar...) +tool_var := TAR +include $(TOOLDIR)/check_override.make + +tool_command := tar +include $(TOOLDIR)/detect_tool.make ifndef TAR - $(warning Could not find tar, so I won't be able to download dependencies.) - $(warning To fix this, set TAR to a command that can extract tar archives.) + $(warning - Could not find tar, so I won't be able to unpack dependencies.) + $(warning - To fix this, set TAR to a command that can extract tar archives.) else - $(info - Will extract archives using $(TAR); set TAR to override.) + $(info - Will extract archives using $(TAR).) endif # Check number of cores @@ -71,5 +89,6 @@ ifndef NCORES NCORES := $(shell nproc 2>/dev/null || echo 2) export NCORES endif +$(info ) $(info Using $(NCORES) cores to build; set NCORES to override.) - +$(info ) diff --git a/libmuscle/cpp/build/grpc/.gitignore b/libmuscle/cpp/build/grpc/.gitignore index a42e8976..72628665 100644 --- a/libmuscle/cpp/build/grpc/.gitignore +++ b/libmuscle/cpp/build/grpc/.gitignore @@ -1,6 +1,7 @@ * !.gitignore !Makefile +!grpc_issue_14844.patch !/c-ares !/zlib !/protobuf diff --git a/libmuscle/cpp/build/grpc/Makefile b/libmuscle/cpp/build/grpc/Makefile index 36cfb9fc..5c688488 100644 --- a/libmuscle/cpp/build/grpc/Makefile +++ b/libmuscle/cpp/build/grpc/Makefile @@ -3,16 +3,10 @@ all: grpc @echo .PHONY: install -ifdef grpc_VERSION -install: grpc - $(MAKE) -C c-ares install - $(MAKE) -C zlib install - $(MAKE) -C openssl install - mkdir -p $(PREFIX)/lib - cp -ra grpc/lib/* $(PREFIX)/lib/ -else -install: -endif +install: all c-ares_install zlib_install openssl_install + @echo 'Installing grpc...' + mkdir -p $(PREFIX) + cp -ra grpc/* $(PREFIX)/ .PHONY: clean clean: @@ -31,28 +25,32 @@ distclean: clean dep_name := c-ares -dep_min_version := 1.11.0 +dep_version_constraint := >= 1.11.0 dep_version := 1.15.0 dep_pkgconfig_name := libcares -include ../make_available.make +dep_install := 1 +include $(TOOLDIR)/make_available.make dep_name := zlib -dep_min_version := 1.2 +dep_version_constraint := >= 1.2 dep_version := 1.2.11 dep_pkgconfig_name := zlib -include ../make_available.make +dep_install := 1 +include $(TOOLDIR)/make_available.make dep_name := openssl -dep_min_version := 1.0.2 -dep_version := 1.1.1c +dep_version_constraint := >= 1.0.2 +dep_version := 1.1.1f dep_pkgconfig_name := openssl -include ../make_available.make +dep_install := 1 +include $(TOOLDIR)/make_available.make v$(grpc_VERSION).tar.gz: $(DOWNLOAD) https://github.com/grpc/grpc/archive/v$(grpc_VERSION).tar.gz grpc-$(grpc_VERSION): v$(grpc_VERSION).tar.gz $(TAR) xf v$(grpc_VERSION).tar.gz + patch -p0 $@ + @echo 'exec_prefix=$${prefix}' >>$@ + @echo 'includedir=$${prefix}/include' >>$@ + @echo 'libdir=$${exec_prefix}/lib' >>$@ + @echo >>$@ + @echo 'Name: libmuscle for C++' >>$@ + @echo 'Description: Library for MUSCLE 3' >>$@ + @echo 'URL: https://muscle3.readthedocs.io' >>$@ + @echo 'Version: $(muscle_version)' >>$@ + @echo 'Requires.private: grpc++ >= 1.24.3, protobuf >= 3.10.0, msgpack >= 3.1.0' >>$@ + @echo 'Cflags: -I$${includedir}' >>$@ + @echo 'Libs: -L$${libdir} -lymmsl -lmuscle' >>$@ + +libmuscle_mpi.pc: + @echo 'prefix=$(PREFIX)' >$@ + @echo 'exec_prefix=$${prefix}' >>$@ + @echo 'includedir=$${prefix}/include' >>$@ + @echo 'libdir=$${exec_prefix}/lib' >>$@ + @echo >>$@ + @echo 'Name: libmuscle for C++ and MPI' >>$@ + @echo 'Description: Library for MUSCLE 3' >>$@ + @echo 'URL: https://muscle3.readthedocs.io' >>$@ + @echo 'Version: $(muscle_version)' >>$@ + @echo 'Requires.private: grpc++ >= 1.24.3, protobuf >= 3.10.0, msgpack >= 3.1.0' >>$@ + @echo 'Cflags: -I$${includedir} -DMUSCLE_ENABLE_MPI' >>$@ + @echo 'Libs: -L$${libdir} -lymmsl -lmuscle_mpi' >>$@ + diff --git a/libmuscle/cpp/build/libmuscle/libmuscle.version b/libmuscle/cpp/build/libmuscle/libmuscle.version index e5f8079c..fef68798 100644 --- a/libmuscle/cpp/build/libmuscle/libmuscle.version +++ b/libmuscle/cpp/build/libmuscle/libmuscle.version @@ -51,6 +51,16 @@ "libmuscle::impl::DataConstRef::DataConstRef(double)"; "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::SettingValue const&)"; "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::Settings const&)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(bool const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(bool const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(double const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(double const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(float const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(float const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(int const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(int const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(long const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(long const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; "libmuscle::impl::DataConstRef::reseat(libmuscle::impl::DataConstRef const&)"; "libmuscle::impl::DataConstRef::size() const"; "bool libmuscle::impl::DataConstRef::is_a() const"; @@ -72,6 +82,11 @@ "bool libmuscle::impl::DataConstRef::is_a() const"; "libmuscle::impl::DataConstRef::is_a_dict() const"; "libmuscle::impl::DataConstRef::is_a_list() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; "libmuscle::impl::DataConstRef::is_a_byte_array() const"; "libmuscle::impl::DataConstRef::is_nil() const"; "libmuscle::impl::DataConstRef::as_byte_array() const"; @@ -82,7 +97,26 @@ "libmuscle::impl::DataConstRef::operator[](std::string const&) const"; "libmuscle::impl::DataConstRef::key(unsigned long) const"; "libmuscle::impl::DataConstRef::value(unsigned long) const"; + "bool const* libmuscle::impl::DataConstRef::elements() const"; + "double const* libmuscle::impl::DataConstRef::elements() const"; + "float const* libmuscle::impl::DataConstRef::elements() const"; + "int const* libmuscle::impl::DataConstRef::elements() const"; + "long const* libmuscle::impl::DataConstRef::elements() const"; + "libmuscle::impl::DataConstRef::has_indexes() const"; + "libmuscle::impl::DataConstRef::indexes[abi:cxx11]() const"; + "libmuscle::impl::DataConstRef::shape() const"; + "libmuscle::impl::DataConstRef::storage_order() const"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(bool const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(bool const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(double const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(double const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(float const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(float const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(int const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(int const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(long const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(long const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; "libmuscle::impl::Data::byte_array(char const*, unsigned int)"; "libmuscle::impl::Data::byte_array(unsigned int)"; "libmuscle::impl::Data::dict()"; @@ -106,6 +140,16 @@ LIBMUSCLE_DataConstRef_create_real8_; LIBMUSCLE_DataConstRef_create_settings_; LIBMUSCLE_DataConstRef_create_copy_; + LIBMUSCLE_DataConstRef_create_grid_logical_a_; + LIBMUSCLE_DataConstRef_create_grid_int4_a_; + LIBMUSCLE_DataConstRef_create_grid_int8_a_; + LIBMUSCLE_DataConstRef_create_grid_real4_a_; + LIBMUSCLE_DataConstRef_create_grid_real8_a_; + LIBMUSCLE_DataConstRef_create_grid_logical_n_; + LIBMUSCLE_DataConstRef_create_grid_int4_n_; + LIBMUSCLE_DataConstRef_create_grid_int8_n_; + LIBMUSCLE_DataConstRef_create_grid_real4_n_; + LIBMUSCLE_DataConstRef_create_grid_real8_n_; LIBMUSCLE_DataConstRef_free_; LIBMUSCLE_DataConstRef_is_a_logical_; LIBMUSCLE_DataConstRef_is_a_character_; @@ -118,6 +162,11 @@ LIBMUSCLE_DataConstRef_is_a_real8_; LIBMUSCLE_DataConstRef_is_a_dict_; LIBMUSCLE_DataConstRef_is_a_list_; + LIBMUSCLE_DataConstRef_is_a_grid_of_logical_; + LIBMUSCLE_DataConstRef_is_a_grid_of_real4_; + LIBMUSCLE_DataConstRef_is_a_grid_of_real8_; + LIBMUSCLE_DataConstRef_is_a_grid_of_int4_; + LIBMUSCLE_DataConstRef_is_a_grid_of_int8_; LIBMUSCLE_DataConstRef_is_a_byte_array_; LIBMUSCLE_DataConstRef_is_nil_; LIBMUSCLE_DataConstRef_is_a_settings_; @@ -135,6 +184,15 @@ LIBMUSCLE_DataConstRef_as_byte_array_; LIBMUSCLE_DataConstRef_get_item_by_key_; LIBMUSCLE_DataConstRef_get_item_by_index_; + LIBMUSCLE_DataConstRef_num_dims_; + LIBMUSCLE_DataConstRef_shape_; + LIBMUSCLE_DataConstRef_elements_logical_; + LIBMUSCLE_DataConstRef_elements_int4_; + LIBMUSCLE_DataConstRef_elements_int8_; + LIBMUSCLE_DataConstRef_elements_real4_; + LIBMUSCLE_DataConstRef_elements_real8_; + LIBMUSCLE_DataConstRef_has_indexes_; + LIBMUSCLE_DataConstRef_index_; LIBMUSCLE_Data_create_nil_; LIBMUSCLE_Data_create_logical_; LIBMUSCLE_Data_create_character_; @@ -146,6 +204,16 @@ LIBMUSCLE_Data_create_real8_; LIBMUSCLE_Data_create_settings_; LIBMUSCLE_Data_create_copy_; + LIBMUSCLE_Data_create_grid_logical_a_; + LIBMUSCLE_Data_create_grid_int4_a_; + LIBMUSCLE_Data_create_grid_int8_a_; + LIBMUSCLE_Data_create_grid_real4_a_; + LIBMUSCLE_Data_create_grid_real8_a_; + LIBMUSCLE_Data_create_grid_logical_n_; + LIBMUSCLE_Data_create_grid_int4_n_; + LIBMUSCLE_Data_create_grid_int8_n_; + LIBMUSCLE_Data_create_grid_real4_n_; + LIBMUSCLE_Data_create_grid_real8_n_; LIBMUSCLE_Data_free_; LIBMUSCLE_Data_is_a_logical_; LIBMUSCLE_Data_is_a_character_; @@ -158,6 +226,11 @@ LIBMUSCLE_Data_is_a_real8_; LIBMUSCLE_Data_is_a_dict_; LIBMUSCLE_Data_is_a_list_; + LIBMUSCLE_Data_is_a_grid_of_logical_; + LIBMUSCLE_Data_is_a_grid_of_real4_; + LIBMUSCLE_Data_is_a_grid_of_real8_; + LIBMUSCLE_Data_is_a_grid_of_int4_; + LIBMUSCLE_Data_is_a_grid_of_int8_; LIBMUSCLE_Data_is_a_byte_array_; LIBMUSCLE_Data_is_nil_; LIBMUSCLE_Data_is_a_settings_; @@ -175,6 +248,15 @@ LIBMUSCLE_Data_as_byte_array_; LIBMUSCLE_Data_get_item_by_key_; LIBMUSCLE_Data_get_item_by_index_; + LIBMUSCLE_Data_num_dims_; + LIBMUSCLE_Data_shape_; + LIBMUSCLE_Data_elements_logical_; + LIBMUSCLE_Data_elements_int4_; + LIBMUSCLE_Data_elements_int8_; + LIBMUSCLE_Data_elements_real4_; + LIBMUSCLE_Data_elements_real8_; + LIBMUSCLE_Data_has_indexes_; + LIBMUSCLE_Data_index_; LIBMUSCLE_Data_create_dict_; LIBMUSCLE_Data_create_list_; LIBMUSCLE_Data_create_nils_; diff --git a/libmuscle/cpp/build/libmuscle/libmuscle.version.in b/libmuscle/cpp/build/libmuscle/libmuscle.version.in index 09f9635f..5163da10 100644 --- a/libmuscle/cpp/build/libmuscle/libmuscle.version.in +++ b/libmuscle/cpp/build/libmuscle/libmuscle.version.in @@ -51,6 +51,16 @@ "libmuscle::impl::DataConstRef::DataConstRef(double)"; "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::SettingValue const&)"; "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::Settings const&)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(bool const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(bool const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(double const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(double const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(float const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(float const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(int const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(int const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(long const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(long const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; "libmuscle::impl::DataConstRef::reseat(libmuscle::impl::DataConstRef const&)"; "libmuscle::impl::DataConstRef::size() const"; "bool libmuscle::impl::DataConstRef::is_a() const"; @@ -72,6 +82,11 @@ "bool libmuscle::impl::DataConstRef::is_a() const"; "libmuscle::impl::DataConstRef::is_a_dict() const"; "libmuscle::impl::DataConstRef::is_a_list() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; "libmuscle::impl::DataConstRef::is_a_byte_array() const"; "libmuscle::impl::DataConstRef::is_nil() const"; "libmuscle::impl::DataConstRef::as_byte_array() const"; @@ -82,7 +97,26 @@ "libmuscle::impl::DataConstRef::operator[](std::string const&) const"; "libmuscle::impl::DataConstRef::key(unsigned long) const"; "libmuscle::impl::DataConstRef::value(unsigned long) const"; + "bool const* libmuscle::impl::DataConstRef::elements() const"; + "double const* libmuscle::impl::DataConstRef::elements() const"; + "float const* libmuscle::impl::DataConstRef::elements() const"; + "int const* libmuscle::impl::DataConstRef::elements() const"; + "long const* libmuscle::impl::DataConstRef::elements() const"; + "libmuscle::impl::DataConstRef::has_indexes() const"; + "libmuscle::impl::DataConstRef::indexes[abi:cxx11]() const"; + "libmuscle::impl::DataConstRef::shape() const"; + "libmuscle::impl::DataConstRef::storage_order() const"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(bool const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(bool const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(double const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(double const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(float const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(float const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(int const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(int const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(long const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(long const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; "libmuscle::impl::Data::byte_array(char const*, unsigned int)"; "libmuscle::impl::Data::byte_array(unsigned int)"; "libmuscle::impl::Data::dict()"; diff --git a/libmuscle/cpp/build/libmuscle/libmuscle_mpi.version b/libmuscle/cpp/build/libmuscle/libmuscle_mpi.version new file mode 100644 index 00000000..fa6c204a --- /dev/null +++ b/libmuscle/cpp/build/libmuscle/libmuscle_mpi.version @@ -0,0 +1,358 @@ +{ + global: + extern "C++" { + libmuscle::impl::Instance::Instance*; + "libmuscle::impl::Instance::~Instance()"; + libmuscle::impl::Instance::reuse_instance*; + libmuscle::impl::Instance::error_shutdown*; + libmuscle::impl::Instance::set_port_length*; + libmuscle::impl::Instance::get_port_length*; + libmuscle::impl::Instance::is_connected*; + libmuscle::impl::Instance::is_resizable*; + libmuscle::impl::Instance::is_vector_port*; + libmuscle::impl::Instance::list_ports*; + libmuscle::impl::Instance::get_setting*; + "bool libmuscle::impl::Instance::get_setting_as(std::__cxx11::basic_string, std::allocator > const&) const"; + "bool libmuscle::impl::Instance::get_setting_as(std::string const&) const"; + "int64_t libmuscle::impl::Instance::get_setting_as(std::__cxx11::basic_string, std::allocator > const&) const"; + "int64_t libmuscle::impl::Instance::get_setting_as(std::string const&) const"; + "int libmuscle::impl::Instance::get_setting_as(std::__cxx11::basic_string, std::allocator > const&) const"; + "int libmuscle::impl::Instance::get_setting_as(std::string const&) const"; + "long libmuscle::impl::Instance::get_setting_as(std::__cxx11::basic_string, std::allocator > const&) const"; + "long libmuscle::impl::Instance::get_setting_as(std::string const&) const"; + "long long libmuscle::impl::Instance::get_setting_as(std::__cxx11::basic_string, std::allocator > const&) const"; + "long long libmuscle::impl::Instance::get_setting_as(std::string const&) const"; + "double libmuscle::impl::Instance::get_setting_as(std::__cxx11::basic_string, std::allocator > const&) const"; + "double libmuscle::impl::Instance::get_setting_as(std::string const&) const"; + "std::__cxx11::basic_string, std::allocator > libmuscle::impl::Instance::get_setting_as, std::allocator > >(std::__cxx11::basic_string, std::allocator > const&) const"; + "std::string libmuscle::impl::Instance::get_setting_as(std::string const&) const"; + "std::vector > libmuscle::impl::Instance::get_setting_as > >(std::__cxx11::basic_string, std::allocator > const&) const"; + "std::vector > libmuscle::impl::Instance::get_setting_as > >(std::string const&) const"; + "std::vector >, std::allocator > > > libmuscle::impl::Instance::get_setting_as >, std::allocator > > > >(std::__cxx11::basic_string, std::allocator > const&) const"; + "std::vector >, std::allocator > > > libmuscle::impl::Instance::get_setting_as >, std::allocator > > > >(std::string const&) const"; + libmuscle::impl::Instance::receive_with_settings*; + libmuscle::impl::Instance::receive*; + libmuscle::impl::Instance::send*; + + libmuscle::impl::Message::*; + + "libmuscle::impl::DataConstRef::DataConstRef()"; + "libmuscle::impl::DataConstRef::DataConstRef(bool)"; + "libmuscle::impl::DataConstRef::DataConstRef(char const*)"; + "libmuscle::impl::DataConstRef::DataConstRef(std::__cxx11::basic_string, std::allocator > const&)"; + "libmuscle::impl::DataConstRef::DataConstRef(std::string const&)"; + "libmuscle::impl::DataConstRef::DataConstRef(int)"; + "libmuscle::impl::DataConstRef::DataConstRef(long)"; + "libmuscle::impl::DataConstRef::DataConstRef(long long)"; + "libmuscle::impl::DataConstRef::DataConstRef(unsigned int)"; + "libmuscle::impl::DataConstRef::DataConstRef(unsigned long)"; + "libmuscle::impl::DataConstRef::DataConstRef(unsigned long long)"; + "libmuscle::impl::DataConstRef::DataConstRef(float)"; + "libmuscle::impl::DataConstRef::DataConstRef(double)"; + "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::SettingValue const&)"; + "libmuscle::impl::DataConstRef::DataConstRef(ymmsl::impl::Settings const&)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(bool const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(bool const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(double const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(double const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(float const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(float const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(int const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(int const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(long const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef libmuscle::impl::DataConstRef::grid(long const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::DataConstRef::reseat(libmuscle::impl::DataConstRef const&)"; + "libmuscle::impl::DataConstRef::size() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a, std::allocator > >() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "bool libmuscle::impl::DataConstRef::is_a() const"; + "libmuscle::impl::DataConstRef::is_a_dict() const"; + "libmuscle::impl::DataConstRef::is_a_list() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "bool libmuscle::impl::DataConstRef::is_a_grid_of() const"; + "libmuscle::impl::DataConstRef::is_a_byte_array() const"; + "libmuscle::impl::DataConstRef::is_nil() const"; + "libmuscle::impl::DataConstRef::as_byte_array() const"; + "ymmsl::impl::SettingValue libmuscle::impl::DataConstRef::as() const"; + "ymmsl::impl::Settings libmuscle::impl::DataConstRef::as() const"; + "libmuscle::impl::DataConstRef::operator[](unsigned long) const"; + "libmuscle::impl::DataConstRef::operator[](std::__cxx11::basic_string, std::allocator > const&) const"; + "libmuscle::impl::DataConstRef::operator[](std::string const&) const"; + "libmuscle::impl::DataConstRef::key(unsigned long) const"; + "libmuscle::impl::DataConstRef::value(unsigned long) const"; + "bool const* libmuscle::impl::DataConstRef::elements() const"; + "double const* libmuscle::impl::DataConstRef::elements() const"; + "float const* libmuscle::impl::DataConstRef::elements() const"; + "int const* libmuscle::impl::DataConstRef::elements() const"; + "long const* libmuscle::impl::DataConstRef::elements() const"; + "libmuscle::impl::DataConstRef::has_indexes() const"; + "libmuscle::impl::DataConstRef::indexes[abi:cxx11]() const"; + "libmuscle::impl::DataConstRef::shape() const"; + "libmuscle::impl::DataConstRef::storage_order() const"; + + "libmuscle::impl::Data libmuscle::impl::Data::grid(bool const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(bool const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(double const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(double const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(float const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(float const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(int const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(int const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(long const*, std::vector > const&, std::vector, std::allocator >, std::allocator, std::allocator > > > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data libmuscle::impl::Data::grid(long const*, std::vector > const&, std::vector > const&, libmuscle::impl::StorageOrder)"; + "libmuscle::impl::Data::byte_array(char const*, unsigned int)"; + "libmuscle::impl::Data::byte_array(unsigned int)"; + "libmuscle::impl::Data::dict()"; + "libmuscle::impl::Data::list()"; + "libmuscle::impl::Data::nils(unsigned long)"; + "libmuscle::impl::Data::operator=(libmuscle::impl::Data const&)"; + "libmuscle::impl::Data::operator[](unsigned long)"; + "libmuscle::impl::Data::operator[](std::__cxx11::basic_string, std::allocator > const&)"; + "libmuscle::impl::Data::operator[](std::string const&)"; + "libmuscle::impl::Data::as_byte_array()"; + }; + + LIBMUSCLE_DataConstRef_create_nil_; + LIBMUSCLE_DataConstRef_create_logical_; + LIBMUSCLE_DataConstRef_create_character_; + LIBMUSCLE_DataConstRef_create_int1_; + LIBMUSCLE_DataConstRef_create_int2_; + LIBMUSCLE_DataConstRef_create_int4_; + LIBMUSCLE_DataConstRef_create_int8_; + LIBMUSCLE_DataConstRef_create_real4_; + LIBMUSCLE_DataConstRef_create_real8_; + LIBMUSCLE_DataConstRef_create_settings_; + LIBMUSCLE_DataConstRef_create_copy_; + LIBMUSCLE_DataConstRef_create_grid_logical_a_; + LIBMUSCLE_DataConstRef_create_grid_int4_a_; + LIBMUSCLE_DataConstRef_create_grid_int8_a_; + LIBMUSCLE_DataConstRef_create_grid_real4_a_; + LIBMUSCLE_DataConstRef_create_grid_real8_a_; + LIBMUSCLE_DataConstRef_create_grid_logical_n_; + LIBMUSCLE_DataConstRef_create_grid_int4_n_; + LIBMUSCLE_DataConstRef_create_grid_int8_n_; + LIBMUSCLE_DataConstRef_create_grid_real4_n_; + LIBMUSCLE_DataConstRef_create_grid_real8_n_; + LIBMUSCLE_DataConstRef_free_; + LIBMUSCLE_DataConstRef_is_a_logical_; + LIBMUSCLE_DataConstRef_is_a_character_; + LIBMUSCLE_DataConstRef_is_a_int_; + LIBMUSCLE_DataConstRef_is_a_int1_; + LIBMUSCLE_DataConstRef_is_a_int2_; + LIBMUSCLE_DataConstRef_is_a_int4_; + LIBMUSCLE_DataConstRef_is_a_int8_; + LIBMUSCLE_DataConstRef_is_a_real4_; + LIBMUSCLE_DataConstRef_is_a_real8_; + LIBMUSCLE_DataConstRef_is_a_dict_; + LIBMUSCLE_DataConstRef_is_a_list_; + LIBMUSCLE_DataConstRef_is_a_grid_of_logical_; + LIBMUSCLE_DataConstRef_is_a_grid_of_real4_; + LIBMUSCLE_DataConstRef_is_a_grid_of_real8_; + LIBMUSCLE_DataConstRef_is_a_grid_of_int4_; + LIBMUSCLE_DataConstRef_is_a_grid_of_int8_; + LIBMUSCLE_DataConstRef_is_a_byte_array_; + LIBMUSCLE_DataConstRef_is_nil_; + LIBMUSCLE_DataConstRef_is_a_settings_; + LIBMUSCLE_DataConstRef_size_; + LIBMUSCLE_DataConstRef_as_logical_; + LIBMUSCLE_DataConstRef_as_character_; + LIBMUSCLE_DataConstRef_as_int_; + LIBMUSCLE_DataConstRef_as_int1_; + LIBMUSCLE_DataConstRef_as_int2_; + LIBMUSCLE_DataConstRef_as_int4_; + LIBMUSCLE_DataConstRef_as_int8_; + LIBMUSCLE_DataConstRef_as_real4_; + LIBMUSCLE_DataConstRef_as_real8_; + LIBMUSCLE_DataConstRef_as_settings_; + LIBMUSCLE_DataConstRef_as_byte_array_; + LIBMUSCLE_DataConstRef_get_item_by_key_; + LIBMUSCLE_DataConstRef_get_item_by_index_; + LIBMUSCLE_DataConstRef_num_dims_; + LIBMUSCLE_DataConstRef_shape_; + LIBMUSCLE_DataConstRef_elements_logical_; + LIBMUSCLE_DataConstRef_elements_int4_; + LIBMUSCLE_DataConstRef_elements_int8_; + LIBMUSCLE_DataConstRef_elements_real4_; + LIBMUSCLE_DataConstRef_elements_real8_; + LIBMUSCLE_DataConstRef_has_indexes_; + LIBMUSCLE_DataConstRef_index_; + LIBMUSCLE_Data_create_nil_; + LIBMUSCLE_Data_create_logical_; + LIBMUSCLE_Data_create_character_; + LIBMUSCLE_Data_create_int1_; + LIBMUSCLE_Data_create_int2_; + LIBMUSCLE_Data_create_int4_; + LIBMUSCLE_Data_create_int8_; + LIBMUSCLE_Data_create_real4_; + LIBMUSCLE_Data_create_real8_; + LIBMUSCLE_Data_create_settings_; + LIBMUSCLE_Data_create_copy_; + LIBMUSCLE_Data_create_grid_logical_a_; + LIBMUSCLE_Data_create_grid_int4_a_; + LIBMUSCLE_Data_create_grid_int8_a_; + LIBMUSCLE_Data_create_grid_real4_a_; + LIBMUSCLE_Data_create_grid_real8_a_; + LIBMUSCLE_Data_create_grid_logical_n_; + LIBMUSCLE_Data_create_grid_int4_n_; + LIBMUSCLE_Data_create_grid_int8_n_; + LIBMUSCLE_Data_create_grid_real4_n_; + LIBMUSCLE_Data_create_grid_real8_n_; + LIBMUSCLE_Data_free_; + LIBMUSCLE_Data_is_a_logical_; + LIBMUSCLE_Data_is_a_character_; + LIBMUSCLE_Data_is_a_int_; + LIBMUSCLE_Data_is_a_int1_; + LIBMUSCLE_Data_is_a_int2_; + LIBMUSCLE_Data_is_a_int4_; + LIBMUSCLE_Data_is_a_int8_; + LIBMUSCLE_Data_is_a_real4_; + LIBMUSCLE_Data_is_a_real8_; + LIBMUSCLE_Data_is_a_dict_; + LIBMUSCLE_Data_is_a_list_; + LIBMUSCLE_Data_is_a_grid_of_logical_; + LIBMUSCLE_Data_is_a_grid_of_real4_; + LIBMUSCLE_Data_is_a_grid_of_real8_; + LIBMUSCLE_Data_is_a_grid_of_int4_; + LIBMUSCLE_Data_is_a_grid_of_int8_; + LIBMUSCLE_Data_is_a_byte_array_; + LIBMUSCLE_Data_is_nil_; + LIBMUSCLE_Data_is_a_settings_; + LIBMUSCLE_Data_size_; + LIBMUSCLE_Data_as_logical_; + LIBMUSCLE_Data_as_character_; + LIBMUSCLE_Data_as_int_; + LIBMUSCLE_Data_as_int1_; + LIBMUSCLE_Data_as_int2_; + LIBMUSCLE_Data_as_int4_; + LIBMUSCLE_Data_as_int8_; + LIBMUSCLE_Data_as_real4_; + LIBMUSCLE_Data_as_real8_; + LIBMUSCLE_Data_as_settings_; + LIBMUSCLE_Data_as_byte_array_; + LIBMUSCLE_Data_get_item_by_key_; + LIBMUSCLE_Data_get_item_by_index_; + LIBMUSCLE_Data_num_dims_; + LIBMUSCLE_Data_shape_; + LIBMUSCLE_Data_elements_logical_; + LIBMUSCLE_Data_elements_int4_; + LIBMUSCLE_Data_elements_int8_; + LIBMUSCLE_Data_elements_real4_; + LIBMUSCLE_Data_elements_real8_; + LIBMUSCLE_Data_has_indexes_; + LIBMUSCLE_Data_index_; + LIBMUSCLE_Data_create_dict_; + LIBMUSCLE_Data_create_list_; + LIBMUSCLE_Data_create_nils_; + LIBMUSCLE_Data_create_byte_array_empty_; + LIBMUSCLE_Data_create_byte_array_from_buf_; + LIBMUSCLE_Data_set_logical_; + LIBMUSCLE_Data_set_character_; + LIBMUSCLE_Data_set_int1_; + LIBMUSCLE_Data_set_int2_; + LIBMUSCLE_Data_set_int4_; + LIBMUSCLE_Data_set_int8_; + LIBMUSCLE_Data_set_real4_; + LIBMUSCLE_Data_set_real8_; + LIBMUSCLE_Data_set_data_; + LIBMUSCLE_Data_set_nil_; + LIBMUSCLE_Data_set_item_key_logical_; + LIBMUSCLE_Data_set_item_key_character_; + LIBMUSCLE_Data_set_item_key_int1_; + LIBMUSCLE_Data_set_item_key_int2_; + LIBMUSCLE_Data_set_item_key_int4_; + LIBMUSCLE_Data_set_item_key_int8_; + LIBMUSCLE_Data_set_item_key_real4_; + LIBMUSCLE_Data_set_item_key_real8_; + LIBMUSCLE_Data_set_item_key_data_; + LIBMUSCLE_Data_set_item_index_logical_; + LIBMUSCLE_Data_set_item_index_character_; + LIBMUSCLE_Data_set_item_index_int1_; + LIBMUSCLE_Data_set_item_index_int2_; + LIBMUSCLE_Data_set_item_index_int4_; + LIBMUSCLE_Data_set_item_index_int8_; + LIBMUSCLE_Data_set_item_index_real4_; + LIBMUSCLE_Data_set_item_index_real8_; + LIBMUSCLE_Data_set_item_index_data_; + LIBMUSCLE_Data_key_; + LIBMUSCLE_Data_value_; + LIBMUSCLE_PortsDescription_create_; + LIBMUSCLE_PortsDescription_free_; + LIBMUSCLE_PortsDescription_add_; + LIBMUSCLE_PortsDescription_num_ports_; + LIBMUSCLE_PortsDescription_get_; + LIBMUSCLE_Message_create_td_; + LIBMUSCLE_Message_create_tnd_; + LIBMUSCLE_Message_create_tds_; + LIBMUSCLE_Message_create_tnds_; + LIBMUSCLE_Message_free_; + LIBMUSCLE_Message_timestamp_; + LIBMUSCLE_Message_set_timestamp_; + LIBMUSCLE_Message_has_next_timestamp_; + LIBMUSCLE_Message_next_timestamp_; + LIBMUSCLE_Message_set_next_timestamp_; + LIBMUSCLE_Message_unset_next_timestamp_; + LIBMUSCLE_Message_get_data_; + LIBMUSCLE_Message_set_data_d_; + LIBMUSCLE_Message_set_data_dcr_; + LIBMUSCLE_Message_has_settings_; + LIBMUSCLE_Message_get_settings_; + LIBMUSCLE_Message_set_settings_; + LIBMUSCLE_Message_unset_settings_; + LIBMUSCLE_Instance_create_autoports_cr_; + LIBMUSCLE_Instance_create_with_ports_cr_; + LIBMUSCLE_Instance_free_; + LIBMUSCLE_Instance_reuse_instance_default_; + LIBMUSCLE_Instance_reuse_instance_apply_; + LIBMUSCLE_Instance_error_shutdown_; + LIBMUSCLE_Instance_is_setting_a_character_; + LIBMUSCLE_Instance_is_setting_a_int8_; + LIBMUSCLE_Instance_is_setting_a_real8_; + LIBMUSCLE_Instance_is_setting_a_logical_; + LIBMUSCLE_Instance_is_setting_a_real8array_; + LIBMUSCLE_Instance_is_setting_a_real8array2_; + LIBMUSCLE_Instance_get_setting_as_character_; + LIBMUSCLE_Instance_get_setting_as_int8_; + LIBMUSCLE_Instance_get_setting_as_real8_; + LIBMUSCLE_Instance_get_setting_as_logical_; + LIBMUSCLE_Instance_get_setting_as_real8array_; + LIBMUSCLE_Instance_get_setting_as_real8array2_; + LIBMUSCLE_Instance_list_ports_; + LIBMUSCLE_Instance_is_connected_; + LIBMUSCLE_Instance_is_vector_port_; + LIBMUSCLE_Instance_is_resizable_; + LIBMUSCLE_Instance_get_port_length_; + LIBMUSCLE_Instance_set_port_length_; + LIBMUSCLE_Instance_send_pm_; + LIBMUSCLE_Instance_send_pms_; + LIBMUSCLE_Instance_receive_p_; + LIBMUSCLE_Instance_receive_pd_; + LIBMUSCLE_Instance_receive_ps_; + LIBMUSCLE_Instance_receive_psd_; + LIBMUSCLE_Instance_receive_with_settings_p_; + LIBMUSCLE_Instance_receive_with_settings_pd_; + LIBMUSCLE_Instance_receive_with_settings_ps_; + LIBMUSCLE_Instance_receive_with_settings_psd_; + LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_; + LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_; + LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_; + + local: *; +}; + diff --git a/libmuscle/cpp/build/msgpack/Makefile b/libmuscle/cpp/build/msgpack/Makefile index c9e5edef..2e3a817c 100644 --- a/libmuscle/cpp/build/msgpack/Makefile +++ b/libmuscle/cpp/build/msgpack/Makefile @@ -2,15 +2,11 @@ all: msgpack .PHONY: install -ifdef msgpack_VERSION install: msgpack mkdir -p $(PREFIX)/lib cp -ra msgpack/lib/* $(PREFIX)/lib/ mkdir -p $(PREFIX)/include cp -ra msgpack/include/* $(PREFIX)/include/ -else -install: -endif .PHONY: clean clean: @@ -22,10 +18,11 @@ distclean: clean rm -rf msgpack dep_name := zlib -dep_min_version := 1.2 +dep_version_constraint := >= 1.2 dep_version := 1.2.11 dep_pkgconfig_name := zlib -include ../make_available.make +dep_install := 1 +include $(TOOLDIR)/make_available.make msgpack-$(msgpack_VERSION).tar.gz: diff --git a/libmuscle/cpp/build/protobuf/Makefile b/libmuscle/cpp/build/protobuf/Makefile index 1f4c80d0..d5d228b1 100644 --- a/libmuscle/cpp/build/protobuf/Makefile +++ b/libmuscle/cpp/build/protobuf/Makefile @@ -2,13 +2,9 @@ all: protobuf .PHONY: install -ifdef protobuf_VERSION install: protobuf mkdir -p $(PREFIX)/lib - cp -ra protobuf/lib/* $(PREFIX)/lib/ -else -install: -endif + cp -ra protobuf/* $(PREFIX)/ .PHONY: clean clean: diff --git a/libmuscle/cpp/src/libmuscle/bindings/libmuscle_fortran_c.cpp b/libmuscle/cpp/src/libmuscle/bindings/libmuscle_fortran_c.cpp index 878d85cd..1ed5ea5d 100644 --- a/libmuscle/cpp/src/libmuscle/bindings/libmuscle_fortran_c.cpp +++ b/libmuscle/cpp/src/libmuscle/bindings/libmuscle_fortran_c.cpp @@ -26,8 +26,8 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_nil_() { return reinterpret_cast(result); } -std::intptr_t LIBMUSCLE_DataConstRef_create_logical_(int value) { - DataConstRef * result = new DataConstRef(value != 0); +std::intptr_t LIBMUSCLE_DataConstRef_create_logical_(bool value) { + DataConstRef * result = new DataConstRef(value); return reinterpret_cast(result); } @@ -79,94 +79,349 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_copy_(std::intptr_t value) { return reinterpret_cast(result); } +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_n_( + bool * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_n_( + int32_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_n_( + int64_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_n_( + float * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_n_( + double * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + void LIBMUSCLE_DataConstRef_free_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); delete self_p; return; } -int LIBMUSCLE_DataConstRef_is_a_logical_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_logical_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_character_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_character_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int1_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int1_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int2_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int2_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int4_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int4_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int8_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int8_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_real4_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_real4_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_real8_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_real8_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_dict_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_dict_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a_dict(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_list_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_list_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a_list(); - return result ? 1 : 0; + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_logical_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_real4_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_real8_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_int4_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_int8_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; } -int LIBMUSCLE_DataConstRef_is_a_byte_array_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_byte_array_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a_byte_array(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_nil_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_nil_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_nil(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_settings_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_settings_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } std::size_t LIBMUSCLE_DataConstRef_size_(std::intptr_t self) { @@ -175,12 +430,12 @@ std::size_t LIBMUSCLE_DataConstRef_size_(std::intptr_t self) { return result; } -int LIBMUSCLE_DataConstRef_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_DataConstRef_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { DataConstRef * self_p = reinterpret_cast(self); try { *err_code = 0; bool result = self_p->as(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -692,152 +947,718 @@ std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_index_( } } -std::intptr_t LIBMUSCLE_Data_create_nil_() { - Data * result = new Data(); - return reinterpret_cast(result); +std::size_t LIBMUSCLE_DataConstRef_num_dims_( + std::intptr_t self, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + return self_p->shape().size(); + } + catch (std::runtime_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_logical_(int value) { - Data * result = new Data(value != 0); - return reinterpret_cast(result); +void LIBMUSCLE_DataConstRef_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + static std::vector result; + result = self_p->shape(); + *shp = result.data(); + *shp_size = result.size(); + return; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_character_(char * value, std::size_t value_size) { - std::string value_s(value, value_size); - Data * result = new Data(value_s); - return reinterpret_cast(result); -} +void LIBMUSCLE_DataConstRef_elements_logical_( + std::intptr_t self, + std::size_t ndims, + bool ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + bool const * result = self_p->elements(); + *elements = const_cast(result); -std::intptr_t LIBMUSCLE_Data_create_int1_(char value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -std::intptr_t LIBMUSCLE_Data_create_int2_(short int value) { - Data * result = new Data(value); - return reinterpret_cast(result); + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_int4_(int32_t value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} +void LIBMUSCLE_DataConstRef_elements_int4_( + std::intptr_t self, + std::size_t ndims, + int32_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int32_t const * result = self_p->elements(); + *elements = const_cast(result); -std::intptr_t LIBMUSCLE_Data_create_int8_(int64_t value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -std::intptr_t LIBMUSCLE_Data_create_real4_(float value) { - Data * result = new Data(value); - return reinterpret_cast(result); + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_real8_(double value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} +void LIBMUSCLE_DataConstRef_elements_int8_( + std::intptr_t self, + std::size_t ndims, + int64_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int64_t const * result = self_p->elements(); + *elements = const_cast(result); -std::intptr_t LIBMUSCLE_Data_create_settings_(std::intptr_t value) { - Settings * value_p = reinterpret_cast(value); - Data * result = new Data(*value_p); - return reinterpret_cast(result); -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -std::intptr_t LIBMUSCLE_Data_create_copy_(std::intptr_t value) { - Data * value_p = reinterpret_cast(value); - Data * result = new Data(*value_p); - return reinterpret_cast(result); + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -void LIBMUSCLE_Data_free_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - delete self_p; - return; -} +void LIBMUSCLE_DataConstRef_elements_real4_( + std::intptr_t self, + std::size_t ndims, + float ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + float const * result = self_p->elements(); + *elements = const_cast(result); -int LIBMUSCLE_Data_is_a_logical_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -int LIBMUSCLE_Data_is_a_character_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -int LIBMUSCLE_Data_is_a_int_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; -} +void LIBMUSCLE_DataConstRef_elements_real8_( + std::intptr_t self, + std::size_t ndims, + double ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + double const * result = self_p->elements(); + *elements = const_cast(result); -int LIBMUSCLE_Data_is_a_int1_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -int LIBMUSCLE_Data_is_a_int2_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + bool result = self_p->has_indexes(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +void LIBMUSCLE_DataConstRef_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + static std::string result; + result = self_p->indexes().at(i - 1); + *ret_val = const_cast(result.c_str()); + *ret_val_size = result.size(); + return; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +std::intptr_t LIBMUSCLE_Data_create_nil_() { + Data * result = new Data(); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_logical_(bool value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_character_(char * value, std::size_t value_size) { + std::string value_s(value, value_size); + Data * result = new Data(value_s); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int1_(char value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int2_(short int value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int4_(int32_t value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int8_(int64_t value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_real4_(float value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_real8_(double value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_settings_(std::intptr_t value) { + Settings * value_p = reinterpret_cast(value); + Data * result = new Data(*value_p); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_copy_(std::intptr_t value) { + Data * value_p = reinterpret_cast(value); + Data * result = new Data(*value_p); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_logical_n_( + bool * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int4_n_( + int32_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int8_n_( + int64_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real4_n_( + float * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real8_n_( + double * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +void LIBMUSCLE_Data_free_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + delete self_p; + return; +} + +bool LIBMUSCLE_Data_is_a_logical_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_character_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_int_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_int1_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_int2_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_int4_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_int4_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_int8_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_int8_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_real4_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_real4_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_real8_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_real8_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_dict_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_dict_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a_dict(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_list_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_list_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a_list(); - return result ? 1 : 0; + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_logical_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_real4_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_real8_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; } -int LIBMUSCLE_Data_is_a_byte_array_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_grid_of_int4_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_int8_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_byte_array_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a_byte_array(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_nil_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_nil_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_nil(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_settings_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_settings_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } std::size_t LIBMUSCLE_Data_size_(std::intptr_t self) { @@ -846,12 +1667,191 @@ std::size_t LIBMUSCLE_Data_size_(std::intptr_t self) { return result; } -int LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + bool result = self_p->as(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + static std::string result; + result = self_p->as(); + *ret_val = const_cast(result.c_str()); + *ret_val_size = result.size(); + return; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + int result = self_p->as(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + char result = self_p->as(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - bool result = self_p->as(); - return result ? 1 : 0; + short int result = self_p->as(); + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -890,15 +1890,12 @@ int LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_m } } -void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - static std::string result; - result = self_p->as(); - *ret_val = const_cast(result.c_str()); - *ret_val_size = result.size(); - return; + int32_t result = self_p->as(); + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -937,11 +1934,11 @@ void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size } } -int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - int result = self_p->as(); + int64_t result = self_p->as(); return result; } catch (std::domain_error const & e) { @@ -981,11 +1978,11 @@ int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, } } -char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - char result = self_p->as(); + float result = self_p->as(); return result; } catch (std::domain_error const & e) { @@ -1025,11 +2022,11 @@ char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg } } -short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - short int result = self_p->as(); + double result = self_p->as(); return result; } catch (std::domain_error const & e) { @@ -1069,12 +2066,12 @@ short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** er } } -int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - int32_t result = self_p->as(); - return result; + Settings * result = new Settings(self_p->as()); + return reinterpret_cast(result); } catch (std::domain_error const & e) { *err_code = 1; @@ -1113,14 +2110,38 @@ int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_ } } -int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_as_byte_array_( + std::intptr_t self, + char ** data, std::size_t * data_size, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - int64_t result = self_p->as(); - return result; + *data = self_p->as_byte_array(); + *data_size = self_p->size(); + return; } - catch (std::domain_error const & e) { + catch (std::runtime_error const & e) { + *err_code = 1; + static std::string msg(e.what()); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} +std::intptr_t LIBMUSCLE_Data_get_item_by_key_( + std::intptr_t self, + char * key, std::size_t key_size, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + std::string key_s(key, key_size); + try { + *err_code = 0; + Data * result = new Data((*self_p)[key_s]); + return reinterpret_cast(result); + } + catch (std::runtime_error const & e) { *err_code = 1; static std::string msg; msg = e.what(); @@ -1128,28 +2149,52 @@ int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_ *err_msg_len = msg.size(); } catch (std::out_of_range const & e) { - *err_code = 2; + *err_code = 3; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::logic_error const & e) { - *err_code = 3; +} + +std::intptr_t LIBMUSCLE_Data_get_item_by_index_( + std::intptr_t self, + std::size_t i, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + Data * result = new Data((*self_p)[i-1u]); + return reinterpret_cast(result); + } + catch (std::runtime_error const & e) { + *err_code = 1; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::runtime_error const & e) { - *err_code = 4; + catch (std::out_of_range const & e) { + *err_code = 3; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::bad_cast const & e) { - *err_code = 5; +} + +std::size_t LIBMUSCLE_Data_num_dims_( + std::intptr_t self, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + return self_p->shape().size(); + } + catch (std::runtime_error const & e) { + *err_code = 1; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); @@ -1157,12 +2202,15 @@ int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_ } } -float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - float result = self_p->as(); - return result; + static std::vector result; + result = self_p->shape(); + *shp = result.data(); + *shp_size = result.size(); + return; } catch (std::domain_error const & e) { *err_code = 1; @@ -1201,34 +2249,121 @@ float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_m } } -double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_elements_logical_( + std::intptr_t self, + std::size_t ndims, + bool ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - double result = self_p->as(); - return result; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + bool const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; } - catch (std::domain_error const & e) { - *err_code = 1; + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::out_of_range const & e) { - *err_code = 2; +} + +void LIBMUSCLE_Data_elements_int4_( + std::intptr_t self, + std::size_t ndims, + int32_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int32_t const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::logic_error const & e) { - *err_code = 3; +} + +void LIBMUSCLE_Data_elements_int8_( + std::intptr_t self, + std::size_t ndims, + int64_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int64_t const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } +} + +void LIBMUSCLE_Data_elements_real4_( + std::intptr_t self, + std::size_t ndims, + float ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + float const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } catch (std::runtime_error const & e) { *err_code = 4; static std::string msg; @@ -1236,8 +2371,32 @@ double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_ *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::bad_cast const & e) { - *err_code = 5; +} + +void LIBMUSCLE_Data_elements_real8_( + std::intptr_t self, + std::size_t ndims, + double ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + double const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); @@ -1245,12 +2404,12 @@ double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_ } } -std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Data_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - Settings * result = new Settings(self_p->as()); - return reinterpret_cast(result); + bool result = self_p->has_indexes(); + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -1289,73 +2448,46 @@ std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, ch } } -void LIBMUSCLE_Data_as_byte_array_( - std::intptr_t self, - char ** data, std::size_t * data_size, - int * err_code, char ** err_msg, std::size_t * err_msg_len -) { +void LIBMUSCLE_Data_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - *data = self_p->as_byte_array(); - *data_size = self_p->size(); + static std::string result; + result = self_p->indexes().at(i - 1); + *ret_val = const_cast(result.c_str()); + *ret_val_size = result.size(); return; } - catch (std::runtime_error const & e) { + catch (std::domain_error const & e) { *err_code = 1; - static std::string msg(e.what()); + static std::string msg; + msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } -} -std::intptr_t LIBMUSCLE_Data_get_item_by_key_( - std::intptr_t self, - char * key, std::size_t key_size, - int * err_code, char ** err_msg, std::size_t * err_msg_len -) { - Data * self_p = reinterpret_cast(self); - std::string key_s(key, key_size); - try { - *err_code = 0; - Data * result = new Data((*self_p)[key_s]); - return reinterpret_cast(result); - } - catch (std::runtime_error const & e) { - *err_code = 1; + catch (std::out_of_range const & e) { + *err_code = 2; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::out_of_range const & e) { + catch (std::logic_error const & e) { *err_code = 3; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } -} - -std::intptr_t LIBMUSCLE_Data_get_item_by_index_( - std::intptr_t self, - std::size_t i, - int * err_code, char ** err_msg, std::size_t * err_msg_len -) { - Data * self_p = reinterpret_cast(self); - try { - *err_code = 0; - Data * result = new Data((*self_p)[i-1u]); - return reinterpret_cast(result); - } catch (std::runtime_error const & e) { - *err_code = 1; + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::out_of_range const & e) { - *err_code = 3; + catch (std::bad_cast const & e) { + *err_code = 5; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); @@ -1390,9 +2522,9 @@ std::intptr_t LIBMUSCLE_Data_create_byte_array_from_buf_( return reinterpret_cast(result); } -void LIBMUSCLE_Data_set_logical_(std::intptr_t self, int value) { +void LIBMUSCLE_Data_set_logical_(std::intptr_t self, bool value) { Data * self_p = reinterpret_cast(self); - *self_p = value != 0; + *self_p = value; return; } @@ -1451,12 +2583,12 @@ void LIBMUSCLE_Data_set_nil_(std::intptr_t self) { *self_p = Data(); } -void LIBMUSCLE_Data_set_item_key_logical_(std::intptr_t self, char * key, std::size_t key_size, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_set_item_key_logical_(std::intptr_t self, char * key, std::size_t key_size, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; - (*self_p)[key_s] = value != 0; + (*self_p)[key_s] = value; return; } catch (std::domain_error const & e) { @@ -1858,11 +2990,11 @@ void LIBMUSCLE_Data_set_item_key_data_(std::intptr_t self, char * key, std::size } } -void LIBMUSCLE_Data_set_item_index_logical_(std::intptr_t self, std::size_t i, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_set_item_index_logical_(std::intptr_t self, std::size_t i, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - (*self_p)[i - 1u] = value != 0; + (*self_p)[i - 1u] = value; return; } catch (std::domain_error const & e) { @@ -2434,10 +3566,10 @@ void LIBMUSCLE_Message_set_timestamp_(std::intptr_t self, double timestamp) { return; } -int LIBMUSCLE_Message_has_next_timestamp_(std::intptr_t self) { +bool LIBMUSCLE_Message_has_next_timestamp_(std::intptr_t self) { Message * self_p = reinterpret_cast(self); bool result = self_p->has_next_timestamp(); - return result ? 1 : 0; + return result; } double LIBMUSCLE_Message_next_timestamp_(std::intptr_t self) { @@ -2478,10 +3610,10 @@ void LIBMUSCLE_Message_set_data_dcr_(std::intptr_t self, std::intptr_t data) { return; } -int LIBMUSCLE_Message_has_settings_(std::intptr_t self) { +bool LIBMUSCLE_Message_has_settings_(std::intptr_t self) { Message * self_p = reinterpret_cast(self); bool result = self_p->has_settings(); - return result ? 1 : 0; + return result; } std::intptr_t LIBMUSCLE_Message_get_settings_(std::intptr_t self) { @@ -2527,16 +3659,16 @@ void LIBMUSCLE_Instance_free_(std::intptr_t self) { return; } -int LIBMUSCLE_Instance_reuse_instance_default_(std::intptr_t self) { +bool LIBMUSCLE_Instance_reuse_instance_default_(std::intptr_t self) { Instance * self_p = reinterpret_cast(self); bool result = self_p->reuse_instance(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Instance_reuse_instance_apply_(std::intptr_t self, int apply_overlay) { +bool LIBMUSCLE_Instance_reuse_instance_apply_(std::intptr_t self, bool apply_overlay) { Instance * self_p = reinterpret_cast(self); - bool result = self_p->reuse_instance(apply_overlay != 0); - return result ? 1 : 0; + bool result = self_p->reuse_instance(apply_overlay); + return result; } void LIBMUSCLE_Instance_error_shutdown_(std::intptr_t self, char * message, std::size_t message_size) { @@ -2546,13 +3678,13 @@ void LIBMUSCLE_Instance_error_shutdown_(std::intptr_t self, char * message, std: return; } -int LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2591,13 +3723,13 @@ int LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name, } } -int LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2636,13 +3768,13 @@ int LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std:: } } -int LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2681,13 +3813,13 @@ int LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std: } } -int LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2726,13 +3858,13 @@ int LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, st } } -int LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a>(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2771,13 +3903,13 @@ int LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, } } -int LIBMUSCLE_Instance_is_setting_a_real8array2_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_real8array2_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a>>(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2954,13 +4086,13 @@ double LIBMUSCLE_Instance_get_setting_as_real8_(std::intptr_t self, char * name, } } -int LIBMUSCLE_Instance_get_setting_as_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_get_setting_as_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting_as(name_s); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -3111,25 +4243,25 @@ std::intptr_t LIBMUSCLE_Instance_list_ports_(std::intptr_t self) { return reinterpret_cast(result); } -int LIBMUSCLE_Instance_is_connected_(std::intptr_t self, char * port, std::size_t port_size) { +bool LIBMUSCLE_Instance_is_connected_(std::intptr_t self, char * port, std::size_t port_size) { Instance * self_p = reinterpret_cast(self); std::string port_s(port, port_size); bool result = self_p->is_connected(port_s); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Instance_is_vector_port_(std::intptr_t self, char * port, std::size_t port_size) { +bool LIBMUSCLE_Instance_is_vector_port_(std::intptr_t self, char * port, std::size_t port_size) { Instance * self_p = reinterpret_cast(self); std::string port_s(port, port_size); bool result = self_p->is_vector_port(port_s); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Instance_is_resizable_(std::intptr_t self, char * port, std::size_t port_size) { +bool LIBMUSCLE_Instance_is_resizable_(std::intptr_t self, char * port, std::size_t port_size) { Instance * self_p = reinterpret_cast(self); std::string port_s(port, port_size); bool result = self_p->is_resizable(port_s); - return result ? 1 : 0; + return result; } int LIBMUSCLE_Instance_get_port_length_(std::intptr_t self, char * port, std::size_t port_size) { diff --git a/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp b/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp index bd023ae0..c66b971f 100644 --- a/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp +++ b/libmuscle/cpp/src/libmuscle/bindings/libmuscle_mpi_fortran_c.cpp @@ -26,8 +26,8 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_nil_() { return reinterpret_cast(result); } -std::intptr_t LIBMUSCLE_DataConstRef_create_logical_(int value) { - DataConstRef * result = new DataConstRef(value != 0); +std::intptr_t LIBMUSCLE_DataConstRef_create_logical_(bool value) { + DataConstRef * result = new DataConstRef(value); return reinterpret_cast(result); } @@ -79,94 +79,349 @@ std::intptr_t LIBMUSCLE_DataConstRef_create_copy_(std::intptr_t value) { return reinterpret_cast(result); } +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + DataConstRef * result = new DataConstRef(DataConstRef::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_logical_n_( + bool * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int4_n_( + int32_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_int8_n_( + int64_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real4_n_( + float * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_DataConstRef_create_grid_real8_n_( + double * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + void LIBMUSCLE_DataConstRef_free_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); delete self_p; return; } -int LIBMUSCLE_DataConstRef_is_a_logical_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_logical_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_character_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_character_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int1_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int1_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int2_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int2_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int4_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int4_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_int8_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_int8_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_real4_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_real4_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_real8_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_real8_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_dict_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_dict_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a_dict(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_list_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_list_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a_list(); - return result ? 1 : 0; + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_logical_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_real4_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_real8_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_int4_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_DataConstRef_is_a_grid_of_int8_(std::intptr_t self) { + DataConstRef * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; } -int LIBMUSCLE_DataConstRef_is_a_byte_array_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_byte_array_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a_byte_array(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_nil_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_nil_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_nil(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_DataConstRef_is_a_settings_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_is_a_settings_(std::intptr_t self) { DataConstRef * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } std::size_t LIBMUSCLE_DataConstRef_size_(std::intptr_t self) { @@ -175,12 +430,12 @@ std::size_t LIBMUSCLE_DataConstRef_size_(std::intptr_t self) { return result; } -int LIBMUSCLE_DataConstRef_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_DataConstRef_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { DataConstRef * self_p = reinterpret_cast(self); try { *err_code = 0; bool result = self_p->as(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -692,152 +947,718 @@ std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_index_( } } -std::intptr_t LIBMUSCLE_Data_create_nil_() { - Data * result = new Data(); - return reinterpret_cast(result); +std::size_t LIBMUSCLE_DataConstRef_num_dims_( + std::intptr_t self, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + return self_p->shape().size(); + } + catch (std::runtime_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_logical_(int value) { - Data * result = new Data(value != 0); - return reinterpret_cast(result); +void LIBMUSCLE_DataConstRef_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + static std::vector result; + result = self_p->shape(); + *shp = result.data(); + *shp_size = result.size(); + return; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_character_(char * value, std::size_t value_size) { - std::string value_s(value, value_size); - Data * result = new Data(value_s); - return reinterpret_cast(result); -} +void LIBMUSCLE_DataConstRef_elements_logical_( + std::intptr_t self, + std::size_t ndims, + bool ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + bool const * result = self_p->elements(); + *elements = const_cast(result); -std::intptr_t LIBMUSCLE_Data_create_int1_(char value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -std::intptr_t LIBMUSCLE_Data_create_int2_(short int value) { - Data * result = new Data(value); - return reinterpret_cast(result); + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_int4_(int32_t value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} +void LIBMUSCLE_DataConstRef_elements_int4_( + std::intptr_t self, + std::size_t ndims, + int32_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int32_t const * result = self_p->elements(); + *elements = const_cast(result); -std::intptr_t LIBMUSCLE_Data_create_int8_(int64_t value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -std::intptr_t LIBMUSCLE_Data_create_real4_(float value) { - Data * result = new Data(value); - return reinterpret_cast(result); + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -std::intptr_t LIBMUSCLE_Data_create_real8_(double value) { - Data * result = new Data(value); - return reinterpret_cast(result); -} +void LIBMUSCLE_DataConstRef_elements_int8_( + std::intptr_t self, + std::size_t ndims, + int64_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int64_t const * result = self_p->elements(); + *elements = const_cast(result); -std::intptr_t LIBMUSCLE_Data_create_settings_(std::intptr_t value) { - Settings * value_p = reinterpret_cast(value); - Data * result = new Data(*value_p); - return reinterpret_cast(result); -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -std::intptr_t LIBMUSCLE_Data_create_copy_(std::intptr_t value) { - Data * value_p = reinterpret_cast(value); - Data * result = new Data(*value_p); - return reinterpret_cast(result); + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -void LIBMUSCLE_Data_free_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - delete self_p; - return; -} +void LIBMUSCLE_DataConstRef_elements_real4_( + std::intptr_t self, + std::size_t ndims, + float ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + float const * result = self_p->elements(); + *elements = const_cast(result); -int LIBMUSCLE_Data_is_a_logical_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; -} + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; -int LIBMUSCLE_Data_is_a_character_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -int LIBMUSCLE_Data_is_a_int_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; -} +void LIBMUSCLE_DataConstRef_elements_real8_( + std::intptr_t self, + std::size_t ndims, + double ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + double const * result = self_p->elements(); + *elements = const_cast(result); -int LIBMUSCLE_Data_is_a_int1_(std::intptr_t self) { - Data * self_p = reinterpret_cast(self); - bool result = self_p->is_a(); - return result ? 1 : 0; + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } } -int LIBMUSCLE_Data_is_a_int2_(std::intptr_t self) { +bool LIBMUSCLE_DataConstRef_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + bool result = self_p->has_indexes(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +void LIBMUSCLE_DataConstRef_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + DataConstRef * self_p = reinterpret_cast(self); + try { + *err_code = 0; + static std::string result; + result = self_p->indexes().at(i - 1); + *ret_val = const_cast(result.c_str()); + *ret_val_size = result.size(); + return; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +std::intptr_t LIBMUSCLE_Data_create_nil_() { + Data * result = new Data(); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_logical_(bool value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_character_(char * value, std::size_t value_size) { + std::string value_s(value, value_size); + Data * result = new Data(value_s); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int1_(char value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int2_(short int value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int4_(int32_t value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_int8_(int64_t value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_real4_(float value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_real8_(double value) { + Data * result = new Data(value); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_settings_(std::intptr_t value) { + Settings * value_p = reinterpret_cast(value); + Data * result = new Data(*value_p); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_copy_(std::intptr_t value) { + Data * value_p = reinterpret_cast(value); + Data * result = new Data(*value_p); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_logical_a_(bool * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int4_a_(int32_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int8_a_(int64_t * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real4_a_(float * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real8_a_(double * data_array, std::size_t * data_array_shape, std::size_t data_array_ndims) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + Data * result = new Data(Data::grid(data_array_p, data_array_shape_v, {}, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_logical_n_( + bool * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int4_n_( + int32_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_int8_n_( + int64_t * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real4_n_( + float * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +std::intptr_t LIBMUSCLE_Data_create_grid_real8_n_( + double * data_array, + std::size_t * data_array_shape, + std::size_t data_array_ndims, + char * index_name_1, std::size_t index_name_1_size, + char * index_name_2, std::size_t index_name_2_size, + char * index_name_3, std::size_t index_name_3_size, + char * index_name_4, std::size_t index_name_4_size, + char * index_name_5, std::size_t index_name_5_size, + char * index_name_6, std::size_t index_name_6_size, + char * index_name_7, std::size_t index_name_7_size +) { + std::vector data_array_shape_v( + data_array_shape, data_array_shape + data_array_ndims); + auto data_array_p = const_cast(data_array); + + std::vector names_v; + names_v.push_back(std::string(index_name_1, index_name_1_size)); + if (data_array_ndims >= 2u) + names_v.push_back(std::string(index_name_2, index_name_2_size)); + if (data_array_ndims >= 3u) + names_v.push_back(std::string(index_name_3, index_name_3_size)); + if (data_array_ndims >= 4u) + names_v.push_back(std::string(index_name_4, index_name_4_size)); + if (data_array_ndims >= 5u) + names_v.push_back(std::string(index_name_5, index_name_5_size)); + if (data_array_ndims >= 6u) + names_v.push_back(std::string(index_name_6, index_name_6_size)); + if (data_array_ndims >= 7u) + names_v.push_back(std::string(index_name_7, index_name_7_size)); + + Data * result = new Data(Data::grid( + data_array_p, data_array_shape_v, + names_v, libmuscle::StorageOrder::first_adjacent)); + return reinterpret_cast(result); +} + +void LIBMUSCLE_Data_free_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + delete self_p; + return; +} + +bool LIBMUSCLE_Data_is_a_logical_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_character_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_int_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_int1_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a(); + return result; +} + +bool LIBMUSCLE_Data_is_a_int2_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_int4_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_int4_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_int8_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_int8_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_real4_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_real4_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_real8_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_real8_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_dict_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_dict_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a_dict(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_list_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_list_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a_list(); - return result ? 1 : 0; + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_logical_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_real4_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_real8_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; } -int LIBMUSCLE_Data_is_a_byte_array_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_grid_of_int4_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_grid_of_int8_(std::intptr_t self) { + Data * self_p = reinterpret_cast(self); + bool result = self_p->is_a_grid_of(); + return result; +} + +bool LIBMUSCLE_Data_is_a_byte_array_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a_byte_array(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_nil_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_nil_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_nil(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Data_is_a_settings_(std::intptr_t self) { +bool LIBMUSCLE_Data_is_a_settings_(std::intptr_t self) { Data * self_p = reinterpret_cast(self); bool result = self_p->is_a(); - return result ? 1 : 0; + return result; } std::size_t LIBMUSCLE_Data_size_(std::intptr_t self) { @@ -846,12 +1667,191 @@ std::size_t LIBMUSCLE_Data_size_(std::intptr_t self) { return result; } -int LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + bool result = self_p->as(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + static std::string result; + result = self_p->as(); + *ret_val = const_cast(result.c_str()); + *ret_val_size = result.size(); + return; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + int result = self_p->as(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + char result = self_p->as(); + return result; + } + catch (std::domain_error const & e) { + *err_code = 1; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::out_of_range const & e) { + *err_code = 2; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::logic_error const & e) { + *err_code = 3; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::runtime_error const & e) { + *err_code = 4; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } + catch (std::bad_cast const & e) { + *err_code = 5; + static std::string msg; + msg = e.what(); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} + +short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - bool result = self_p->as(); - return result ? 1 : 0; + short int result = self_p->as(); + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -890,15 +1890,12 @@ int LIBMUSCLE_Data_as_logical_(std::intptr_t self, int * err_code, char ** err_m } } -void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - static std::string result; - result = self_p->as(); - *ret_val = const_cast(result.c_str()); - *ret_val_size = result.size(); - return; + int32_t result = self_p->as(); + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -937,11 +1934,11 @@ void LIBMUSCLE_Data_as_character_(std::intptr_t self, char ** ret_val, std::size } } -int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - int result = self_p->as(); + int64_t result = self_p->as(); return result; } catch (std::domain_error const & e) { @@ -981,11 +1978,11 @@ int LIBMUSCLE_Data_as_int_(std::intptr_t self, int * err_code, char ** err_msg, } } -char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - char result = self_p->as(); + float result = self_p->as(); return result; } catch (std::domain_error const & e) { @@ -1025,11 +2022,11 @@ char LIBMUSCLE_Data_as_int1_(std::intptr_t self, int * err_code, char ** err_msg } } -short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - short int result = self_p->as(); + double result = self_p->as(); return result; } catch (std::domain_error const & e) { @@ -1069,12 +2066,12 @@ short int LIBMUSCLE_Data_as_int2_(std::intptr_t self, int * err_code, char ** er } } -int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - int32_t result = self_p->as(); - return result; + Settings * result = new Settings(self_p->as()); + return reinterpret_cast(result); } catch (std::domain_error const & e) { *err_code = 1; @@ -1113,14 +2110,38 @@ int32_t LIBMUSCLE_Data_as_int4_(std::intptr_t self, int * err_code, char ** err_ } } -int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_as_byte_array_( + std::intptr_t self, + char ** data, std::size_t * data_size, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - int64_t result = self_p->as(); - return result; + *data = self_p->as_byte_array(); + *data_size = self_p->size(); + return; } - catch (std::domain_error const & e) { + catch (std::runtime_error const & e) { + *err_code = 1; + static std::string msg(e.what()); + *err_msg = const_cast(msg.data()); + *err_msg_len = msg.size(); + } +} +std::intptr_t LIBMUSCLE_Data_get_item_by_key_( + std::intptr_t self, + char * key, std::size_t key_size, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + std::string key_s(key, key_size); + try { + *err_code = 0; + Data * result = new Data((*self_p)[key_s]); + return reinterpret_cast(result); + } + catch (std::runtime_error const & e) { *err_code = 1; static std::string msg; msg = e.what(); @@ -1128,28 +2149,52 @@ int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_ *err_msg_len = msg.size(); } catch (std::out_of_range const & e) { - *err_code = 2; + *err_code = 3; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::logic_error const & e) { - *err_code = 3; +} + +std::intptr_t LIBMUSCLE_Data_get_item_by_index_( + std::intptr_t self, + std::size_t i, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + Data * result = new Data((*self_p)[i-1u]); + return reinterpret_cast(result); + } + catch (std::runtime_error const & e) { + *err_code = 1; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::runtime_error const & e) { - *err_code = 4; + catch (std::out_of_range const & e) { + *err_code = 3; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::bad_cast const & e) { - *err_code = 5; +} + +std::size_t LIBMUSCLE_Data_num_dims_( + std::intptr_t self, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + return self_p->shape().size(); + } + catch (std::runtime_error const & e) { + *err_code = 1; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); @@ -1157,12 +2202,15 @@ int64_t LIBMUSCLE_Data_as_int8_(std::intptr_t self, int * err_code, char ** err_ } } -float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_shape_(std::intptr_t self, std::size_t ** shp, std::size_t * shp_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - float result = self_p->as(); - return result; + static std::vector result; + result = self_p->shape(); + *shp = result.data(); + *shp_size = result.size(); + return; } catch (std::domain_error const & e) { *err_code = 1; @@ -1201,34 +2249,121 @@ float LIBMUSCLE_Data_as_real4_(std::intptr_t self, int * err_code, char ** err_m } } -double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_elements_logical_( + std::intptr_t self, + std::size_t ndims, + bool ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - double result = self_p->as(); - return result; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + bool const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; } - catch (std::domain_error const & e) { - *err_code = 1; + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::out_of_range const & e) { - *err_code = 2; +} + +void LIBMUSCLE_Data_elements_int4_( + std::intptr_t self, + std::size_t ndims, + int32_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int32_t const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::logic_error const & e) { - *err_code = 3; +} + +void LIBMUSCLE_Data_elements_int8_( + std::intptr_t self, + std::size_t ndims, + int64_t ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + int64_t const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } +} + +void LIBMUSCLE_Data_elements_real4_( + std::intptr_t self, + std::size_t ndims, + float ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + float const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } catch (std::runtime_error const & e) { *err_code = 4; static std::string msg; @@ -1236,8 +2371,32 @@ double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_ *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::bad_cast const & e) { - *err_code = 5; +} + +void LIBMUSCLE_Data_elements_real8_( + std::intptr_t self, + std::size_t ndims, + double ** elements, + std::size_t * elements_shape, + int * elements_format, + int * err_code, char ** err_msg, std::size_t * err_msg_len +) { + Data * self_p = reinterpret_cast(self); + try { + *err_code = 0; + if (self_p->shape().size() != ndims) + throw std::runtime_error("Grid does not have a matching number of dimensions."); + double const * result = self_p->elements(); + *elements = const_cast(result); + + for (std::size_t i = 0u; i < ndims; ++i) + elements_shape[i] = self_p->shape()[i]; + + *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent); + return; + } + catch (std::runtime_error const & e) { + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); @@ -1245,12 +2404,12 @@ double LIBMUSCLE_Data_as_real8_(std::intptr_t self, int * err_code, char ** err_ } } -std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Data_has_indexes_(std::intptr_t self, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - Settings * result = new Settings(self_p->as()); - return reinterpret_cast(result); + bool result = self_p->has_indexes(); + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -1289,73 +2448,46 @@ std::intptr_t LIBMUSCLE_Data_as_settings_(std::intptr_t self, int * err_code, ch } } -void LIBMUSCLE_Data_as_byte_array_( - std::intptr_t self, - char ** data, std::size_t * data_size, - int * err_code, char ** err_msg, std::size_t * err_msg_len -) { +void LIBMUSCLE_Data_index_(std::intptr_t self, std::size_t i, char ** ret_val, std::size_t * ret_val_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - *data = self_p->as_byte_array(); - *data_size = self_p->size(); + static std::string result; + result = self_p->indexes().at(i - 1); + *ret_val = const_cast(result.c_str()); + *ret_val_size = result.size(); return; } - catch (std::runtime_error const & e) { + catch (std::domain_error const & e) { *err_code = 1; - static std::string msg(e.what()); + static std::string msg; + msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } -} -std::intptr_t LIBMUSCLE_Data_get_item_by_key_( - std::intptr_t self, - char * key, std::size_t key_size, - int * err_code, char ** err_msg, std::size_t * err_msg_len -) { - Data * self_p = reinterpret_cast(self); - std::string key_s(key, key_size); - try { - *err_code = 0; - Data * result = new Data((*self_p)[key_s]); - return reinterpret_cast(result); - } - catch (std::runtime_error const & e) { - *err_code = 1; + catch (std::out_of_range const & e) { + *err_code = 2; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::out_of_range const & e) { + catch (std::logic_error const & e) { *err_code = 3; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } -} - -std::intptr_t LIBMUSCLE_Data_get_item_by_index_( - std::intptr_t self, - std::size_t i, - int * err_code, char ** err_msg, std::size_t * err_msg_len -) { - Data * self_p = reinterpret_cast(self); - try { - *err_code = 0; - Data * result = new Data((*self_p)[i-1u]); - return reinterpret_cast(result); - } catch (std::runtime_error const & e) { - *err_code = 1; + *err_code = 4; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); *err_msg_len = msg.size(); } - catch (std::out_of_range const & e) { - *err_code = 3; + catch (std::bad_cast const & e) { + *err_code = 5; static std::string msg; msg = e.what(); *err_msg = const_cast(msg.data()); @@ -1390,9 +2522,9 @@ std::intptr_t LIBMUSCLE_Data_create_byte_array_from_buf_( return reinterpret_cast(result); } -void LIBMUSCLE_Data_set_logical_(std::intptr_t self, int value) { +void LIBMUSCLE_Data_set_logical_(std::intptr_t self, bool value) { Data * self_p = reinterpret_cast(self); - *self_p = value != 0; + *self_p = value; return; } @@ -1451,12 +2583,12 @@ void LIBMUSCLE_Data_set_nil_(std::intptr_t self) { *self_p = Data(); } -void LIBMUSCLE_Data_set_item_key_logical_(std::intptr_t self, char * key, std::size_t key_size, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_set_item_key_logical_(std::intptr_t self, char * key, std::size_t key_size, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; - (*self_p)[key_s] = value != 0; + (*self_p)[key_s] = value; return; } catch (std::domain_error const & e) { @@ -1858,11 +2990,11 @@ void LIBMUSCLE_Data_set_item_key_data_(std::intptr_t self, char * key, std::size } } -void LIBMUSCLE_Data_set_item_index_logical_(std::intptr_t self, std::size_t i, int value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +void LIBMUSCLE_Data_set_item_index_logical_(std::intptr_t self, std::size_t i, bool value, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Data * self_p = reinterpret_cast(self); try { *err_code = 0; - (*self_p)[i - 1u] = value != 0; + (*self_p)[i - 1u] = value; return; } catch (std::domain_error const & e) { @@ -2434,10 +3566,10 @@ void LIBMUSCLE_Message_set_timestamp_(std::intptr_t self, double timestamp) { return; } -int LIBMUSCLE_Message_has_next_timestamp_(std::intptr_t self) { +bool LIBMUSCLE_Message_has_next_timestamp_(std::intptr_t self) { Message * self_p = reinterpret_cast(self); bool result = self_p->has_next_timestamp(); - return result ? 1 : 0; + return result; } double LIBMUSCLE_Message_next_timestamp_(std::intptr_t self) { @@ -2478,10 +3610,10 @@ void LIBMUSCLE_Message_set_data_dcr_(std::intptr_t self, std::intptr_t data) { return; } -int LIBMUSCLE_Message_has_settings_(std::intptr_t self) { +bool LIBMUSCLE_Message_has_settings_(std::intptr_t self) { Message * self_p = reinterpret_cast(self); bool result = self_p->has_settings(); - return result ? 1 : 0; + return result; } std::intptr_t LIBMUSCLE_Message_get_settings_(std::intptr_t self) { @@ -2534,16 +3666,16 @@ void LIBMUSCLE_Instance_free_(std::intptr_t self) { return; } -int LIBMUSCLE_Instance_reuse_instance_default_(std::intptr_t self) { +bool LIBMUSCLE_Instance_reuse_instance_default_(std::intptr_t self) { Instance * self_p = reinterpret_cast(self); bool result = self_p->reuse_instance(); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Instance_reuse_instance_apply_(std::intptr_t self, int apply_overlay) { +bool LIBMUSCLE_Instance_reuse_instance_apply_(std::intptr_t self, bool apply_overlay) { Instance * self_p = reinterpret_cast(self); - bool result = self_p->reuse_instance(apply_overlay != 0); - return result ? 1 : 0; + bool result = self_p->reuse_instance(apply_overlay); + return result; } void LIBMUSCLE_Instance_error_shutdown_(std::intptr_t self, char * message, std::size_t message_size) { @@ -2553,13 +3685,13 @@ void LIBMUSCLE_Instance_error_shutdown_(std::intptr_t self, char * message, std: return; } -int LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2598,13 +3730,13 @@ int LIBMUSCLE_Instance_is_setting_a_character_(std::intptr_t self, char * name, } } -int LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2643,13 +3775,13 @@ int LIBMUSCLE_Instance_is_setting_a_int8_(std::intptr_t self, char * name, std:: } } -int LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2688,13 +3820,13 @@ int LIBMUSCLE_Instance_is_setting_a_real8_(std::intptr_t self, char * name, std: } } -int LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2733,13 +3865,13 @@ int LIBMUSCLE_Instance_is_setting_a_logical_(std::intptr_t self, char * name, st } } -int LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a>(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2778,13 +3910,13 @@ int LIBMUSCLE_Instance_is_setting_a_real8array_(std::intptr_t self, char * name, } } -int LIBMUSCLE_Instance_is_setting_a_real8array2_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_is_setting_a_real8array2_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting(name_s).is_a>>(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -2961,13 +4093,13 @@ double LIBMUSCLE_Instance_get_setting_as_real8_(std::intptr_t self, char * name, } } -int LIBMUSCLE_Instance_get_setting_as_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool LIBMUSCLE_Instance_get_setting_as_logical_(std::intptr_t self, char * name, std::size_t name_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Instance * self_p = reinterpret_cast(self); std::string name_s(name, name_size); try { *err_code = 0; bool result = self_p->get_setting_as(name_s); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -3118,25 +4250,25 @@ std::intptr_t LIBMUSCLE_Instance_list_ports_(std::intptr_t self) { return reinterpret_cast(result); } -int LIBMUSCLE_Instance_is_connected_(std::intptr_t self, char * port, std::size_t port_size) { +bool LIBMUSCLE_Instance_is_connected_(std::intptr_t self, char * port, std::size_t port_size) { Instance * self_p = reinterpret_cast(self); std::string port_s(port, port_size); bool result = self_p->is_connected(port_s); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Instance_is_vector_port_(std::intptr_t self, char * port, std::size_t port_size) { +bool LIBMUSCLE_Instance_is_vector_port_(std::intptr_t self, char * port, std::size_t port_size) { Instance * self_p = reinterpret_cast(self); std::string port_s(port, port_size); bool result = self_p->is_vector_port(port_s); - return result ? 1 : 0; + return result; } -int LIBMUSCLE_Instance_is_resizable_(std::intptr_t self, char * port, std::size_t port_size) { +bool LIBMUSCLE_Instance_is_resizable_(std::intptr_t self, char * port, std::size_t port_size) { Instance * self_p = reinterpret_cast(self); std::string port_s(port, port_size); bool result = self_p->is_resizable(port_s); - return result ? 1 : 0; + return result; } int LIBMUSCLE_Instance_get_port_length_(std::intptr_t self, char * port, std::size_t port_size) { diff --git a/libmuscle/cpp/src/libmuscle/data.cpp b/libmuscle/cpp/src/libmuscle/data.cpp index 883feef1..4637d380 100644 --- a/libmuscle/cpp/src/libmuscle/data.cpp +++ b/libmuscle/cpp/src/libmuscle/data.cpp @@ -1,5 +1,7 @@ #include +#include #include +#include #include #include #include @@ -20,6 +22,78 @@ using ymmsl::Settings; namespace libmuscle { namespace impl { +// helper functions + +template +ExtTypeId grid_type_id_(); + +template <> +ExtTypeId grid_type_id_() { + return ExtTypeId::grid_int32; +} + +template <> +ExtTypeId grid_type_id_() { + return ExtTypeId::grid_int64; +} + +template <> +ExtTypeId grid_type_id_() { + return ExtTypeId::grid_float32; +} + +template <> +ExtTypeId grid_type_id_() { + return ExtTypeId::grid_float64; +} + +template <> +ExtTypeId grid_type_id_() { + return ExtTypeId::grid_bool; +} + +template +std::string grid_type_name_(); + +template <> +std::string grid_type_name_() { + return "int32"; +} + +template <> +std::string grid_type_name_() { + return "int64"; +} + +template <> +std::string grid_type_name_() { + return "float32"; +} + +template <> +std::string grid_type_name_() { + return "float64"; +} + +template <> +std::string grid_type_name_() { + return "bool"; +} + +template +DataConstRef DataConstRef::grid_data_( + Element const * const data, std::size_t num_elems +) const { + return Data::byte_array( + reinterpret_cast(data), num_elems * sizeof(Element)); +} + +template <> +DataConstRef DataConstRef::grid_data_( + bool const * const data, std::size_t num_elems) const; + +// implementation + DataConstRef::DataConstRef() : mp_zones_(new std::vector>()) { @@ -98,6 +172,88 @@ DataConstRef::DataConstRef(double value) *mp_obj_ << value; } +/* This is here in the .cpp and instantiated explicitly, because it requires the + * ExtTypeId, and we don't want to have that in a public header since it's a + * detail of an internal format. + */ +template +DataConstRef DataConstRef::grid( + Element const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order +) { + if (shape.size() != indexes.size() && !indexes.empty()) + throw std::runtime_error("Shape and indexes must have the same length"); + + auto grid_dict = Data::dict(); + // type member is redundant, but useful metadata + grid_dict["type"] = grid_type_name_(); + mcp::ExtTypeId ext_type_id = grid_type_id_(); + + Data shape_list = Data::nils(shape.size()); + for (std::size_t i = 0u; i < shape.size(); ++i) + shape_list[i] = shape[i]; + grid_dict["shape"] = shape_list; + + if (storage_order == StorageOrder::first_adjacent) + grid_dict["order"] = "fa"; + else + grid_dict["order"] = "la"; + + std::size_t num_elems = std::accumulate( + shape.cbegin(), shape.cend(), 1u, + std::multiplies()); + grid_dict["data"] = Data::byte_array( + reinterpret_cast(data), num_elems * sizeof(Element)); + + if (!indexes.empty()) { + Data indexes_list = Data::nils(indexes.size()); + for (std::size_t i = 0u; i < indexes.size(); ++i) + indexes_list[i] = indexes[i]; + grid_dict["indexes"] = indexes_list; + } + else { + grid_dict["indexes"] = Data(); + } + + return DataConstRef(static_cast(ext_type_id), grid_dict); +} + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +template DataConstRef DataConstRef::grid( + std::int32_t const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template DataConstRef DataConstRef::grid( + std::int64_t const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template DataConstRef DataConstRef::grid( + float const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template DataConstRef DataConstRef::grid( + double const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template DataConstRef DataConstRef::grid( + bool const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +#endif + DataConstRef::DataConstRef(SettingValue const & value) : DataConstRef() { @@ -249,6 +405,29 @@ bool DataConstRef::is_a_list() const { return mp_obj_->type == msgpack::type::ARRAY; } +template +bool DataConstRef::is_a_grid_of() const { + if (mp_obj_->type != msgpack::type::EXT) + return false; + + auto ext_type = static_cast(mp_obj_->via.ext.type()); + return ext_type == grid_type_id_(); +} + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +template bool DataConstRef::is_a_grid_of() const; + +template bool DataConstRef::is_a_grid_of() const; + +template bool DataConstRef::is_a_grid_of() const; + +template bool DataConstRef::is_a_grid_of() const; + +template bool DataConstRef::is_a_grid_of() const; + +#endif + bool DataConstRef::is_a_byte_array() const { return mp_obj_->type == msgpack::type::BIN; } @@ -340,11 +519,17 @@ std::size_t DataConstRef::size() const { return mp_obj_->via.map.size; else if (is_a_list()) return mp_obj_->via.array.size; + else if (is_a_grid_()) { + auto shape_vec = shape(); + return std::accumulate( + shape_vec.cbegin(), shape_vec.cend(), 1u, + std::multiplies()); + } else if (is_a_byte_array()) return mp_obj_->via.bin.size; else throw std::runtime_error("DataConstRef::size() called for an object that does" - " not represent a list or dict"); + " not represent a list, dict, grid or byte array"); } char const * DataConstRef::as_byte_array() const { @@ -398,6 +583,74 @@ DataConstRef DataConstRef::operator[](std::size_t index) const { throw std::runtime_error("Tried to index an object that is not a list."); } +template +Element const * DataConstRef::elements() const { + if (!is_a_grid_of()) + throw std::runtime_error( + "Tried to get grid data, but this object is not a grid or" + " not of the correct type."); + char const * data_bytes = grid_dict_()["data"].as_byte_array(); + return reinterpret_cast(data_bytes); +} + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +template bool const * DataConstRef::elements() const; + +template double const * DataConstRef::elements() const; + +template float const * DataConstRef::elements() const; + +template int const * DataConstRef::elements() const; + +template long const * DataConstRef::elements() const; + +#endif + +std::vector DataConstRef::shape() const { + if (is_a_grid_()) { + DataConstRef shape_list = grid_dict_()["shape"]; + std::vector result(shape_list.size()); + for (std::size_t i = 0u; i < shape_list.size(); ++i) + result[i] = shape_list[i].as(); + return result; + } + else + throw std::runtime_error("Tried to get the shape, but this object is not a grid."); +} + +StorageOrder DataConstRef::storage_order() const { + if (is_a_grid_()) { + std::string const & order = grid_dict_()["order"].as(); + if (order == "fa") + return StorageOrder::first_adjacent; + else if (order == "la") + return StorageOrder::last_adjacent; + throw std::runtime_error("Invalid data format received, MUSCLE 3 bug?"); + } + else + throw std::runtime_error("Tried to get the shape, but this object is not a grid."); +} + +bool DataConstRef::has_indexes() const { + if (is_a_grid_()) + return !grid_dict_()["indexes"].is_nil(); + else + throw std::runtime_error("Tried to check for indexes, but this object is not a grid."); +} + +std::vector DataConstRef::indexes() const { + if (has_indexes()) { + DataConstRef indexes = grid_dict_()["indexes"]; + std::vector result(indexes.size()); + for (std::size_t i = 0u; i < indexes.size(); ++i) + result[i] = indexes[i].as(); + return result; + } + else + throw std::runtime_error("Tried to get indexes, but this grid does not have any."); +} + DataConstRef::DataConstRef( msgpack::object * obj, std::shared_ptr const & zone) @@ -421,6 +674,18 @@ DataConstRef::DataConstRef(std::shared_ptr const & zone) mp_obj_->type = msgpack::type::NIL; } +DataConstRef::DataConstRef(char ext_type_id, DataConstRef const & data) + : DataConstRef() +{ + msgpack::sbuffer buf; + msgpack::pack(buf, data); + + char * zoned_mem = zone_alloc_(buf.size() + 1); + zoned_mem[0] = ext_type_id; + memcpy(zoned_mem + 1, buf.data(), buf.size()); + *mp_obj_ << msgpack::type::ext_ref(zoned_mem, buf.size() + 1); +} + std::vector DataConstRef::as_vec_double_() const { std::vector result; DataConstRef const & self = *this; @@ -434,6 +699,110 @@ std::vector DataConstRef::as_vec_double_() const { return result; } +bool DataConstRef::is_a_grid_() const { + if (mp_obj_->type != msgpack::type::EXT) + return false; + + auto ext_type = static_cast(mp_obj_->via.ext.type()); + return (ext_type == mcp::ExtTypeId::grid_int32) + || (ext_type == mcp::ExtTypeId::grid_int64) + || (ext_type == mcp::ExtTypeId::grid_float32) + || (ext_type == mcp::ExtTypeId::grid_float64) + || (ext_type == mcp::ExtTypeId::grid_bool); +} + +DataConstRef DataConstRef::grid_dict_() const { + auto ext = mp_obj_->as(); + auto oh = msgpack::unpack(ext.data(), ext.size()); + + if (oh.get().type != msgpack::type::MAP) + throw std::runtime_error("Invalid grid format. Bug in MUSCLE 3?"); + + auto zone = std::make_shared(); + return DataConstRef(mcp::unpack_data(zone, ext.data(), ext.size())); +} + +/* This is here in the .cpp and instantiated explicitly, because it requires the + * ExtTypeId, and we don't want to have that in a public header since it's a + * detail of an internal format. + */ +template +Data Data::grid( + Element const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order +) { + if (shape.size() != indexes.size() && !indexes.empty()) + throw std::runtime_error("Shape and indexes must have the same length"); + + auto grid_dict = Data::dict(); + // type member is redundant, but useful metadata + grid_dict["type"] = grid_type_name_(); + mcp::ExtTypeId ext_type_id = grid_type_id_(); + + Data shape_list = Data::nils(shape.size()); + for (std::size_t i = 0u; i < shape.size(); ++i) + shape_list[i] = shape[i]; + grid_dict["shape"] = shape_list; + + if (storage_order == StorageOrder::first_adjacent) + grid_dict["order"] = "fa"; + else + grid_dict["order"] = "la"; + + std::size_t num_elems = std::accumulate( + shape.cbegin(), shape.cend(), 1u, + std::multiplies()); + grid_dict["data"] = Data::byte_array( + reinterpret_cast(data), num_elems * sizeof(Element)); + + if (!indexes.empty()) { + Data indexes_list = Data::nils(indexes.size()); + for (std::size_t i = 0u; i < indexes.size(); ++i) + indexes_list[i] = indexes[i]; + grid_dict["indexes"] = indexes_list; + } + else { + grid_dict["indexes"] = Data(); + } + + return Data(static_cast(ext_type_id), grid_dict); +} + +#ifndef DOXYGEN_SHOULD_SKIP_THIS + +template Data Data::grid( + std::int32_t const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template Data Data::grid( + std::int64_t const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template Data Data::grid( + float const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template Data Data::grid( + double const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +template Data Data::grid( + bool const * const data, + std::vector const & shape, + std::vector const & indexes, + StorageOrder storage_order); + +#endif Data Data::dict() { Data dict; @@ -545,6 +914,22 @@ char * Data::as_byte_array() { return const_cast(mp_obj_->via.bin.ptr); } +void Data::set_dict_item_( + uint32_t offset, std::string const & key, DataConstRef const & value +) { + mp_obj_->via.map.ptr[offset].key = msgpack::object(key, *mp_zones_->front()); + mp_obj_->via.map.ptr[offset].val = msgpack::object(value, *mp_zones_->front()); + mp_zones_->insert(mp_zones_->end(), value.mp_zones_->cbegin(), value.mp_zones_->cend()); +} + +void Data::set_dict_item_( + uint32_t offset, std::string const & key, Data const & value +) { + mp_obj_->via.map.ptr[offset].key = msgpack::object(key, *mp_zones_->front()); + mp_obj_->via.map.ptr[offset].val = msgpack::object(value, *mp_zones_->front()); + mp_zones_->insert(mp_zones_->end(), value.mp_zones_->cbegin(), value.mp_zones_->cend()); +} + void Data::init_dict_(uint32_t size) { mp_obj_->type = msgpack::type::MAP; mp_obj_->via.map.size = size; @@ -557,5 +942,20 @@ void Data::init_list_(uint32_t size) { mp_obj_->via.array.ptr = zone_alloc_(size); } +template <> +DataConstRef DataConstRef::grid_data_( + bool const * const data, std::size_t num_elems +) const { + if (sizeof(bool) == 1u) + return Data::byte_array( + reinterpret_cast(data), num_elems); + else { + Data result = Data::byte_array(num_elems); + char * data_copy = result.as_byte_array(); + std::copy(data, data + num_elems, data_copy); + return result; + } +} + } } // namespace libmuscle::impl diff --git a/libmuscle/cpp/src/libmuscle/data.hpp b/libmuscle/cpp/src/libmuscle/data.hpp index 5371ce4e..02b83321 100644 --- a/libmuscle/cpp/src/libmuscle/data.hpp +++ b/libmuscle/cpp/src/libmuscle/data.hpp @@ -1,5 +1,6 @@ #pragma once +#include #include #include #include @@ -13,8 +14,17 @@ namespace libmuscle { namespace impl { +enum class StorageOrder { + first_adjacent, + last_adjacent +}; + +class DataConstRef; + class Data; +bool is_close_port(DataConstRef const &); + namespace mcp { // forward-declare this so it can be a friend Data unpack_data( @@ -112,6 +122,51 @@ class DataConstRef { */ DataConstRef(double value); + /** Create a DataConstRef object containing a grid object. + * + * This creates a DataConstRef that represents a grid or array of a + * given element type. + * + * Supported types are ``std::int32_t``, ``std::int64_t``, ``float``, + * ``double`` and ``bool``. Note that unless you have exotic hardware, + * ``int``, ``long`` and ``long long`` will be aliased as either + * ``int32_t`` or ``int64_t``, and will therefore work as well. Unsigned + * integer types are not supported. + * + * Besides a type, arrays have a shape. This is a list of sizes, one for + * each dimension of the array. + * + * They also have a storage order, which specifies in which order the + * elements are arranged in memory. StorageOrder::first_adjacent means + * that array items who only differ by one in their first index are + * adjacent in memory, while StorageOrder::last_adjacent means that + * array items which only differ by one in their last index are adjacent + * in memory. Last adjacent is the standard in C and C++, and is also + * known as column-major, while first adjacent is the standard in + * Fortran, and is also known as row-major. + * + * The data argument should be a pointer to a contiguous array of + * elements of the given type. + * + * Finally, the optional index_names argument may be used to specify the + * names of the indices. For a Cartesian grid, these may be ``x`` and + * ``y``, while for for example a polar grid you may have ``rho`` and + * ``phi``. These names are optional, but help to make it easier to + * interpret the data, and so adding them is very much recommended. + * + * @tparam Element The type of the elements. + * @param data Pointer to the array data. + * @param shape The shape of the array. + * @param indexes Names of the array's indexes. + * @param storage_order The storage order of the array data. + */ + template + static DataConstRef grid( + Element const * const data, + std::vector const & shape, + std::vector const & indexes = {}, + StorageOrder storage_order = StorageOrder::last_adjacent); + /** Create a DataConstRef object from a SettingValue's value. * * Note that this will decode to whichever type is stored in the @@ -203,6 +258,19 @@ class DataConstRef { */ bool is_a_list() const; + /** Return whether this references a grid of the given element type. + * + * Supported element types are ``std::int32_t``, ``std::int64_t``, + * ``float``, ``double``, and ``bool``. Unless you're on some exotic + * machine, ``int``, ``long``, and ``long long`` are aliases for + * ``int32_t`` or ``int64_t``, and so will also work. Unsigned types are + * not supported. + * + * @tparam Element The type of the elements of the array. + */ + template + bool is_a_grid_of() const; + /** Return whether this references a byte array. * * If so, as_byte_array() can be used to obtain values, and size() @@ -212,10 +280,11 @@ class DataConstRef { */ bool is_a_byte_array() const; - /** Returns the size of a list, dict or byte array. + /** Returns the size of a list, dict, grid or byte array. * - * @return The number of items in a referenced list or dict value, or - * the number of bytes in a byte array. + * @return The number of items in a referenced list or dict value, the + * number of elements in a grid, or the number of bytes in a + * byte array. */ std::size_t size() const; @@ -313,6 +382,81 @@ class DataConstRef { */ DataConstRef operator[](std::size_t index) const; + /** Get the shape of a grid. + * + * Use only if is_a_grid_of() returns true. + * + * The shape of an array is a list of sizes of the array, one for each + * of its dimensions. + * + * @return The shape of the contained grid. + * @throws std::runtime_error if the object is not a grid. + */ + std::vector shape() const; + + /** Get the storage order of the grid. + * + * Use only if is_a_grid_of() returns true. + * + * The storage order is either StorageOrder::first_adjacent or + * StorageOrder::last_adjacent. StorageOrder::first_adjacent means that + * array items who only differ by one in their first index are adjacent + * in memory, while StorageOrder::last_adjacent means that array items + * which only differ by one in their last index are adjacent in memory. + * Last adjacent is the standard in C and C++, and is also known as + * column-major, while first adjacent is the standard in Fortran, and is + * also known as row-major. + * + * @return The storage order of the grid. + * @throws std::runtime_error if the object is not a grid. + */ + StorageOrder storage_order() const; + + /** Return whether a grid has index names. + * + * Use only if is_a_grid_of() returns true. + * + * This function determines whether the grid has named indexes. If so, + * you can access them through indexes(). + * + * @return True iff the grid has named indexes. + * @throw std::runtime_Error if the object is not a grid. + */ + bool has_indexes() const; + + /** Get the index names of the grid. + * + * Use only if is_a_grid_of() returns true and has_indexes() + * returns true. + * + * The optional index names returned by this function specify which + * index refers to what. For a 2D Cartesian grid, these may be ``'x'`` + * and ``'y'`` for example, or for a polar grid, ``'phi'`` and + * ``'rho'``. They're intended to help annotate and use the data, and + * may be absent if the sender of a message did not include them. + * + * @return The indexes. + * @throw std::runtime_error if the object is not a grid. + */ + std::vector indexes() const; + + /** Get the elements (data values) of a grid. + * + * Use only if is_a_grid_of() returns true. + * + * This returns a pointer to the specified type which points to a block + * of memory containing the grid's element values. They are contiguous + * in memory in the order specified by storage_order(). + * + * The returned pointer is valid at least as long as this object exists. + * + * @tparam Element The type of the data stored in the grid. + * @return A pointer to the data, as specified above. + * @throws std::runtime_error if the object is not a grid of this type. + */ + template + Element const * elements() const; + protected: using Zones_ = std::shared_ptr>>; Zones_ mp_zones_; @@ -331,6 +475,9 @@ class DataConstRef { // create DCR sharing the given zone DataConstRef(std::shared_ptr const & zone); + // create DCR with given data packed as ext type + DataConstRef(char ext_type_id, DataConstRef const & data); + // allocate an object on this object's zone template T * zone_alloc_(uint32_t size = 1u); @@ -343,6 +490,13 @@ class DataConstRef { // see comment at Data::init_dict_'s implementation friend class Data; friend bool ::libmuscle::impl::is_close_port(DataConstRef const &); + + bool is_a_grid_() const; + + DataConstRef grid_dict_() const; + + template + DataConstRef grid_data_(Element const * const data, std::size_t num_elems) const; }; @@ -370,6 +524,51 @@ class Data : public DataConstRef { // create from scalar type using DataConstRef::DataConstRef; + /** Create a Data object containing a grid object. + * + * This creates a DataConstRef that represents a grid or array of a + * given element type. + * + * Supported types are ``std::int32_t``, ``std::int64_t``, ``float``, + * ``double`` and ``bool``. Note that unless you have exotic hardware, + * ``int``, ``long`` and ``long long`` will be aliased as either + * ``int32_t`` or ``int64_t``, and will therefore work as well. Unsigned + * integer types are not supported. + * + * Besides a type, arrays have a shape. This is a list of sizes, one for + * each dimension of the array. + * + * They also have a storage order, which specifies in which order the + * elements are arranged in memory. StorageOrder::first_adjacent means + * that array items who only differ by one in their first index are + * adjacent in memory, while StorageOrder::last_adjacent means that + * array items which only differ by one in their last index are adjacent + * in memory. Last adjacent is the standard in C and C++, and is also + * known as column-major, while first adjacent is the standard in + * Fortran, and is also known as row-major. + * + * The data argument should be a pointer to a contiguous array of + * elements of the given type. + * + * Finally, the optional index_names argument may be used to specify the + * names of the indices. For a Cartesian grid, these may be ``x`` and + * ``y``, while for for example a polar grid you may have ``rho`` and + * ``phi``. These names are optional, but help to make it easier to + * interpret the data, and so adding them is very much recommended. + * + * @tparam Element The type of the elements. + * @param data Pointer to the array data. + * @param shape The shape of the array. + * @param indexes Names of the array's indexes. + * @param storage_order The storage order of the array data. + */ + template + static Data grid( + Element const * const data, + std::vector const & shape, + std::vector const & indexes = {}, + StorageOrder storage_order = StorageOrder::last_adjacent); + /** Create a Data containing an empty dictionary. * * @returns A Data containing an empty dictionary. @@ -423,7 +622,7 @@ class Data : public DataConstRef { /** Create a byte array of a given size. * - * The buffer will be owned by this Data object. Use byte_array() to + * The buffer will be owned by this Data object. Use as_byte_array() to * get a pointer to put data into it. */ static Data byte_array(uint32_t size); @@ -515,6 +714,15 @@ class Data : public DataConstRef { char * as_byte_array(); private: + // this requires packing, so needs to be non-template + void set_dict_item_( + uint32_t offset, + std::string const & key, DataConstRef const & value); + + void set_dict_item_( + uint32_t offset, + std::string const & key, Data const & value); + void init_dict_(uint32_t size); template diff --git a/libmuscle/cpp/src/libmuscle/data.tpp b/libmuscle/cpp/src/libmuscle/data.tpp index 57d21d2a..3276fb1b 100644 --- a/libmuscle/cpp/src/libmuscle/data.tpp +++ b/libmuscle/cpp/src/libmuscle/data.tpp @@ -1,5 +1,6 @@ // Template implementation. Do not include directly! +#include #include #include #include @@ -62,9 +63,7 @@ void Data::init_dict_(uint32_t offset, std::string const & key, DataConstRef con Args const & ... args) { init_dict_(offset + 1, args...); - mp_obj_->via.map.ptr[offset].key = msgpack::object(key, *mp_zones_->front()); - mp_obj_->via.map.ptr[offset].val = msgpack::object(value, *mp_zones_->front()); - mp_zones_->insert(mp_zones_->end(), value.mp_zones_->cbegin(), value.mp_zones_->cend()); + set_dict_item_(offset, key, value); } template @@ -72,9 +71,7 @@ void Data::init_dict_(uint32_t offset, std::string const & key, Data const & val Args const & ... args) { init_dict_(offset + 1, args...); - mp_obj_->via.map.ptr[offset].key = msgpack::object(key, *mp_zones_->front()); - mp_obj_->via.map.ptr[offset].val = msgpack::object(value, *mp_zones_->front()); - mp_zones_->insert(mp_zones_->end(), value.mp_zones_->cbegin(), value.mp_zones_->cend()); + set_dict_item_(offset, key, value); } template diff --git a/libmuscle/cpp/src/libmuscle/libmuscle.hpp b/libmuscle/cpp/src/libmuscle/libmuscle.hpp index 431cc7b2..19813429 100644 --- a/libmuscle/cpp/src/libmuscle/libmuscle.hpp +++ b/libmuscle/cpp/src/libmuscle/libmuscle.hpp @@ -10,5 +10,6 @@ namespace libmuscle { using impl::Instance; using impl::Message; using impl::PortsDescription; + using impl::StorageOrder; } diff --git a/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp b/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp index 281e26ce..86ae586b 100644 --- a/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp +++ b/libmuscle/cpp/src/libmuscle/mcp/ext_types.hpp @@ -7,7 +7,12 @@ namespace libmuscle { namespace impl { namespace mcp { enum class ExtTypeId : int8_t { close_port = 0, - settings = 1 + settings = 1, + grid_int32 = 2, + grid_int64 = 3, + grid_float32 = 4, + grid_float64 = 5, + grid_bool = 6 }; } } } diff --git a/libmuscle/cpp/src/libmuscle/tests/micro_model_test.cpp b/libmuscle/cpp/src/libmuscle/tests/micro_model_test.cpp index 97b01291..70789c46 100644 --- a/libmuscle/cpp/src/libmuscle/tests/micro_model_test.cpp +++ b/libmuscle/cpp/src/libmuscle/tests/micro_model_test.cpp @@ -8,8 +8,10 @@ #include +using libmuscle::Data; using libmuscle::Instance; using libmuscle::Message; +using libmuscle::StorageOrder; using ymmsl::Operator; @@ -25,12 +27,27 @@ int main(int argc, char *argv[]) { assert(instance.get_setting_as("test4") == true); auto msg = instance.receive("in"); - assert(msg.data().as() == "testing"); + assert(msg.data()["message"].as() == "testing"); + auto r_test_grid = msg.data()["test_grid"]; + assert(r_test_grid.is_a_grid_of()); + assert(r_test_grid.shape()[0] == 2u); + assert(r_test_grid.shape()[1] == 3u); + assert(r_test_grid.storage_order() == StorageOrder::last_adjacent); + assert(r_test_grid.elements()[3] == 4.0); + assert(!r_test_grid.has_indexes()); // O_F std::ostringstream reply; reply << "testing back " << i; - instance.send("out", Message(msg.timestamp(), reply.str())); + + std::vector s_test_grid_data({1, 2, 3, 4, 5, 6}); + Data s_test_grid = Data::grid( + s_test_grid_data.data(), {2, 3}, {"x", "y"}); + + Data reply_dict = Data::dict( + "reply", reply.str(), + "test_grid", s_test_grid); + instance.send("out", Message(msg.timestamp(), reply_dict)); ++i; } diff --git a/libmuscle/cpp/src/libmuscle/tests/test_data.cpp b/libmuscle/cpp/src/libmuscle/tests/test_data.cpp index 843d3556..88bf5dd4 100644 --- a/libmuscle/cpp/src/libmuscle/tests/test_data.cpp +++ b/libmuscle/cpp/src/libmuscle/tests/test_data.cpp @@ -13,6 +13,7 @@ using libmuscle::impl::Data; using libmuscle::impl::DataConstRef; using libmuscle::impl::mcp::unpack_data; +using libmuscle::impl::StorageOrder; using ymmsl::SettingValue; using ymmsl::Settings; @@ -134,6 +135,7 @@ TEST(libmuscle_mcp_data, string_value) { test(std::string("Testing")); } + TEST(libmuscle_mcp_data, dict) { Data d(Data::dict( "test_double", 13.3, @@ -179,7 +181,6 @@ TEST(libmuscle_mcp_data, dict_errors) { ASSERT_THROW(d["test_not_a_map"], std::runtime_error); } - TEST(libmuscle_mcp_data, dict_dict) { Data d(Data::dict( "test3", Data::dict("test1", true, "test2", 87), @@ -213,7 +214,6 @@ TEST(libmuscle_mcp_data, dict_dict) { ASSERT_EQ(d2["test4"].as(), 12.34); } - TEST(libmuscle_mcp_data, dict_build) { Data dict = Data::dict("test1", true, "test2", 54); ASSERT_TRUE(dict["test1"].is_a()); @@ -243,7 +243,6 @@ TEST(libmuscle_mcp_data, dict_build) { ASSERT_EQ(data["test4"].as(), 23); } - TEST(libmuscle_mcp_data, dict_dataconstref) { // regression test Data dict = Data::dict("test", DataConstRef()); @@ -489,6 +488,107 @@ TEST(libmuscle_mcp_data, settings) { } +TEST(libmuscle_mcp_data, grid) { + std::vector x({1, 2, 3, 4, 5, 6}); + Data d = Data::grid(x.data(), {2, 3}, {"x", "y"}, StorageOrder::first_adjacent); + ASSERT_TRUE(d.is_a_grid_of()); + ASSERT_FALSE(d.is_a_grid_of()); + ASSERT_EQ(d.size(), 6u); + ASSERT_EQ(d.shape().size(), 2u); + ASSERT_EQ(d.shape()[0], 2); + ASSERT_EQ(d.shape()[1], 3); + ASSERT_EQ(d.storage_order(), StorageOrder::first_adjacent); + ASSERT_THROW(d.elements(), std::runtime_error); + ASSERT_THROW(d.elements(), std::runtime_error); + ASSERT_EQ(d.elements()[0], 1); + ASSERT_EQ(d.elements()[4], 5); + ASSERT_TRUE(d.has_indexes()); + ASSERT_EQ(d.indexes().size(), 2u); + ASSERT_EQ(d.indexes()[0], "x"); + ASSERT_EQ(d.indexes()[1], "y"); + + std::array x2 = { + false, true, false, true, false, true, + false, true, false, true, false, true, + false, true, false, true, false, true, + false, true, false, true, false, true}; + + Data d2 = Data::grid(x2.data(), {4, 3, 2}); + ASSERT_TRUE(d2.is_a_grid_of()); + ASSERT_FALSE(d2.is_a_grid_of()); + ASSERT_EQ(d2.size(), 24u); + ASSERT_EQ(d2.shape().size(), 3u); + ASSERT_EQ(d2.shape()[0], 4u); + ASSERT_EQ(d2.shape()[1], 3u); + ASSERT_EQ(d2.shape()[2], 2u); + ASSERT_EQ(d2.storage_order(), StorageOrder::last_adjacent); + ASSERT_EQ(d2.elements()[0 * 6 + 0 * 2 + 0], false); + ASSERT_EQ(d2.elements()[2 * 6 + 1 * 2 + 0], false); + ASSERT_EQ(d2.elements()[3 * 6 + 0 * 2 + 1], true); + ASSERT_EQ(d2.elements()[0 * 6 + 2 * 2 + 1], true); + ASSERT_FALSE(d2.has_indexes()); + + Data d3 = Data::dict(); + ASSERT_FALSE(d3.is_a_grid_of()); + ASSERT_THROW(d3.shape(), std::runtime_error); + ASSERT_THROW(d3.storage_order(), std::runtime_error); + ASSERT_THROW(d3.has_indexes(), std::runtime_error); + ASSERT_THROW(d3.elements(), std::runtime_error); + + ASSERT_THROW(Data::grid(x2.data(), {4, 3, 2}, {"x", "y"}), std::runtime_error); + ASSERT_THROW(Data::grid(x2.data(), {4, 3, 2}, {"w", "x", "y", "z"}), std::runtime_error); +} + + +TEST(libmuscle_mcp_data, grid_serialisation) { + // Tests serialising grids, also as an item in a list or a dict + std::vector x({1.0, 4.0, 9.0, 16.0}); + Data d = Data::grid(x.data(), {2, 2}, {"direction", "speed"}); + + msgpack::sbuffer buf; + msgpack::pack(buf, d); + auto zone = std::make_shared(); + auto d2 = unpack_data(zone, buf.data(), buf.size()); + + ASSERT_TRUE(d2.is_a_grid_of()); + ASSERT_EQ(d2.elements()[1], 4.0); + ASSERT_TRUE(d2.has_indexes()); + ASSERT_EQ(d2.indexes().at(1u), "speed"); + + Data d3 = Data::dict( + "year", "2000", + "data", d); + + msgpack::sbuffer buf2; + msgpack::pack(buf2, d3); + auto zone2 = std::make_shared(); + auto d4 = unpack_data(zone2, buf2.data(), buf2.size()); + + auto d5 = d4["data"]; + ASSERT_TRUE(d5.is_a_grid_of()); + ASSERT_EQ(d5.elements()[2], 9.0); + ASSERT_TRUE(d5.has_indexes()); + ASSERT_EQ(d5.indexes().at(0u), "direction"); + + Data d6 = Data::list(1, "test", d, d3); + + msgpack::sbuffer buf3; + msgpack::pack(buf3, d6); + auto zone3 = std::make_shared(); + auto d7 = unpack_data(zone3, buf3.data(), buf3.size()); + + ASSERT_TRUE(d7.is_a_list()); + ASSERT_EQ(d7.size(), 4u); + ASSERT_TRUE(d7[2].is_a_grid_of()); + ASSERT_EQ(d7[2].elements()[3], 16.0); + + ASSERT_TRUE(d7[3].is_a_dict()); + ASSERT_TRUE(d7[3]["data"].is_a_grid_of()); + ASSERT_EQ(d7[3]["data"].shape().at(0), 2u); + ASSERT_EQ(d7[3]["data"].shape().at(1), 2u); +} + + TEST(libmuscle_mcp_data, byte_array) { std::string test_data("Test data"); @@ -505,7 +605,6 @@ TEST(libmuscle_mcp_data, byte_array) { ASSERT_EQ(data.as_byte_array()[i], test_data[i]); } - TEST(libmuscle_mcp_data, byte_array_alloc) { std::string test_data("Test data"); diff --git a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.cc b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.cc index a1fd4210..7981e938 100644 --- a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.cc +++ b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.cc @@ -47,15 +47,27 @@ ::grpc::Status MuscleManager::Stub::SubmitLogMessage(::grpc::ClientContext* cont } void MuscleManager::Stub::experimental_async::SubmitLogMessage(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SubmitLogMessage_, context, request, response, std::move(f)); + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SubmitLogMessage_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::SubmitLogMessage(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::LogResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SubmitLogMessage_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::SubmitLogMessage(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SubmitLogMessage_, context, request, response, reactor); +} + +void MuscleManager::Stub::experimental_async::SubmitLogMessage(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SubmitLogMessage_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::LogResult>* MuscleManager::Stub::AsyncSubmitLogMessageRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::LogResult>::Create(channel_.get(), cq, rpcmethod_SubmitLogMessage_, context, request, true); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::LogResult>::Create(channel_.get(), cq, rpcmethod_SubmitLogMessage_, context, request, true); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::LogResult>* MuscleManager::Stub::PrepareAsyncSubmitLogMessageRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::LogResult>::Create(channel_.get(), cq, rpcmethod_SubmitLogMessage_, context, request, false); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::LogResult>::Create(channel_.get(), cq, rpcmethod_SubmitLogMessage_, context, request, false); } ::grpc::Status MuscleManager::Stub::SubmitProfileEvents(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile& request, ::muscle_manager_protocol::ProfileResult* response) { @@ -63,15 +75,27 @@ ::grpc::Status MuscleManager::Stub::SubmitProfileEvents(::grpc::ClientContext* c } void MuscleManager::Stub::experimental_async::SubmitProfileEvents(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SubmitProfileEvents_, context, request, response, std::move(f)); + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SubmitProfileEvents_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::SubmitProfileEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::ProfileResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_SubmitProfileEvents_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::SubmitProfileEvents(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SubmitProfileEvents_, context, request, response, reactor); +} + +void MuscleManager::Stub::experimental_async::SubmitProfileEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_SubmitProfileEvents_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::ProfileResult>* MuscleManager::Stub::AsyncSubmitProfileEventsRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::ProfileResult>::Create(channel_.get(), cq, rpcmethod_SubmitProfileEvents_, context, request, true); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::ProfileResult>::Create(channel_.get(), cq, rpcmethod_SubmitProfileEvents_, context, request, true); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::ProfileResult>* MuscleManager::Stub::PrepareAsyncSubmitProfileEventsRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::ProfileResult>::Create(channel_.get(), cq, rpcmethod_SubmitProfileEvents_, context, request, false); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::ProfileResult>::Create(channel_.get(), cq, rpcmethod_SubmitProfileEvents_, context, request, false); } ::grpc::Status MuscleManager::Stub::RequestSettings(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest& request, ::muscle_manager_protocol::SettingsResult* response) { @@ -79,15 +103,27 @@ ::grpc::Status MuscleManager::Stub::RequestSettings(::grpc::ClientContext* conte } void MuscleManager::Stub::experimental_async::RequestSettings(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RequestSettings_, context, request, response, std::move(f)); + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RequestSettings_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::RequestSettings(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::SettingsResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RequestSettings_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::RequestSettings(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RequestSettings_, context, request, response, reactor); +} + +void MuscleManager::Stub::experimental_async::RequestSettings(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RequestSettings_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::SettingsResult>* MuscleManager::Stub::AsyncRequestSettingsRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::SettingsResult>::Create(channel_.get(), cq, rpcmethod_RequestSettings_, context, request, true); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::SettingsResult>::Create(channel_.get(), cq, rpcmethod_RequestSettings_, context, request, true); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::SettingsResult>* MuscleManager::Stub::PrepareAsyncRequestSettingsRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::SettingsResult>::Create(channel_.get(), cq, rpcmethod_RequestSettings_, context, request, false); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::SettingsResult>::Create(channel_.get(), cq, rpcmethod_RequestSettings_, context, request, false); } ::grpc::Status MuscleManager::Stub::RegisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest& request, ::muscle_manager_protocol::RegistrationResult* response) { @@ -95,15 +131,27 @@ ::grpc::Status MuscleManager::Stub::RegisterInstance(::grpc::ClientContext* cont } void MuscleManager::Stub::experimental_async::RegisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RegisterInstance_, context, request, response, std::move(f)); + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RegisterInstance_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::RegisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::RegistrationResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RegisterInstance_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::RegisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RegisterInstance_, context, request, response, reactor); +} + +void MuscleManager::Stub::experimental_async::RegisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RegisterInstance_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::RegistrationResult>* MuscleManager::Stub::AsyncRegisterInstanceRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::RegistrationResult>::Create(channel_.get(), cq, rpcmethod_RegisterInstance_, context, request, true); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::RegistrationResult>::Create(channel_.get(), cq, rpcmethod_RegisterInstance_, context, request, true); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::RegistrationResult>* MuscleManager::Stub::PrepareAsyncRegisterInstanceRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::RegistrationResult>::Create(channel_.get(), cq, rpcmethod_RegisterInstance_, context, request, false); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::RegistrationResult>::Create(channel_.get(), cq, rpcmethod_RegisterInstance_, context, request, false); } ::grpc::Status MuscleManager::Stub::RequestPeers(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest& request, ::muscle_manager_protocol::PeerResult* response) { @@ -111,15 +159,27 @@ ::grpc::Status MuscleManager::Stub::RequestPeers(::grpc::ClientContext* context, } void MuscleManager::Stub::experimental_async::RequestPeers(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RequestPeers_, context, request, response, std::move(f)); + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RequestPeers_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::RequestPeers(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::PeerResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_RequestPeers_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::RequestPeers(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RequestPeers_, context, request, response, reactor); +} + +void MuscleManager::Stub::experimental_async::RequestPeers(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_RequestPeers_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::PeerResult>* MuscleManager::Stub::AsyncRequestPeersRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::PeerResult>::Create(channel_.get(), cq, rpcmethod_RequestPeers_, context, request, true); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::PeerResult>::Create(channel_.get(), cq, rpcmethod_RequestPeers_, context, request, true); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::PeerResult>* MuscleManager::Stub::PrepareAsyncRequestPeersRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::PeerResult>::Create(channel_.get(), cq, rpcmethod_RequestPeers_, context, request, false); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::PeerResult>::Create(channel_.get(), cq, rpcmethod_RequestPeers_, context, request, false); } ::grpc::Status MuscleManager::Stub::DeregisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest& request, ::muscle_manager_protocol::DeregistrationResult* response) { @@ -127,15 +187,27 @@ ::grpc::Status MuscleManager::Stub::DeregisterInstance(::grpc::ClientContext* co } void MuscleManager::Stub::experimental_async::DeregisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, std::function f) { - return ::grpc::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DeregisterInstance_, context, request, response, std::move(f)); + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DeregisterInstance_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::DeregisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::DeregistrationResult* response, std::function f) { + ::grpc_impl::internal::CallbackUnaryCall(stub_->channel_.get(), stub_->rpcmethod_DeregisterInstance_, context, request, response, std::move(f)); +} + +void MuscleManager::Stub::experimental_async::DeregisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_DeregisterInstance_, context, request, response, reactor); +} + +void MuscleManager::Stub::experimental_async::DeregisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) { + ::grpc_impl::internal::ClientCallbackUnaryFactory::Create(stub_->channel_.get(), stub_->rpcmethod_DeregisterInstance_, context, request, response, reactor); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::DeregistrationResult>* MuscleManager::Stub::AsyncDeregisterInstanceRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::DeregistrationResult>::Create(channel_.get(), cq, rpcmethod_DeregisterInstance_, context, request, true); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::DeregistrationResult>::Create(channel_.get(), cq, rpcmethod_DeregisterInstance_, context, request, true); } ::grpc::ClientAsyncResponseReader< ::muscle_manager_protocol::DeregistrationResult>* MuscleManager::Stub::PrepareAsyncDeregisterInstanceRaw(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest& request, ::grpc::CompletionQueue* cq) { - return ::grpc::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::DeregistrationResult>::Create(channel_.get(), cq, rpcmethod_DeregisterInstance_, context, request, false); + return ::grpc_impl::internal::ClientAsyncResponseReaderFactory< ::muscle_manager_protocol::DeregistrationResult>::Create(channel_.get(), cq, rpcmethod_DeregisterInstance_, context, request, false); } MuscleManager::Service::Service() { diff --git a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.h b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.h index 58f3263f..2a33063d 100644 --- a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.h +++ b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.grpc.pb.h @@ -10,20 +10,30 @@ #include #include #include +#include +#include +#include #include #include #include #include +#include #include #include #include #include -namespace grpc { +namespace grpc_impl { class CompletionQueue; -class Channel; class ServerCompletionQueue; class ServerContext; +} // namespace grpc_impl + +namespace grpc { +namespace experimental { +template +class MessageAllocator; +} // namespace experimental } // namespace grpc namespace muscle_manager_protocol { @@ -90,16 +100,34 @@ class MuscleManager final { virtual ~experimental_async_interface() {} // Sends a logged message to the Manager virtual void SubmitLogMessage(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, std::function) = 0; + virtual void SubmitLogMessage(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::LogResult* response, std::function) = 0; + virtual void SubmitLogMessage(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void SubmitLogMessage(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // Sends a batch of profiling events to the Manager virtual void SubmitProfileEvents(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, std::function) = 0; + virtual void SubmitProfileEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::ProfileResult* response, std::function) = 0; + virtual void SubmitProfileEvents(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void SubmitProfileEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // Requests the global base settings virtual void RequestSettings(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, std::function) = 0; + virtual void RequestSettings(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::SettingsResult* response, std::function) = 0; + virtual void RequestSettings(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void RequestSettings(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // Registers a newly started kernel instance virtual void RegisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, std::function) = 0; + virtual void RegisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::RegistrationResult* response, std::function) = 0; + virtual void RegisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void RegisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // Requests information about peers virtual void RequestPeers(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, std::function) = 0; + virtual void RequestPeers(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::PeerResult* response, std::function) = 0; + virtual void RequestPeers(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void RequestPeers(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; // Deregisters an instance on shutdown virtual void DeregisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, std::function) = 0; + virtual void DeregisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::DeregistrationResult* response, std::function) = 0; + virtual void DeregisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; + virtual void DeregisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) = 0; }; virtual class experimental_async_interface* experimental_async() { return nullptr; } private: @@ -165,11 +193,29 @@ class MuscleManager final { public StubInterface::experimental_async_interface { public: void SubmitLogMessage(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, std::function) override; + void SubmitLogMessage(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::LogResult* response, std::function) override; + void SubmitLogMessage(::grpc::ClientContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void SubmitLogMessage(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void SubmitProfileEvents(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, std::function) override; + void SubmitProfileEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::ProfileResult* response, std::function) override; + void SubmitProfileEvents(::grpc::ClientContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void SubmitProfileEvents(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void RequestSettings(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, std::function) override; + void RequestSettings(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::SettingsResult* response, std::function) override; + void RequestSettings(::grpc::ClientContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void RequestSettings(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void RegisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, std::function) override; + void RegisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::RegistrationResult* response, std::function) override; + void RegisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void RegisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void RequestPeers(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, std::function) override; + void RequestPeers(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::PeerResult* response, std::function) override; + void RequestPeers(::grpc::ClientContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void RequestPeers(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; void DeregisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, std::function) override; + void DeregisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::DeregistrationResult* response, std::function) override; + void DeregisterInstance(::grpc::ClientContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; + void DeregisterInstance(::grpc::ClientContext* context, const ::grpc::ByteBuffer* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ClientUnaryReactor* reactor) override; private: friend class Stub; explicit experimental_async(Stub* stub): stub_(stub) { } @@ -222,7 +268,7 @@ class MuscleManager final { template class WithAsyncMethod_SubmitLogMessage : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_SubmitLogMessage() { ::grpc::Service::MarkMethodAsync(0); @@ -231,7 +277,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitLogMessage(::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response) override { + ::grpc::Status SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::LogMessage* /*request*/, ::muscle_manager_protocol::LogResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -242,7 +288,7 @@ class MuscleManager final { template class WithAsyncMethod_SubmitProfileEvents : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_SubmitProfileEvents() { ::grpc::Service::MarkMethodAsync(1); @@ -251,7 +297,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response) override { + ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::Profile* /*request*/, ::muscle_manager_protocol::ProfileResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -262,7 +308,7 @@ class MuscleManager final { template class WithAsyncMethod_RequestSettings : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_RequestSettings() { ::grpc::Service::MarkMethodAsync(2); @@ -271,7 +317,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestSettings(::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response) override { + ::grpc::Status RequestSettings(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::SettingsRequest* /*request*/, ::muscle_manager_protocol::SettingsResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -282,7 +328,7 @@ class MuscleManager final { template class WithAsyncMethod_RegisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_RegisterInstance() { ::grpc::Service::MarkMethodAsync(3); @@ -291,7 +337,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RegisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response) override { + ::grpc::Status RegisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::RegistrationRequest* /*request*/, ::muscle_manager_protocol::RegistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -302,7 +348,7 @@ class MuscleManager final { template class WithAsyncMethod_RequestPeers : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_RequestPeers() { ::grpc::Service::MarkMethodAsync(4); @@ -311,7 +357,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestPeers(::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response) override { + ::grpc::Status RequestPeers(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::PeerRequest* /*request*/, ::muscle_manager_protocol::PeerResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -322,7 +368,7 @@ class MuscleManager final { template class WithAsyncMethod_DeregisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithAsyncMethod_DeregisterInstance() { ::grpc::Service::MarkMethodAsync(5); @@ -331,7 +377,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DeregisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response) override { + ::grpc::Status DeregisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::DeregistrationRequest* /*request*/, ::muscle_manager_protocol::DeregistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -343,158 +389,194 @@ class MuscleManager final { template class ExperimentalWithCallbackMethod_SubmitLogMessage : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_SubmitLogMessage() { ::grpc::Service::experimental().MarkMethodCallback(0, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_SubmitLogMessage, ::muscle_manager_protocol::LogMessage, ::muscle_manager_protocol::LogResult>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::LogMessage, ::muscle_manager_protocol::LogResult>( [this](::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { - this->SubmitLogMessage(context, request, response, controller); - }, this)); + return this->SubmitLogMessage(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_SubmitLogMessage( + ::grpc::experimental::MessageAllocator< ::muscle_manager_protocol::LogMessage, ::muscle_manager_protocol::LogResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::LogMessage, ::muscle_manager_protocol::LogResult>*>( + ::grpc::Service::experimental().GetHandler(0)) + ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_SubmitLogMessage() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitLogMessage(::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response) override { + ::grpc::Status SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::LogMessage* /*request*/, ::muscle_manager_protocol::LogResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void SubmitLogMessage(::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::LogMessage* /*request*/, ::muscle_manager_protocol::LogResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_SubmitProfileEvents : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_SubmitProfileEvents() { ::grpc::Service::experimental().MarkMethodCallback(1, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_SubmitProfileEvents, ::muscle_manager_protocol::Profile, ::muscle_manager_protocol::ProfileResult>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::Profile, ::muscle_manager_protocol::ProfileResult>( [this](::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { - this->SubmitProfileEvents(context, request, response, controller); - }, this)); + return this->SubmitProfileEvents(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_SubmitProfileEvents( + ::grpc::experimental::MessageAllocator< ::muscle_manager_protocol::Profile, ::muscle_manager_protocol::ProfileResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::Profile, ::muscle_manager_protocol::ProfileResult>*>( + ::grpc::Service::experimental().GetHandler(1)) + ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_SubmitProfileEvents() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response) override { + ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::Profile* /*request*/, ::muscle_manager_protocol::ProfileResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void SubmitProfileEvents(::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::Profile* /*request*/, ::muscle_manager_protocol::ProfileResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_RequestSettings : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_RequestSettings() { ::grpc::Service::experimental().MarkMethodCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_RequestSettings, ::muscle_manager_protocol::SettingsRequest, ::muscle_manager_protocol::SettingsResult>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::SettingsRequest, ::muscle_manager_protocol::SettingsResult>( [this](::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { - this->RequestSettings(context, request, response, controller); - }, this)); + return this->RequestSettings(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_RequestSettings( + ::grpc::experimental::MessageAllocator< ::muscle_manager_protocol::SettingsRequest, ::muscle_manager_protocol::SettingsResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::SettingsRequest, ::muscle_manager_protocol::SettingsResult>*>( + ::grpc::Service::experimental().GetHandler(2)) + ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_RequestSettings() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestSettings(::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response) override { + ::grpc::Status RequestSettings(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::SettingsRequest* /*request*/, ::muscle_manager_protocol::SettingsResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void RequestSettings(::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void RequestSettings(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::SettingsRequest* /*request*/, ::muscle_manager_protocol::SettingsResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_RegisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_RegisterInstance() { ::grpc::Service::experimental().MarkMethodCallback(3, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_RegisterInstance, ::muscle_manager_protocol::RegistrationRequest, ::muscle_manager_protocol::RegistrationResult>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::RegistrationRequest, ::muscle_manager_protocol::RegistrationResult>( [this](::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { - this->RegisterInstance(context, request, response, controller); - }, this)); + return this->RegisterInstance(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_RegisterInstance( + ::grpc::experimental::MessageAllocator< ::muscle_manager_protocol::RegistrationRequest, ::muscle_manager_protocol::RegistrationResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::RegistrationRequest, ::muscle_manager_protocol::RegistrationResult>*>( + ::grpc::Service::experimental().GetHandler(3)) + ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_RegisterInstance() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RegisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response) override { + ::grpc::Status RegisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::RegistrationRequest* /*request*/, ::muscle_manager_protocol::RegistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void RegisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void RegisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::RegistrationRequest* /*request*/, ::muscle_manager_protocol::RegistrationResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_RequestPeers : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_RequestPeers() { ::grpc::Service::experimental().MarkMethodCallback(4, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_RequestPeers, ::muscle_manager_protocol::PeerRequest, ::muscle_manager_protocol::PeerResult>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::PeerRequest, ::muscle_manager_protocol::PeerResult>( [this](::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { - this->RequestPeers(context, request, response, controller); - }, this)); + return this->RequestPeers(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_RequestPeers( + ::grpc::experimental::MessageAllocator< ::muscle_manager_protocol::PeerRequest, ::muscle_manager_protocol::PeerResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::PeerRequest, ::muscle_manager_protocol::PeerResult>*>( + ::grpc::Service::experimental().GetHandler(4)) + ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_RequestPeers() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestPeers(::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response) override { + ::grpc::Status RequestPeers(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::PeerRequest* /*request*/, ::muscle_manager_protocol::PeerResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void RequestPeers(::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void RequestPeers(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::PeerRequest* /*request*/, ::muscle_manager_protocol::PeerResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithCallbackMethod_DeregisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithCallbackMethod_DeregisterInstance() { ::grpc::Service::experimental().MarkMethodCallback(5, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithCallbackMethod_DeregisterInstance, ::muscle_manager_protocol::DeregistrationRequest, ::muscle_manager_protocol::DeregistrationResult>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::DeregistrationRequest, ::muscle_manager_protocol::DeregistrationResult>( [this](::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { - this->DeregisterInstance(context, request, response, controller); - }, this)); + return this->DeregisterInstance(context, request, response, controller); + })); + } + void SetMessageAllocatorFor_DeregisterInstance( + ::grpc::experimental::MessageAllocator< ::muscle_manager_protocol::DeregistrationRequest, ::muscle_manager_protocol::DeregistrationResult>* allocator) { + static_cast<::grpc_impl::internal::CallbackUnaryHandler< ::muscle_manager_protocol::DeregistrationRequest, ::muscle_manager_protocol::DeregistrationResult>*>( + ::grpc::Service::experimental().GetHandler(5)) + ->SetMessageAllocator(allocator); } ~ExperimentalWithCallbackMethod_DeregisterInstance() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DeregisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response) override { + ::grpc::Status DeregisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::DeregistrationRequest* /*request*/, ::muscle_manager_protocol::DeregistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void DeregisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void DeregisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::DeregistrationRequest* /*request*/, ::muscle_manager_protocol::DeregistrationResult* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; typedef ExperimentalWithCallbackMethod_SubmitLogMessage > > > > > ExperimentalCallbackService; template class WithGenericMethod_SubmitLogMessage : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_SubmitLogMessage() { ::grpc::Service::MarkMethodGeneric(0); @@ -503,7 +585,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitLogMessage(::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response) override { + ::grpc::Status SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::LogMessage* /*request*/, ::muscle_manager_protocol::LogResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -511,7 +593,7 @@ class MuscleManager final { template class WithGenericMethod_SubmitProfileEvents : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_SubmitProfileEvents() { ::grpc::Service::MarkMethodGeneric(1); @@ -520,7 +602,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response) override { + ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::Profile* /*request*/, ::muscle_manager_protocol::ProfileResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -528,7 +610,7 @@ class MuscleManager final { template class WithGenericMethod_RequestSettings : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_RequestSettings() { ::grpc::Service::MarkMethodGeneric(2); @@ -537,7 +619,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestSettings(::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response) override { + ::grpc::Status RequestSettings(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::SettingsRequest* /*request*/, ::muscle_manager_protocol::SettingsResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -545,7 +627,7 @@ class MuscleManager final { template class WithGenericMethod_RegisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_RegisterInstance() { ::grpc::Service::MarkMethodGeneric(3); @@ -554,7 +636,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RegisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response) override { + ::grpc::Status RegisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::RegistrationRequest* /*request*/, ::muscle_manager_protocol::RegistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -562,7 +644,7 @@ class MuscleManager final { template class WithGenericMethod_RequestPeers : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_RequestPeers() { ::grpc::Service::MarkMethodGeneric(4); @@ -571,7 +653,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestPeers(::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response) override { + ::grpc::Status RequestPeers(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::PeerRequest* /*request*/, ::muscle_manager_protocol::PeerResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -579,7 +661,7 @@ class MuscleManager final { template class WithGenericMethod_DeregisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithGenericMethod_DeregisterInstance() { ::grpc::Service::MarkMethodGeneric(5); @@ -588,7 +670,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DeregisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response) override { + ::grpc::Status DeregisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::DeregistrationRequest* /*request*/, ::muscle_manager_protocol::DeregistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -596,7 +678,7 @@ class MuscleManager final { template class WithRawMethod_SubmitLogMessage : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_SubmitLogMessage() { ::grpc::Service::MarkMethodRaw(0); @@ -605,7 +687,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitLogMessage(::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response) override { + ::grpc::Status SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::LogMessage* /*request*/, ::muscle_manager_protocol::LogResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -616,7 +698,7 @@ class MuscleManager final { template class WithRawMethod_SubmitProfileEvents : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_SubmitProfileEvents() { ::grpc::Service::MarkMethodRaw(1); @@ -625,7 +707,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response) override { + ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::Profile* /*request*/, ::muscle_manager_protocol::ProfileResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -636,7 +718,7 @@ class MuscleManager final { template class WithRawMethod_RequestSettings : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_RequestSettings() { ::grpc::Service::MarkMethodRaw(2); @@ -645,7 +727,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestSettings(::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response) override { + ::grpc::Status RequestSettings(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::SettingsRequest* /*request*/, ::muscle_manager_protocol::SettingsResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -656,7 +738,7 @@ class MuscleManager final { template class WithRawMethod_RegisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_RegisterInstance() { ::grpc::Service::MarkMethodRaw(3); @@ -665,7 +747,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RegisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response) override { + ::grpc::Status RegisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::RegistrationRequest* /*request*/, ::muscle_manager_protocol::RegistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -676,7 +758,7 @@ class MuscleManager final { template class WithRawMethod_RequestPeers : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_RequestPeers() { ::grpc::Service::MarkMethodRaw(4); @@ -685,7 +767,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestPeers(::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response) override { + ::grpc::Status RequestPeers(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::PeerRequest* /*request*/, ::muscle_manager_protocol::PeerResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -696,7 +778,7 @@ class MuscleManager final { template class WithRawMethod_DeregisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithRawMethod_DeregisterInstance() { ::grpc::Service::MarkMethodRaw(5); @@ -705,7 +787,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DeregisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response) override { + ::grpc::Status DeregisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::DeregistrationRequest* /*request*/, ::muscle_manager_protocol::DeregistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -716,157 +798,157 @@ class MuscleManager final { template class ExperimentalWithRawCallbackMethod_SubmitLogMessage : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_SubmitLogMessage() { ::grpc::Service::experimental().MarkMethodRawCallback(0, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_SubmitLogMessage, ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { this->SubmitLogMessage(context, request, response, controller); - }, this)); + })); } ~ExperimentalWithRawCallbackMethod_SubmitLogMessage() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitLogMessage(::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response) override { + ::grpc::Status SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::LogMessage* /*request*/, ::muscle_manager_protocol::LogResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void SubmitLogMessage(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithRawCallbackMethod_SubmitProfileEvents : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_SubmitProfileEvents() { ::grpc::Service::experimental().MarkMethodRawCallback(1, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_SubmitProfileEvents, ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { this->SubmitProfileEvents(context, request, response, controller); - }, this)); + })); } ~ExperimentalWithRawCallbackMethod_SubmitProfileEvents() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response) override { + ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::Profile* /*request*/, ::muscle_manager_protocol::ProfileResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void SubmitProfileEvents(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithRawCallbackMethod_RequestSettings : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_RequestSettings() { ::grpc::Service::experimental().MarkMethodRawCallback(2, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_RequestSettings, ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { this->RequestSettings(context, request, response, controller); - }, this)); + })); } ~ExperimentalWithRawCallbackMethod_RequestSettings() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestSettings(::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response) override { + ::grpc::Status RequestSettings(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::SettingsRequest* /*request*/, ::muscle_manager_protocol::SettingsResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void RequestSettings(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void RequestSettings(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithRawCallbackMethod_RegisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_RegisterInstance() { ::grpc::Service::experimental().MarkMethodRawCallback(3, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_RegisterInstance, ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { this->RegisterInstance(context, request, response, controller); - }, this)); + })); } ~ExperimentalWithRawCallbackMethod_RegisterInstance() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RegisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response) override { + ::grpc::Status RegisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::RegistrationRequest* /*request*/, ::muscle_manager_protocol::RegistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void RegisterInstance(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void RegisterInstance(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithRawCallbackMethod_RequestPeers : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_RequestPeers() { ::grpc::Service::experimental().MarkMethodRawCallback(4, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_RequestPeers, ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { this->RequestPeers(context, request, response, controller); - }, this)); + })); } ~ExperimentalWithRawCallbackMethod_RequestPeers() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status RequestPeers(::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response) override { + ::grpc::Status RequestPeers(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::PeerRequest* /*request*/, ::muscle_manager_protocol::PeerResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void RequestPeers(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void RequestPeers(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class ExperimentalWithRawCallbackMethod_DeregisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: ExperimentalWithRawCallbackMethod_DeregisterInstance() { ::grpc::Service::experimental().MarkMethodRawCallback(5, - new ::grpc::internal::CallbackUnaryHandler< ExperimentalWithRawCallbackMethod_DeregisterInstance, ::grpc::ByteBuffer, ::grpc::ByteBuffer>( + new ::grpc_impl::internal::CallbackUnaryHandler< ::grpc::ByteBuffer, ::grpc::ByteBuffer>( [this](::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { this->DeregisterInstance(context, request, response, controller); - }, this)); + })); } ~ExperimentalWithRawCallbackMethod_DeregisterInstance() override { BaseClassMustBeDerivedFromService(this); } // disable synchronous version of this method - ::grpc::Status DeregisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response) override { + ::grpc::Status DeregisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::DeregistrationRequest* /*request*/, ::muscle_manager_protocol::DeregistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } - virtual void DeregisterInstance(::grpc::ServerContext* context, const ::grpc::ByteBuffer* request, ::grpc::ByteBuffer* response, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } + virtual void DeregisterInstance(::grpc::ServerContext* /*context*/, const ::grpc::ByteBuffer* /*request*/, ::grpc::ByteBuffer* /*response*/, ::grpc::experimental::ServerCallbackRpcController* controller) { controller->Finish(::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, "")); } }; template class WithStreamedUnaryMethod_SubmitLogMessage : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_SubmitLogMessage() { ::grpc::Service::MarkMethodStreamed(0, @@ -876,7 +958,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status SubmitLogMessage(::grpc::ServerContext* context, const ::muscle_manager_protocol::LogMessage* request, ::muscle_manager_protocol::LogResult* response) override { + ::grpc::Status SubmitLogMessage(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::LogMessage* /*request*/, ::muscle_manager_protocol::LogResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -886,7 +968,7 @@ class MuscleManager final { template class WithStreamedUnaryMethod_SubmitProfileEvents : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_SubmitProfileEvents() { ::grpc::Service::MarkMethodStreamed(1, @@ -896,7 +978,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* context, const ::muscle_manager_protocol::Profile* request, ::muscle_manager_protocol::ProfileResult* response) override { + ::grpc::Status SubmitProfileEvents(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::Profile* /*request*/, ::muscle_manager_protocol::ProfileResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -906,7 +988,7 @@ class MuscleManager final { template class WithStreamedUnaryMethod_RequestSettings : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_RequestSettings() { ::grpc::Service::MarkMethodStreamed(2, @@ -916,7 +998,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status RequestSettings(::grpc::ServerContext* context, const ::muscle_manager_protocol::SettingsRequest* request, ::muscle_manager_protocol::SettingsResult* response) override { + ::grpc::Status RequestSettings(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::SettingsRequest* /*request*/, ::muscle_manager_protocol::SettingsResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -926,7 +1008,7 @@ class MuscleManager final { template class WithStreamedUnaryMethod_RegisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_RegisterInstance() { ::grpc::Service::MarkMethodStreamed(3, @@ -936,7 +1018,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status RegisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::RegistrationRequest* request, ::muscle_manager_protocol::RegistrationResult* response) override { + ::grpc::Status RegisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::RegistrationRequest* /*request*/, ::muscle_manager_protocol::RegistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -946,7 +1028,7 @@ class MuscleManager final { template class WithStreamedUnaryMethod_RequestPeers : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_RequestPeers() { ::grpc::Service::MarkMethodStreamed(4, @@ -956,7 +1038,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status RequestPeers(::grpc::ServerContext* context, const ::muscle_manager_protocol::PeerRequest* request, ::muscle_manager_protocol::PeerResult* response) override { + ::grpc::Status RequestPeers(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::PeerRequest* /*request*/, ::muscle_manager_protocol::PeerResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } @@ -966,7 +1048,7 @@ class MuscleManager final { template class WithStreamedUnaryMethod_DeregisterInstance : public BaseClass { private: - void BaseClassMustBeDerivedFromService(const Service *service) {} + void BaseClassMustBeDerivedFromService(const Service* /*service*/) {} public: WithStreamedUnaryMethod_DeregisterInstance() { ::grpc::Service::MarkMethodStreamed(5, @@ -976,7 +1058,7 @@ class MuscleManager final { BaseClassMustBeDerivedFromService(this); } // disable regular version of this method - ::grpc::Status DeregisterInstance(::grpc::ServerContext* context, const ::muscle_manager_protocol::DeregistrationRequest* request, ::muscle_manager_protocol::DeregistrationResult* response) override { + ::grpc::Status DeregisterInstance(::grpc::ServerContext* /*context*/, const ::muscle_manager_protocol::DeregistrationRequest* /*request*/, ::muscle_manager_protocol::DeregistrationResult* /*response*/) override { abort(); return ::grpc::Status(::grpc::StatusCode::UNIMPLEMENTED, ""); } diff --git a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.cc b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.cc index a0ce2194..e0129ff8 100644 --- a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.cc +++ b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.cc @@ -5,428 +5,403 @@ #include -#include #include #include -#include +#include #include #include #include #include // @@protoc_insertion_point(includes) #include - -extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; -extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_google_2fprotobuf_2ftimestamp_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; +extern PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; namespace muscle_manager_protocol { class LogMessageDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _LogMessage_default_instance_; class LogResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _LogResult_default_instance_; class PortDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Port_default_instance_; class ProfileEventDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ProfileEvent_default_instance_; class ProfileDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Profile_default_instance_; class ProfileResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ProfileResult_default_instance_; class RegistrationRequestDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _RegistrationRequest_default_instance_; class RegistrationResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _RegistrationResult_default_instance_; class ConduitDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Conduit_default_instance_; class PeerRequestDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _PeerRequest_default_instance_; class PeerResult_PeerDimensionsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _PeerResult_PeerDimensions_default_instance_; class PeerResult_PeerLocationsDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _PeerResult_PeerLocations_default_instance_; class PeerResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _PeerResult_default_instance_; class ListOfDoubleDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ListOfDouble_default_instance_; class ListOfListOfDoubleDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _ListOfListOfDouble_default_instance_; class SettingDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _Setting_default_instance_; class SettingsRequestDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _SettingsRequest_default_instance_; class SettingsResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _SettingsResult_default_instance_; class DeregistrationRequestDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _DeregistrationRequest_default_instance_; class DeregistrationResultDefaultTypeInternal { public: - ::google::protobuf::internal::ExplicitlyConstructed _instance; + ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed _instance; } _DeregistrationResult_default_instance_; } // namespace muscle_manager_protocol -static void InitDefaultsLogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_LogMessage_default_instance_; - new (ptr) ::muscle_manager_protocol::LogMessage(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_Conduit_default_instance_; + new (ptr) ::muscle_manager_protocol::Conduit(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::LogMessage::InitAsDefaultInstance(); + ::muscle_manager_protocol::Conduit::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsLogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsLogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_LogResult_default_instance_; - new (ptr) ::muscle_manager_protocol::LogResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_DeregistrationRequest_default_instance_; + new (ptr) ::muscle_manager_protocol::DeregistrationRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::LogResult::InitAsDefaultInstance(); + ::muscle_manager_protocol::DeregistrationRequest::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsLogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsPort_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_Port_default_instance_; - new (ptr) ::muscle_manager_protocol::Port(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_DeregistrationResult_default_instance_; + new (ptr) ::muscle_manager_protocol::DeregistrationResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::Port::InitAsDefaultInstance(); + ::muscle_manager_protocol::DeregistrationResult::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPort_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_ProfileEvent_default_instance_; - new (ptr) ::muscle_manager_protocol::ProfileEvent(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_ListOfDouble_default_instance_; + new (ptr) ::muscle_manager_protocol::ListOfDouble(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::ProfileEvent::InitAsDefaultInstance(); + ::muscle_manager_protocol::ListOfDouble::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<2> scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base, - &scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsProfile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_Profile_default_instance_; - new (ptr) ::muscle_manager_protocol::Profile(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_ListOfListOfDouble_default_instance_; + new (ptr) ::muscle_manager_protocol::ListOfListOfDouble(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::Profile::InitAsDefaultInstance(); + ::muscle_manager_protocol::ListOfListOfDouble::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsProfile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; -static void InitDefaultsProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_ProfileResult_default_instance_; - new (ptr) ::muscle_manager_protocol::ProfileResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_LogMessage_default_instance_; + new (ptr) ::muscle_manager_protocol::LogMessage(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::ProfileResult::InitAsDefaultInstance(); + ::muscle_manager_protocol::LogMessage::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base,}}; -static void InitDefaultsRegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_RegistrationRequest_default_instance_; - new (ptr) ::muscle_manager_protocol::RegistrationRequest(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_LogResult_default_instance_; + new (ptr) ::muscle_manager_protocol::LogResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::RegistrationRequest::InitAsDefaultInstance(); + ::muscle_manager_protocol::LogResult::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsRegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsRegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_RegistrationResult_default_instance_; - new (ptr) ::muscle_manager_protocol::RegistrationResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_PeerRequest_default_instance_; + new (ptr) ::muscle_manager_protocol::PeerRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::RegistrationResult::InitAsDefaultInstance(); + ::muscle_manager_protocol::PeerRequest::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsRegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsConduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_Conduit_default_instance_; - new (ptr) ::muscle_manager_protocol::Conduit(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_PeerResult_default_instance_; + new (ptr) ::muscle_manager_protocol::PeerResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::Conduit::InitAsDefaultInstance(); + ::muscle_manager_protocol::PeerResult::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsConduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; -static void InitDefaultsPeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_PeerRequest_default_instance_; - new (ptr) ::muscle_manager_protocol::PeerRequest(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_PeerResult_PeerDimensions_default_instance_; + new (ptr) ::muscle_manager_protocol::PeerResult_PeerDimensions(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::PeerRequest::InitAsDefaultInstance(); + ::muscle_manager_protocol::PeerResult_PeerDimensions::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsPeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_PeerResult_PeerDimensions_default_instance_; - new (ptr) ::muscle_manager_protocol::PeerResult_PeerDimensions(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_PeerResult_PeerLocations_default_instance_; + new (ptr) ::muscle_manager_protocol::PeerResult_PeerLocations(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::PeerResult_PeerDimensions::InitAsDefaultInstance(); + ::muscle_manager_protocol::PeerResult_PeerLocations::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsPeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_PeerResult_PeerLocations_default_instance_; - new (ptr) ::muscle_manager_protocol::PeerResult_PeerLocations(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_Port_default_instance_; + new (ptr) ::muscle_manager_protocol::Port(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::PeerResult_PeerLocations::InitAsDefaultInstance(); + ::muscle_manager_protocol::Port::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsPeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsPeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_PeerResult_default_instance_; - new (ptr) ::muscle_manager_protocol::PeerResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_Profile_default_instance_; + new (ptr) ::muscle_manager_protocol::Profile(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::PeerResult::InitAsDefaultInstance(); + ::muscle_manager_protocol::Profile::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<3> scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 3, InitDefaultsPeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, - &scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, - &scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; -static void InitDefaultsListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_ListOfDouble_default_instance_; - new (ptr) ::muscle_manager_protocol::ListOfDouble(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_ProfileEvent_default_instance_; + new (ptr) ::muscle_manager_protocol::ProfileEvent(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::ListOfDouble::InitAsDefaultInstance(); + ::muscle_manager_protocol::ProfileEvent::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_Timestamp_google_2fprotobuf_2ftimestamp_2eproto.base, + &scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; -static void InitDefaultsListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_ListOfListOfDouble_default_instance_; - new (ptr) ::muscle_manager_protocol::ListOfListOfDouble(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_ProfileResult_default_instance_; + new (ptr) ::muscle_manager_protocol::ProfileResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::ListOfListOfDouble::InitAsDefaultInstance(); + ::muscle_manager_protocol::ProfileResult::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsSetting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_Setting_default_instance_; - new (ptr) ::muscle_manager_protocol::Setting(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_RegistrationRequest_default_instance_; + new (ptr) ::muscle_manager_protocol::RegistrationRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::Setting::InitAsDefaultInstance(); + ::muscle_manager_protocol::RegistrationRequest::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<2> scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsSetting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, - &scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; -static void InitDefaultsSettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_SettingsRequest_default_instance_; - new (ptr) ::muscle_manager_protocol::SettingsRequest(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_RegistrationResult_default_instance_; + new (ptr) ::muscle_manager_protocol::RegistrationResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::SettingsRequest::InitAsDefaultInstance(); + ::muscle_manager_protocol::RegistrationResult::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsSettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsSettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_SettingsResult_default_instance_; - new (ptr) ::muscle_manager_protocol::SettingsResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_Setting_default_instance_; + new (ptr) ::muscle_manager_protocol::Setting(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::SettingsResult::InitAsDefaultInstance(); + ::muscle_manager_protocol::Setting::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<1> scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsSettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { - &scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<2> scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 2, 0, InitDefaultsscc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; -static void InitDefaultsDeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_DeregistrationRequest_default_instance_; - new (ptr) ::muscle_manager_protocol::DeregistrationRequest(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_SettingsRequest_default_instance_; + new (ptr) ::muscle_manager_protocol::SettingsRequest(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::DeregistrationRequest::InitAsDefaultInstance(); + ::muscle_manager_protocol::SettingsRequest::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; -static void InitDefaultsDeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { +static void InitDefaultsscc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { GOOGLE_PROTOBUF_VERIFY_VERSION; { - void* ptr = &::muscle_manager_protocol::_DeregistrationResult_default_instance_; - new (ptr) ::muscle_manager_protocol::DeregistrationResult(); - ::google::protobuf::internal::OnShutdownDestroyMessage(ptr); + void* ptr = &::muscle_manager_protocol::_SettingsResult_default_instance_; + new (ptr) ::muscle_manager_protocol::SettingsResult(); + ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr); } - ::muscle_manager_protocol::DeregistrationResult::InitAsDefaultInstance(); + ::muscle_manager_protocol::SettingsResult::InitAsDefaultInstance(); } -::google::protobuf::internal::SCCInfo<0> scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = - {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsDeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, {}}; - -void InitDefaults_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { - ::google::protobuf::internal::InitSCC(&scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - ::google::protobuf::internal::InitSCC(&scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); -} - -::google::protobuf::Metadata file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[20]; -const ::google::protobuf::EnumDescriptor* file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[5]; -constexpr ::google::protobuf::ServiceDescriptor const** file_level_service_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = nullptr; - -const ::google::protobuf::uint32 TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = + {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto}, { + &scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base,}}; + +static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[20]; +static const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[5]; +static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = nullptr; + +const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { ~0u, // no _has_bits_ PROTOBUF_FIELD_OFFSET(::muscle_manager_protocol::LogMessage, _internal_metadata_), ~0u, // no _extensions_ @@ -574,7 +549,7 @@ const ::google::protobuf::uint32 TableStruct_muscle_5fmanager_5fprotocol_2fmuscl PROTOBUF_FIELD_OFFSET(::muscle_manager_protocol::DeregistrationResult, status_), PROTOBUF_FIELD_OFFSET(::muscle_manager_protocol::DeregistrationResult, error_message_), }; -static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { +static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { { 0, -1, sizeof(::muscle_manager_protocol::LogMessage)}, { 9, -1, sizeof(::muscle_manager_protocol::LogResult)}, { 14, -1, sizeof(::muscle_manager_protocol::Port)}, @@ -597,36 +572,30 @@ static const ::google::protobuf::internal::MigrationSchema schemas[] PROTOBUF_SE { 139, -1, sizeof(::muscle_manager_protocol::DeregistrationResult)}, }; -static ::google::protobuf::Message const * const file_default_instances[] = { - reinterpret_cast(&::muscle_manager_protocol::_LogMessage_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_LogResult_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_Port_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_ProfileEvent_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_Profile_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_ProfileResult_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_RegistrationRequest_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_RegistrationResult_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_Conduit_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_PeerRequest_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_PeerResult_PeerDimensions_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_PeerResult_PeerLocations_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_PeerResult_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_ListOfDouble_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_ListOfListOfDouble_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_Setting_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_SettingsRequest_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_SettingsResult_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_DeregistrationRequest_default_instance_), - reinterpret_cast(&::muscle_manager_protocol::_DeregistrationResult_default_instance_), -}; - -::google::protobuf::internal::AssignDescriptorsTable assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = { - {}, AddDescriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, "muscle_manager_protocol/muscle_manager_protocol.proto", schemas, - file_default_instances, TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto::offsets, - file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, 20, file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, file_level_service_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, +static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = { + reinterpret_cast(&::muscle_manager_protocol::_LogMessage_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_LogResult_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_Port_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_ProfileEvent_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_Profile_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_ProfileResult_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_RegistrationRequest_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_RegistrationResult_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_Conduit_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_PeerRequest_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_PeerResult_PeerDimensions_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_PeerResult_PeerLocations_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_PeerResult_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_ListOfDouble_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_ListOfListOfDouble_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_Setting_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_SettingsRequest_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_SettingsResult_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_DeregistrationRequest_default_instance_), + reinterpret_cast(&::muscle_manager_protocol::_DeregistrationResult_default_instance_), }; -const char descriptor_table_protodef_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[] = +const char descriptor_table_protodef_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = "\n5muscle_manager_protocol/muscle_manager" "_protocol.proto\022\027muscle_manager_protocol" "\032\037google/protobuf/timestamp.proto\"\220\001\n\nLo" @@ -716,25 +685,45 @@ const char descriptor_table_protodef_muscle_5fmanager_5fprotocol_2fmuscle_5fmana "est\032-.muscle_manager_protocol.Deregistra" "tionResultb\006proto3" ; -::google::protobuf::internal::DescriptorTable descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = { - false, InitDefaults_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, - descriptor_table_protodef_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, - "muscle_manager_protocol/muscle_manager_protocol.proto", &assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, 3498, +static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_deps[1] = { + &::descriptor_table_google_2fprotobuf_2ftimestamp_2eproto, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_sccs[20] = { + &scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, + &scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base, +}; +static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_once; +static bool descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_initialized = false; +const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = { + &descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_initialized, descriptor_table_protodef_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, "muscle_manager_protocol/muscle_manager_protocol.proto", 3498, + &descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_once, descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_sccs, descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto_deps, 20, 1, + schemas, file_default_instances, TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto::offsets, + file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, 20, file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, file_level_service_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, }; - -void AddDescriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto() { - static constexpr ::google::protobuf::internal::InitFunc deps[1] = - { - ::AddDescriptors_google_2fprotobuf_2ftimestamp_2eproto, - }; - ::google::protobuf::internal::AddDescriptors(&descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto, deps, 1); -} // Force running AddDescriptors() at dynamic initialization time. -static bool dynamic_init_dummy_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = []() { AddDescriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto(); return true; }(); +static bool dynamic_init_dummy_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto = ( ::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto), true); namespace muscle_manager_protocol { -const ::google::protobuf::EnumDescriptor* ResultStatus_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResultStatus_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); return file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[0]; } bool ResultStatus_IsValid(int value) { @@ -748,8 +737,8 @@ bool ResultStatus_IsValid(int value) { } } -const ::google::protobuf::EnumDescriptor* Operator_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Operator_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); return file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[1]; } bool Operator_IsValid(int value) { @@ -767,8 +756,8 @@ bool Operator_IsValid(int value) { } } -const ::google::protobuf::EnumDescriptor* LogLevel_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LogLevel_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); return file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[2]; } bool LogLevel_IsValid(int value) { @@ -784,8 +773,8 @@ bool LogLevel_IsValid(int value) { } } -const ::google::protobuf::EnumDescriptor* ProfileEventType_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ProfileEventType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); return file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[3]; } bool ProfileEventType_IsValid(int value) { @@ -801,8 +790,8 @@ bool ProfileEventType_IsValid(int value) { } } -const ::google::protobuf::EnumDescriptor* SettingValueType_descriptor() { - ::google::protobuf::internal::AssignDescriptors(&assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SettingValueType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); return file_level_enum_descriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[4]; } bool SettingValueType_IsValid(int value) { @@ -823,16 +812,16 @@ bool SettingValueType_IsValid(int value) { // =================================================================== void LogMessage::InitAsDefaultInstance() { - ::muscle_manager_protocol::_LogMessage_default_instance_._instance.get_mutable()->timestamp_ = const_cast< ::google::protobuf::Timestamp*>( - ::google::protobuf::Timestamp::internal_default_instance()); + ::muscle_manager_protocol::_LogMessage_default_instance_._instance.get_mutable()->timestamp_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>( + PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance()); } -class LogMessage::HasBitSetters { +class LogMessage::_Internal { public: - static const ::google::protobuf::Timestamp& timestamp(const LogMessage* msg); + static const PROTOBUF_NAMESPACE_ID::Timestamp& timestamp(const LogMessage* msg); }; -const ::google::protobuf::Timestamp& -LogMessage::HasBitSetters::timestamp(const LogMessage* msg) { +const PROTOBUF_NAMESPACE_ID::Timestamp& +LogMessage::_Internal::timestamp(const LogMessage* msg) { return *msg->timestamp_; } void LogMessage::clear_timestamp() { @@ -841,32 +830,25 @@ void LogMessage::clear_timestamp() { } timestamp_ = nullptr; } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int LogMessage::kInstanceIdFieldNumber; -const int LogMessage::kTimestampFieldNumber; -const int LogMessage::kLevelFieldNumber; -const int LogMessage::kTextFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - LogMessage::LogMessage() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.LogMessage) } LogMessage::LogMessage(const LogMessage& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.instance_id().size() > 0) { - instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + instance_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_instance_id().empty()) { + instance_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_id_); } - text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.text().size() > 0) { - text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_); + text_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_text().empty()) { + text_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.text_); } - if (from.has_timestamp()) { - timestamp_ = new ::google::protobuf::Timestamp(*from.timestamp_); + if (from._internal_has_timestamp()) { + timestamp_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.timestamp_); } else { timestamp_ = nullptr; } @@ -875,10 +857,9 @@ LogMessage::LogMessage(const LogMessage& from) } void LogMessage::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - text_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + instance_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + text_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(×tamp_, 0, static_cast( reinterpret_cast(&level_) - reinterpret_cast(×tamp_)) + sizeof(level_)); @@ -890,8 +871,8 @@ LogMessage::~LogMessage() { } void LogMessage::SharedDtor() { - instance_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - text_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + text_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete timestamp_; } @@ -899,19 +880,19 @@ void LogMessage::SetCachedSize(int size) const { _cached_size_.Set(size); } const LogMessage& LogMessage::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_LogMessage_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void LogMessage::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.LogMessage) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + text_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && timestamp_ != nullptr) { delete timestamp_; } @@ -920,271 +901,106 @@ void LogMessage::Clear() { _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* LogMessage::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* LogMessage::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string instance_id = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.LogMessage.instance_id"); - object = msg->mutable_instance_id(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_instance_id(), ptr, ctx, "muscle_manager_protocol.LogMessage.instance_id"); + CHK_(ptr); + } else goto handle_unusual; + continue; // .google.protobuf.Timestamp timestamp = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::google::protobuf::Timestamp::_InternalParse; - object = msg->mutable_timestamp(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_timestamp(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // .muscle_manager_protocol.LogLevel level = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_level(static_cast<::muscle_manager_protocol::LogLevel>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_level(static_cast<::muscle_manager_protocol::LogLevel>(val)); + } else goto handle_unusual; + continue; // string text = 5; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.LogMessage.text"); - object = msg->mutable_text(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_text(), ptr, ctx, "muscle_manager_protocol.LogMessage.text"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool LogMessage::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.LogMessage) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string instance_id = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_instance_id())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_id().data(), static_cast(this->instance_id().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.LogMessage.instance_id")); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Timestamp timestamp = 3; - case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_timestamp())); - } else { - goto handle_unusual; - } - break; - } - - // .muscle_manager_protocol.LogLevel level = 4; - case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { - int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_level(static_cast< ::muscle_manager_protocol::LogLevel >(value)); - } else { - goto handle_unusual; - } - break; - } - - // string text = 5; - case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_text())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->text().data(), static_cast(this->text().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.LogMessage.text")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.LogMessage) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.LogMessage) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void LogMessage::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.LogMessage) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string instance_id = 1; - if (this->instance_id().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_id().data(), static_cast(this->instance_id().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.LogMessage.instance_id"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->instance_id(), output); - } - - // .google.protobuf.Timestamp timestamp = 3; - if (this->has_timestamp()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, HasBitSetters::timestamp(this), output); - } - - // .muscle_manager_protocol.LogLevel level = 4; - if (this->level() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 4, this->level(), output); - } - - // string text = 5; - if (this->text().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->text().data(), static_cast(this->text().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.LogMessage.text"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 5, this->text(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.LogMessage) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* LogMessage::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* LogMessage::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.LogMessage) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string instance_id = 1; if (this->instance_id().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_id().data(), static_cast(this->instance_id().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_instance_id().data(), static_cast(this->_internal_instance_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.LogMessage.instance_id"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->instance_id(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_instance_id(), target); } // .google.protobuf.Timestamp timestamp = 3; if (this->has_timestamp()) { - target = ::google::protobuf::internal::WireFormatLite:: + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 3, HasBitSetters::timestamp(this), target); + 3, _Internal::timestamp(this), target, stream); } // .muscle_manager_protocol.LogLevel level = 4; if (this->level() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 4, this->level(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_level(), target); } // string text = 5; if (this->text().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->text().data(), static_cast(this->text().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_text().data(), static_cast(this->_internal_text().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.LogMessage.text"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 5, this->text(), target); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_text(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.LogMessage) return target; @@ -1194,56 +1010,55 @@ size_t LogMessage::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.LogMessage) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string instance_id = 1; if (this->instance_id().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->instance_id()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_instance_id()); } // string text = 5; if (this->text().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->text()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_text()); } // .google.protobuf.Timestamp timestamp = 3; if (this->has_timestamp()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *timestamp_); } // .muscle_manager_protocol.LogLevel level = 4; if (this->level() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->level()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_level()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void LogMessage::MergeFrom(const ::google::protobuf::Message& from) { +void LogMessage::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.LogMessage) GOOGLE_DCHECK_NE(&from, this); const LogMessage* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.LogMessage) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.LogMessage) MergeFrom(*source); @@ -1254,26 +1069,26 @@ void LogMessage::MergeFrom(const LogMessage& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.LogMessage) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.instance_id().size() > 0) { - instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + instance_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_id_); } if (from.text().size() > 0) { - text_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.text_); + text_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.text_); } if (from.has_timestamp()) { - mutable_timestamp()->::google::protobuf::Timestamp::MergeFrom(from.timestamp()); + _internal_mutable_timestamp()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_timestamp()); } if (from.level() != 0) { - set_level(from.level()); + _internal_set_level(from._internal_level()); } } -void LogMessage::CopyFrom(const ::google::protobuf::Message& from) { +void LogMessage::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.LogMessage) if (&from == this) return; Clear(); @@ -1291,24 +1106,19 @@ bool LogMessage::IsInitialized() const { return true; } -void LogMessage::Swap(LogMessage* other) { - if (other == this) return; - InternalSwap(other); -} void LogMessage::InternalSwap(LogMessage* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - instance_id_.Swap(&other->instance_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_id_.Swap(&other->instance_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - text_.Swap(&other->text_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + text_.Swap(&other->text_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(timestamp_, other->timestamp_); swap(level_, other->level_); } -::google::protobuf::Metadata LogMessage::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata LogMessage::GetMetadata() const { + return GetMetadataStatic(); } @@ -1316,20 +1126,17 @@ ::google::protobuf::Metadata LogMessage::GetMetadata() const { void LogResult::InitAsDefaultInstance() { } -class LogResult::HasBitSetters { +class LogResult::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - LogResult::LogResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.LogResult) } LogResult::LogResult(const LogResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.LogResult) @@ -1350,97 +1157,55 @@ void LogResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const LogResult& LogResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_LogResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void LogResult::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.LogResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* LogResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* LogResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { default: { if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool LogResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.LogResult) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.LogResult) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.LogResult) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void LogResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.LogResult) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.LogResult) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* LogResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* LogResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.LogResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.LogResult) return target; @@ -1450,29 +1215,28 @@ size_t LogResult::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.LogResult) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void LogResult::MergeFrom(const ::google::protobuf::Message& from) { +void LogResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.LogResult) GOOGLE_DCHECK_NE(&from, this); const LogResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.LogResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.LogResult) MergeFrom(*source); @@ -1483,12 +1247,12 @@ void LogResult::MergeFrom(const LogResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.LogResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; } -void LogResult::CopyFrom(const ::google::protobuf::Message& from) { +void LogResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.LogResult) if (&from == this) return; Clear(); @@ -1506,18 +1270,13 @@ bool LogResult::IsInitialized() const { return true; } -void LogResult::Swap(LogResult* other) { - if (other == this) return; - InternalSwap(other); -} void LogResult::InternalSwap(LogResult* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); } -::google::protobuf::Metadata LogResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata LogResult::GetMetadata() const { + return GetMetadataStatic(); } @@ -1525,36 +1284,30 @@ ::google::protobuf::Metadata LogResult::GetMetadata() const { void Port::InitAsDefaultInstance() { } -class Port::HasBitSetters { +class Port::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Port::kNameFieldNumber; -const int Port::kOperatorFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - Port::Port() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.Port) } Port::Port(const Port& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } operator__ = from.operator__; // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.Port) } void Port::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); operator__ = 0; } @@ -1564,205 +1317,97 @@ Port::~Port() { } void Port::SharedDtor() { - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Port::SetCachedSize(int size) const { _cached_size_.Set(size); } const Port& Port::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Port_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void Port::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.Port) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); operator__ = 0; _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Port::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* Port::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.Port.name"); - object = msg->mutable_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_name(), ptr, ctx, "muscle_manager_protocol.Port.name"); + CHK_(ptr); + } else goto handle_unusual; + continue; // .muscle_manager_protocol.Operator operator = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_operator_(static_cast<::muscle_manager_protocol::Operator>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_operator_(static_cast<::muscle_manager_protocol::Operator>(val)); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while +success: return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Port::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.Port) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.Port.name")); - } else { - goto handle_unusual; - } - break; - } +failure: + ptr = nullptr; + goto success; +#undef CHK_ +} - // .muscle_manager_protocol.Operator operator = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { - int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_operator_(static_cast< ::muscle_manager_protocol::Operator >(value)); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } -success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.Port) - return true; -failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.Port) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Port::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.Port) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.Port.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // .muscle_manager_protocol.Operator operator = 2; - if (this->operator_() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 2, this->operator_(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.Port) -} - -::google::protobuf::uint8* Port::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.Port) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; +::PROTOBUF_NAMESPACE_ID::uint8* Port::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.Port) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; + (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.Port.name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // .muscle_manager_protocol.Operator operator = 2; if (this->operator_() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 2, this->operator_(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_operator_(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.Port) return target; @@ -1772,42 +1417,41 @@ size_t Port::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.Port) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); } // .muscle_manager_protocol.Operator operator = 2; if (this->operator_() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->operator_()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_operator_()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Port::MergeFrom(const ::google::protobuf::Message& from) { +void Port::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.Port) GOOGLE_DCHECK_NE(&from, this); const Port* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.Port) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.Port) MergeFrom(*source); @@ -1818,19 +1462,19 @@ void Port::MergeFrom(const Port& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.Port) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.operator_() != 0) { - set_operator_(from.operator_()); + _internal_set_operator_(from._internal_operator_()); } } -void Port::CopyFrom(const ::google::protobuf::Message& from) { +void Port::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.Port) if (&from == this) return; Clear(); @@ -1848,51 +1492,46 @@ bool Port::IsInitialized() const { return true; } -void Port::Swap(Port* other) { - if (other == this) return; - InternalSwap(other); -} void Port::InternalSwap(Port* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(operator__, other->operator__); } -::google::protobuf::Metadata Port::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata Port::GetMetadata() const { + return GetMetadataStatic(); } // =================================================================== void ProfileEvent::InitAsDefaultInstance() { - ::muscle_manager_protocol::_ProfileEvent_default_instance_._instance.get_mutable()->start_time_ = const_cast< ::google::protobuf::Timestamp*>( - ::google::protobuf::Timestamp::internal_default_instance()); - ::muscle_manager_protocol::_ProfileEvent_default_instance_._instance.get_mutable()->stop_time_ = const_cast< ::google::protobuf::Timestamp*>( - ::google::protobuf::Timestamp::internal_default_instance()); + ::muscle_manager_protocol::_ProfileEvent_default_instance_._instance.get_mutable()->start_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>( + PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance()); + ::muscle_manager_protocol::_ProfileEvent_default_instance_._instance.get_mutable()->stop_time_ = const_cast< PROTOBUF_NAMESPACE_ID::Timestamp*>( + PROTOBUF_NAMESPACE_ID::Timestamp::internal_default_instance()); ::muscle_manager_protocol::_ProfileEvent_default_instance_._instance.get_mutable()->port_ = const_cast< ::muscle_manager_protocol::Port*>( ::muscle_manager_protocol::Port::internal_default_instance()); } -class ProfileEvent::HasBitSetters { +class ProfileEvent::_Internal { public: - static const ::google::protobuf::Timestamp& start_time(const ProfileEvent* msg); - static const ::google::protobuf::Timestamp& stop_time(const ProfileEvent* msg); + static const PROTOBUF_NAMESPACE_ID::Timestamp& start_time(const ProfileEvent* msg); + static const PROTOBUF_NAMESPACE_ID::Timestamp& stop_time(const ProfileEvent* msg); static const ::muscle_manager_protocol::Port& port(const ProfileEvent* msg); }; -const ::google::protobuf::Timestamp& -ProfileEvent::HasBitSetters::start_time(const ProfileEvent* msg) { +const PROTOBUF_NAMESPACE_ID::Timestamp& +ProfileEvent::_Internal::start_time(const ProfileEvent* msg) { return *msg->start_time_; } -const ::google::protobuf::Timestamp& -ProfileEvent::HasBitSetters::stop_time(const ProfileEvent* msg) { +const PROTOBUF_NAMESPACE_ID::Timestamp& +ProfileEvent::_Internal::stop_time(const ProfileEvent* msg) { return *msg->stop_time_; } const ::muscle_manager_protocol::Port& -ProfileEvent::HasBitSetters::port(const ProfileEvent* msg) { +ProfileEvent::_Internal::port(const ProfileEvent* msg) { return *msg->port_; } void ProfileEvent::clear_start_time() { @@ -1907,41 +1546,30 @@ void ProfileEvent::clear_stop_time() { } stop_time_ = nullptr; } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ProfileEvent::kInstanceIdFieldNumber; -const int ProfileEvent::kStartTimeFieldNumber; -const int ProfileEvent::kStopTimeFieldNumber; -const int ProfileEvent::kEventTypeFieldNumber; -const int ProfileEvent::kPortFieldNumber; -const int ProfileEvent::kPortLengthFieldNumber; -const int ProfileEvent::kSlotFieldNumber; -const int ProfileEvent::kMessageSizeFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - ProfileEvent::ProfileEvent() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.ProfileEvent) } ProfileEvent::ProfileEvent(const ProfileEvent& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.instance_id().size() > 0) { - instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + instance_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_instance_id().empty()) { + instance_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_id_); } - if (from.has_start_time()) { - start_time_ = new ::google::protobuf::Timestamp(*from.start_time_); + if (from._internal_has_start_time()) { + start_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.start_time_); } else { start_time_ = nullptr; } - if (from.has_stop_time()) { - stop_time_ = new ::google::protobuf::Timestamp(*from.stop_time_); + if (from._internal_has_stop_time()) { + stop_time_ = new PROTOBUF_NAMESPACE_ID::Timestamp(*from.stop_time_); } else { stop_time_ = nullptr; } - if (from.has_port()) { + if (from._internal_has_port()) { port_ = new ::muscle_manager_protocol::Port(*from.port_); } else { port_ = nullptr; @@ -1953,9 +1581,8 @@ ProfileEvent::ProfileEvent(const ProfileEvent& from) } void ProfileEvent::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - instance_id_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + instance_id_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&start_time_, 0, static_cast( reinterpret_cast(&slot_) - reinterpret_cast(&start_time_)) + sizeof(slot_)); @@ -1967,7 +1594,7 @@ ProfileEvent::~ProfileEvent() { } void ProfileEvent::SharedDtor() { - instance_id_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete start_time_; if (this != internal_default_instance()) delete stop_time_; if (this != internal_default_instance()) delete port_; @@ -1977,18 +1604,18 @@ void ProfileEvent::SetCachedSize(int size) const { _cached_size_.Set(size); } const ProfileEvent& ProfileEvent::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfileEvent_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void ProfileEvent::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.ProfileEvent) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && start_time_ != nullptr) { delete start_time_; } @@ -2007,383 +1634,158 @@ void ProfileEvent::Clear() { _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ProfileEvent::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* ProfileEvent::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string instance_id = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.ProfileEvent.instance_id"); - object = msg->mutable_instance_id(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_instance_id(), ptr, ctx, "muscle_manager_protocol.ProfileEvent.instance_id"); + CHK_(ptr); + } else goto handle_unusual; + continue; // .google.protobuf.Timestamp start_time = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::google::protobuf::Timestamp::_InternalParse; - object = msg->mutable_start_time(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_start_time(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // .google.protobuf.Timestamp stop_time = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::google::protobuf::Timestamp::_InternalParse; - object = msg->mutable_stop_time(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_stop_time(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // .muscle_manager_protocol.ProfileEventType event_type = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_event_type(static_cast<::muscle_manager_protocol::ProfileEventType>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_event_type(static_cast<::muscle_manager_protocol::ProfileEventType>(val)); + } else goto handle_unusual; + continue; // .muscle_manager_protocol.Port port = 5; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::Port::_InternalParse; - object = msg->mutable_port(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_port(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // int32 port_length = 6; - case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; - msg->set_port_length(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + port_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // int32 slot = 7; - case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 56) goto handle_unusual; - msg->set_slot(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) { + slot_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // int64 message_size = 8; - case 8: { - if (static_cast<::google::protobuf::uint8>(tag) != 64) goto handle_unusual; - msg->set_message_size(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 64)) { + message_size_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ProfileEvent::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.ProfileEvent) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string instance_id = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_instance_id())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_id().data(), static_cast(this->instance_id().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.ProfileEvent.instance_id")); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Timestamp start_time = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_start_time())); - } else { - goto handle_unusual; - } - break; - } - - // .google.protobuf.Timestamp stop_time = 3; - case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_stop_time())); - } else { - goto handle_unusual; - } - break; - } - - // .muscle_manager_protocol.ProfileEventType event_type = 4; - case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { - int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_event_type(static_cast< ::muscle_manager_protocol::ProfileEventType >(value)); - } else { - goto handle_unusual; - } - break; - } - - // .muscle_manager_protocol.Port port = 5; - case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_port())); - } else { - goto handle_unusual; - } - break; - } - - // int32 port_length = 6; - case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &port_length_))); - } else { - goto handle_unusual; - } - break; - } - - // int32 slot = 7; - case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (56 & 0xFF)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, &slot_))); - } else { - goto handle_unusual; - } - break; - } - - // int64 message_size = 8; - case 8: { - if (static_cast< ::google::protobuf::uint8>(tag) == (64 & 0xFF)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( - input, &message_size_))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.ProfileEvent) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.ProfileEvent) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ProfileEvent::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.ProfileEvent) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string instance_id = 1; - if (this->instance_id().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_id().data(), static_cast(this->instance_id().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.ProfileEvent.instance_id"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->instance_id(), output); - } - - // .google.protobuf.Timestamp start_time = 2; - if (this->has_start_time()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 2, HasBitSetters::start_time(this), output); - } - - // .google.protobuf.Timestamp stop_time = 3; - if (this->has_stop_time()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, HasBitSetters::stop_time(this), output); - } - - // .muscle_manager_protocol.ProfileEventType event_type = 4; - if (this->event_type() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 4, this->event_type(), output); - } - - // .muscle_manager_protocol.Port port = 5; - if (this->has_port()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, HasBitSetters::port(this), output); - } - - // int32 port_length = 6; - if (this->port_length() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(6, this->port_length(), output); - } - - // int32 slot = 7; - if (this->slot() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt32(7, this->slot(), output); - } - - // int64 message_size = 8; - if (this->message_size() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(8, this->message_size(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.ProfileEvent) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* ProfileEvent::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ProfileEvent::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.ProfileEvent) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string instance_id = 1; if (this->instance_id().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_id().data(), static_cast(this->instance_id().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_instance_id().data(), static_cast(this->_internal_instance_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.ProfileEvent.instance_id"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->instance_id(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_instance_id(), target); } // .google.protobuf.Timestamp start_time = 2; if (this->has_start_time()) { - target = ::google::protobuf::internal::WireFormatLite:: + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 2, HasBitSetters::start_time(this), target); + 2, _Internal::start_time(this), target, stream); } // .google.protobuf.Timestamp stop_time = 3; if (this->has_stop_time()) { - target = ::google::protobuf::internal::WireFormatLite:: + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 3, HasBitSetters::stop_time(this), target); + 3, _Internal::stop_time(this), target, stream); } // .muscle_manager_protocol.ProfileEventType event_type = 4; if (this->event_type() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 4, this->event_type(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 4, this->_internal_event_type(), target); } // .muscle_manager_protocol.Port port = 5; if (this->has_port()) { - target = ::google::protobuf::internal::WireFormatLite:: + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 5, HasBitSetters::port(this), target); + 5, _Internal::port(this), target, stream); } // int32 port_length = 6; if (this->port_length() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(6, this->port_length(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(6, this->_internal_port_length(), target); } // int32 slot = 7; if (this->slot() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt32ToArray(7, this->slot(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(7, this->_internal_slot(), target); } // int64 message_size = 8; if (this->message_size() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(8, this->message_size(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(8, this->_internal_message_size(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.ProfileEvent) return target; @@ -2393,84 +1795,83 @@ size_t ProfileEvent::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.ProfileEvent) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string instance_id = 1; if (this->instance_id().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->instance_id()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_instance_id()); } // .google.protobuf.Timestamp start_time = 2; if (this->has_start_time()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *start_time_); } // .google.protobuf.Timestamp stop_time = 3; if (this->has_stop_time()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *stop_time_); } // .muscle_manager_protocol.Port port = 5; if (this->has_port()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *port_); } // .muscle_manager_protocol.ProfileEventType event_type = 4; if (this->event_type() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->event_type()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_event_type()); } // int32 port_length = 6; if (this->port_length() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->port_length()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_port_length()); } // int64 message_size = 8; if (this->message_size() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->message_size()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_message_size()); } // int32 slot = 7; if (this->slot() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - this->slot()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + this->_internal_slot()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ProfileEvent::MergeFrom(const ::google::protobuf::Message& from) { +void ProfileEvent::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.ProfileEvent) GOOGLE_DCHECK_NE(&from, this); const ProfileEvent* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.ProfileEvent) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.ProfileEvent) MergeFrom(*source); @@ -2481,37 +1882,37 @@ void ProfileEvent::MergeFrom(const ProfileEvent& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.ProfileEvent) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.instance_id().size() > 0) { - instance_id_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_id_); + instance_id_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_id_); } if (from.has_start_time()) { - mutable_start_time()->::google::protobuf::Timestamp::MergeFrom(from.start_time()); + _internal_mutable_start_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_start_time()); } if (from.has_stop_time()) { - mutable_stop_time()->::google::protobuf::Timestamp::MergeFrom(from.stop_time()); + _internal_mutable_stop_time()->PROTOBUF_NAMESPACE_ID::Timestamp::MergeFrom(from._internal_stop_time()); } if (from.has_port()) { - mutable_port()->::muscle_manager_protocol::Port::MergeFrom(from.port()); + _internal_mutable_port()->::muscle_manager_protocol::Port::MergeFrom(from._internal_port()); } if (from.event_type() != 0) { - set_event_type(from.event_type()); + _internal_set_event_type(from._internal_event_type()); } if (from.port_length() != 0) { - set_port_length(from.port_length()); + _internal_set_port_length(from._internal_port_length()); } if (from.message_size() != 0) { - set_message_size(from.message_size()); + _internal_set_message_size(from._internal_message_size()); } if (from.slot() != 0) { - set_slot(from.slot()); + _internal_set_slot(from._internal_slot()); } } -void ProfileEvent::CopyFrom(const ::google::protobuf::Message& from) { +void ProfileEvent::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.ProfileEvent) if (&from == this) return; Clear(); @@ -2529,14 +1930,10 @@ bool ProfileEvent::IsInitialized() const { return true; } -void ProfileEvent::Swap(ProfileEvent* other) { - if (other == this) return; - InternalSwap(other); -} void ProfileEvent::InternalSwap(ProfileEvent* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - instance_id_.Swap(&other->instance_id_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_id_.Swap(&other->instance_id_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(start_time_, other->start_time_); swap(stop_time_, other->stop_time_); @@ -2547,9 +1944,8 @@ void ProfileEvent::InternalSwap(ProfileEvent* other) { swap(slot_, other->slot_); } -::google::protobuf::Metadata ProfileEvent::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata ProfileEvent::GetMetadata() const { + return GetMetadataStatic(); } @@ -2557,21 +1953,17 @@ ::google::protobuf::Metadata ProfileEvent::GetMetadata() const { void Profile::InitAsDefaultInstance() { } -class Profile::HasBitSetters { +class Profile::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Profile::kEventsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - Profile::Profile() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.Profile) } Profile::Profile(const Profile& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), events_(from.events_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -2579,8 +1971,7 @@ Profile::Profile(const Profile& from) } void Profile::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); } Profile::~Profile() { @@ -2595,14 +1986,14 @@ void Profile::SetCachedSize(int size) const { _cached_size_.Set(size); } const Profile& Profile::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Profile_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void Profile::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.Profile) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -2610,136 +2001,62 @@ void Profile::Clear() { _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Profile::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* Profile::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // repeated .muscle_manager_protocol.ProfileEvent events = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::ProfileEvent::_InternalParse; - object = msg->add_events(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_events(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Profile::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.Profile) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .muscle_manager_protocol.ProfileEvent events = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, add_events())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.Profile) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.Profile) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Profile::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.Profile) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .muscle_manager_protocol.ProfileEvent events = 1; - for (unsigned int i = 0, - n = static_cast(this->events_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, - this->events(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.Profile) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* Profile::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Profile::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.Profile) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .muscle_manager_protocol.ProfileEvent events = 1; for (unsigned int i = 0, - n = static_cast(this->events_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, this->events(static_cast(i)), target); + n = static_cast(this->_internal_events_size()); i < n; i++) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray(1, this->_internal_events(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.Profile) return target; @@ -2749,40 +2066,35 @@ size_t Profile::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.Profile) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .muscle_manager_protocol.ProfileEvent events = 1; - { - unsigned int count = static_cast(this->events_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( - this->events(static_cast(i))); - } + total_size += 1UL * this->_internal_events_size(); + for (const auto& msg : this->events_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Profile::MergeFrom(const ::google::protobuf::Message& from) { +void Profile::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.Profile) GOOGLE_DCHECK_NE(&from, this); const Profile* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.Profile) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.Profile) MergeFrom(*source); @@ -2793,13 +2105,13 @@ void Profile::MergeFrom(const Profile& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.Profile) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; events_.MergeFrom(from.events_); } -void Profile::CopyFrom(const ::google::protobuf::Message& from) { +void Profile::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.Profile) if (&from == this) return; Clear(); @@ -2817,19 +2129,14 @@ bool Profile::IsInitialized() const { return true; } -void Profile::Swap(Profile* other) { - if (other == this) return; - InternalSwap(other); -} void Profile::InternalSwap(Profile* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&events_)->InternalSwap(CastToBase(&other->events_)); + events_.InternalSwap(&other->events_); } -::google::protobuf::Metadata Profile::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata Profile::GetMetadata() const { + return GetMetadataStatic(); } @@ -2837,20 +2144,17 @@ ::google::protobuf::Metadata Profile::GetMetadata() const { void ProfileResult::InitAsDefaultInstance() { } -class ProfileResult::HasBitSetters { +class ProfileResult::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - ProfileResult::ProfileResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.ProfileResult) } ProfileResult::ProfileResult(const ProfileResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.ProfileResult) @@ -2871,97 +2175,55 @@ void ProfileResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const ProfileResult& ProfileResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ProfileResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void ProfileResult::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.ProfileResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ProfileResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* ProfileResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { default: { if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ProfileResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.ProfileResult) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.ProfileResult) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.ProfileResult) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ProfileResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.ProfileResult) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.ProfileResult) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* ProfileResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ProfileResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.ProfileResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.ProfileResult) return target; @@ -2971,29 +2233,28 @@ size_t ProfileResult::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.ProfileResult) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ProfileResult::MergeFrom(const ::google::protobuf::Message& from) { +void ProfileResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.ProfileResult) GOOGLE_DCHECK_NE(&from, this); const ProfileResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.ProfileResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.ProfileResult) MergeFrom(*source); @@ -3004,12 +2265,12 @@ void ProfileResult::MergeFrom(const ProfileResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.ProfileResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; } -void ProfileResult::CopyFrom(const ::google::protobuf::Message& from) { +void ProfileResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.ProfileResult) if (&from == this) return; Clear(); @@ -3027,18 +2288,13 @@ bool ProfileResult::IsInitialized() const { return true; } -void ProfileResult::Swap(ProfileResult* other) { - if (other == this) return; - InternalSwap(other); -} void ProfileResult::InternalSwap(ProfileResult* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); } -::google::protobuf::Metadata ProfileResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata ProfileResult::GetMetadata() const { + return GetMetadataStatic(); } @@ -3046,38 +2302,31 @@ ::google::protobuf::Metadata ProfileResult::GetMetadata() const { void RegistrationRequest::InitAsDefaultInstance() { } -class RegistrationRequest::HasBitSetters { +class RegistrationRequest::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int RegistrationRequest::kInstanceNameFieldNumber; -const int RegistrationRequest::kNetworkLocationsFieldNumber; -const int RegistrationRequest::kPortsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - RegistrationRequest::RegistrationRequest() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.RegistrationRequest) } RegistrationRequest::RegistrationRequest(const RegistrationRequest& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), network_locations_(from.network_locations_), ports_(from.ports_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_instance_name().empty()) { + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.RegistrationRequest) } void RegistrationRequest::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } RegistrationRequest::~RegistrationRequest() { @@ -3086,271 +2335,125 @@ RegistrationRequest::~RegistrationRequest() { } void RegistrationRequest::SharedDtor() { - instance_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void RegistrationRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const RegistrationRequest& RegistrationRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RegistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void RegistrationRequest::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.RegistrationRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; network_locations_.Clear(); ports_.Clear(); - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* RegistrationRequest::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* RegistrationRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string instance_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.RegistrationRequest.instance_name"); - object = msg->mutable_instance_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_instance_name(), ptr, ctx, "muscle_manager_protocol.RegistrationRequest.instance_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated string network_locations = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.RegistrationRequest.network_locations"); - object = msg->add_network_locations(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_add_network_locations(), ptr, ctx, "muscle_manager_protocol.RegistrationRequest.network_locations"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; // repeated .muscle_manager_protocol.Port ports = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::Port::_InternalParse; - object = msg->add_ports(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); - break; - } + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_ports(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool RegistrationRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.RegistrationRequest) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string instance_name = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_instance_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.RegistrationRequest.instance_name")); - } else { - goto handle_unusual; - } - break; - } - - // repeated string network_locations = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_network_locations())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->network_locations(this->network_locations_size() - 1).data(), - static_cast(this->network_locations(this->network_locations_size() - 1).length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.RegistrationRequest.network_locations")); - } else { - goto handle_unusual; - } - break; - } - - // repeated .muscle_manager_protocol.Port ports = 3; - case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, add_ports())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.RegistrationRequest) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.RegistrationRequest) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void RegistrationRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.RegistrationRequest) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string instance_name = 1; - if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.RegistrationRequest.instance_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->instance_name(), output); - } - - // repeated string network_locations = 2; - for (int i = 0, n = this->network_locations_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->network_locations(i).data(), static_cast(this->network_locations(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.RegistrationRequest.network_locations"); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->network_locations(i), output); - } - - // repeated .muscle_manager_protocol.Port ports = 3; - for (unsigned int i = 0, - n = static_cast(this->ports_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, - this->ports(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.RegistrationRequest) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* RegistrationRequest::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* RegistrationRequest::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.RegistrationRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string instance_name = 1; if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_instance_name().data(), static_cast(this->_internal_instance_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.RegistrationRequest.instance_name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->instance_name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_instance_name(), target); } // repeated string network_locations = 2; - for (int i = 0, n = this->network_locations_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->network_locations(i).data(), static_cast(this->network_locations(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + for (int i = 0, n = this->_internal_network_locations_size(); i < n; i++) { + const auto& s = this->_internal_network_locations(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.RegistrationRequest.network_locations"); - target = ::google::protobuf::internal::WireFormatLite:: - WriteStringToArray(2, this->network_locations(i), target); + target = stream->WriteString(2, s, target); } // repeated .muscle_manager_protocol.Port ports = 3; for (unsigned int i = 0, - n = static_cast(this->ports_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, this->ports(static_cast(i)), target); + n = static_cast(this->_internal_ports_size()); i < n; i++) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray(3, this->_internal_ports(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.RegistrationRequest) return target; @@ -3360,55 +2463,50 @@ size_t RegistrationRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.RegistrationRequest) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string network_locations = 2; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->network_locations_size()); - for (int i = 0, n = this->network_locations_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->network_locations(i)); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(network_locations_.size()); + for (int i = 0, n = network_locations_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + network_locations_.Get(i)); } // repeated .muscle_manager_protocol.Port ports = 3; - { - unsigned int count = static_cast(this->ports_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( - this->ports(static_cast(i))); - } + total_size += 1UL * this->_internal_ports_size(); + for (const auto& msg : this->ports_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string instance_name = 1; if (this->instance_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->instance_name()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_instance_name()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void RegistrationRequest::MergeFrom(const ::google::protobuf::Message& from) { +void RegistrationRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.RegistrationRequest) GOOGLE_DCHECK_NE(&from, this); const RegistrationRequest* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.RegistrationRequest) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.RegistrationRequest) MergeFrom(*source); @@ -3419,18 +2517,18 @@ void RegistrationRequest::MergeFrom(const RegistrationRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.RegistrationRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; network_locations_.MergeFrom(from.network_locations_); ports_.MergeFrom(from.ports_); if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } } -void RegistrationRequest::CopyFrom(const ::google::protobuf::Message& from) { +void RegistrationRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.RegistrationRequest) if (&from == this) return; Clear(); @@ -3448,22 +2546,17 @@ bool RegistrationRequest::IsInitialized() const { return true; } -void RegistrationRequest::Swap(RegistrationRequest* other) { - if (other == this) return; - InternalSwap(other); -} void RegistrationRequest::InternalSwap(RegistrationRequest* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - network_locations_.InternalSwap(CastToBase(&other->network_locations_)); - CastToBase(&ports_)->InternalSwap(CastToBase(&other->ports_)); - instance_name_.Swap(&other->instance_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + network_locations_.InternalSwap(&other->network_locations_); + ports_.InternalSwap(&other->ports_); + instance_name_.Swap(&other->instance_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata RegistrationRequest::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata RegistrationRequest::GetMetadata() const { + return GetMetadataStatic(); } @@ -3471,36 +2564,30 @@ ::google::protobuf::Metadata RegistrationRequest::GetMetadata() const { void RegistrationResult::InitAsDefaultInstance() { } -class RegistrationResult::HasBitSetters { +class RegistrationResult::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int RegistrationResult::kStatusFieldNumber; -const int RegistrationResult::kErrorMessageFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - RegistrationResult::RegistrationResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.RegistrationResult) } RegistrationResult::RegistrationResult(const RegistrationResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.error_message().size() > 0) { - error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_error_message().empty()) { + error_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_message_); } status_ = from.status_; // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.RegistrationResult) } void RegistrationResult::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = 0; } @@ -3510,205 +2597,97 @@ RegistrationResult::~RegistrationResult() { } void RegistrationResult::SharedDtor() { - error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void RegistrationResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const RegistrationResult& RegistrationResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_RegistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void RegistrationResult::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.RegistrationResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = 0; _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* RegistrationResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* RegistrationResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // .muscle_manager_protocol.ResultStatus status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_status(static_cast<::muscle_manager_protocol::ResultStatus>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_status(static_cast<::muscle_manager_protocol::ResultStatus>(val)); + } else goto handle_unusual; + continue; // string error_message = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.RegistrationResult.error_message"); - object = msg->mutable_error_message(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_error_message(), ptr, ctx, "muscle_manager_protocol.RegistrationResult.error_message"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool RegistrationResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.RegistrationResult) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .muscle_manager_protocol.ResultStatus status = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { - int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_status(static_cast< ::muscle_manager_protocol::ResultStatus >(value)); - } else { - goto handle_unusual; - } - break; - } - - // string error_message = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_error_message())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.RegistrationResult.error_message")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.RegistrationResult) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.RegistrationResult) - return false; -#undef DO_ + ptr = nullptr; + goto success; +#undef CHK_ } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -void RegistrationResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.RegistrationResult) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .muscle_manager_protocol.ResultStatus status = 1; - if (this->status() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 1, this->status(), output); - } - - // string error_message = 2; - if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.RegistrationResult.error_message"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->error_message(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.RegistrationResult) -} - -::google::protobuf::uint8* RegistrationResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* RegistrationResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.RegistrationResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .muscle_manager_protocol.ResultStatus status = 1; if (this->status() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 1, this->status(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_status(), target); } // string error_message = 2; if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_error_message().data(), static_cast(this->_internal_error_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.RegistrationResult.error_message"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->error_message(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_error_message(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.RegistrationResult) return target; @@ -3718,42 +2697,41 @@ size_t RegistrationResult::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.RegistrationResult) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error_message = 2; if (this->error_message().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->error_message()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_error_message()); } // .muscle_manager_protocol.ResultStatus status = 1; if (this->status() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_status()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void RegistrationResult::MergeFrom(const ::google::protobuf::Message& from) { +void RegistrationResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.RegistrationResult) GOOGLE_DCHECK_NE(&from, this); const RegistrationResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.RegistrationResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.RegistrationResult) MergeFrom(*source); @@ -3764,19 +2742,19 @@ void RegistrationResult::MergeFrom(const RegistrationResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.RegistrationResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.error_message().size() > 0) { - error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + error_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_message_); } if (from.status() != 0) { - set_status(from.status()); + _internal_set_status(from._internal_status()); } } -void RegistrationResult::CopyFrom(const ::google::protobuf::Message& from) { +void RegistrationResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.RegistrationResult) if (&from == this) return; Clear(); @@ -3794,21 +2772,16 @@ bool RegistrationResult::IsInitialized() const { return true; } -void RegistrationResult::Swap(RegistrationResult* other) { - if (other == this) return; - InternalSwap(other); -} void RegistrationResult::InternalSwap(RegistrationResult* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - error_message_.Swap(&other->error_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + error_message_.Swap(&other->error_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(status_, other->status_); } -::google::protobuf::Metadata RegistrationResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata RegistrationResult::GetMetadata() const { + return GetMetadataStatic(); } @@ -3816,40 +2789,34 @@ ::google::protobuf::Metadata RegistrationResult::GetMetadata() const { void Conduit::InitAsDefaultInstance() { } -class Conduit::HasBitSetters { +class Conduit::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Conduit::kSenderFieldNumber; -const int Conduit::kReceiverFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - Conduit::Conduit() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.Conduit) } Conduit::Conduit(const Conduit& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - sender_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.sender().size() > 0) { - sender_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.sender_); + sender_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_sender().empty()) { + sender_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sender_); } - receiver_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.receiver().size() > 0) { - receiver_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.receiver_); + receiver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_receiver().empty()) { + receiver_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.receiver_); } // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.Conduit) } void Conduit::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - sender_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - receiver_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + sender_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + receiver_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } Conduit::~Conduit() { @@ -3858,224 +2825,100 @@ Conduit::~Conduit() { } void Conduit::SharedDtor() { - sender_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - receiver_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + sender_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + receiver_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void Conduit::SetCachedSize(int size) const { _cached_size_.Set(size); } const Conduit& Conduit::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Conduit_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void Conduit::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.Conduit) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - sender_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - receiver_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + sender_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + receiver_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Conduit::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* Conduit::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string sender = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.Conduit.sender"); - object = msg->mutable_sender(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_sender(), ptr, ctx, "muscle_manager_protocol.Conduit.sender"); + CHK_(ptr); + } else goto handle_unusual; + continue; // string receiver = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.Conduit.receiver"); - object = msg->mutable_receiver(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_receiver(), ptr, ctx, "muscle_manager_protocol.Conduit.receiver"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; - } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; - } - } // switch - } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Conduit::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.Conduit) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string sender = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_sender())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->sender().data(), static_cast(this->sender().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.Conduit.sender")); - } else { - goto handle_unusual; - } - break; - } - - // string receiver = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_receiver())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->receiver().data(), static_cast(this->receiver().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.Conduit.receiver")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { + ctx->SetLastTag(tag); goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } - } - } -success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.Conduit) - return true; -failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.Conduit) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Conduit::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.Conduit) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string sender = 1; - if (this->sender().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->sender().data(), static_cast(this->sender().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.Conduit.sender"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->sender(), output); - } - - // string receiver = 2; - if (this->receiver().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->receiver().data(), static_cast(this->receiver().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.Conduit.receiver"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->receiver(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.Conduit) + } // switch + } // while +success: + return ptr; +failure: + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* Conduit::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Conduit::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.Conduit) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string sender = 1; if (this->sender().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->sender().data(), static_cast(this->sender().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_sender().data(), static_cast(this->_internal_sender().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.Conduit.sender"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->sender(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_sender(), target); } // string receiver = 2; if (this->receiver().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->receiver().data(), static_cast(this->receiver().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_receiver().data(), static_cast(this->_internal_receiver().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.Conduit.receiver"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->receiver(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_receiver(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.Conduit) return target; @@ -4085,43 +2928,42 @@ size_t Conduit::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.Conduit) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string sender = 1; if (this->sender().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->sender()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_sender()); } // string receiver = 2; if (this->receiver().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->receiver()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_receiver()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Conduit::MergeFrom(const ::google::protobuf::Message& from) { +void Conduit::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.Conduit) GOOGLE_DCHECK_NE(&from, this); const Conduit* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.Conduit) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.Conduit) MergeFrom(*source); @@ -4132,20 +2974,20 @@ void Conduit::MergeFrom(const Conduit& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.Conduit) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.sender().size() > 0) { - sender_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.sender_); + sender_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.sender_); } if (from.receiver().size() > 0) { - receiver_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.receiver_); + receiver_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.receiver_); } } -void Conduit::CopyFrom(const ::google::protobuf::Message& from) { +void Conduit::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.Conduit) if (&from == this) return; Clear(); @@ -4163,22 +3005,17 @@ bool Conduit::IsInitialized() const { return true; } -void Conduit::Swap(Conduit* other) { - if (other == this) return; - InternalSwap(other); -} void Conduit::InternalSwap(Conduit* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - sender_.Swap(&other->sender_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + sender_.Swap(&other->sender_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - receiver_.Swap(&other->receiver_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + receiver_.Swap(&other->receiver_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata Conduit::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata Conduit::GetMetadata() const { + return GetMetadataStatic(); } @@ -4186,34 +3023,29 @@ ::google::protobuf::Metadata Conduit::GetMetadata() const { void PeerRequest::InitAsDefaultInstance() { } -class PeerRequest::HasBitSetters { +class PeerRequest::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int PeerRequest::kInstanceNameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - PeerRequest::PeerRequest() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.PeerRequest) } PeerRequest::PeerRequest(const PeerRequest& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_instance_name().empty()) { + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.PeerRequest) } void PeerRequest::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } PeerRequest::~PeerRequest() { @@ -4222,170 +3054,81 @@ PeerRequest::~PeerRequest() { } void PeerRequest::SharedDtor() { - instance_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void PeerRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const PeerRequest& PeerRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PeerRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void PeerRequest::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.PeerRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* PeerRequest::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* PeerRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string instance_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.PeerRequest.instance_name"); - object = msg->mutable_instance_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_instance_name(), ptr, ctx, "muscle_manager_protocol.PeerRequest.instance_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool PeerRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.PeerRequest) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string instance_name = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_instance_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.PeerRequest.instance_name")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.PeerRequest) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.PeerRequest) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void PeerRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.PeerRequest) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string instance_name = 1; - if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.PeerRequest.instance_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->instance_name(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.PeerRequest) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* PeerRequest::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* PeerRequest::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.PeerRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string instance_name = 1; if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_instance_name().data(), static_cast(this->_internal_instance_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.PeerRequest.instance_name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->instance_name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_instance_name(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.PeerRequest) return target; @@ -4395,36 +3138,35 @@ size_t PeerRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.PeerRequest) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string instance_name = 1; if (this->instance_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->instance_name()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_instance_name()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void PeerRequest::MergeFrom(const ::google::protobuf::Message& from) { +void PeerRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.PeerRequest) GOOGLE_DCHECK_NE(&from, this); const PeerRequest* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.PeerRequest) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.PeerRequest) MergeFrom(*source); @@ -4435,16 +3177,16 @@ void PeerRequest::MergeFrom(const PeerRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.PeerRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } } -void PeerRequest::CopyFrom(const ::google::protobuf::Message& from) { +void PeerRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.PeerRequest) if (&from == this) return; Clear(); @@ -4462,20 +3204,15 @@ bool PeerRequest::IsInitialized() const { return true; } -void PeerRequest::Swap(PeerRequest* other) { - if (other == this) return; - InternalSwap(other); -} void PeerRequest::InternalSwap(PeerRequest* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - instance_name_.Swap(&other->instance_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_name_.Swap(&other->instance_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata PeerRequest::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata PeerRequest::GetMetadata() const { + return GetMetadataStatic(); } @@ -4483,36 +3220,30 @@ ::google::protobuf::Metadata PeerRequest::GetMetadata() const { void PeerResult_PeerDimensions::InitAsDefaultInstance() { } -class PeerResult_PeerDimensions::HasBitSetters { +class PeerResult_PeerDimensions::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int PeerResult_PeerDimensions::kPeerNameFieldNumber; -const int PeerResult_PeerDimensions::kDimensionsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - PeerResult_PeerDimensions::PeerResult_PeerDimensions() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.PeerResult.PeerDimensions) } PeerResult_PeerDimensions::PeerResult_PeerDimensions(const PeerResult_PeerDimensions& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), dimensions_(from.dimensions_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - peer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.peer_name().size() > 0) { - peer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.peer_name_); + peer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_peer_name().empty()) { + peer_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.peer_name_); } // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.PeerResult.PeerDimensions) } void PeerResult_PeerDimensions::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - peer_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + peer_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } PeerResult_PeerDimensions::~PeerResult_PeerDimensions() { @@ -4521,231 +3252,101 @@ PeerResult_PeerDimensions::~PeerResult_PeerDimensions() { } void PeerResult_PeerDimensions::SharedDtor() { - peer_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + peer_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void PeerResult_PeerDimensions::SetCachedSize(int size) const { _cached_size_.Set(size); } const PeerResult_PeerDimensions& PeerResult_PeerDimensions::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PeerResult_PeerDimensions_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void PeerResult_PeerDimensions::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.PeerResult.PeerDimensions) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; dimensions_.Clear(); - peer_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + peer_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* PeerResult_PeerDimensions::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* PeerResult_PeerDimensions::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string peer_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.PeerResult.PeerDimensions.peer_name"); - object = msg->mutable_peer_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_peer_name(), ptr, ctx, "muscle_manager_protocol.PeerResult.PeerDimensions.peer_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated int32 dimensions = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) == 18) { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::google::protobuf::internal::PackedInt32Parser; - object = msg->mutable_dimensions(); - if (size > end - ptr) goto len_delim_till_end; - auto newend = ptr + size; - if (size) ptr = parser_till_end(ptr, newend, object, ctx); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); - break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - do { - msg->add_dimensions(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 16 && (ptr += 1)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_dimensions(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16) { + _internal_add_dimensions(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr)); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool PeerResult_PeerDimensions::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.PeerResult.PeerDimensions) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string peer_name = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_peer_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->peer_name().data(), static_cast(this->peer_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.PeerResult.PeerDimensions.peer_name")); - } else { - goto handle_unusual; - } - break; - } - - // repeated int32 dimensions = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - input, this->mutable_dimensions()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - ::google::protobuf::int32, ::google::protobuf::internal::WireFormatLite::TYPE_INT32>( - 1, 18u, input, this->mutable_dimensions()))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.PeerResult.PeerDimensions) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.PeerResult.PeerDimensions) - return false; -#undef DO_ + ptr = nullptr; + goto success; +#undef CHK_ } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -void PeerResult_PeerDimensions::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.PeerResult.PeerDimensions) - ::google::protobuf::uint32 cached_has_bits = 0; +::PROTOBUF_NAMESPACE_ID::uint8* PeerResult_PeerDimensions::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.PeerResult.PeerDimensions) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string peer_name = 1; if (this->peer_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->peer_name().data(), static_cast(this->peer_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_peer_name().data(), static_cast(this->_internal_peer_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.PeerResult.PeerDimensions.peer_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->peer_name(), output); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_peer_name(), target); } // repeated int32 dimensions = 2; - if (this->dimensions_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(2, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_dimensions_cached_byte_size_.load( - std::memory_order_relaxed)); - } - for (int i = 0, n = this->dimensions_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteInt32NoTag( - this->dimensions(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.PeerResult.PeerDimensions) -} - -::google::protobuf::uint8* PeerResult_PeerDimensions::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.PeerResult.PeerDimensions) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string peer_name = 1; - if (this->peer_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->peer_name().data(), static_cast(this->peer_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.PeerResult.PeerDimensions.peer_name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->peer_name(), target); + { + int byte_size = _dimensions_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 2, _internal_dimensions(), byte_size, target); + } } - // repeated int32 dimensions = 2; - if (this->dimensions_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( - 2, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _dimensions_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::google::protobuf::internal::WireFormatLite:: - WriteInt32NoTagToArray(this->dimensions_, target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.PeerResult.PeerDimensions) return target; @@ -4755,25 +3356,20 @@ size_t PeerResult_PeerDimensions::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.PeerResult.PeerDimensions) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated int32 dimensions = 2; { - size_t data_size = ::google::protobuf::internal::WireFormatLite:: + size_t data_size = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: Int32Size(this->dimensions_); if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast<::google::protobuf::int32>(data_size)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); _dimensions_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; @@ -4782,24 +3378,28 @@ size_t PeerResult_PeerDimensions::ByteSizeLong() const { // string peer_name = 1; if (this->peer_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->peer_name()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_peer_name()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void PeerResult_PeerDimensions::MergeFrom(const ::google::protobuf::Message& from) { +void PeerResult_PeerDimensions::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.PeerResult.PeerDimensions) GOOGLE_DCHECK_NE(&from, this); const PeerResult_PeerDimensions* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.PeerResult.PeerDimensions) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.PeerResult.PeerDimensions) MergeFrom(*source); @@ -4810,17 +3410,17 @@ void PeerResult_PeerDimensions::MergeFrom(const PeerResult_PeerDimensions& from) // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.PeerResult.PeerDimensions) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; dimensions_.MergeFrom(from.dimensions_); if (from.peer_name().size() > 0) { - peer_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.peer_name_); + peer_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.peer_name_); } } -void PeerResult_PeerDimensions::CopyFrom(const ::google::protobuf::Message& from) { +void PeerResult_PeerDimensions::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.PeerResult.PeerDimensions) if (&from == this) return; Clear(); @@ -4838,21 +3438,16 @@ bool PeerResult_PeerDimensions::IsInitialized() const { return true; } -void PeerResult_PeerDimensions::Swap(PeerResult_PeerDimensions* other) { - if (other == this) return; - InternalSwap(other); -} void PeerResult_PeerDimensions::InternalSwap(PeerResult_PeerDimensions* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); dimensions_.InternalSwap(&other->dimensions_); - peer_name_.Swap(&other->peer_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + peer_name_.Swap(&other->peer_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata PeerResult_PeerDimensions::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata PeerResult_PeerDimensions::GetMetadata() const { + return GetMetadataStatic(); } @@ -4860,36 +3455,30 @@ ::google::protobuf::Metadata PeerResult_PeerDimensions::GetMetadata() const { void PeerResult_PeerLocations::InitAsDefaultInstance() { } -class PeerResult_PeerLocations::HasBitSetters { +class PeerResult_PeerLocations::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int PeerResult_PeerLocations::kInstanceNameFieldNumber; -const int PeerResult_PeerLocations::kLocationsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - PeerResult_PeerLocations::PeerResult_PeerLocations() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.PeerResult.PeerLocations) } PeerResult_PeerLocations::PeerResult_PeerLocations(const PeerResult_PeerLocations& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), locations_(from.locations_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_instance_name().empty()) { + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.PeerResult.PeerLocations) } void PeerResult_PeerLocations::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } PeerResult_PeerLocations::~PeerResult_PeerLocations() { @@ -4898,226 +3487,104 @@ PeerResult_PeerLocations::~PeerResult_PeerLocations() { } void PeerResult_PeerLocations::SharedDtor() { - instance_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void PeerResult_PeerLocations::SetCachedSize(int size) const { _cached_size_.Set(size); } const PeerResult_PeerLocations& PeerResult_PeerLocations::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PeerResult_PeerLocations_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void PeerResult_PeerLocations::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.PeerResult.PeerLocations) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; locations_.Clear(); - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* PeerResult_PeerLocations::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* PeerResult_PeerLocations::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string instance_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.PeerResult.PeerLocations.instance_name"); - object = msg->mutable_instance_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_instance_name(), ptr, ctx, "muscle_manager_protocol.PeerResult.PeerLocations.instance_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated string locations = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.PeerResult.PeerLocations.locations"); - object = msg->add_locations(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 18 && (ptr += 1)); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_add_locations(), ptr, ctx, "muscle_manager_protocol.PeerResult.PeerLocations.locations"); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool PeerResult_PeerLocations::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.PeerResult.PeerLocations) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string instance_name = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_instance_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.PeerResult.PeerLocations.instance_name")); - } else { - goto handle_unusual; - } - break; - } - - // repeated string locations = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->add_locations())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->locations(this->locations_size() - 1).data(), - static_cast(this->locations(this->locations_size() - 1).length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.PeerResult.PeerLocations.locations")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.PeerResult.PeerLocations) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.PeerResult.PeerLocations) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void PeerResult_PeerLocations::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.PeerResult.PeerLocations) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string instance_name = 1; - if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.PeerResult.PeerLocations.instance_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->instance_name(), output); - } - - // repeated string locations = 2; - for (int i = 0, n = this->locations_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->locations(i).data(), static_cast(this->locations(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.PeerResult.PeerLocations.locations"); - ::google::protobuf::internal::WireFormatLite::WriteString( - 2, this->locations(i), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.PeerResult.PeerLocations) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* PeerResult_PeerLocations::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* PeerResult_PeerLocations::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.PeerResult.PeerLocations) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string instance_name = 1; if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_instance_name().data(), static_cast(this->_internal_instance_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.PeerResult.PeerLocations.instance_name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->instance_name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_instance_name(), target); } // repeated string locations = 2; - for (int i = 0, n = this->locations_size(); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->locations(i).data(), static_cast(this->locations(i).length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + for (int i = 0, n = this->_internal_locations_size(); i < n; i++) { + const auto& s = this->_internal_locations(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.PeerResult.PeerLocations.locations"); - target = ::google::protobuf::internal::WireFormatLite:: - WriteStringToArray(2, this->locations(i), target); + target = stream->WriteString(2, s, target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.PeerResult.PeerLocations) return target; @@ -5127,44 +3594,43 @@ size_t PeerResult_PeerLocations::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.PeerResult.PeerLocations) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated string locations = 2; total_size += 1 * - ::google::protobuf::internal::FromIntSize(this->locations_size()); - for (int i = 0, n = this->locations_size(); i < n; i++) { - total_size += ::google::protobuf::internal::WireFormatLite::StringSize( - this->locations(i)); + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(locations_.size()); + for (int i = 0, n = locations_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + locations_.Get(i)); } // string instance_name = 1; if (this->instance_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->instance_name()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_instance_name()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void PeerResult_PeerLocations::MergeFrom(const ::google::protobuf::Message& from) { +void PeerResult_PeerLocations::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.PeerResult.PeerLocations) GOOGLE_DCHECK_NE(&from, this); const PeerResult_PeerLocations* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.PeerResult.PeerLocations) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.PeerResult.PeerLocations) MergeFrom(*source); @@ -5175,17 +3641,17 @@ void PeerResult_PeerLocations::MergeFrom(const PeerResult_PeerLocations& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.PeerResult.PeerLocations) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; locations_.MergeFrom(from.locations_); if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } } -void PeerResult_PeerLocations::CopyFrom(const ::google::protobuf::Message& from) { +void PeerResult_PeerLocations::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.PeerResult.PeerLocations) if (&from == this) return; Clear(); @@ -5203,21 +3669,16 @@ bool PeerResult_PeerLocations::IsInitialized() const { return true; } -void PeerResult_PeerLocations::Swap(PeerResult_PeerLocations* other) { - if (other == this) return; - InternalSwap(other); -} void PeerResult_PeerLocations::InternalSwap(PeerResult_PeerLocations* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - locations_.InternalSwap(CastToBase(&other->locations_)); - instance_name_.Swap(&other->instance_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + locations_.InternalSwap(&other->locations_); + instance_name_.Swap(&other->instance_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata PeerResult_PeerLocations::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata PeerResult_PeerLocations::GetMetadata() const { + return GetMetadataStatic(); } @@ -5225,42 +3686,33 @@ ::google::protobuf::Metadata PeerResult_PeerLocations::GetMetadata() const { void PeerResult::InitAsDefaultInstance() { } -class PeerResult::HasBitSetters { +class PeerResult::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int PeerResult::kStatusFieldNumber; -const int PeerResult::kErrorMessageFieldNumber; -const int PeerResult::kConduitsFieldNumber; -const int PeerResult::kPeerDimensionsFieldNumber; -const int PeerResult::kPeerLocationsFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - PeerResult::PeerResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.PeerResult) } PeerResult::PeerResult(const PeerResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), conduits_(from.conduits_), peer_dimensions_(from.peer_dimensions_), peer_locations_(from.peer_locations_) { _internal_metadata_.MergeFrom(from._internal_metadata_); - error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.error_message().size() > 0) { - error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_error_message().empty()) { + error_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_message_); } status_ = from.status_; // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.PeerResult) } void PeerResult::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = 0; } @@ -5270,340 +3722,160 @@ PeerResult::~PeerResult() { } void PeerResult::SharedDtor() { - error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void PeerResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const PeerResult& PeerResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_PeerResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void PeerResult::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.PeerResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; conduits_.Clear(); peer_dimensions_.Clear(); peer_locations_.Clear(); - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = 0; _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* PeerResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* PeerResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // .muscle_manager_protocol.ResultStatus status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_status(static_cast<::muscle_manager_protocol::ResultStatus>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_status(static_cast<::muscle_manager_protocol::ResultStatus>(val)); + } else goto handle_unusual; + continue; // string error_message = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.PeerResult.error_message"); - object = msg->mutable_error_message(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_error_message(), ptr, ctx, "muscle_manager_protocol.PeerResult.error_message"); + CHK_(ptr); + } else goto handle_unusual; + continue; // repeated .muscle_manager_protocol.Conduit conduits = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::Conduit::_InternalParse; - object = msg->add_conduits(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 26 && (ptr += 1)); - break; - } + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_conduits(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else goto handle_unusual; + continue; // repeated .muscle_manager_protocol.PeerResult.PeerDimensions peer_dimensions = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 34) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::PeerResult_PeerDimensions::_InternalParse; - object = msg->add_peer_dimensions(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 34 && (ptr += 1)); - break; - } + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_peer_dimensions(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else goto handle_unusual; + continue; // repeated .muscle_manager_protocol.PeerResult.PeerLocations peer_locations = 5; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 42) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::PeerResult_PeerLocations::_InternalParse; - object = msg->add_peer_locations(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 42 && (ptr += 1)); - break; - } + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_peer_locations(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool PeerResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.PeerResult) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .muscle_manager_protocol.ResultStatus status = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { - int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_status(static_cast< ::muscle_manager_protocol::ResultStatus >(value)); - } else { - goto handle_unusual; - } - break; - } - - // string error_message = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_error_message())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.PeerResult.error_message")); - } else { - goto handle_unusual; - } - break; - } - - // repeated .muscle_manager_protocol.Conduit conduits = 3; - case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, add_conduits())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .muscle_manager_protocol.PeerResult.PeerDimensions peer_dimensions = 4; - case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (34 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, add_peer_dimensions())); - } else { - goto handle_unusual; - } - break; - } - - // repeated .muscle_manager_protocol.PeerResult.PeerLocations peer_locations = 5; - case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (42 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, add_peer_locations())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.PeerResult) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.PeerResult) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void PeerResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.PeerResult) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .muscle_manager_protocol.ResultStatus status = 1; - if (this->status() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 1, this->status(), output); - } - - // string error_message = 2; - if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.PeerResult.error_message"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->error_message(), output); - } - - // repeated .muscle_manager_protocol.Conduit conduits = 3; - for (unsigned int i = 0, - n = static_cast(this->conduits_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 3, - this->conduits(static_cast(i)), - output); - } - - // repeated .muscle_manager_protocol.PeerResult.PeerDimensions peer_dimensions = 4; - for (unsigned int i = 0, - n = static_cast(this->peer_dimensions_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 4, - this->peer_dimensions(static_cast(i)), - output); - } - - // repeated .muscle_manager_protocol.PeerResult.PeerLocations peer_locations = 5; - for (unsigned int i = 0, - n = static_cast(this->peer_locations_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 5, - this->peer_locations(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.PeerResult) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* PeerResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* PeerResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.PeerResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .muscle_manager_protocol.ResultStatus status = 1; if (this->status() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 1, this->status(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_status(), target); } // string error_message = 2; if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_error_message().data(), static_cast(this->_internal_error_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.PeerResult.error_message"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->error_message(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_error_message(), target); } // repeated .muscle_manager_protocol.Conduit conduits = 3; for (unsigned int i = 0, - n = static_cast(this->conduits_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageToArray( - 3, this->conduits(static_cast(i)), target); + n = static_cast(this->_internal_conduits_size()); i < n; i++) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray(3, this->_internal_conduits(i), target, stream); } // repeated .muscle_manager_protocol.PeerResult.PeerDimensions peer_dimensions = 4; for (unsigned int i = 0, - n = static_cast(this->peer_dimensions_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageToArray( - 4, this->peer_dimensions(static_cast(i)), target); + n = static_cast(this->_internal_peer_dimensions_size()); i < n; i++) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray(4, this->_internal_peer_dimensions(i), target, stream); } // repeated .muscle_manager_protocol.PeerResult.PeerLocations peer_locations = 5; for (unsigned int i = 0, - n = static_cast(this->peer_locations_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageToArray( - 5, this->peer_locations(static_cast(i)), target); + n = static_cast(this->_internal_peer_locations_size()); i < n; i++) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray(5, this->_internal_peer_locations(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.PeerResult) return target; @@ -5613,75 +3885,62 @@ size_t PeerResult::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.PeerResult) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .muscle_manager_protocol.Conduit conduits = 3; - { - unsigned int count = static_cast(this->conduits_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( - this->conduits(static_cast(i))); - } + total_size += 1UL * this->_internal_conduits_size(); + for (const auto& msg : this->conduits_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .muscle_manager_protocol.PeerResult.PeerDimensions peer_dimensions = 4; - { - unsigned int count = static_cast(this->peer_dimensions_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( - this->peer_dimensions(static_cast(i))); - } + total_size += 1UL * this->_internal_peer_dimensions_size(); + for (const auto& msg : this->peer_dimensions_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // repeated .muscle_manager_protocol.PeerResult.PeerLocations peer_locations = 5; - { - unsigned int count = static_cast(this->peer_locations_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( - this->peer_locations(static_cast(i))); - } + total_size += 1UL * this->_internal_peer_locations_size(); + for (const auto& msg : this->peer_locations_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } // string error_message = 2; if (this->error_message().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->error_message()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_error_message()); } // .muscle_manager_protocol.ResultStatus status = 1; if (this->status() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_status()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void PeerResult::MergeFrom(const ::google::protobuf::Message& from) { +void PeerResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.PeerResult) GOOGLE_DCHECK_NE(&from, this); const PeerResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.PeerResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.PeerResult) MergeFrom(*source); @@ -5692,7 +3951,7 @@ void PeerResult::MergeFrom(const PeerResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.PeerResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; conduits_.MergeFrom(from.conduits_); @@ -5700,14 +3959,14 @@ void PeerResult::MergeFrom(const PeerResult& from) { peer_locations_.MergeFrom(from.peer_locations_); if (from.error_message().size() > 0) { - error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + error_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_message_); } if (from.status() != 0) { - set_status(from.status()); + _internal_set_status(from._internal_status()); } } -void PeerResult::CopyFrom(const ::google::protobuf::Message& from) { +void PeerResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.PeerResult) if (&from == this) return; Clear(); @@ -5725,24 +3984,19 @@ bool PeerResult::IsInitialized() const { return true; } -void PeerResult::Swap(PeerResult* other) { - if (other == this) return; - InternalSwap(other); -} void PeerResult::InternalSwap(PeerResult* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&conduits_)->InternalSwap(CastToBase(&other->conduits_)); - CastToBase(&peer_dimensions_)->InternalSwap(CastToBase(&other->peer_dimensions_)); - CastToBase(&peer_locations_)->InternalSwap(CastToBase(&other->peer_locations_)); - error_message_.Swap(&other->error_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + conduits_.InternalSwap(&other->conduits_); + peer_dimensions_.InternalSwap(&other->peer_dimensions_); + peer_locations_.InternalSwap(&other->peer_locations_); + error_message_.Swap(&other->error_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(status_, other->status_); } -::google::protobuf::Metadata PeerResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata PeerResult::GetMetadata() const { + return GetMetadataStatic(); } @@ -5750,21 +4004,17 @@ ::google::protobuf::Metadata PeerResult::GetMetadata() const { void ListOfDouble::InitAsDefaultInstance() { } -class ListOfDouble::HasBitSetters { +class ListOfDouble::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ListOfDouble::kValuesFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - ListOfDouble::ListOfDouble() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.ListOfDouble) } ListOfDouble::ListOfDouble(const ListOfDouble& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), values_(from.values_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -5786,14 +4036,14 @@ void ListOfDouble::SetCachedSize(int size) const { _cached_size_.Set(size); } const ListOfDouble& ListOfDouble::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void ListOfDouble::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.ListOfDouble) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -5801,150 +4051,57 @@ void ListOfDouble::Clear() { _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ListOfDouble::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* ListOfDouble::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // repeated double values = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) == 10) { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::google::protobuf::internal::PackedDoubleParser; - object = msg->mutable_values(); - if (size > end - ptr) goto len_delim_till_end; - auto newend = ptr + size; - if (size) ptr = parser_till_end(ptr, newend, object, ctx); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr == newend); - break; - } else if (static_cast<::google::protobuf::uint8>(tag) != 9) goto handle_unusual; - do { - msg->add_values(::google::protobuf::io::UnalignedLoad(ptr)); + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedDoubleParser(_internal_mutable_values(), ptr, ctx); + CHK_(ptr); + } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9) { + _internal_add_values(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); ptr += sizeof(double); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 9 && (ptr += 1)); - break; - } + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ListOfDouble::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.ListOfDouble) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated double values = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadPackedPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( - input, this->mutable_values()))); - } else if (static_cast< ::google::protobuf::uint8>(tag) == (9 & 0xFF)) { - DO_((::google::protobuf::internal::WireFormatLite::ReadRepeatedPrimitiveNoInline< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( - 1, 10u, input, this->mutable_values()))); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.ListOfDouble) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.ListOfDouble) - return false; -#undef DO_ + ptr = nullptr; + goto success; +#undef CHK_ } -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -void ListOfDouble::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.ListOfDouble) - ::google::protobuf::uint32 cached_has_bits = 0; +::PROTOBUF_NAMESPACE_ID::uint8* ListOfDouble::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.ListOfDouble) + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated double values = 1; - if (this->values_size() > 0) { - ::google::protobuf::internal::WireFormatLite::WriteTag(1, ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, output); - output->WriteVarint32(_values_cached_byte_size_.load( - std::memory_order_relaxed)); - ::google::protobuf::internal::WireFormatLite::WriteDoubleArray( - this->values().data(), this->values_size(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); + if (this->_internal_values_size() > 0) { + target = stream->WriteFixedPacked(1, _internal_values(), target); } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.ListOfDouble) -} - -::google::protobuf::uint8* ListOfDouble::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { - // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.ListOfDouble) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - // repeated double values = 1; - if (this->values_size() > 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteTagToArray( - 1, - ::google::protobuf::internal::WireFormatLite::WIRETYPE_LENGTH_DELIMITED, - target); - target = ::google::protobuf::io::CodedOutputStream::WriteVarint32ToArray( - _values_cached_byte_size_.load(std::memory_order_relaxed), - target); - target = ::google::protobuf::internal::WireFormatLite:: - WriteDoubleNoTagToArray(this->values_, target); - } - - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.ListOfDouble) return target; @@ -5954,44 +4111,43 @@ size_t ListOfDouble::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.ListOfDouble) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated double values = 1; { - unsigned int count = static_cast(this->values_size()); + unsigned int count = static_cast(this->_internal_values_size()); size_t data_size = 8UL * count; if (data_size > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int32Size( - static_cast<::google::protobuf::int32>(data_size)); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size( + static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size)); } - int cached_size = ::google::protobuf::internal::ToCachedSize(data_size); + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size); _values_cached_byte_size_.store(cached_size, std::memory_order_relaxed); total_size += data_size; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ListOfDouble::MergeFrom(const ::google::protobuf::Message& from) { +void ListOfDouble::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.ListOfDouble) GOOGLE_DCHECK_NE(&from, this); const ListOfDouble* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.ListOfDouble) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.ListOfDouble) MergeFrom(*source); @@ -6002,13 +4158,13 @@ void ListOfDouble::MergeFrom(const ListOfDouble& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.ListOfDouble) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; values_.MergeFrom(from.values_); } -void ListOfDouble::CopyFrom(const ::google::protobuf::Message& from) { +void ListOfDouble::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.ListOfDouble) if (&from == this) return; Clear(); @@ -6026,19 +4182,14 @@ bool ListOfDouble::IsInitialized() const { return true; } -void ListOfDouble::Swap(ListOfDouble* other) { - if (other == this) return; - InternalSwap(other); -} void ListOfDouble::InternalSwap(ListOfDouble* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); values_.InternalSwap(&other->values_); } -::google::protobuf::Metadata ListOfDouble::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata ListOfDouble::GetMetadata() const { + return GetMetadataStatic(); } @@ -6046,21 +4197,17 @@ ::google::protobuf::Metadata ListOfDouble::GetMetadata() const { void ListOfListOfDouble::InitAsDefaultInstance() { } -class ListOfListOfDouble::HasBitSetters { +class ListOfListOfDouble::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int ListOfListOfDouble::kValuesFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - ListOfListOfDouble::ListOfListOfDouble() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.ListOfListOfDouble) } ListOfListOfDouble::ListOfListOfDouble(const ListOfListOfDouble& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), values_(from.values_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -6068,8 +4215,7 @@ ListOfListOfDouble::ListOfListOfDouble(const ListOfListOfDouble& from) } void ListOfListOfDouble::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); } ListOfListOfDouble::~ListOfListOfDouble() { @@ -6084,151 +4230,77 @@ void ListOfListOfDouble::SetCachedSize(int size) const { _cached_size_.Set(size); } const ListOfListOfDouble& ListOfListOfDouble::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ListOfListOfDouble_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void ListOfListOfDouble::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.ListOfListOfDouble) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; values_.Clear(); - _internal_metadata_.Clear(); -} - -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* ListOfListOfDouble::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - switch (tag >> 3) { - // repeated .muscle_manager_protocol.ListOfDouble values = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::ListOfDouble::_InternalParse; - object = msg->add_values(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); - break; - } - default: { - handle_unusual: - if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; - } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; - } - } // switch - } // while - return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool ListOfListOfDouble::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.ListOfListOfDouble) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .muscle_manager_protocol.ListOfDouble values = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, add_values())); - } else { - goto handle_unusual; - } - break; - } + _internal_metadata_.Clear(); +} +const char* ListOfListOfDouble::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); + switch (tag >> 3) { + // repeated .muscle_manager_protocol.ListOfDouble values = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_values(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; default: { handle_unusual: - if (tag == 0) { + if ((tag & 7) == 4 || tag == 0) { + ctx->SetLastTag(tag); goto success; } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } - } - } + } // switch + } // while success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.ListOfListOfDouble) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.ListOfListOfDouble) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void ListOfListOfDouble::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.ListOfListOfDouble) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .muscle_manager_protocol.ListOfDouble values = 1; - for (unsigned int i = 0, - n = static_cast(this->values_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, - this->values(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.ListOfListOfDouble) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* ListOfListOfDouble::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* ListOfListOfDouble::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.ListOfListOfDouble) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .muscle_manager_protocol.ListOfDouble values = 1; for (unsigned int i = 0, - n = static_cast(this->values_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, this->values(static_cast(i)), target); + n = static_cast(this->_internal_values_size()); i < n; i++) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray(1, this->_internal_values(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.ListOfListOfDouble) return target; @@ -6238,40 +4310,35 @@ size_t ListOfListOfDouble::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.ListOfListOfDouble) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .muscle_manager_protocol.ListOfDouble values = 1; - { - unsigned int count = static_cast(this->values_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( - this->values(static_cast(i))); - } + total_size += 1UL * this->_internal_values_size(); + for (const auto& msg : this->values_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void ListOfListOfDouble::MergeFrom(const ::google::protobuf::Message& from) { +void ListOfListOfDouble::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.ListOfListOfDouble) GOOGLE_DCHECK_NE(&from, this); const ListOfListOfDouble* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.ListOfListOfDouble) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.ListOfListOfDouble) MergeFrom(*source); @@ -6282,13 +4349,13 @@ void ListOfListOfDouble::MergeFrom(const ListOfListOfDouble& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.ListOfListOfDouble) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; values_.MergeFrom(from.values_); } -void ListOfListOfDouble::CopyFrom(const ::google::protobuf::Message& from) { +void ListOfListOfDouble::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.ListOfListOfDouble) if (&from == this) return; Clear(); @@ -6306,19 +4373,14 @@ bool ListOfListOfDouble::IsInitialized() const { return true; } -void ListOfListOfDouble::Swap(ListOfListOfDouble* other) { - if (other == this) return; - InternalSwap(other); -} void ListOfListOfDouble::InternalSwap(ListOfListOfDouble* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&values_)->InternalSwap(CastToBase(&other->values_)); + values_.InternalSwap(&other->values_); } -::google::protobuf::Metadata ListOfListOfDouble::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata ListOfListOfDouble::GetMetadata() const { + return GetMetadataStatic(); } @@ -6330,54 +4392,43 @@ void Setting::InitAsDefaultInstance() { ::muscle_manager_protocol::_Setting_default_instance_._instance.get_mutable()->value_list_list_float_ = const_cast< ::muscle_manager_protocol::ListOfListOfDouble*>( ::muscle_manager_protocol::ListOfListOfDouble::internal_default_instance()); } -class Setting::HasBitSetters { +class Setting::_Internal { public: static const ::muscle_manager_protocol::ListOfDouble& value_list_float(const Setting* msg); static const ::muscle_manager_protocol::ListOfListOfDouble& value_list_list_float(const Setting* msg); }; const ::muscle_manager_protocol::ListOfDouble& -Setting::HasBitSetters::value_list_float(const Setting* msg) { +Setting::_Internal::value_list_float(const Setting* msg) { return *msg->value_list_float_; } const ::muscle_manager_protocol::ListOfListOfDouble& -Setting::HasBitSetters::value_list_list_float(const Setting* msg) { +Setting::_Internal::value_list_list_float(const Setting* msg) { return *msg->value_list_list_float_; } -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int Setting::kNameFieldNumber; -const int Setting::kValueTypeFieldNumber; -const int Setting::kValueStringFieldNumber; -const int Setting::kValueIntFieldNumber; -const int Setting::kValueFloatFieldNumber; -const int Setting::kValueBoolFieldNumber; -const int Setting::kValueListFloatFieldNumber; -const int Setting::kValueListListFloatFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - Setting::Setting() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.Setting) } Setting::Setting(const Setting& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_name().empty()) { + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } - value_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.value_string().size() > 0) { - value_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_string_); + value_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_value_string().empty()) { + value_string_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_string_); } - if (from.has_value_list_float()) { + if (from._internal_has_value_list_float()) { value_list_float_ = new ::muscle_manager_protocol::ListOfDouble(*from.value_list_float_); } else { value_list_float_ = nullptr; } - if (from.has_value_list_list_float()) { + if (from._internal_has_value_list_list_float()) { value_list_list_float_ = new ::muscle_manager_protocol::ListOfListOfDouble(*from.value_list_list_float_); } else { value_list_list_float_ = nullptr; @@ -6389,10 +4440,9 @@ Setting::Setting(const Setting& from) } void Setting::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - value_string_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_string_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); ::memset(&value_list_float_, 0, static_cast( reinterpret_cast(&value_float_) - reinterpret_cast(&value_list_float_)) + sizeof(value_float_)); @@ -6404,8 +4454,8 @@ Setting::~Setting() { } void Setting::SharedDtor() { - name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - value_string_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_string_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (this != internal_default_instance()) delete value_list_float_; if (this != internal_default_instance()) delete value_list_list_float_; } @@ -6414,19 +4464,19 @@ void Setting::SetCachedSize(int size) const { _cached_size_.Set(size); } const Setting& Setting::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_Setting_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void Setting::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.Setting) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - value_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + value_string_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); if (GetArenaNoVirtual() == nullptr && value_list_float_ != nullptr) { delete value_list_float_; } @@ -6441,398 +4491,160 @@ void Setting::Clear() { _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* Setting::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* Setting::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.Setting.name"); - object = msg->mutable_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_name(), ptr, ctx, "muscle_manager_protocol.Setting.name"); + CHK_(ptr); + } else goto handle_unusual; + continue; // .muscle_manager_protocol.SettingValueType value_type = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 16) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_value_type(static_cast<::muscle_manager_protocol::SettingValueType>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_value_type(static_cast<::muscle_manager_protocol::SettingValueType>(val)); + } else goto handle_unusual; + continue; // string value_string = 3; - case 3: { - if (static_cast<::google::protobuf::uint8>(tag) != 26) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.Setting.value_string"); - object = msg->mutable_value_string(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_value_string(), ptr, ctx, "muscle_manager_protocol.Setting.value_string"); + CHK_(ptr); + } else goto handle_unusual; + continue; // int64 value_int = 4; - case 4: { - if (static_cast<::google::protobuf::uint8>(tag) != 32) goto handle_unusual; - msg->set_value_int(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 32)) { + value_int_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // double value_float = 5; - case 5: { - if (static_cast<::google::protobuf::uint8>(tag) != 41) goto handle_unusual; - msg->set_value_float(::google::protobuf::io::UnalignedLoad(ptr)); - ptr += sizeof(double); - break; - } + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 41)) { + value_float_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr); + ptr += sizeof(double); + } else goto handle_unusual; + continue; // bool value_bool = 6; - case 6: { - if (static_cast<::google::protobuf::uint8>(tag) != 48) goto handle_unusual; - msg->set_value_bool(::google::protobuf::internal::ReadVarint(&ptr)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 48)) { + value_bool_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // .muscle_manager_protocol.ListOfDouble value_list_float = 7; - case 7: { - if (static_cast<::google::protobuf::uint8>(tag) != 58) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::ListOfDouble::_InternalParse; - object = msg->mutable_value_list_float(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 58)) { + ptr = ctx->ParseMessage(_internal_mutable_value_list_float(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; // .muscle_manager_protocol.ListOfListOfDouble value_list_list_float = 8; - case 8: { - if (static_cast<::google::protobuf::uint8>(tag) != 66) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::ListOfListOfDouble::_InternalParse; - object = msg->mutable_value_list_list_float(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - break; - } + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_value_list_list_float(), ptr); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool Setting::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.Setting) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string name = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.Setting.name")); - } else { - goto handle_unusual; - } - break; - } - - // .muscle_manager_protocol.SettingValueType value_type = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (16 & 0xFF)) { - int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_value_type(static_cast< ::muscle_manager_protocol::SettingValueType >(value)); - } else { - goto handle_unusual; - } - break; - } - - // string value_string = 3; - case 3: { - if (static_cast< ::google::protobuf::uint8>(tag) == (26 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_value_string())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->value_string().data(), static_cast(this->value_string().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.Setting.value_string")); - } else { - goto handle_unusual; - } - break; - } - - // int64 value_int = 4; - case 4: { - if (static_cast< ::google::protobuf::uint8>(tag) == (32 & 0xFF)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>( - input, &value_int_))); - } else { - goto handle_unusual; - } - break; - } - - // double value_float = 5; - case 5: { - if (static_cast< ::google::protobuf::uint8>(tag) == (41 & 0xFF)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - double, ::google::protobuf::internal::WireFormatLite::TYPE_DOUBLE>( - input, &value_float_))); - } else { - goto handle_unusual; - } - break; - } - - // bool value_bool = 6; - case 6: { - if (static_cast< ::google::protobuf::uint8>(tag) == (48 & 0xFF)) { - - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - bool, ::google::protobuf::internal::WireFormatLite::TYPE_BOOL>( - input, &value_bool_))); - } else { - goto handle_unusual; - } - break; - } - - // .muscle_manager_protocol.ListOfDouble value_list_float = 7; - case 7: { - if (static_cast< ::google::protobuf::uint8>(tag) == (58 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_value_list_float())); - } else { - goto handle_unusual; - } - break; - } - - // .muscle_manager_protocol.ListOfListOfDouble value_list_list_float = 8; - case 8: { - if (static_cast< ::google::protobuf::uint8>(tag) == (66 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, mutable_value_list_list_float())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.Setting) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.Setting) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void Setting::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.Setting) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string name = 1; - if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.Setting.name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->name(), output); - } - - // .muscle_manager_protocol.SettingValueType value_type = 2; - if (this->value_type() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 2, this->value_type(), output); - } - - // string value_string = 3; - if (this->value_string().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->value_string().data(), static_cast(this->value_string().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.Setting.value_string"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 3, this->value_string(), output); - } - - // int64 value_int = 4; - if (this->value_int() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteInt64(4, this->value_int(), output); - } - - // double value_float = 5; - if (this->value_float() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteDouble(5, this->value_float(), output); - } - - // bool value_bool = 6; - if (this->value_bool() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteBool(6, this->value_bool(), output); - } - - // .muscle_manager_protocol.ListOfDouble value_list_float = 7; - if (this->has_value_list_float()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 7, HasBitSetters::value_list_float(this), output); - } - - // .muscle_manager_protocol.ListOfListOfDouble value_list_list_float = 8; - if (this->has_value_list_list_float()) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 8, HasBitSetters::value_list_list_float(this), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.Setting) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* Setting::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* Setting::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.Setting) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->name().data(), static_cast(this->name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.Setting.name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); } // .muscle_manager_protocol.SettingValueType value_type = 2; if (this->value_type() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 2, this->value_type(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 2, this->_internal_value_type(), target); } // string value_string = 3; if (this->value_string().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->value_string().data(), static_cast(this->value_string().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_value_string().data(), static_cast(this->_internal_value_string().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.Setting.value_string"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 3, this->value_string(), target); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_value_string(), target); } // int64 value_int = 4; if (this->value_int() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(4, this->value_int(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt64ToArray(4, this->_internal_value_int(), target); } // double value_float = 5; - if (this->value_float() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteDoubleToArray(5, this->value_float(), target); + if (!(this->value_float() <= 0 && this->value_float() >= 0)) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(5, this->_internal_value_float(), target); } // bool value_bool = 6; if (this->value_bool() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteBoolToArray(6, this->value_bool(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(6, this->_internal_value_bool(), target); } // .muscle_manager_protocol.ListOfDouble value_list_float = 7; if (this->has_value_list_float()) { - target = ::google::protobuf::internal::WireFormatLite:: + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 7, HasBitSetters::value_list_float(this), target); + 7, _Internal::value_list_float(this), target, stream); } // .muscle_manager_protocol.ListOfListOfDouble value_list_list_float = 8; if (this->has_value_list_list_float()) { - target = ::google::protobuf::internal::WireFormatLite:: + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: InternalWriteMessageToArray( - 8, HasBitSetters::value_list_list_float(this), target); + 8, _Internal::value_list_list_float(this), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.Setting) return target; @@ -6842,54 +4654,49 @@ size_t Setting::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.Setting) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string name = 1; if (this->name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->name()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); } // string value_string = 3; if (this->value_string().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->value_string()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_value_string()); } // .muscle_manager_protocol.ListOfDouble value_list_float = 7; if (this->has_value_list_float()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *value_list_float_); } // .muscle_manager_protocol.ListOfListOfDouble value_list_list_float = 8; if (this->has_value_list_list_float()) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::MessageSize( + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( *value_list_list_float_); } // int64 value_int = 4; if (this->value_int() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::Int64Size( - this->value_int()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int64Size( + this->_internal_value_int()); } // .muscle_manager_protocol.SettingValueType value_type = 2; if (this->value_type() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->value_type()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_value_type()); } // bool value_bool = 6; @@ -6898,24 +4705,28 @@ size_t Setting::ByteSizeLong() const { } // double value_float = 5; - if (this->value_float() != 0) { + if (!(this->value_float() <= 0 && this->value_float() >= 0)) { total_size += 1 + 8; } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void Setting::MergeFrom(const ::google::protobuf::Message& from) { +void Setting::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.Setting) GOOGLE_DCHECK_NE(&from, this); const Setting* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.Setting) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.Setting) MergeFrom(*source); @@ -6926,38 +4737,38 @@ void Setting::MergeFrom(const Setting& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.Setting) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.name().size() > 0) { - name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_); + name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.name_); } if (from.value_string().size() > 0) { - value_string_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.value_string_); + value_string_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.value_string_); } if (from.has_value_list_float()) { - mutable_value_list_float()->::muscle_manager_protocol::ListOfDouble::MergeFrom(from.value_list_float()); + _internal_mutable_value_list_float()->::muscle_manager_protocol::ListOfDouble::MergeFrom(from._internal_value_list_float()); } if (from.has_value_list_list_float()) { - mutable_value_list_list_float()->::muscle_manager_protocol::ListOfListOfDouble::MergeFrom(from.value_list_list_float()); + _internal_mutable_value_list_list_float()->::muscle_manager_protocol::ListOfListOfDouble::MergeFrom(from._internal_value_list_list_float()); } if (from.value_int() != 0) { - set_value_int(from.value_int()); + _internal_set_value_int(from._internal_value_int()); } if (from.value_type() != 0) { - set_value_type(from.value_type()); + _internal_set_value_type(from._internal_value_type()); } if (from.value_bool() != 0) { - set_value_bool(from.value_bool()); + _internal_set_value_bool(from._internal_value_bool()); } - if (from.value_float() != 0) { - set_value_float(from.value_float()); + if (!(from.value_float() <= 0 && from.value_float() >= 0)) { + _internal_set_value_float(from._internal_value_float()); } } -void Setting::CopyFrom(const ::google::protobuf::Message& from) { +void Setting::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.Setting) if (&from == this) return; Clear(); @@ -6975,16 +4786,12 @@ bool Setting::IsInitialized() const { return true; } -void Setting::Swap(Setting* other) { - if (other == this) return; - InternalSwap(other); -} void Setting::InternalSwap(Setting* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.Swap(&other->name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); - value_string_.Swap(&other->value_string_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + value_string_.Swap(&other->value_string_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(value_list_float_, other->value_list_float_); swap(value_list_list_float_, other->value_list_list_float_); @@ -6994,9 +4801,8 @@ void Setting::InternalSwap(Setting* other) { swap(value_float_, other->value_float_); } -::google::protobuf::Metadata Setting::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata Setting::GetMetadata() const { + return GetMetadataStatic(); } @@ -7004,20 +4810,17 @@ ::google::protobuf::Metadata Setting::GetMetadata() const { void SettingsRequest::InitAsDefaultInstance() { } -class SettingsRequest::HasBitSetters { +class SettingsRequest::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - SettingsRequest::SettingsRequest() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.SettingsRequest) } SettingsRequest::SettingsRequest(const SettingsRequest& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.SettingsRequest) @@ -7038,97 +4841,55 @@ void SettingsRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const SettingsRequest& SettingsRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SettingsRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void SettingsRequest::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.SettingsRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SettingsRequest::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* SettingsRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { default: { if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool SettingsRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.SettingsRequest) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.SettingsRequest) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.SettingsRequest) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void SettingsRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.SettingsRequest) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.SettingsRequest) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* SettingsRequest::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SettingsRequest::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.SettingsRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.SettingsRequest) return target; @@ -7138,29 +4899,28 @@ size_t SettingsRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.SettingsRequest) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void SettingsRequest::MergeFrom(const ::google::protobuf::Message& from) { +void SettingsRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.SettingsRequest) GOOGLE_DCHECK_NE(&from, this); const SettingsRequest* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.SettingsRequest) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.SettingsRequest) MergeFrom(*source); @@ -7171,12 +4931,12 @@ void SettingsRequest::MergeFrom(const SettingsRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.SettingsRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; } -void SettingsRequest::CopyFrom(const ::google::protobuf::Message& from) { +void SettingsRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.SettingsRequest) if (&from == this) return; Clear(); @@ -7194,18 +4954,13 @@ bool SettingsRequest::IsInitialized() const { return true; } -void SettingsRequest::Swap(SettingsRequest* other) { - if (other == this) return; - InternalSwap(other); -} void SettingsRequest::InternalSwap(SettingsRequest* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); } -::google::protobuf::Metadata SettingsRequest::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata SettingsRequest::GetMetadata() const { + return GetMetadataStatic(); } @@ -7213,21 +4968,17 @@ ::google::protobuf::Metadata SettingsRequest::GetMetadata() const { void SettingsResult::InitAsDefaultInstance() { } -class SettingsResult::HasBitSetters { +class SettingsResult::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int SettingsResult::kSettingValuesFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - SettingsResult::SettingsResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.SettingsResult) } SettingsResult::SettingsResult(const SettingsResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr), setting_values_(from.setting_values_) { _internal_metadata_.MergeFrom(from._internal_metadata_); @@ -7235,8 +4986,7 @@ SettingsResult::SettingsResult(const SettingsResult& from) } void SettingsResult::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); } SettingsResult::~SettingsResult() { @@ -7251,14 +5001,14 @@ void SettingsResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const SettingsResult& SettingsResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SettingsResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void SettingsResult::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.SettingsResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; @@ -7266,136 +5016,62 @@ void SettingsResult::Clear() { _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* SettingsResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* SettingsResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // repeated .muscle_manager_protocol.Setting setting_values = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - do { - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - parser_till_end = ::muscle_manager_protocol::Setting::_InternalParse; - object = msg->add_setting_values(); - if (size > end - ptr) goto len_delim_till_end; - ptr += size; - GOOGLE_PROTOBUF_PARSER_ASSERT(ctx->ParseExactRange( - {parser_till_end, object}, ptr - size, ptr)); - if (ptr >= end) break; - } while ((::google::protobuf::io::UnalignedLoad<::google::protobuf::uint64>(ptr) & 255) == 10 && (ptr += 1)); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_setting_values(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool SettingsResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.SettingsResult) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // repeated .muscle_manager_protocol.Setting setting_values = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadMessage( - input, add_setting_values())); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.SettingsResult) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.SettingsResult) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void SettingsResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.SettingsResult) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // repeated .muscle_manager_protocol.Setting setting_values = 1; - for (unsigned int i = 0, - n = static_cast(this->setting_values_size()); i < n; i++) { - ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray( - 1, - this->setting_values(static_cast(i)), - output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.SettingsResult) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* SettingsResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* SettingsResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.SettingsResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // repeated .muscle_manager_protocol.Setting setting_values = 1; for (unsigned int i = 0, - n = static_cast(this->setting_values_size()); i < n; i++) { - target = ::google::protobuf::internal::WireFormatLite:: - InternalWriteMessageToArray( - 1, this->setting_values(static_cast(i)), target); + n = static_cast(this->_internal_setting_values_size()); i < n; i++) { + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessageToArray(1, this->_internal_setting_values(i), target, stream); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.SettingsResult) return target; @@ -7405,40 +5081,35 @@ size_t SettingsResult::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.SettingsResult) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // repeated .muscle_manager_protocol.Setting setting_values = 1; - { - unsigned int count = static_cast(this->setting_values_size()); - total_size += 1UL * count; - for (unsigned int i = 0; i < count; i++) { - total_size += - ::google::protobuf::internal::WireFormatLite::MessageSize( - this->setting_values(static_cast(i))); - } + total_size += 1UL * this->_internal_setting_values_size(); + for (const auto& msg : this->setting_values_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void SettingsResult::MergeFrom(const ::google::protobuf::Message& from) { +void SettingsResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.SettingsResult) GOOGLE_DCHECK_NE(&from, this); const SettingsResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.SettingsResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.SettingsResult) MergeFrom(*source); @@ -7449,13 +5120,13 @@ void SettingsResult::MergeFrom(const SettingsResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.SettingsResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; setting_values_.MergeFrom(from.setting_values_); } -void SettingsResult::CopyFrom(const ::google::protobuf::Message& from) { +void SettingsResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.SettingsResult) if (&from == this) return; Clear(); @@ -7473,19 +5144,14 @@ bool SettingsResult::IsInitialized() const { return true; } -void SettingsResult::Swap(SettingsResult* other) { - if (other == this) return; - InternalSwap(other); -} void SettingsResult::InternalSwap(SettingsResult* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - CastToBase(&setting_values_)->InternalSwap(CastToBase(&other->setting_values_)); + setting_values_.InternalSwap(&other->setting_values_); } -::google::protobuf::Metadata SettingsResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata SettingsResult::GetMetadata() const { + return GetMetadataStatic(); } @@ -7493,34 +5159,29 @@ ::google::protobuf::Metadata SettingsResult::GetMetadata() const { void DeregistrationRequest::InitAsDefaultInstance() { } -class DeregistrationRequest::HasBitSetters { +class DeregistrationRequest::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int DeregistrationRequest::kInstanceNameFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - DeregistrationRequest::DeregistrationRequest() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.DeregistrationRequest) } DeregistrationRequest::DeregistrationRequest(const DeregistrationRequest& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_instance_name().empty()) { + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.DeregistrationRequest) } void DeregistrationRequest::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - instance_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + instance_name_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } DeregistrationRequest::~DeregistrationRequest() { @@ -7529,170 +5190,81 @@ DeregistrationRequest::~DeregistrationRequest() { } void DeregistrationRequest::SharedDtor() { - instance_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void DeregistrationRequest::SetCachedSize(int size) const { _cached_size_.Set(size); } const DeregistrationRequest& DeregistrationRequest::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DeregistrationRequest_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void DeregistrationRequest::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.DeregistrationRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* DeregistrationRequest::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* DeregistrationRequest::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // string instance_name = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 10) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.DeregistrationRequest.instance_name"); - object = msg->mutable_instance_name(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_instance_name(), ptr, ctx, "muscle_manager_protocol.DeregistrationRequest.instance_name"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool DeregistrationRequest::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.DeregistrationRequest) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // string instance_name = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (10 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_instance_name())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.DeregistrationRequest.instance_name")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.DeregistrationRequest) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.DeregistrationRequest) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void DeregistrationRequest::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.DeregistrationRequest) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // string instance_name = 1; - if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.DeregistrationRequest.instance_name"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 1, this->instance_name(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.DeregistrationRequest) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* DeregistrationRequest::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DeregistrationRequest::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.DeregistrationRequest) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // string instance_name = 1; if (this->instance_name().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->instance_name().data(), static_cast(this->instance_name().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_instance_name().data(), static_cast(this->_internal_instance_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.DeregistrationRequest.instance_name"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 1, this->instance_name(), target); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_instance_name(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.DeregistrationRequest) return target; @@ -7702,36 +5274,35 @@ size_t DeregistrationRequest::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.DeregistrationRequest) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string instance_name = 1; if (this->instance_name().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->instance_name()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_instance_name()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void DeregistrationRequest::MergeFrom(const ::google::protobuf::Message& from) { +void DeregistrationRequest::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.DeregistrationRequest) GOOGLE_DCHECK_NE(&from, this); const DeregistrationRequest* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.DeregistrationRequest) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.DeregistrationRequest) MergeFrom(*source); @@ -7742,16 +5313,16 @@ void DeregistrationRequest::MergeFrom(const DeregistrationRequest& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.DeregistrationRequest) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.instance_name().size() > 0) { - instance_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.instance_name_); + instance_name_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.instance_name_); } } -void DeregistrationRequest::CopyFrom(const ::google::protobuf::Message& from) { +void DeregistrationRequest::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.DeregistrationRequest) if (&from == this) return; Clear(); @@ -7769,20 +5340,15 @@ bool DeregistrationRequest::IsInitialized() const { return true; } -void DeregistrationRequest::Swap(DeregistrationRequest* other) { - if (other == this) return; - InternalSwap(other); -} void DeregistrationRequest::InternalSwap(DeregistrationRequest* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - instance_name_.Swap(&other->instance_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_name_.Swap(&other->instance_name_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); } -::google::protobuf::Metadata DeregistrationRequest::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata DeregistrationRequest::GetMetadata() const { + return GetMetadataStatic(); } @@ -7790,36 +5356,30 @@ ::google::protobuf::Metadata DeregistrationRequest::GetMetadata() const { void DeregistrationResult::InitAsDefaultInstance() { } -class DeregistrationResult::HasBitSetters { +class DeregistrationResult::_Internal { public: }; -#if !defined(_MSC_VER) || _MSC_VER >= 1900 -const int DeregistrationResult::kStatusFieldNumber; -const int DeregistrationResult::kErrorMessageFieldNumber; -#endif // !defined(_MSC_VER) || _MSC_VER >= 1900 - DeregistrationResult::DeregistrationResult() - : ::google::protobuf::Message(), _internal_metadata_(nullptr) { + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { SharedCtor(); // @@protoc_insertion_point(constructor:muscle_manager_protocol.DeregistrationResult) } DeregistrationResult::DeregistrationResult(const DeregistrationResult& from) - : ::google::protobuf::Message(), + : ::PROTOBUF_NAMESPACE_ID::Message(), _internal_metadata_(nullptr) { _internal_metadata_.MergeFrom(from._internal_metadata_); - error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); - if (from.error_message().size() > 0) { - error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); + if (!from._internal_error_message().empty()) { + error_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_message_); } status_ = from.status_; // @@protoc_insertion_point(copy_constructor:muscle_manager_protocol.DeregistrationResult) } void DeregistrationResult::SharedCtor() { - ::google::protobuf::internal::InitSCC( - &scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); - error_message_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + error_message_.UnsafeSetDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = 0; } @@ -7829,205 +5389,97 @@ DeregistrationResult::~DeregistrationResult() { } void DeregistrationResult::SharedDtor() { - error_message_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.DestroyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } void DeregistrationResult::SetCachedSize(int size) const { _cached_size_.Set(size); } const DeregistrationResult& DeregistrationResult::default_instance() { - ::google::protobuf::internal::InitSCC(&::scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); + ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_DeregistrationResult_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.base); return *internal_default_instance(); } void DeregistrationResult::Clear() { // @@protoc_insertion_point(message_clear_start:muscle_manager_protocol.DeregistrationResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); status_ = 0; _internal_metadata_.Clear(); } -#if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -const char* DeregistrationResult::_InternalParse(const char* begin, const char* end, void* object, - ::google::protobuf::internal::ParseContext* ctx) { - auto msg = static_cast(object); - ::google::protobuf::int32 size; (void)size; - int depth; (void)depth; - ::google::protobuf::uint32 tag; - ::google::protobuf::internal::ParseFunc parser_till_end; (void)parser_till_end; - auto ptr = begin; - while (ptr < end) { - ptr = ::google::protobuf::io::Parse32(ptr, &tag); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); +const char* DeregistrationResult::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + while (!ctx->Done(&ptr)) { + ::PROTOBUF_NAMESPACE_ID::uint32 tag; + ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag); + CHK_(ptr); switch (tag >> 3) { // .muscle_manager_protocol.ResultStatus status = 1; - case 1: { - if (static_cast<::google::protobuf::uint8>(tag) != 8) goto handle_unusual; - ::google::protobuf::uint64 val = ::google::protobuf::internal::ReadVarint(&ptr); - msg->set_status(static_cast<::muscle_manager_protocol::ResultStatus>(val)); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - break; - } + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) { + ::PROTOBUF_NAMESPACE_ID::uint64 val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint(&ptr); + CHK_(ptr); + _internal_set_status(static_cast<::muscle_manager_protocol::ResultStatus>(val)); + } else goto handle_unusual; + continue; // string error_message = 2; - case 2: { - if (static_cast<::google::protobuf::uint8>(tag) != 18) goto handle_unusual; - ptr = ::google::protobuf::io::ReadSize(ptr, &size); - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr); - ctx->extra_parse_data().SetFieldName("muscle_manager_protocol.DeregistrationResult.error_message"); - object = msg->mutable_error_message(); - if (size > end - ptr + ::google::protobuf::internal::ParseContext::kSlopBytes) { - parser_till_end = ::google::protobuf::internal::GreedyStringParserUTF8; - goto string_till_end; - } - GOOGLE_PROTOBUF_PARSER_ASSERT(::google::protobuf::internal::StringCheckUTF8(ptr, size, ctx)); - ::google::protobuf::internal::InlineGreedyStringParser(object, ptr, size, ctx); - ptr += size; - break; - } + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::InlineGreedyStringParserUTF8(_internal_mutable_error_message(), ptr, ctx, "muscle_manager_protocol.DeregistrationResult.error_message"); + CHK_(ptr); + } else goto handle_unusual; + continue; default: { handle_unusual: if ((tag & 7) == 4 || tag == 0) { - ctx->EndGroup(tag); - return ptr; + ctx->SetLastTag(tag); + goto success; } - auto res = UnknownFieldParse(tag, {_InternalParse, msg}, - ptr, end, msg->_internal_metadata_.mutable_unknown_fields(), ctx); - ptr = res.first; - GOOGLE_PROTOBUF_PARSER_ASSERT(ptr != nullptr); - if (res.second) return ptr; + ptr = UnknownFieldParse(tag, &_internal_metadata_, ptr, ctx); + CHK_(ptr != nullptr); + continue; } } // switch } // while - return ptr; -string_till_end: - static_cast<::std::string*>(object)->clear(); - static_cast<::std::string*>(object)->reserve(size); - goto len_delim_till_end; -len_delim_till_end: - return ctx->StoreAndTailCall(ptr, end, {_InternalParse, msg}, - {parser_till_end, object}, size); -} -#else // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER -bool DeregistrationResult::MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) { -#define DO_(EXPRESSION) if (!PROTOBUF_PREDICT_TRUE(EXPRESSION)) goto failure - ::google::protobuf::uint32 tag; - // @@protoc_insertion_point(parse_start:muscle_manager_protocol.DeregistrationResult) - for (;;) { - ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u); - tag = p.first; - if (!p.second) goto handle_unusual; - switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) { - // .muscle_manager_protocol.ResultStatus status = 1; - case 1: { - if (static_cast< ::google::protobuf::uint8>(tag) == (8 & 0xFF)) { - int value = 0; - DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive< - int, ::google::protobuf::internal::WireFormatLite::TYPE_ENUM>( - input, &value))); - set_status(static_cast< ::muscle_manager_protocol::ResultStatus >(value)); - } else { - goto handle_unusual; - } - break; - } - - // string error_message = 2; - case 2: { - if (static_cast< ::google::protobuf::uint8>(tag) == (18 & 0xFF)) { - DO_(::google::protobuf::internal::WireFormatLite::ReadString( - input, this->mutable_error_message())); - DO_(::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::PARSE, - "muscle_manager_protocol.DeregistrationResult.error_message")); - } else { - goto handle_unusual; - } - break; - } - - default: { - handle_unusual: - if (tag == 0) { - goto success; - } - DO_(::google::protobuf::internal::WireFormat::SkipField( - input, tag, _internal_metadata_.mutable_unknown_fields())); - break; - } - } - } success: - // @@protoc_insertion_point(parse_success:muscle_manager_protocol.DeregistrationResult) - return true; + return ptr; failure: - // @@protoc_insertion_point(parse_failure:muscle_manager_protocol.DeregistrationResult) - return false; -#undef DO_ -} -#endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - -void DeregistrationResult::SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const { - // @@protoc_insertion_point(serialize_start:muscle_manager_protocol.DeregistrationResult) - ::google::protobuf::uint32 cached_has_bits = 0; - (void) cached_has_bits; - - // .muscle_manager_protocol.ResultStatus status = 1; - if (this->status() != 0) { - ::google::protobuf::internal::WireFormatLite::WriteEnum( - 1, this->status(), output); - } - - // string error_message = 2; - if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, - "muscle_manager_protocol.DeregistrationResult.error_message"); - ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased( - 2, this->error_message(), output); - } - - if (_internal_metadata_.have_unknown_fields()) { - ::google::protobuf::internal::WireFormat::SerializeUnknownFields( - _internal_metadata_.unknown_fields(), output); - } - // @@protoc_insertion_point(serialize_end:muscle_manager_protocol.DeregistrationResult) + ptr = nullptr; + goto success; +#undef CHK_ } -::google::protobuf::uint8* DeregistrationResult::InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const { +::PROTOBUF_NAMESPACE_ID::uint8* DeregistrationResult::InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { // @@protoc_insertion_point(serialize_to_array_start:muscle_manager_protocol.DeregistrationResult) - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; // .muscle_manager_protocol.ResultStatus status = 1; if (this->status() != 0) { - target = ::google::protobuf::internal::WireFormatLite::WriteEnumToArray( - 1, this->status(), target); + stream->EnsureSpace(&target); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteEnumToArray( + 1, this->_internal_status(), target); } // string error_message = 2; if (this->error_message().size() > 0) { - ::google::protobuf::internal::WireFormatLite::VerifyUtf8String( - this->error_message().data(), static_cast(this->error_message().length()), - ::google::protobuf::internal::WireFormatLite::SERIALIZE, + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::VerifyUtf8String( + this->_internal_error_message().data(), static_cast(this->_internal_error_message().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::SERIALIZE, "muscle_manager_protocol.DeregistrationResult.error_message"); - target = - ::google::protobuf::internal::WireFormatLite::WriteStringToArray( - 2, this->error_message(), target); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_error_message(), target); } - if (_internal_metadata_.have_unknown_fields()) { - target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray( - _internal_metadata_.unknown_fields(), target); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields(), target, stream); } // @@protoc_insertion_point(serialize_to_array_end:muscle_manager_protocol.DeregistrationResult) return target; @@ -8037,42 +5489,41 @@ size_t DeregistrationResult::ByteSizeLong() const { // @@protoc_insertion_point(message_byte_size_start:muscle_manager_protocol.DeregistrationResult) size_t total_size = 0; - if (_internal_metadata_.have_unknown_fields()) { - total_size += - ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize( - _internal_metadata_.unknown_fields()); - } - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; // Prevent compiler warnings about cached_has_bits being unused (void) cached_has_bits; // string error_message = 2; if (this->error_message().size() > 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::StringSize( - this->error_message()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_error_message()); } // .muscle_manager_protocol.ResultStatus status = 1; if (this->status() != 0) { total_size += 1 + - ::google::protobuf::internal::WireFormatLite::EnumSize(this->status()); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::EnumSize(this->_internal_status()); } - int cached_size = ::google::protobuf::internal::ToCachedSize(total_size); + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize( + _internal_metadata_, total_size, &_cached_size_); + } + int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size); SetCachedSize(cached_size); return total_size; } -void DeregistrationResult::MergeFrom(const ::google::protobuf::Message& from) { +void DeregistrationResult::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_merge_from_start:muscle_manager_protocol.DeregistrationResult) GOOGLE_DCHECK_NE(&from, this); const DeregistrationResult* source = - ::google::protobuf::DynamicCastToGenerated( + ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated( &from); if (source == nullptr) { // @@protoc_insertion_point(generalized_merge_from_cast_fail:muscle_manager_protocol.DeregistrationResult) - ::google::protobuf::internal::ReflectionOps::Merge(from, this); + ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this); } else { // @@protoc_insertion_point(generalized_merge_from_cast_success:muscle_manager_protocol.DeregistrationResult) MergeFrom(*source); @@ -8083,19 +5534,19 @@ void DeregistrationResult::MergeFrom(const DeregistrationResult& from) { // @@protoc_insertion_point(class_specific_merge_from_start:muscle_manager_protocol.DeregistrationResult) GOOGLE_DCHECK_NE(&from, this); _internal_metadata_.MergeFrom(from._internal_metadata_); - ::google::protobuf::uint32 cached_has_bits = 0; + ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0; (void) cached_has_bits; if (from.error_message().size() > 0) { - error_message_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.error_message_); + error_message_.AssignWithDefault(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), from.error_message_); } if (from.status() != 0) { - set_status(from.status()); + _internal_set_status(from._internal_status()); } } -void DeregistrationResult::CopyFrom(const ::google::protobuf::Message& from) { +void DeregistrationResult::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) { // @@protoc_insertion_point(generalized_copy_from_start:muscle_manager_protocol.DeregistrationResult) if (&from == this) return; Clear(); @@ -8113,28 +5564,22 @@ bool DeregistrationResult::IsInitialized() const { return true; } -void DeregistrationResult::Swap(DeregistrationResult* other) { - if (other == this) return; - InternalSwap(other); -} void DeregistrationResult::InternalSwap(DeregistrationResult* other) { using std::swap; _internal_metadata_.Swap(&other->_internal_metadata_); - error_message_.Swap(&other->error_message_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(), + error_message_.Swap(&other->error_message_, &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), GetArenaNoVirtual()); swap(status_, other->status_); } -::google::protobuf::Metadata DeregistrationResult::GetMetadata() const { - ::google::protobuf::internal::AssignDescriptors(&::assign_descriptors_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); - return ::file_level_metadata_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto[kIndexInFileMessages]; +::PROTOBUF_NAMESPACE_ID::Metadata DeregistrationResult::GetMetadata() const { + return GetMetadataStatic(); } // @@protoc_insertion_point(namespace_scope) } // namespace muscle_manager_protocol -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template<> PROTOBUF_NOINLINE ::muscle_manager_protocol::LogMessage* Arena::CreateMaybeMessage< ::muscle_manager_protocol::LogMessage >(Arena* arena) { return Arena::CreateInternal< ::muscle_manager_protocol::LogMessage >(arena); } @@ -8195,8 +5640,7 @@ template<> PROTOBUF_NOINLINE ::muscle_manager_protocol::DeregistrationRequest* A template<> PROTOBUF_NOINLINE ::muscle_manager_protocol::DeregistrationResult* Arena::CreateMaybeMessage< ::muscle_manager_protocol::DeregistrationResult >(Arena* arena) { return Arena::CreateInternal< ::muscle_manager_protocol::DeregistrationResult >(arena); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include diff --git a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.h b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.h index 97b3b2dc..2bb4aaa2 100644 --- a/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.h +++ b/libmuscle/cpp/src/muscle_manager_protocol/muscle_manager_protocol.pb.h @@ -1,19 +1,19 @@ // Generated by the protocol buffer compiler. DO NOT EDIT! // source: muscle_manager_protocol/muscle_manager_protocol.proto -#ifndef PROTOBUF_INCLUDED_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto -#define PROTOBUF_INCLUDED_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto +#ifndef GOOGLE_PROTOBUF_INCLUDED_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto #include #include #include -#if PROTOBUF_VERSION < 3007000 +#if PROTOBUF_VERSION < 3010000 #error This file was generated by a newer version of protoc which is #error incompatible with your Protocol Buffer headers. Please update #error your headers. #endif -#if 3007001 < PROTOBUF_MIN_PROTOC_VERSION +#if 3010000 < PROTOBUF_MIN_PROTOC_VERSION #error This file was generated by an older version of protoc which is #error incompatible with your Protocol Buffer headers. Please #error regenerate this file with a newer version of protoc. @@ -27,6 +27,7 @@ #include #include #include +#include #include #include // IWYU pragma: export #include // IWYU pragma: export @@ -36,20 +37,25 @@ // @@protoc_insertion_point(includes) #include #define PROTOBUF_INTERNAL_EXPORT_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE // Internal implementation detail -- do not use these members. struct TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto { - static const ::google::protobuf::internal::ParseTableField entries[] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTableField entries[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::AuxillaryParseTableField aux[] + static const ::PROTOBUF_NAMESPACE_ID::internal::AuxillaryParseTableField aux[] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::ParseTable schema[20] + static const ::PROTOBUF_NAMESPACE_ID::internal::ParseTable schema[20] PROTOBUF_SECTION_VARIABLE(protodesc_cold); - static const ::google::protobuf::internal::FieldMetadata field_metadata[]; - static const ::google::protobuf::internal::SerializationTable serialization_table[]; - static const ::google::protobuf::uint32 offsets[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::FieldMetadata field_metadata[]; + static const ::PROTOBUF_NAMESPACE_ID::internal::SerializationTable serialization_table[]; + static const ::PROTOBUF_NAMESPACE_ID::uint32 offsets[]; }; -void AddDescriptors_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto(); +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; namespace muscle_manager_protocol { class Conduit; class ConduitDefaultTypeInternal; @@ -112,8 +118,7 @@ class SettingsResult; class SettingsResultDefaultTypeInternal; extern SettingsResultDefaultTypeInternal _SettingsResult_default_instance_; } // namespace muscle_manager_protocol -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template<> ::muscle_manager_protocol::Conduit* Arena::CreateMaybeMessage<::muscle_manager_protocol::Conduit>(Arena*); template<> ::muscle_manager_protocol::DeregistrationRequest* Arena::CreateMaybeMessage<::muscle_manager_protocol::DeregistrationRequest>(Arena*); template<> ::muscle_manager_protocol::DeregistrationResult* Arena::CreateMaybeMessage<::muscle_manager_protocol::DeregistrationResult>(Arena*); @@ -134,33 +139,36 @@ template<> ::muscle_manager_protocol::RegistrationResult* Arena::CreateMaybeMess template<> ::muscle_manager_protocol::Setting* Arena::CreateMaybeMessage<::muscle_manager_protocol::Setting>(Arena*); template<> ::muscle_manager_protocol::SettingsRequest* Arena::CreateMaybeMessage<::muscle_manager_protocol::SettingsRequest>(Arena*); template<> ::muscle_manager_protocol::SettingsResult* Arena::CreateMaybeMessage<::muscle_manager_protocol::SettingsResult>(Arena*); -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE namespace muscle_manager_protocol { -enum ResultStatus { +enum ResultStatus : int { RESULT_STATUS_SUCCESS = 0, RESULT_STATUS_ERROR = 1, RESULT_STATUS_PENDING = 2, - ResultStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), - ResultStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() + ResultStatus_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + ResultStatus_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool ResultStatus_IsValid(int value); -const ResultStatus ResultStatus_MIN = RESULT_STATUS_SUCCESS; -const ResultStatus ResultStatus_MAX = RESULT_STATUS_PENDING; -const int ResultStatus_ARRAYSIZE = ResultStatus_MAX + 1; - -const ::google::protobuf::EnumDescriptor* ResultStatus_descriptor(); -inline const ::std::string& ResultStatus_Name(ResultStatus value) { - return ::google::protobuf::internal::NameOfEnum( - ResultStatus_descriptor(), value); +constexpr ResultStatus ResultStatus_MIN = RESULT_STATUS_SUCCESS; +constexpr ResultStatus ResultStatus_MAX = RESULT_STATUS_PENDING; +constexpr int ResultStatus_ARRAYSIZE = ResultStatus_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ResultStatus_descriptor(); +template +inline const std::string& ResultStatus_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ResultStatus_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ResultStatus_descriptor(), enum_t_value); } inline bool ResultStatus_Parse( - const ::std::string& name, ResultStatus* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, ResultStatus* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( ResultStatus_descriptor(), name, value); } -enum Operator { +enum Operator : int { OPERATOR_NONE = 0, OPERATOR_F_INIT = 1, OPERATOR_O_I = 2, @@ -168,117 +176,131 @@ enum Operator { OPERATOR_B = 4, OPERATOR_O_F = 5, OPERATOR_MAP = 6, - Operator_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), - Operator_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() + Operator_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + Operator_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool Operator_IsValid(int value); -const Operator Operator_MIN = OPERATOR_NONE; -const Operator Operator_MAX = OPERATOR_MAP; -const int Operator_ARRAYSIZE = Operator_MAX + 1; - -const ::google::protobuf::EnumDescriptor* Operator_descriptor(); -inline const ::std::string& Operator_Name(Operator value) { - return ::google::protobuf::internal::NameOfEnum( - Operator_descriptor(), value); +constexpr Operator Operator_MIN = OPERATOR_NONE; +constexpr Operator Operator_MAX = OPERATOR_MAP; +constexpr int Operator_ARRAYSIZE = Operator_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Operator_descriptor(); +template +inline const std::string& Operator_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Operator_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + Operator_descriptor(), enum_t_value); } inline bool Operator_Parse( - const ::std::string& name, Operator* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, Operator* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( Operator_descriptor(), name, value); } -enum LogLevel { +enum LogLevel : int { LOG_LEVEL_DEBUG = 0, LOG_LEVEL_INFO = 1, LOG_LEVEL_WARNING = 3, LOG_LEVEL_ERROR = 4, LOG_LEVEL_CRITICAL = 5, - LogLevel_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), - LogLevel_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() + LogLevel_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + LogLevel_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool LogLevel_IsValid(int value); -const LogLevel LogLevel_MIN = LOG_LEVEL_DEBUG; -const LogLevel LogLevel_MAX = LOG_LEVEL_CRITICAL; -const int LogLevel_ARRAYSIZE = LogLevel_MAX + 1; - -const ::google::protobuf::EnumDescriptor* LogLevel_descriptor(); -inline const ::std::string& LogLevel_Name(LogLevel value) { - return ::google::protobuf::internal::NameOfEnum( - LogLevel_descriptor(), value); +constexpr LogLevel LogLevel_MIN = LOG_LEVEL_DEBUG; +constexpr LogLevel LogLevel_MAX = LOG_LEVEL_CRITICAL; +constexpr int LogLevel_ARRAYSIZE = LogLevel_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* LogLevel_descriptor(); +template +inline const std::string& LogLevel_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function LogLevel_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + LogLevel_descriptor(), enum_t_value); } inline bool LogLevel_Parse( - const ::std::string& name, LogLevel* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, LogLevel* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( LogLevel_descriptor(), name, value); } -enum ProfileEventType { +enum ProfileEventType : int { PROFILE_EVENT_TYPE_REGISTER = 0, PROFILE_EVENT_TYPE_CONNECT = 4, PROFILE_EVENT_TYPE_DEREGISTER = 1, PROFILE_EVENT_TYPE_SEND = 2, PROFILE_EVENT_TYPE_RECEIVE = 3, - ProfileEventType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), - ProfileEventType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() + ProfileEventType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + ProfileEventType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool ProfileEventType_IsValid(int value); -const ProfileEventType ProfileEventType_MIN = PROFILE_EVENT_TYPE_REGISTER; -const ProfileEventType ProfileEventType_MAX = PROFILE_EVENT_TYPE_CONNECT; -const int ProfileEventType_ARRAYSIZE = ProfileEventType_MAX + 1; - -const ::google::protobuf::EnumDescriptor* ProfileEventType_descriptor(); -inline const ::std::string& ProfileEventType_Name(ProfileEventType value) { - return ::google::protobuf::internal::NameOfEnum( - ProfileEventType_descriptor(), value); +constexpr ProfileEventType ProfileEventType_MIN = PROFILE_EVENT_TYPE_REGISTER; +constexpr ProfileEventType ProfileEventType_MAX = PROFILE_EVENT_TYPE_CONNECT; +constexpr int ProfileEventType_ARRAYSIZE = ProfileEventType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ProfileEventType_descriptor(); +template +inline const std::string& ProfileEventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ProfileEventType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ProfileEventType_descriptor(), enum_t_value); } inline bool ProfileEventType_Parse( - const ::std::string& name, ProfileEventType* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, ProfileEventType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( ProfileEventType_descriptor(), name, value); } -enum SettingValueType { +enum SettingValueType : int { SETTING_VALUE_TYPE_STRING = 0, SETTING_VALUE_TYPE_INT = 1, SETTING_VALUE_TYPE_FLOAT = 2, SETTING_VALUE_TYPE_BOOL = 3, SETTING_VALUE_TYPE_LIST_FLOAT = 4, SETTING_VALUE_TYPE_LIST_LIST_FLOAT = 5, - SettingValueType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::min(), - SettingValueType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::google::protobuf::int32>::max() + SettingValueType_INT_MIN_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::min(), + SettingValueType_INT_MAX_SENTINEL_DO_NOT_USE_ = std::numeric_limits<::PROTOBUF_NAMESPACE_ID::int32>::max() }; bool SettingValueType_IsValid(int value); -const SettingValueType SettingValueType_MIN = SETTING_VALUE_TYPE_STRING; -const SettingValueType SettingValueType_MAX = SETTING_VALUE_TYPE_LIST_LIST_FLOAT; -const int SettingValueType_ARRAYSIZE = SettingValueType_MAX + 1; - -const ::google::protobuf::EnumDescriptor* SettingValueType_descriptor(); -inline const ::std::string& SettingValueType_Name(SettingValueType value) { - return ::google::protobuf::internal::NameOfEnum( - SettingValueType_descriptor(), value); +constexpr SettingValueType SettingValueType_MIN = SETTING_VALUE_TYPE_STRING; +constexpr SettingValueType SettingValueType_MAX = SETTING_VALUE_TYPE_LIST_LIST_FLOAT; +constexpr int SettingValueType_ARRAYSIZE = SettingValueType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* SettingValueType_descriptor(); +template +inline const std::string& SettingValueType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function SettingValueType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + SettingValueType_descriptor(), enum_t_value); } inline bool SettingValueType_Parse( - const ::std::string& name, SettingValueType* value) { - return ::google::protobuf::internal::ParseNamedEnum( + const std::string& name, SettingValueType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( SettingValueType_descriptor(), name, value); } // =================================================================== class LogMessage : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.LogMessage) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.LogMessage) */ { public: LogMessage(); virtual ~LogMessage(); LogMessage(const LogMessage& from); - - inline LogMessage& operator=(const LogMessage& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 LogMessage(LogMessage&& from) noexcept : LogMessage() { *this = ::std::move(from); } + inline LogMessage& operator=(const LogMessage& from) { + CopyFrom(from); + return *this; + } inline LogMessage& operator=(LogMessage&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -287,9 +309,15 @@ class LogMessage : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const LogMessage& default_instance(); @@ -301,10 +329,13 @@ class LogMessage : static constexpr int kIndexInFileMessages = 0; - void Swap(LogMessage* other); friend void swap(LogMessage& a, LogMessage& b) { a.Swap(&b); } + inline void Swap(LogMessage* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -312,37 +343,33 @@ class LogMessage : return CreateMaybeMessage(nullptr); } - LogMessage* New(::google::protobuf::Arena* arena) const final { + LogMessage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const LogMessage& from); void MergeFrom(const LogMessage& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(LogMessage* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.LogMessage"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -350,87 +377,111 @@ class LogMessage : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kInstanceIdFieldNumber = 1, + kTextFieldNumber = 5, + kTimestampFieldNumber = 3, + kLevelFieldNumber = 4, + }; // string instance_id = 1; void clear_instance_id(); - static const int kInstanceIdFieldNumber = 1; - const ::std::string& instance_id() const; - void set_instance_id(const ::std::string& value); - #if LANG_CXX11 - void set_instance_id(::std::string&& value); - #endif + const std::string& instance_id() const; + void set_instance_id(const std::string& value); + void set_instance_id(std::string&& value); void set_instance_id(const char* value); void set_instance_id(const char* value, size_t size); - ::std::string* mutable_instance_id(); - ::std::string* release_instance_id(); - void set_allocated_instance_id(::std::string* instance_id); + std::string* mutable_instance_id(); + std::string* release_instance_id(); + void set_allocated_instance_id(std::string* instance_id); + private: + const std::string& _internal_instance_id() const; + void _internal_set_instance_id(const std::string& value); + std::string* _internal_mutable_instance_id(); + public: // string text = 5; void clear_text(); - static const int kTextFieldNumber = 5; - const ::std::string& text() const; - void set_text(const ::std::string& value); - #if LANG_CXX11 - void set_text(::std::string&& value); - #endif + const std::string& text() const; + void set_text(const std::string& value); + void set_text(std::string&& value); void set_text(const char* value); void set_text(const char* value, size_t size); - ::std::string* mutable_text(); - ::std::string* release_text(); - void set_allocated_text(::std::string* text); + std::string* mutable_text(); + std::string* release_text(); + void set_allocated_text(std::string* text); + private: + const std::string& _internal_text() const; + void _internal_set_text(const std::string& value); + std::string* _internal_mutable_text(); + public: // .google.protobuf.Timestamp timestamp = 3; bool has_timestamp() const; + private: + bool _internal_has_timestamp() const; + public: void clear_timestamp(); - static const int kTimestampFieldNumber = 3; - const ::google::protobuf::Timestamp& timestamp() const; - ::google::protobuf::Timestamp* release_timestamp(); - ::google::protobuf::Timestamp* mutable_timestamp(); - void set_allocated_timestamp(::google::protobuf::Timestamp* timestamp); + const PROTOBUF_NAMESPACE_ID::Timestamp& timestamp() const; + PROTOBUF_NAMESPACE_ID::Timestamp* release_timestamp(); + PROTOBUF_NAMESPACE_ID::Timestamp* mutable_timestamp(); + void set_allocated_timestamp(PROTOBUF_NAMESPACE_ID::Timestamp* timestamp); + private: + const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_timestamp() const; + PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_timestamp(); + public: // .muscle_manager_protocol.LogLevel level = 4; void clear_level(); - static const int kLevelFieldNumber = 4; ::muscle_manager_protocol::LogLevel level() const; void set_level(::muscle_manager_protocol::LogLevel value); + private: + ::muscle_manager_protocol::LogLevel _internal_level() const; + void _internal_set_level(::muscle_manager_protocol::LogLevel value); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.LogMessage) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr instance_id_; - ::google::protobuf::internal::ArenaStringPtr text_; - ::google::protobuf::Timestamp* timestamp_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instance_id_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr text_; + PROTOBUF_NAMESPACE_ID::Timestamp* timestamp_; int level_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class LogResult : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.LogResult) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.LogResult) */ { public: LogResult(); virtual ~LogResult(); LogResult(const LogResult& from); - - inline LogResult& operator=(const LogResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 LogResult(LogResult&& from) noexcept : LogResult() { *this = ::std::move(from); } + inline LogResult& operator=(const LogResult& from) { + CopyFrom(from); + return *this; + } inline LogResult& operator=(LogResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -439,9 +490,15 @@ class LogResult : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const LogResult& default_instance(); @@ -453,10 +510,13 @@ class LogResult : static constexpr int kIndexInFileMessages = 1; - void Swap(LogResult* other); friend void swap(LogResult& a, LogResult& b) { a.Swap(&b); } + inline void Swap(LogResult* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -464,37 +524,33 @@ class LogResult : return CreateMaybeMessage(nullptr); } - LogResult* New(::google::protobuf::Arena* arena) const final { + LogResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const LogResult& from); void MergeFrom(const LogResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(LogResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.LogResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -502,7 +558,14 @@ class LogResult : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -510,32 +573,30 @@ class LogResult : // @@protoc_insertion_point(class_scope:muscle_manager_protocol.LogResult) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class Port : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Port) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Port) */ { public: Port(); virtual ~Port(); Port(const Port& from); - - inline Port& operator=(const Port& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Port(Port&& from) noexcept : Port() { *this = ::std::move(from); } + inline Port& operator=(const Port& from) { + CopyFrom(from); + return *this; + } inline Port& operator=(Port&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -544,9 +605,15 @@ class Port : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const Port& default_instance(); @@ -558,10 +625,13 @@ class Port : static constexpr int kIndexInFileMessages = 2; - void Swap(Port* other); friend void swap(Port& a, Port& b) { a.Swap(&b); } + inline void Swap(Port* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -569,37 +639,33 @@ class Port : return CreateMaybeMessage(nullptr); } - Port* New(::google::protobuf::Arena* arena) const final { + Port* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Port& from); void MergeFrom(const Port& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Port* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.Port"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -607,62 +673,76 @@ class Port : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kOperatorFieldNumber = 2, + }; // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // .muscle_manager_protocol.Operator operator = 2; void clear_operator_(); - static const int kOperatorFieldNumber = 2; ::muscle_manager_protocol::Operator operator_() const; void set_operator_(::muscle_manager_protocol::Operator value); + private: + ::muscle_manager_protocol::Operator _internal_operator_() const; + void _internal_set_operator_(::muscle_manager_protocol::Operator value); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.Port) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; int operator__; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class ProfileEvent : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ProfileEvent) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ProfileEvent) */ { public: ProfileEvent(); virtual ~ProfileEvent(); ProfileEvent(const ProfileEvent& from); - - inline ProfileEvent& operator=(const ProfileEvent& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ProfileEvent(ProfileEvent&& from) noexcept : ProfileEvent() { *this = ::std::move(from); } + inline ProfileEvent& operator=(const ProfileEvent& from) { + CopyFrom(from); + return *this; + } inline ProfileEvent& operator=(ProfileEvent&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -671,9 +751,15 @@ class ProfileEvent : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const ProfileEvent& default_instance(); @@ -685,10 +771,13 @@ class ProfileEvent : static constexpr int kIndexInFileMessages = 3; - void Swap(ProfileEvent* other); friend void swap(ProfileEvent& a, ProfileEvent& b) { a.Swap(&b); } + inline void Swap(ProfileEvent* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -696,37 +785,33 @@ class ProfileEvent : return CreateMaybeMessage(nullptr); } - ProfileEvent* New(::google::protobuf::Arena* arena) const final { + ProfileEvent* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ProfileEvent& from); void MergeFrom(const ProfileEvent& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ProfileEvent* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.ProfileEvent"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -734,113 +819,160 @@ class ProfileEvent : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kInstanceIdFieldNumber = 1, + kStartTimeFieldNumber = 2, + kStopTimeFieldNumber = 3, + kPortFieldNumber = 5, + kEventTypeFieldNumber = 4, + kPortLengthFieldNumber = 6, + kMessageSizeFieldNumber = 8, + kSlotFieldNumber = 7, + }; // string instance_id = 1; void clear_instance_id(); - static const int kInstanceIdFieldNumber = 1; - const ::std::string& instance_id() const; - void set_instance_id(const ::std::string& value); - #if LANG_CXX11 - void set_instance_id(::std::string&& value); - #endif + const std::string& instance_id() const; + void set_instance_id(const std::string& value); + void set_instance_id(std::string&& value); void set_instance_id(const char* value); void set_instance_id(const char* value, size_t size); - ::std::string* mutable_instance_id(); - ::std::string* release_instance_id(); - void set_allocated_instance_id(::std::string* instance_id); + std::string* mutable_instance_id(); + std::string* release_instance_id(); + void set_allocated_instance_id(std::string* instance_id); + private: + const std::string& _internal_instance_id() const; + void _internal_set_instance_id(const std::string& value); + std::string* _internal_mutable_instance_id(); + public: // .google.protobuf.Timestamp start_time = 2; bool has_start_time() const; + private: + bool _internal_has_start_time() const; + public: void clear_start_time(); - static const int kStartTimeFieldNumber = 2; - const ::google::protobuf::Timestamp& start_time() const; - ::google::protobuf::Timestamp* release_start_time(); - ::google::protobuf::Timestamp* mutable_start_time(); - void set_allocated_start_time(::google::protobuf::Timestamp* start_time); + const PROTOBUF_NAMESPACE_ID::Timestamp& start_time() const; + PROTOBUF_NAMESPACE_ID::Timestamp* release_start_time(); + PROTOBUF_NAMESPACE_ID::Timestamp* mutable_start_time(); + void set_allocated_start_time(PROTOBUF_NAMESPACE_ID::Timestamp* start_time); + private: + const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_start_time() const; + PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_start_time(); + public: // .google.protobuf.Timestamp stop_time = 3; bool has_stop_time() const; + private: + bool _internal_has_stop_time() const; + public: void clear_stop_time(); - static const int kStopTimeFieldNumber = 3; - const ::google::protobuf::Timestamp& stop_time() const; - ::google::protobuf::Timestamp* release_stop_time(); - ::google::protobuf::Timestamp* mutable_stop_time(); - void set_allocated_stop_time(::google::protobuf::Timestamp* stop_time); + const PROTOBUF_NAMESPACE_ID::Timestamp& stop_time() const; + PROTOBUF_NAMESPACE_ID::Timestamp* release_stop_time(); + PROTOBUF_NAMESPACE_ID::Timestamp* mutable_stop_time(); + void set_allocated_stop_time(PROTOBUF_NAMESPACE_ID::Timestamp* stop_time); + private: + const PROTOBUF_NAMESPACE_ID::Timestamp& _internal_stop_time() const; + PROTOBUF_NAMESPACE_ID::Timestamp* _internal_mutable_stop_time(); + public: // .muscle_manager_protocol.Port port = 5; bool has_port() const; + private: + bool _internal_has_port() const; + public: void clear_port(); - static const int kPortFieldNumber = 5; const ::muscle_manager_protocol::Port& port() const; ::muscle_manager_protocol::Port* release_port(); ::muscle_manager_protocol::Port* mutable_port(); void set_allocated_port(::muscle_manager_protocol::Port* port); + private: + const ::muscle_manager_protocol::Port& _internal_port() const; + ::muscle_manager_protocol::Port* _internal_mutable_port(); + public: // .muscle_manager_protocol.ProfileEventType event_type = 4; void clear_event_type(); - static const int kEventTypeFieldNumber = 4; ::muscle_manager_protocol::ProfileEventType event_type() const; void set_event_type(::muscle_manager_protocol::ProfileEventType value); + private: + ::muscle_manager_protocol::ProfileEventType _internal_event_type() const; + void _internal_set_event_type(::muscle_manager_protocol::ProfileEventType value); + public: // int32 port_length = 6; void clear_port_length(); - static const int kPortLengthFieldNumber = 6; - ::google::protobuf::int32 port_length() const; - void set_port_length(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 port_length() const; + void set_port_length(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_port_length() const; + void _internal_set_port_length(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // int64 message_size = 8; void clear_message_size(); - static const int kMessageSizeFieldNumber = 8; - ::google::protobuf::int64 message_size() const; - void set_message_size(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 message_size() const; + void set_message_size(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_message_size() const; + void _internal_set_message_size(::PROTOBUF_NAMESPACE_ID::int64 value); + public: // int32 slot = 7; void clear_slot(); - static const int kSlotFieldNumber = 7; - ::google::protobuf::int32 slot() const; - void set_slot(::google::protobuf::int32 value); + ::PROTOBUF_NAMESPACE_ID::int32 slot() const; + void set_slot(::PROTOBUF_NAMESPACE_ID::int32 value); + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_slot() const; + void _internal_set_slot(::PROTOBUF_NAMESPACE_ID::int32 value); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.ProfileEvent) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr instance_id_; - ::google::protobuf::Timestamp* start_time_; - ::google::protobuf::Timestamp* stop_time_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instance_id_; + PROTOBUF_NAMESPACE_ID::Timestamp* start_time_; + PROTOBUF_NAMESPACE_ID::Timestamp* stop_time_; ::muscle_manager_protocol::Port* port_; int event_type_; - ::google::protobuf::int32 port_length_; - ::google::protobuf::int64 message_size_; - ::google::protobuf::int32 slot_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::int32 port_length_; + ::PROTOBUF_NAMESPACE_ID::int64 message_size_; + ::PROTOBUF_NAMESPACE_ID::int32 slot_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class Profile : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Profile) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Profile) */ { public: Profile(); virtual ~Profile(); Profile(const Profile& from); - - inline Profile& operator=(const Profile& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Profile(Profile&& from) noexcept : Profile() { *this = ::std::move(from); } + inline Profile& operator=(const Profile& from) { + CopyFrom(from); + return *this; + } inline Profile& operator=(Profile&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -849,9 +981,15 @@ class Profile : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const Profile& default_instance(); @@ -863,10 +1001,13 @@ class Profile : static constexpr int kIndexInFileMessages = 4; - void Swap(Profile* other); friend void swap(Profile& a, Profile& b) { a.Swap(&b); } + inline void Swap(Profile* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -874,37 +1015,33 @@ class Profile : return CreateMaybeMessage(nullptr); } - Profile* New(::google::protobuf::Arena* arena) const final { + Profile* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Profile& from); void MergeFrom(const Profile& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Profile* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.Profile"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -912,53 +1049,67 @@ class Profile : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kEventsFieldNumber = 1, + }; // repeated .muscle_manager_protocol.ProfileEvent events = 1; int events_size() const; + private: + int _internal_events_size() const; + public: void clear_events(); - static const int kEventsFieldNumber = 1; ::muscle_manager_protocol::ProfileEvent* mutable_events(int index); - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >* mutable_events(); + private: + const ::muscle_manager_protocol::ProfileEvent& _internal_events(int index) const; + ::muscle_manager_protocol::ProfileEvent* _internal_add_events(); + public: const ::muscle_manager_protocol::ProfileEvent& events(int index) const; ::muscle_manager_protocol::ProfileEvent* add_events(); - const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >& events() const; // @@protoc_insertion_point(class_scope:muscle_manager_protocol.Profile) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent > events_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent > events_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class ProfileResult : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ProfileResult) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ProfileResult) */ { public: ProfileResult(); virtual ~ProfileResult(); ProfileResult(const ProfileResult& from); - - inline ProfileResult& operator=(const ProfileResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ProfileResult(ProfileResult&& from) noexcept : ProfileResult() { *this = ::std::move(from); } + inline ProfileResult& operator=(const ProfileResult& from) { + CopyFrom(from); + return *this; + } inline ProfileResult& operator=(ProfileResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -967,9 +1118,15 @@ class ProfileResult : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const ProfileResult& default_instance(); @@ -981,10 +1138,13 @@ class ProfileResult : static constexpr int kIndexInFileMessages = 5; - void Swap(ProfileResult* other); friend void swap(ProfileResult& a, ProfileResult& b) { a.Swap(&b); } + inline void Swap(ProfileResult* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -992,37 +1152,33 @@ class ProfileResult : return CreateMaybeMessage(nullptr); } - ProfileResult* New(::google::protobuf::Arena* arena) const final { + ProfileResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ProfileResult& from); void MergeFrom(const ProfileResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ProfileResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.ProfileResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1030,7 +1186,14 @@ class ProfileResult : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1038,32 +1201,30 @@ class ProfileResult : // @@protoc_insertion_point(class_scope:muscle_manager_protocol.ProfileResult) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class RegistrationRequest : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.RegistrationRequest) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.RegistrationRequest) */ { public: RegistrationRequest(); virtual ~RegistrationRequest(); RegistrationRequest(const RegistrationRequest& from); - - inline RegistrationRequest& operator=(const RegistrationRequest& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 RegistrationRequest(RegistrationRequest&& from) noexcept : RegistrationRequest() { *this = ::std::move(from); } + inline RegistrationRequest& operator=(const RegistrationRequest& from) { + CopyFrom(from); + return *this; + } inline RegistrationRequest& operator=(RegistrationRequest&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1072,9 +1233,15 @@ class RegistrationRequest : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const RegistrationRequest& default_instance(); @@ -1086,10 +1253,13 @@ class RegistrationRequest : static constexpr int kIndexInFileMessages = 6; - void Swap(RegistrationRequest* other); friend void swap(RegistrationRequest& a, RegistrationRequest& b) { a.Swap(&b); } + inline void Swap(RegistrationRequest* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1097,37 +1267,33 @@ class RegistrationRequest : return CreateMaybeMessage(nullptr); } - RegistrationRequest* New(::google::protobuf::Arena* arena) const final { + RegistrationRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const RegistrationRequest& from); void MergeFrom(const RegistrationRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(RegistrationRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.RegistrationRequest"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1135,91 +1301,111 @@ class RegistrationRequest : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kNetworkLocationsFieldNumber = 2, + kPortsFieldNumber = 3, + kInstanceNameFieldNumber = 1, + }; // repeated string network_locations = 2; int network_locations_size() const; + private: + int _internal_network_locations_size() const; + public: void clear_network_locations(); - static const int kNetworkLocationsFieldNumber = 2; - const ::std::string& network_locations(int index) const; - ::std::string* mutable_network_locations(int index); - void set_network_locations(int index, const ::std::string& value); - #if LANG_CXX11 - void set_network_locations(int index, ::std::string&& value); - #endif + const std::string& network_locations(int index) const; + std::string* mutable_network_locations(int index); + void set_network_locations(int index, const std::string& value); + void set_network_locations(int index, std::string&& value); void set_network_locations(int index, const char* value); void set_network_locations(int index, const char* value, size_t size); - ::std::string* add_network_locations(); - void add_network_locations(const ::std::string& value); - #if LANG_CXX11 - void add_network_locations(::std::string&& value); - #endif + std::string* add_network_locations(); + void add_network_locations(const std::string& value); + void add_network_locations(std::string&& value); void add_network_locations(const char* value); void add_network_locations(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& network_locations() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_network_locations(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& network_locations() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_network_locations(); + private: + const std::string& _internal_network_locations(int index) const; + std::string* _internal_add_network_locations(); + public: // repeated .muscle_manager_protocol.Port ports = 3; int ports_size() const; + private: + int _internal_ports_size() const; + public: void clear_ports(); - static const int kPortsFieldNumber = 3; ::muscle_manager_protocol::Port* mutable_ports(int index); - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Port >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Port >* mutable_ports(); + private: + const ::muscle_manager_protocol::Port& _internal_ports(int index) const; + ::muscle_manager_protocol::Port* _internal_add_ports(); + public: const ::muscle_manager_protocol::Port& ports(int index) const; ::muscle_manager_protocol::Port* add_ports(); - const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Port >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Port >& ports() const; // string instance_name = 1; void clear_instance_name(); - static const int kInstanceNameFieldNumber = 1; - const ::std::string& instance_name() const; - void set_instance_name(const ::std::string& value); - #if LANG_CXX11 - void set_instance_name(::std::string&& value); - #endif + const std::string& instance_name() const; + void set_instance_name(const std::string& value); + void set_instance_name(std::string&& value); void set_instance_name(const char* value); void set_instance_name(const char* value, size_t size); - ::std::string* mutable_instance_name(); - ::std::string* release_instance_name(); - void set_allocated_instance_name(::std::string* instance_name); + std::string* mutable_instance_name(); + std::string* release_instance_name(); + void set_allocated_instance_name(std::string* instance_name); + private: + const std::string& _internal_instance_name() const; + void _internal_set_instance_name(const std::string& value); + std::string* _internal_mutable_instance_name(); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.RegistrationRequest) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField<::std::string> network_locations_; - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Port > ports_; - ::google::protobuf::internal::ArenaStringPtr instance_name_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField network_locations_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Port > ports_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instance_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class RegistrationResult : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.RegistrationResult) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.RegistrationResult) */ { public: RegistrationResult(); virtual ~RegistrationResult(); RegistrationResult(const RegistrationResult& from); - - inline RegistrationResult& operator=(const RegistrationResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 RegistrationResult(RegistrationResult&& from) noexcept : RegistrationResult() { *this = ::std::move(from); } + inline RegistrationResult& operator=(const RegistrationResult& from) { + CopyFrom(from); + return *this; + } inline RegistrationResult& operator=(RegistrationResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1228,9 +1414,15 @@ class RegistrationResult : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const RegistrationResult& default_instance(); @@ -1242,10 +1434,13 @@ class RegistrationResult : static constexpr int kIndexInFileMessages = 7; - void Swap(RegistrationResult* other); friend void swap(RegistrationResult& a, RegistrationResult& b) { a.Swap(&b); } + inline void Swap(RegistrationResult* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1253,37 +1448,33 @@ class RegistrationResult : return CreateMaybeMessage(nullptr); } - RegistrationResult* New(::google::protobuf::Arena* arena) const final { + RegistrationResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const RegistrationResult& from); void MergeFrom(const RegistrationResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(RegistrationResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.RegistrationResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1291,62 +1482,76 @@ class RegistrationResult : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kErrorMessageFieldNumber = 2, + kStatusFieldNumber = 1, + }; // string error_message = 2; void clear_error_message(); - static const int kErrorMessageFieldNumber = 2; - const ::std::string& error_message() const; - void set_error_message(const ::std::string& value); - #if LANG_CXX11 - void set_error_message(::std::string&& value); - #endif + const std::string& error_message() const; + void set_error_message(const std::string& value); + void set_error_message(std::string&& value); void set_error_message(const char* value); void set_error_message(const char* value, size_t size); - ::std::string* mutable_error_message(); - ::std::string* release_error_message(); - void set_allocated_error_message(::std::string* error_message); + std::string* mutable_error_message(); + std::string* release_error_message(); + void set_allocated_error_message(std::string* error_message); + private: + const std::string& _internal_error_message() const; + void _internal_set_error_message(const std::string& value); + std::string* _internal_mutable_error_message(); + public: // .muscle_manager_protocol.ResultStatus status = 1; void clear_status(); - static const int kStatusFieldNumber = 1; ::muscle_manager_protocol::ResultStatus status() const; void set_status(::muscle_manager_protocol::ResultStatus value); + private: + ::muscle_manager_protocol::ResultStatus _internal_status() const; + void _internal_set_status(::muscle_manager_protocol::ResultStatus value); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.RegistrationResult) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr error_message_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_message_; int status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class Conduit : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Conduit) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Conduit) */ { public: Conduit(); virtual ~Conduit(); Conduit(const Conduit& from); - - inline Conduit& operator=(const Conduit& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Conduit(Conduit&& from) noexcept : Conduit() { *this = ::std::move(from); } + inline Conduit& operator=(const Conduit& from) { + CopyFrom(from); + return *this; + } inline Conduit& operator=(Conduit&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1355,9 +1560,15 @@ class Conduit : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const Conduit& default_instance(); @@ -1369,10 +1580,13 @@ class Conduit : static constexpr int kIndexInFileMessages = 8; - void Swap(Conduit* other); friend void swap(Conduit& a, Conduit& b) { a.Swap(&b); } + inline void Swap(Conduit* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1380,37 +1594,33 @@ class Conduit : return CreateMaybeMessage(nullptr); } - Conduit* New(::google::protobuf::Arena* arena) const final { + Conduit* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Conduit& from); void MergeFrom(const Conduit& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Conduit* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.Conduit"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1418,70 +1628,83 @@ class Conduit : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kSenderFieldNumber = 1, + kReceiverFieldNumber = 2, + }; // string sender = 1; void clear_sender(); - static const int kSenderFieldNumber = 1; - const ::std::string& sender() const; - void set_sender(const ::std::string& value); - #if LANG_CXX11 - void set_sender(::std::string&& value); - #endif + const std::string& sender() const; + void set_sender(const std::string& value); + void set_sender(std::string&& value); void set_sender(const char* value); void set_sender(const char* value, size_t size); - ::std::string* mutable_sender(); - ::std::string* release_sender(); - void set_allocated_sender(::std::string* sender); + std::string* mutable_sender(); + std::string* release_sender(); + void set_allocated_sender(std::string* sender); + private: + const std::string& _internal_sender() const; + void _internal_set_sender(const std::string& value); + std::string* _internal_mutable_sender(); + public: // string receiver = 2; void clear_receiver(); - static const int kReceiverFieldNumber = 2; - const ::std::string& receiver() const; - void set_receiver(const ::std::string& value); - #if LANG_CXX11 - void set_receiver(::std::string&& value); - #endif + const std::string& receiver() const; + void set_receiver(const std::string& value); + void set_receiver(std::string&& value); void set_receiver(const char* value); void set_receiver(const char* value, size_t size); - ::std::string* mutable_receiver(); - ::std::string* release_receiver(); - void set_allocated_receiver(::std::string* receiver); + std::string* mutable_receiver(); + std::string* release_receiver(); + void set_allocated_receiver(std::string* receiver); + private: + const std::string& _internal_receiver() const; + void _internal_set_receiver(const std::string& value); + std::string* _internal_mutable_receiver(); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.Conduit) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr sender_; - ::google::protobuf::internal::ArenaStringPtr receiver_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr sender_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr receiver_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class PeerRequest : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerRequest) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerRequest) */ { public: PeerRequest(); virtual ~PeerRequest(); PeerRequest(const PeerRequest& from); - - inline PeerRequest& operator=(const PeerRequest& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 PeerRequest(PeerRequest&& from) noexcept : PeerRequest() { *this = ::std::move(from); } + inline PeerRequest& operator=(const PeerRequest& from) { + CopyFrom(from); + return *this; + } inline PeerRequest& operator=(PeerRequest&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1490,9 +1713,15 @@ class PeerRequest : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const PeerRequest& default_instance(); @@ -1504,10 +1733,13 @@ class PeerRequest : static constexpr int kIndexInFileMessages = 9; - void Swap(PeerRequest* other); friend void swap(PeerRequest& a, PeerRequest& b) { a.Swap(&b); } + inline void Swap(PeerRequest* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1515,37 +1747,33 @@ class PeerRequest : return CreateMaybeMessage(nullptr); } - PeerRequest* New(::google::protobuf::Arena* arena) const final { + PeerRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const PeerRequest& from); void MergeFrom(const PeerRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(PeerRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.PeerRequest"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1553,55 +1781,65 @@ class PeerRequest : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kInstanceNameFieldNumber = 1, + }; // string instance_name = 1; void clear_instance_name(); - static const int kInstanceNameFieldNumber = 1; - const ::std::string& instance_name() const; - void set_instance_name(const ::std::string& value); - #if LANG_CXX11 - void set_instance_name(::std::string&& value); - #endif + const std::string& instance_name() const; + void set_instance_name(const std::string& value); + void set_instance_name(std::string&& value); void set_instance_name(const char* value); void set_instance_name(const char* value, size_t size); - ::std::string* mutable_instance_name(); - ::std::string* release_instance_name(); - void set_allocated_instance_name(::std::string* instance_name); + std::string* mutable_instance_name(); + std::string* release_instance_name(); + void set_allocated_instance_name(std::string* instance_name); + private: + const std::string& _internal_instance_name() const; + void _internal_set_instance_name(const std::string& value); + std::string* _internal_mutable_instance_name(); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerRequest) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr instance_name_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instance_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class PeerResult_PeerDimensions : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerResult.PeerDimensions) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerResult.PeerDimensions) */ { public: PeerResult_PeerDimensions(); virtual ~PeerResult_PeerDimensions(); PeerResult_PeerDimensions(const PeerResult_PeerDimensions& from); - - inline PeerResult_PeerDimensions& operator=(const PeerResult_PeerDimensions& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 PeerResult_PeerDimensions(PeerResult_PeerDimensions&& from) noexcept : PeerResult_PeerDimensions() { *this = ::std::move(from); } + inline PeerResult_PeerDimensions& operator=(const PeerResult_PeerDimensions& from) { + CopyFrom(from); + return *this; + } inline PeerResult_PeerDimensions& operator=(PeerResult_PeerDimensions&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1610,11 +1848,17 @@ class PeerResult_PeerDimensions : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); - } - static const PeerResult_PeerDimensions& default_instance(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; + } + static const PeerResult_PeerDimensions& default_instance(); static void InitAsDefaultInstance(); // FOR INTERNAL USE ONLY static inline const PeerResult_PeerDimensions* internal_default_instance() { @@ -1624,10 +1868,13 @@ class PeerResult_PeerDimensions : static constexpr int kIndexInFileMessages = 10; - void Swap(PeerResult_PeerDimensions* other); friend void swap(PeerResult_PeerDimensions& a, PeerResult_PeerDimensions& b) { a.Swap(&b); } + inline void Swap(PeerResult_PeerDimensions* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1635,37 +1882,33 @@ class PeerResult_PeerDimensions : return CreateMaybeMessage(nullptr); } - PeerResult_PeerDimensions* New(::google::protobuf::Arena* arena) const final { + PeerResult_PeerDimensions* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const PeerResult_PeerDimensions& from); void MergeFrom(const PeerResult_PeerDimensions& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(PeerResult_PeerDimensions* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.PeerResult.PeerDimensions"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1673,69 +1916,90 @@ class PeerResult_PeerDimensions : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kDimensionsFieldNumber = 2, + kPeerNameFieldNumber = 1, + }; // repeated int32 dimensions = 2; int dimensions_size() const; + private: + int _internal_dimensions_size() const; + public: void clear_dimensions(); - static const int kDimensionsFieldNumber = 2; - ::google::protobuf::int32 dimensions(int index) const; - void set_dimensions(int index, ::google::protobuf::int32 value); - void add_dimensions(::google::protobuf::int32 value); - const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& + private: + ::PROTOBUF_NAMESPACE_ID::int32 _internal_dimensions(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& + _internal_dimensions() const; + void _internal_add_dimensions(::PROTOBUF_NAMESPACE_ID::int32 value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* + _internal_mutable_dimensions(); + public: + ::PROTOBUF_NAMESPACE_ID::int32 dimensions(int index) const; + void set_dimensions(int index, ::PROTOBUF_NAMESPACE_ID::int32 value); + void add_dimensions(::PROTOBUF_NAMESPACE_ID::int32 value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& dimensions() const; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* mutable_dimensions(); // string peer_name = 1; void clear_peer_name(); - static const int kPeerNameFieldNumber = 1; - const ::std::string& peer_name() const; - void set_peer_name(const ::std::string& value); - #if LANG_CXX11 - void set_peer_name(::std::string&& value); - #endif + const std::string& peer_name() const; + void set_peer_name(const std::string& value); + void set_peer_name(std::string&& value); void set_peer_name(const char* value); void set_peer_name(const char* value, size_t size); - ::std::string* mutable_peer_name(); - ::std::string* release_peer_name(); - void set_allocated_peer_name(::std::string* peer_name); + std::string* mutable_peer_name(); + std::string* release_peer_name(); + void set_allocated_peer_name(std::string* peer_name); + private: + const std::string& _internal_peer_name() const; + void _internal_set_peer_name(const std::string& value); + std::string* _internal_mutable_peer_name(); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerResult.PeerDimensions) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedField< ::google::protobuf::int32 > dimensions_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 > dimensions_; mutable std::atomic _dimensions_cached_byte_size_; - ::google::protobuf::internal::ArenaStringPtr peer_name_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr peer_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class PeerResult_PeerLocations : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerResult.PeerLocations) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerResult.PeerLocations) */ { public: PeerResult_PeerLocations(); virtual ~PeerResult_PeerLocations(); PeerResult_PeerLocations(const PeerResult_PeerLocations& from); - - inline PeerResult_PeerLocations& operator=(const PeerResult_PeerLocations& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 PeerResult_PeerLocations(PeerResult_PeerLocations&& from) noexcept : PeerResult_PeerLocations() { *this = ::std::move(from); } + inline PeerResult_PeerLocations& operator=(const PeerResult_PeerLocations& from) { + CopyFrom(from); + return *this; + } inline PeerResult_PeerLocations& operator=(PeerResult_PeerLocations&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1744,9 +2008,15 @@ class PeerResult_PeerLocations : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const PeerResult_PeerLocations& default_instance(); @@ -1758,10 +2028,13 @@ class PeerResult_PeerLocations : static constexpr int kIndexInFileMessages = 11; - void Swap(PeerResult_PeerLocations* other); friend void swap(PeerResult_PeerLocations& a, PeerResult_PeerLocations& b) { a.Swap(&b); } + inline void Swap(PeerResult_PeerLocations* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1769,37 +2042,33 @@ class PeerResult_PeerLocations : return CreateMaybeMessage(nullptr); } - PeerResult_PeerLocations* New(::google::protobuf::Arena* arena) const final { + PeerResult_PeerLocations* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const PeerResult_PeerLocations& from); void MergeFrom(const PeerResult_PeerLocations& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(PeerResult_PeerLocations* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.PeerResult.PeerLocations"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1807,78 +2076,91 @@ class PeerResult_PeerLocations : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kLocationsFieldNumber = 2, + kInstanceNameFieldNumber = 1, + }; // repeated string locations = 2; int locations_size() const; + private: + int _internal_locations_size() const; + public: void clear_locations(); - static const int kLocationsFieldNumber = 2; - const ::std::string& locations(int index) const; - ::std::string* mutable_locations(int index); - void set_locations(int index, const ::std::string& value); - #if LANG_CXX11 - void set_locations(int index, ::std::string&& value); - #endif + const std::string& locations(int index) const; + std::string* mutable_locations(int index); + void set_locations(int index, const std::string& value); + void set_locations(int index, std::string&& value); void set_locations(int index, const char* value); void set_locations(int index, const char* value, size_t size); - ::std::string* add_locations(); - void add_locations(const ::std::string& value); - #if LANG_CXX11 - void add_locations(::std::string&& value); - #endif + std::string* add_locations(); + void add_locations(const std::string& value); + void add_locations(std::string&& value); void add_locations(const char* value); void add_locations(const char* value, size_t size); - const ::google::protobuf::RepeatedPtrField<::std::string>& locations() const; - ::google::protobuf::RepeatedPtrField<::std::string>* mutable_locations(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& locations() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_locations(); + private: + const std::string& _internal_locations(int index) const; + std::string* _internal_add_locations(); + public: // string instance_name = 1; void clear_instance_name(); - static const int kInstanceNameFieldNumber = 1; - const ::std::string& instance_name() const; - void set_instance_name(const ::std::string& value); - #if LANG_CXX11 - void set_instance_name(::std::string&& value); - #endif + const std::string& instance_name() const; + void set_instance_name(const std::string& value); + void set_instance_name(std::string&& value); void set_instance_name(const char* value); void set_instance_name(const char* value, size_t size); - ::std::string* mutable_instance_name(); - ::std::string* release_instance_name(); - void set_allocated_instance_name(::std::string* instance_name); + std::string* mutable_instance_name(); + std::string* release_instance_name(); + void set_allocated_instance_name(std::string* instance_name); + private: + const std::string& _internal_instance_name() const; + void _internal_set_instance_name(const std::string& value); + std::string* _internal_mutable_instance_name(); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerResult.PeerLocations) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField<::std::string> locations_; - ::google::protobuf::internal::ArenaStringPtr instance_name_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField locations_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instance_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class PeerResult : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerResult) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.PeerResult) */ { public: PeerResult(); virtual ~PeerResult(); PeerResult(const PeerResult& from); - - inline PeerResult& operator=(const PeerResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 PeerResult(PeerResult&& from) noexcept : PeerResult() { *this = ::std::move(from); } + inline PeerResult& operator=(const PeerResult& from) { + CopyFrom(from); + return *this; + } inline PeerResult& operator=(PeerResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -1887,9 +2169,15 @@ class PeerResult : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const PeerResult& default_instance(); @@ -1901,10 +2189,13 @@ class PeerResult : static constexpr int kIndexInFileMessages = 12; - void Swap(PeerResult* other); friend void swap(PeerResult& a, PeerResult& b) { a.Swap(&b); } + inline void Swap(PeerResult* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -1912,37 +2203,33 @@ class PeerResult : return CreateMaybeMessage(nullptr); } - PeerResult* New(::google::protobuf::Arena* arena) const final { + PeerResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const PeerResult& from); void MergeFrom(const PeerResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(PeerResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.PeerResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -1950,7 +2237,14 @@ class PeerResult : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -1959,95 +2253,123 @@ class PeerResult : // accessors ------------------------------------------------------- + enum : int { + kConduitsFieldNumber = 3, + kPeerDimensionsFieldNumber = 4, + kPeerLocationsFieldNumber = 5, + kErrorMessageFieldNumber = 2, + kStatusFieldNumber = 1, + }; // repeated .muscle_manager_protocol.Conduit conduits = 3; int conduits_size() const; + private: + int _internal_conduits_size() const; + public: void clear_conduits(); - static const int kConduitsFieldNumber = 3; ::muscle_manager_protocol::Conduit* mutable_conduits(int index); - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Conduit >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Conduit >* mutable_conduits(); + private: + const ::muscle_manager_protocol::Conduit& _internal_conduits(int index) const; + ::muscle_manager_protocol::Conduit* _internal_add_conduits(); + public: const ::muscle_manager_protocol::Conduit& conduits(int index) const; ::muscle_manager_protocol::Conduit* add_conduits(); - const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Conduit >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Conduit >& conduits() const; // repeated .muscle_manager_protocol.PeerResult.PeerDimensions peer_dimensions = 4; int peer_dimensions_size() const; + private: + int _internal_peer_dimensions_size() const; + public: void clear_peer_dimensions(); - static const int kPeerDimensionsFieldNumber = 4; ::muscle_manager_protocol::PeerResult_PeerDimensions* mutable_peer_dimensions(int index); - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >* mutable_peer_dimensions(); + private: + const ::muscle_manager_protocol::PeerResult_PeerDimensions& _internal_peer_dimensions(int index) const; + ::muscle_manager_protocol::PeerResult_PeerDimensions* _internal_add_peer_dimensions(); + public: const ::muscle_manager_protocol::PeerResult_PeerDimensions& peer_dimensions(int index) const; ::muscle_manager_protocol::PeerResult_PeerDimensions* add_peer_dimensions(); - const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >& peer_dimensions() const; // repeated .muscle_manager_protocol.PeerResult.PeerLocations peer_locations = 5; int peer_locations_size() const; + private: + int _internal_peer_locations_size() const; + public: void clear_peer_locations(); - static const int kPeerLocationsFieldNumber = 5; ::muscle_manager_protocol::PeerResult_PeerLocations* mutable_peer_locations(int index); - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >* mutable_peer_locations(); + private: + const ::muscle_manager_protocol::PeerResult_PeerLocations& _internal_peer_locations(int index) const; + ::muscle_manager_protocol::PeerResult_PeerLocations* _internal_add_peer_locations(); + public: const ::muscle_manager_protocol::PeerResult_PeerLocations& peer_locations(int index) const; ::muscle_manager_protocol::PeerResult_PeerLocations* add_peer_locations(); - const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >& peer_locations() const; // string error_message = 2; void clear_error_message(); - static const int kErrorMessageFieldNumber = 2; - const ::std::string& error_message() const; - void set_error_message(const ::std::string& value); - #if LANG_CXX11 - void set_error_message(::std::string&& value); - #endif + const std::string& error_message() const; + void set_error_message(const std::string& value); + void set_error_message(std::string&& value); void set_error_message(const char* value); void set_error_message(const char* value, size_t size); - ::std::string* mutable_error_message(); - ::std::string* release_error_message(); - void set_allocated_error_message(::std::string* error_message); + std::string* mutable_error_message(); + std::string* release_error_message(); + void set_allocated_error_message(std::string* error_message); + private: + const std::string& _internal_error_message() const; + void _internal_set_error_message(const std::string& value); + std::string* _internal_mutable_error_message(); + public: // .muscle_manager_protocol.ResultStatus status = 1; void clear_status(); - static const int kStatusFieldNumber = 1; ::muscle_manager_protocol::ResultStatus status() const; void set_status(::muscle_manager_protocol::ResultStatus value); + private: + ::muscle_manager_protocol::ResultStatus _internal_status() const; + void _internal_set_status(::muscle_manager_protocol::ResultStatus value); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerResult) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Conduit > conduits_; - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions > peer_dimensions_; - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations > peer_locations_; - ::google::protobuf::internal::ArenaStringPtr error_message_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Conduit > conduits_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions > peer_dimensions_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations > peer_locations_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_message_; int status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class ListOfDouble : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ListOfDouble) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ListOfDouble) */ { public: ListOfDouble(); virtual ~ListOfDouble(); ListOfDouble(const ListOfDouble& from); - - inline ListOfDouble& operator=(const ListOfDouble& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ListOfDouble(ListOfDouble&& from) noexcept : ListOfDouble() { *this = ::std::move(from); } + inline ListOfDouble& operator=(const ListOfDouble& from) { + CopyFrom(from); + return *this; + } inline ListOfDouble& operator=(ListOfDouble&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2056,9 +2378,15 @@ class ListOfDouble : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const ListOfDouble& default_instance(); @@ -2070,10 +2398,13 @@ class ListOfDouble : static constexpr int kIndexInFileMessages = 13; - void Swap(ListOfDouble* other); friend void swap(ListOfDouble& a, ListOfDouble& b) { a.Swap(&b); } + inline void Swap(ListOfDouble* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2081,37 +2412,33 @@ class ListOfDouble : return CreateMaybeMessage(nullptr); } - ListOfDouble* New(::google::protobuf::Arena* arena) const final { + ListOfDouble* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ListOfDouble& from); void MergeFrom(const ListOfDouble& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ListOfDouble* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.ListOfDouble"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2119,54 +2446,72 @@ class ListOfDouble : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kValuesFieldNumber = 1, + }; // repeated double values = 1; int values_size() const; + private: + int _internal_values_size() const; + public: void clear_values(); - static const int kValuesFieldNumber = 1; + private: + double _internal_values(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& + _internal_values() const; + void _internal_add_values(double value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* + _internal_mutable_values(); + public: double values(int index) const; void set_values(int index, double value); void add_values(double value); - const ::google::protobuf::RepeatedField< double >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& values() const; - ::google::protobuf::RepeatedField< double >* + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* mutable_values(); // @@protoc_insertion_point(class_scope:muscle_manager_protocol.ListOfDouble) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedField< double > values_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< double > values_; mutable std::atomic _values_cached_byte_size_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class ListOfListOfDouble : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ListOfListOfDouble) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.ListOfListOfDouble) */ { public: ListOfListOfDouble(); virtual ~ListOfListOfDouble(); ListOfListOfDouble(const ListOfListOfDouble& from); - - inline ListOfListOfDouble& operator=(const ListOfListOfDouble& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 ListOfListOfDouble(ListOfListOfDouble&& from) noexcept : ListOfListOfDouble() { *this = ::std::move(from); } + inline ListOfListOfDouble& operator=(const ListOfListOfDouble& from) { + CopyFrom(from); + return *this; + } inline ListOfListOfDouble& operator=(ListOfListOfDouble&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2175,9 +2520,15 @@ class ListOfListOfDouble : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const ListOfListOfDouble& default_instance(); @@ -2189,10 +2540,13 @@ class ListOfListOfDouble : static constexpr int kIndexInFileMessages = 14; - void Swap(ListOfListOfDouble* other); friend void swap(ListOfListOfDouble& a, ListOfListOfDouble& b) { a.Swap(&b); } + inline void Swap(ListOfListOfDouble* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2200,37 +2554,33 @@ class ListOfListOfDouble : return CreateMaybeMessage(nullptr); } - ListOfListOfDouble* New(::google::protobuf::Arena* arena) const final { + ListOfListOfDouble* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const ListOfListOfDouble& from); void MergeFrom(const ListOfListOfDouble& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(ListOfListOfDouble* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.ListOfListOfDouble"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2238,53 +2588,67 @@ class ListOfListOfDouble : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kValuesFieldNumber = 1, + }; // repeated .muscle_manager_protocol.ListOfDouble values = 1; int values_size() const; + private: + int _internal_values_size() const; + public: void clear_values(); - static const int kValuesFieldNumber = 1; ::muscle_manager_protocol::ListOfDouble* mutable_values(int index); - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >* mutable_values(); + private: + const ::muscle_manager_protocol::ListOfDouble& _internal_values(int index) const; + ::muscle_manager_protocol::ListOfDouble* _internal_add_values(); + public: const ::muscle_manager_protocol::ListOfDouble& values(int index) const; ::muscle_manager_protocol::ListOfDouble* add_values(); - const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >& values() const; // @@protoc_insertion_point(class_scope:muscle_manager_protocol.ListOfListOfDouble) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble > values_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble > values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class Setting : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Setting) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.Setting) */ { public: Setting(); virtual ~Setting(); Setting(const Setting& from); - - inline Setting& operator=(const Setting& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 Setting(Setting&& from) noexcept : Setting() { *this = ::std::move(from); } + inline Setting& operator=(const Setting& from) { + CopyFrom(from); + return *this; + } inline Setting& operator=(Setting&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2293,9 +2657,15 @@ class Setting : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const Setting& default_instance(); @@ -2307,10 +2677,13 @@ class Setting : static constexpr int kIndexInFileMessages = 15; - void Swap(Setting* other); friend void swap(Setting& a, Setting& b) { a.Swap(&b); } + inline void Swap(Setting* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2318,37 +2691,33 @@ class Setting : return CreateMaybeMessage(nullptr); } - Setting* New(::google::protobuf::Arena* arena) const final { + Setting* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const Setting& from); void MergeFrom(const Setting& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(Setting* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.Setting"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2356,118 +2725,161 @@ class Setting : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kNameFieldNumber = 1, + kValueStringFieldNumber = 3, + kValueListFloatFieldNumber = 7, + kValueListListFloatFieldNumber = 8, + kValueIntFieldNumber = 4, + kValueTypeFieldNumber = 2, + kValueBoolFieldNumber = 6, + kValueFloatFieldNumber = 5, + }; // string name = 1; void clear_name(); - static const int kNameFieldNumber = 1; - const ::std::string& name() const; - void set_name(const ::std::string& value); - #if LANG_CXX11 - void set_name(::std::string&& value); - #endif + const std::string& name() const; + void set_name(const std::string& value); + void set_name(std::string&& value); void set_name(const char* value); void set_name(const char* value, size_t size); - ::std::string* mutable_name(); - ::std::string* release_name(); - void set_allocated_name(::std::string* name); + std::string* mutable_name(); + std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: // string value_string = 3; void clear_value_string(); - static const int kValueStringFieldNumber = 3; - const ::std::string& value_string() const; - void set_value_string(const ::std::string& value); - #if LANG_CXX11 - void set_value_string(::std::string&& value); - #endif + const std::string& value_string() const; + void set_value_string(const std::string& value); + void set_value_string(std::string&& value); void set_value_string(const char* value); void set_value_string(const char* value, size_t size); - ::std::string* mutable_value_string(); - ::std::string* release_value_string(); - void set_allocated_value_string(::std::string* value_string); + std::string* mutable_value_string(); + std::string* release_value_string(); + void set_allocated_value_string(std::string* value_string); + private: + const std::string& _internal_value_string() const; + void _internal_set_value_string(const std::string& value); + std::string* _internal_mutable_value_string(); + public: // .muscle_manager_protocol.ListOfDouble value_list_float = 7; bool has_value_list_float() const; + private: + bool _internal_has_value_list_float() const; + public: void clear_value_list_float(); - static const int kValueListFloatFieldNumber = 7; const ::muscle_manager_protocol::ListOfDouble& value_list_float() const; ::muscle_manager_protocol::ListOfDouble* release_value_list_float(); ::muscle_manager_protocol::ListOfDouble* mutable_value_list_float(); void set_allocated_value_list_float(::muscle_manager_protocol::ListOfDouble* value_list_float); + private: + const ::muscle_manager_protocol::ListOfDouble& _internal_value_list_float() const; + ::muscle_manager_protocol::ListOfDouble* _internal_mutable_value_list_float(); + public: // .muscle_manager_protocol.ListOfListOfDouble value_list_list_float = 8; bool has_value_list_list_float() const; + private: + bool _internal_has_value_list_list_float() const; + public: void clear_value_list_list_float(); - static const int kValueListListFloatFieldNumber = 8; const ::muscle_manager_protocol::ListOfListOfDouble& value_list_list_float() const; ::muscle_manager_protocol::ListOfListOfDouble* release_value_list_list_float(); ::muscle_manager_protocol::ListOfListOfDouble* mutable_value_list_list_float(); void set_allocated_value_list_list_float(::muscle_manager_protocol::ListOfListOfDouble* value_list_list_float); + private: + const ::muscle_manager_protocol::ListOfListOfDouble& _internal_value_list_list_float() const; + ::muscle_manager_protocol::ListOfListOfDouble* _internal_mutable_value_list_list_float(); + public: // int64 value_int = 4; void clear_value_int(); - static const int kValueIntFieldNumber = 4; - ::google::protobuf::int64 value_int() const; - void set_value_int(::google::protobuf::int64 value); + ::PROTOBUF_NAMESPACE_ID::int64 value_int() const; + void set_value_int(::PROTOBUF_NAMESPACE_ID::int64 value); + private: + ::PROTOBUF_NAMESPACE_ID::int64 _internal_value_int() const; + void _internal_set_value_int(::PROTOBUF_NAMESPACE_ID::int64 value); + public: // .muscle_manager_protocol.SettingValueType value_type = 2; void clear_value_type(); - static const int kValueTypeFieldNumber = 2; ::muscle_manager_protocol::SettingValueType value_type() const; void set_value_type(::muscle_manager_protocol::SettingValueType value); + private: + ::muscle_manager_protocol::SettingValueType _internal_value_type() const; + void _internal_set_value_type(::muscle_manager_protocol::SettingValueType value); + public: // bool value_bool = 6; void clear_value_bool(); - static const int kValueBoolFieldNumber = 6; bool value_bool() const; void set_value_bool(bool value); + private: + bool _internal_value_bool() const; + void _internal_set_value_bool(bool value); + public: // double value_float = 5; void clear_value_float(); - static const int kValueFloatFieldNumber = 5; double value_float() const; void set_value_float(double value); + private: + double _internal_value_float() const; + void _internal_set_value_float(double value); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.Setting) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr name_; - ::google::protobuf::internal::ArenaStringPtr value_string_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_string_; ::muscle_manager_protocol::ListOfDouble* value_list_float_; ::muscle_manager_protocol::ListOfListOfDouble* value_list_list_float_; - ::google::protobuf::int64 value_int_; + ::PROTOBUF_NAMESPACE_ID::int64 value_int_; int value_type_; bool value_bool_; double value_float_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class SettingsRequest : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.SettingsRequest) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.SettingsRequest) */ { public: SettingsRequest(); virtual ~SettingsRequest(); SettingsRequest(const SettingsRequest& from); - - inline SettingsRequest& operator=(const SettingsRequest& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 SettingsRequest(SettingsRequest&& from) noexcept : SettingsRequest() { *this = ::std::move(from); } + inline SettingsRequest& operator=(const SettingsRequest& from) { + CopyFrom(from); + return *this; + } inline SettingsRequest& operator=(SettingsRequest&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2476,9 +2888,15 @@ class SettingsRequest : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const SettingsRequest& default_instance(); @@ -2490,10 +2908,13 @@ class SettingsRequest : static constexpr int kIndexInFileMessages = 16; - void Swap(SettingsRequest* other); friend void swap(SettingsRequest& a, SettingsRequest& b) { a.Swap(&b); } + inline void Swap(SettingsRequest* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2501,37 +2922,33 @@ class SettingsRequest : return CreateMaybeMessage(nullptr); } - SettingsRequest* New(::google::protobuf::Arena* arena) const final { + SettingsRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SettingsRequest& from); void MergeFrom(const SettingsRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SettingsRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.SettingsRequest"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2539,7 +2956,14 @@ class SettingsRequest : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- @@ -2547,32 +2971,30 @@ class SettingsRequest : // @@protoc_insertion_point(class_scope:muscle_manager_protocol.SettingsRequest) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class SettingsResult : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.SettingsResult) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.SettingsResult) */ { public: SettingsResult(); virtual ~SettingsResult(); SettingsResult(const SettingsResult& from); - - inline SettingsResult& operator=(const SettingsResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 SettingsResult(SettingsResult&& from) noexcept : SettingsResult() { *this = ::std::move(from); } + inline SettingsResult& operator=(const SettingsResult& from) { + CopyFrom(from); + return *this; + } inline SettingsResult& operator=(SettingsResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2581,9 +3003,15 @@ class SettingsResult : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const SettingsResult& default_instance(); @@ -2595,10 +3023,13 @@ class SettingsResult : static constexpr int kIndexInFileMessages = 17; - void Swap(SettingsResult* other); friend void swap(SettingsResult& a, SettingsResult& b) { a.Swap(&b); } + inline void Swap(SettingsResult* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2606,37 +3037,33 @@ class SettingsResult : return CreateMaybeMessage(nullptr); } - SettingsResult* New(::google::protobuf::Arena* arena) const final { + SettingsResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const SettingsResult& from); void MergeFrom(const SettingsResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(SettingsResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.SettingsResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2644,53 +3071,67 @@ class SettingsResult : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kSettingValuesFieldNumber = 1, + }; // repeated .muscle_manager_protocol.Setting setting_values = 1; int setting_values_size() const; + private: + int _internal_setting_values_size() const; + public: void clear_setting_values(); - static const int kSettingValuesFieldNumber = 1; ::muscle_manager_protocol::Setting* mutable_setting_values(int index); - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Setting >* + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Setting >* mutable_setting_values(); + private: + const ::muscle_manager_protocol::Setting& _internal_setting_values(int index) const; + ::muscle_manager_protocol::Setting* _internal_add_setting_values(); + public: const ::muscle_manager_protocol::Setting& setting_values(int index) const; ::muscle_manager_protocol::Setting* add_setting_values(); - const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Setting >& + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Setting >& setting_values() const; // @@protoc_insertion_point(class_scope:muscle_manager_protocol.SettingsResult) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Setting > setting_values_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Setting > setting_values_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class DeregistrationRequest : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.DeregistrationRequest) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.DeregistrationRequest) */ { public: DeregistrationRequest(); virtual ~DeregistrationRequest(); DeregistrationRequest(const DeregistrationRequest& from); - - inline DeregistrationRequest& operator=(const DeregistrationRequest& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 DeregistrationRequest(DeregistrationRequest&& from) noexcept : DeregistrationRequest() { *this = ::std::move(from); } + inline DeregistrationRequest& operator=(const DeregistrationRequest& from) { + CopyFrom(from); + return *this; + } inline DeregistrationRequest& operator=(DeregistrationRequest&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2699,9 +3140,15 @@ class DeregistrationRequest : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const DeregistrationRequest& default_instance(); @@ -2713,10 +3160,13 @@ class DeregistrationRequest : static constexpr int kIndexInFileMessages = 18; - void Swap(DeregistrationRequest* other); friend void swap(DeregistrationRequest& a, DeregistrationRequest& b) { a.Swap(&b); } + inline void Swap(DeregistrationRequest* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2724,37 +3174,33 @@ class DeregistrationRequest : return CreateMaybeMessage(nullptr); } - DeregistrationRequest* New(::google::protobuf::Arena* arena) const final { + DeregistrationRequest* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const DeregistrationRequest& from); void MergeFrom(const DeregistrationRequest& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DeregistrationRequest* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.DeregistrationRequest"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2762,55 +3208,65 @@ class DeregistrationRequest : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kInstanceNameFieldNumber = 1, + }; // string instance_name = 1; void clear_instance_name(); - static const int kInstanceNameFieldNumber = 1; - const ::std::string& instance_name() const; - void set_instance_name(const ::std::string& value); - #if LANG_CXX11 - void set_instance_name(::std::string&& value); - #endif + const std::string& instance_name() const; + void set_instance_name(const std::string& value); + void set_instance_name(std::string&& value); void set_instance_name(const char* value); void set_instance_name(const char* value, size_t size); - ::std::string* mutable_instance_name(); - ::std::string* release_instance_name(); - void set_allocated_instance_name(::std::string* instance_name); + std::string* mutable_instance_name(); + std::string* release_instance_name(); + void set_allocated_instance_name(std::string* instance_name); + private: + const std::string& _internal_instance_name() const; + void _internal_set_instance_name(const std::string& value); + std::string* _internal_mutable_instance_name(); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.DeregistrationRequest) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr instance_name_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr instance_name_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // ------------------------------------------------------------------- class DeregistrationResult : - public ::google::protobuf::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.DeregistrationResult) */ { + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:muscle_manager_protocol.DeregistrationResult) */ { public: DeregistrationResult(); virtual ~DeregistrationResult(); DeregistrationResult(const DeregistrationResult& from); - - inline DeregistrationResult& operator=(const DeregistrationResult& from) { - CopyFrom(from); - return *this; - } - #if LANG_CXX11 DeregistrationResult(DeregistrationResult&& from) noexcept : DeregistrationResult() { *this = ::std::move(from); } + inline DeregistrationResult& operator=(const DeregistrationResult& from) { + CopyFrom(from); + return *this; + } inline DeregistrationResult& operator=(DeregistrationResult&& from) noexcept { if (GetArenaNoVirtual() == from.GetArenaNoVirtual()) { if (this != &from) InternalSwap(&from); @@ -2819,9 +3275,15 @@ class DeregistrationResult : } return *this; } - #endif - static const ::google::protobuf::Descriptor* descriptor() { - return default_instance().GetDescriptor(); + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return GetMetadataStatic().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return GetMetadataStatic().reflection; } static const DeregistrationResult& default_instance(); @@ -2833,10 +3295,13 @@ class DeregistrationResult : static constexpr int kIndexInFileMessages = 19; - void Swap(DeregistrationResult* other); friend void swap(DeregistrationResult& a, DeregistrationResult& b) { a.Swap(&b); } + inline void Swap(DeregistrationResult* other) { + if (other == this) return; + InternalSwap(other); + } // implements Message ---------------------------------------------- @@ -2844,37 +3309,33 @@ class DeregistrationResult : return CreateMaybeMessage(nullptr); } - DeregistrationResult* New(::google::protobuf::Arena* arena) const final { + DeregistrationResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena) const final { return CreateMaybeMessage(arena); } - void CopyFrom(const ::google::protobuf::Message& from) final; - void MergeFrom(const ::google::protobuf::Message& from) final; + void CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; + void MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) final; void CopyFrom(const DeregistrationResult& from); void MergeFrom(const DeregistrationResult& from); PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; bool IsInitialized() const final; size_t ByteSizeLong() const final; - #if GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - static const char* _InternalParse(const char* begin, const char* end, void* object, ::google::protobuf::internal::ParseContext* ctx); - ::google::protobuf::internal::ParseFunc _ParseFunc() const final { return _InternalParse; } - #else - bool MergePartialFromCodedStream( - ::google::protobuf::io::CodedInputStream* input) final; - #endif // GOOGLE_PROTOBUF_ENABLE_EXPERIMENTAL_PARSER - void SerializeWithCachedSizes( - ::google::protobuf::io::CodedOutputStream* output) const final; - ::google::protobuf::uint8* InternalSerializeWithCachedSizesToArray( - ::google::protobuf::uint8* target) const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + ::PROTOBUF_NAMESPACE_ID::uint8* InternalSerializeWithCachedSizesToArray( + ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; int GetCachedSize() const final { return _cached_size_.Get(); } private: - void SharedCtor(); - void SharedDtor(); + inline void SharedCtor(); + inline void SharedDtor(); void SetCachedSize(int size) const final; void InternalSwap(DeregistrationResult* other); + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "muscle_manager_protocol.DeregistrationResult"; + } private: - inline ::google::protobuf::Arena* GetArenaNoVirtual() const { + inline ::PROTOBUF_NAMESPACE_ID::Arena* GetArenaNoVirtual() const { return nullptr; } inline void* MaybeArenaPtr() const { @@ -2882,40 +3343,56 @@ class DeregistrationResult : } public: - ::google::protobuf::Metadata GetMetadata() const final; + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + private: + static ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadataStatic() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto); + return ::descriptor_table_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto.file_level_metadata[kIndexInFileMessages]; + } + + public: // nested types ---------------------------------------------------- // accessors ------------------------------------------------------- + enum : int { + kErrorMessageFieldNumber = 2, + kStatusFieldNumber = 1, + }; // string error_message = 2; void clear_error_message(); - static const int kErrorMessageFieldNumber = 2; - const ::std::string& error_message() const; - void set_error_message(const ::std::string& value); - #if LANG_CXX11 - void set_error_message(::std::string&& value); - #endif + const std::string& error_message() const; + void set_error_message(const std::string& value); + void set_error_message(std::string&& value); void set_error_message(const char* value); void set_error_message(const char* value, size_t size); - ::std::string* mutable_error_message(); - ::std::string* release_error_message(); - void set_allocated_error_message(::std::string* error_message); + std::string* mutable_error_message(); + std::string* release_error_message(); + void set_allocated_error_message(std::string* error_message); + private: + const std::string& _internal_error_message() const; + void _internal_set_error_message(const std::string& value); + std::string* _internal_mutable_error_message(); + public: // .muscle_manager_protocol.ResultStatus status = 1; void clear_status(); - static const int kStatusFieldNumber = 1; ::muscle_manager_protocol::ResultStatus status() const; void set_status(::muscle_manager_protocol::ResultStatus value); + private: + ::muscle_manager_protocol::ResultStatus _internal_status() const; + void _internal_set_status(::muscle_manager_protocol::ResultStatus value); + public: // @@protoc_insertion_point(class_scope:muscle_manager_protocol.DeregistrationResult) private: - class HasBitSetters; + class _Internal; - ::google::protobuf::internal::InternalMetadataWithArena _internal_metadata_; - ::google::protobuf::internal::ArenaStringPtr error_message_; + ::PROTOBUF_NAMESPACE_ID::internal::InternalMetadataWithArena _internal_metadata_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr error_message_; int status_; - mutable ::google::protobuf::internal::CachedSize _cached_size_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; friend struct ::TableStruct_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto; }; // =================================================================== @@ -2931,93 +3408,109 @@ class DeregistrationResult : // string instance_id = 1; inline void LogMessage::clear_instance_id() { - instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& LogMessage::instance_id() const { +inline const std::string& LogMessage::instance_id() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.LogMessage.instance_id) + return _internal_instance_id(); +} +inline void LogMessage::set_instance_id(const std::string& value) { + _internal_set_instance_id(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.LogMessage.instance_id) +} +inline std::string* LogMessage::mutable_instance_id() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.LogMessage.instance_id) + return _internal_mutable_instance_id(); +} +inline const std::string& LogMessage::_internal_instance_id() const { return instance_id_.GetNoArena(); } -inline void LogMessage::set_instance_id(const ::std::string& value) { +inline void LogMessage::_internal_set_instance_id(const std::string& value) { - instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.LogMessage.instance_id) + instance_id_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void LogMessage::set_instance_id(::std::string&& value) { +inline void LogMessage::set_instance_id(std::string&& value) { instance_id_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.LogMessage.instance_id) } -#endif inline void LogMessage::set_instance_id(const char* value) { GOOGLE_DCHECK(value != nullptr); - instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + instance_id_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.LogMessage.instance_id) } inline void LogMessage::set_instance_id(const char* value, size_t size) { - instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_id_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.LogMessage.instance_id) } -inline ::std::string* LogMessage::mutable_instance_id() { +inline std::string* LogMessage::_internal_mutable_instance_id() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.LogMessage.instance_id) - return instance_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_id_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* LogMessage::release_instance_id() { +inline std::string* LogMessage::release_instance_id() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.LogMessage.instance_id) - return instance_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_id_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void LogMessage::set_allocated_instance_id(::std::string* instance_id) { +inline void LogMessage::set_allocated_instance_id(std::string* instance_id) { if (instance_id != nullptr) { } else { } - instance_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_id); + instance_id_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), instance_id); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.LogMessage.instance_id) } // .google.protobuf.Timestamp timestamp = 3; -inline bool LogMessage::has_timestamp() const { +inline bool LogMessage::_internal_has_timestamp() const { return this != internal_default_instance() && timestamp_ != nullptr; } -inline const ::google::protobuf::Timestamp& LogMessage::timestamp() const { - const ::google::protobuf::Timestamp* p = timestamp_; +inline bool LogMessage::has_timestamp() const { + return _internal_has_timestamp(); +} +inline const PROTOBUF_NAMESPACE_ID::Timestamp& LogMessage::_internal_timestamp() const { + const PROTOBUF_NAMESPACE_ID::Timestamp* p = timestamp_; + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Timestamp& LogMessage::timestamp() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.LogMessage.timestamp) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_Timestamp_default_instance_); + return _internal_timestamp(); } -inline ::google::protobuf::Timestamp* LogMessage::release_timestamp() { +inline PROTOBUF_NAMESPACE_ID::Timestamp* LogMessage::release_timestamp() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.LogMessage.timestamp) - ::google::protobuf::Timestamp* temp = timestamp_; + PROTOBUF_NAMESPACE_ID::Timestamp* temp = timestamp_; timestamp_ = nullptr; return temp; } -inline ::google::protobuf::Timestamp* LogMessage::mutable_timestamp() { +inline PROTOBUF_NAMESPACE_ID::Timestamp* LogMessage::_internal_mutable_timestamp() { if (timestamp_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); timestamp_ = p; } - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.LogMessage.timestamp) return timestamp_; } -inline void LogMessage::set_allocated_timestamp(::google::protobuf::Timestamp* timestamp) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline PROTOBUF_NAMESPACE_ID::Timestamp* LogMessage::mutable_timestamp() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.LogMessage.timestamp) + return _internal_mutable_timestamp(); +} +inline void LogMessage::set_allocated_timestamp(PROTOBUF_NAMESPACE_ID::Timestamp* timestamp) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(timestamp_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(timestamp_); } if (timestamp) { - ::google::protobuf::Arena* submessage_arena = - reinterpret_cast<::google::protobuf::MessageLite*>(timestamp)->GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(timestamp)->GetArena(); if (message_arena != submessage_arena) { - timestamp = ::google::protobuf::internal::GetOwnedMessage( + timestamp = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, timestamp, submessage_arena); } @@ -3032,66 +3525,79 @@ inline void LogMessage::set_allocated_timestamp(::google::protobuf::Timestamp* t inline void LogMessage::clear_level() { level_ = 0; } -inline ::muscle_manager_protocol::LogLevel LogMessage::level() const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.LogMessage.level) +inline ::muscle_manager_protocol::LogLevel LogMessage::_internal_level() const { return static_cast< ::muscle_manager_protocol::LogLevel >(level_); } -inline void LogMessage::set_level(::muscle_manager_protocol::LogLevel value) { +inline ::muscle_manager_protocol::LogLevel LogMessage::level() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.LogMessage.level) + return _internal_level(); +} +inline void LogMessage::_internal_set_level(::muscle_manager_protocol::LogLevel value) { level_ = value; +} +inline void LogMessage::set_level(::muscle_manager_protocol::LogLevel value) { + _internal_set_level(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.LogMessage.level) } // string text = 5; inline void LogMessage::clear_text() { - text_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + text_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& LogMessage::text() const { +inline const std::string& LogMessage::text() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.LogMessage.text) + return _internal_text(); +} +inline void LogMessage::set_text(const std::string& value) { + _internal_set_text(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.LogMessage.text) +} +inline std::string* LogMessage::mutable_text() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.LogMessage.text) + return _internal_mutable_text(); +} +inline const std::string& LogMessage::_internal_text() const { return text_.GetNoArena(); } -inline void LogMessage::set_text(const ::std::string& value) { +inline void LogMessage::_internal_set_text(const std::string& value) { - text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.LogMessage.text) + text_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void LogMessage::set_text(::std::string&& value) { +inline void LogMessage::set_text(std::string&& value) { text_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.LogMessage.text) } -#endif inline void LogMessage::set_text(const char* value) { GOOGLE_DCHECK(value != nullptr); - text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + text_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.LogMessage.text) } inline void LogMessage::set_text(const char* value, size_t size) { - text_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + text_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.LogMessage.text) } -inline ::std::string* LogMessage::mutable_text() { +inline std::string* LogMessage::_internal_mutable_text() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.LogMessage.text) - return text_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return text_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* LogMessage::release_text() { +inline std::string* LogMessage::release_text() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.LogMessage.text) - return text_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return text_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void LogMessage::set_allocated_text(::std::string* text) { +inline void LogMessage::set_allocated_text(std::string* text) { if (text != nullptr) { } else { } - text_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), text); + text_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), text); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.LogMessage.text) } @@ -3105,54 +3611,61 @@ inline void LogMessage::set_allocated_text(::std::string* text) { // string name = 1; inline void Port::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Port::name() const { +inline const std::string& Port::name() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Port.name) + return _internal_name(); +} +inline void Port::set_name(const std::string& value) { + _internal_set_name(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.Port.name) +} +inline std::string* Port::mutable_name() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Port.name) + return _internal_mutable_name(); +} +inline const std::string& Port::_internal_name() const { return name_.GetNoArena(); } -inline void Port::set_name(const ::std::string& value) { +inline void Port::_internal_set_name(const std::string& value) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.Port.name) + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void Port::set_name(::std::string&& value) { +inline void Port::set_name(std::string&& value) { name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.Port.name) } -#endif inline void Port::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.Port.name) } inline void Port::set_name(const char* value, size_t size) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.Port.name) } -inline ::std::string* Port::mutable_name() { +inline std::string* Port::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Port.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Port::release_name() { +inline std::string* Port::release_name() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.Port.name) - return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Port::set_allocated_name(::std::string* name) { +inline void Port::set_allocated_name(std::string* name) { if (name != nullptr) { } else { } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.Port.name) } @@ -3160,13 +3673,19 @@ inline void Port::set_allocated_name(::std::string* name) { inline void Port::clear_operator_() { operator__ = 0; } +inline ::muscle_manager_protocol::Operator Port::_internal_operator_() const { + return static_cast< ::muscle_manager_protocol::Operator >(operator__); +} inline ::muscle_manager_protocol::Operator Port::operator_() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Port.operator) - return static_cast< ::muscle_manager_protocol::Operator >(operator__); + return _internal_operator_(); } -inline void Port::set_operator_(::muscle_manager_protocol::Operator value) { +inline void Port::_internal_set_operator_(::muscle_manager_protocol::Operator value) { operator__ = value; +} +inline void Port::set_operator_(::muscle_manager_protocol::Operator value) { + _internal_set_operator_(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.Port.operator) } @@ -3176,93 +3695,109 @@ inline void Port::set_operator_(::muscle_manager_protocol::Operator value) { // string instance_id = 1; inline void ProfileEvent::clear_instance_id() { - instance_id_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_id_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& ProfileEvent::instance_id() const { +inline const std::string& ProfileEvent::instance_id() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.instance_id) + return _internal_instance_id(); +} +inline void ProfileEvent::set_instance_id(const std::string& value) { + _internal_set_instance_id(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.ProfileEvent.instance_id) +} +inline std::string* ProfileEvent::mutable_instance_id() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.instance_id) + return _internal_mutable_instance_id(); +} +inline const std::string& ProfileEvent::_internal_instance_id() const { return instance_id_.GetNoArena(); } -inline void ProfileEvent::set_instance_id(const ::std::string& value) { +inline void ProfileEvent::_internal_set_instance_id(const std::string& value) { - instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.ProfileEvent.instance_id) + instance_id_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void ProfileEvent::set_instance_id(::std::string&& value) { +inline void ProfileEvent::set_instance_id(std::string&& value) { instance_id_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.ProfileEvent.instance_id) } -#endif inline void ProfileEvent::set_instance_id(const char* value) { GOOGLE_DCHECK(value != nullptr); - instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + instance_id_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.ProfileEvent.instance_id) } inline void ProfileEvent::set_instance_id(const char* value, size_t size) { - instance_id_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_id_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.ProfileEvent.instance_id) } -inline ::std::string* ProfileEvent::mutable_instance_id() { +inline std::string* ProfileEvent::_internal_mutable_instance_id() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.instance_id) - return instance_id_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_id_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* ProfileEvent::release_instance_id() { +inline std::string* ProfileEvent::release_instance_id() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.ProfileEvent.instance_id) - return instance_id_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_id_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void ProfileEvent::set_allocated_instance_id(::std::string* instance_id) { +inline void ProfileEvent::set_allocated_instance_id(std::string* instance_id) { if (instance_id != nullptr) { } else { } - instance_id_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_id); + instance_id_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), instance_id); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.ProfileEvent.instance_id) } // .google.protobuf.Timestamp start_time = 2; -inline bool ProfileEvent::has_start_time() const { +inline bool ProfileEvent::_internal_has_start_time() const { return this != internal_default_instance() && start_time_ != nullptr; } -inline const ::google::protobuf::Timestamp& ProfileEvent::start_time() const { - const ::google::protobuf::Timestamp* p = start_time_; +inline bool ProfileEvent::has_start_time() const { + return _internal_has_start_time(); +} +inline const PROTOBUF_NAMESPACE_ID::Timestamp& ProfileEvent::_internal_start_time() const { + const PROTOBUF_NAMESPACE_ID::Timestamp* p = start_time_; + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Timestamp& ProfileEvent::start_time() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.start_time) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_Timestamp_default_instance_); + return _internal_start_time(); } -inline ::google::protobuf::Timestamp* ProfileEvent::release_start_time() { +inline PROTOBUF_NAMESPACE_ID::Timestamp* ProfileEvent::release_start_time() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.ProfileEvent.start_time) - ::google::protobuf::Timestamp* temp = start_time_; + PROTOBUF_NAMESPACE_ID::Timestamp* temp = start_time_; start_time_ = nullptr; return temp; } -inline ::google::protobuf::Timestamp* ProfileEvent::mutable_start_time() { +inline PROTOBUF_NAMESPACE_ID::Timestamp* ProfileEvent::_internal_mutable_start_time() { if (start_time_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); start_time_ = p; } - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.start_time) return start_time_; } -inline void ProfileEvent::set_allocated_start_time(::google::protobuf::Timestamp* start_time) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline PROTOBUF_NAMESPACE_ID::Timestamp* ProfileEvent::mutable_start_time() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.start_time) + return _internal_mutable_start_time(); +} +inline void ProfileEvent::set_allocated_start_time(PROTOBUF_NAMESPACE_ID::Timestamp* start_time) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(start_time_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(start_time_); } if (start_time) { - ::google::protobuf::Arena* submessage_arena = - reinterpret_cast<::google::protobuf::MessageLite*>(start_time)->GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(start_time)->GetArena(); if (message_arena != submessage_arena) { - start_time = ::google::protobuf::internal::GetOwnedMessage( + start_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, start_time, submessage_arena); } @@ -3274,41 +3809,50 @@ inline void ProfileEvent::set_allocated_start_time(::google::protobuf::Timestamp } // .google.protobuf.Timestamp stop_time = 3; -inline bool ProfileEvent::has_stop_time() const { +inline bool ProfileEvent::_internal_has_stop_time() const { return this != internal_default_instance() && stop_time_ != nullptr; } -inline const ::google::protobuf::Timestamp& ProfileEvent::stop_time() const { - const ::google::protobuf::Timestamp* p = stop_time_; +inline bool ProfileEvent::has_stop_time() const { + return _internal_has_stop_time(); +} +inline const PROTOBUF_NAMESPACE_ID::Timestamp& ProfileEvent::_internal_stop_time() const { + const PROTOBUF_NAMESPACE_ID::Timestamp* p = stop_time_; + return p != nullptr ? *p : *reinterpret_cast( + &PROTOBUF_NAMESPACE_ID::_Timestamp_default_instance_); +} +inline const PROTOBUF_NAMESPACE_ID::Timestamp& ProfileEvent::stop_time() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.stop_time) - return p != nullptr ? *p : *reinterpret_cast( - &::google::protobuf::_Timestamp_default_instance_); + return _internal_stop_time(); } -inline ::google::protobuf::Timestamp* ProfileEvent::release_stop_time() { +inline PROTOBUF_NAMESPACE_ID::Timestamp* ProfileEvent::release_stop_time() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.ProfileEvent.stop_time) - ::google::protobuf::Timestamp* temp = stop_time_; + PROTOBUF_NAMESPACE_ID::Timestamp* temp = stop_time_; stop_time_ = nullptr; return temp; } -inline ::google::protobuf::Timestamp* ProfileEvent::mutable_stop_time() { +inline PROTOBUF_NAMESPACE_ID::Timestamp* ProfileEvent::_internal_mutable_stop_time() { if (stop_time_ == nullptr) { - auto* p = CreateMaybeMessage<::google::protobuf::Timestamp>(GetArenaNoVirtual()); + auto* p = CreateMaybeMessage(GetArenaNoVirtual()); stop_time_ = p; } - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.stop_time) return stop_time_; } -inline void ProfileEvent::set_allocated_stop_time(::google::protobuf::Timestamp* stop_time) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); +inline PROTOBUF_NAMESPACE_ID::Timestamp* ProfileEvent::mutable_stop_time() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.stop_time) + return _internal_mutable_stop_time(); +} +inline void ProfileEvent::set_allocated_stop_time(PROTOBUF_NAMESPACE_ID::Timestamp* stop_time) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { - delete reinterpret_cast< ::google::protobuf::MessageLite*>(stop_time_); + delete reinterpret_cast< ::PROTOBUF_NAMESPACE_ID::MessageLite*>(stop_time_); } if (stop_time) { - ::google::protobuf::Arena* submessage_arena = - reinterpret_cast<::google::protobuf::MessageLite*>(stop_time)->GetArena(); + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(stop_time)->GetArena(); if (message_arena != submessage_arena) { - stop_time = ::google::protobuf::internal::GetOwnedMessage( + stop_time = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, stop_time, submessage_arena); } @@ -3323,32 +3867,44 @@ inline void ProfileEvent::set_allocated_stop_time(::google::protobuf::Timestamp* inline void ProfileEvent::clear_event_type() { event_type_ = 0; } +inline ::muscle_manager_protocol::ProfileEventType ProfileEvent::_internal_event_type() const { + return static_cast< ::muscle_manager_protocol::ProfileEventType >(event_type_); +} inline ::muscle_manager_protocol::ProfileEventType ProfileEvent::event_type() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.event_type) - return static_cast< ::muscle_manager_protocol::ProfileEventType >(event_type_); + return _internal_event_type(); } -inline void ProfileEvent::set_event_type(::muscle_manager_protocol::ProfileEventType value) { +inline void ProfileEvent::_internal_set_event_type(::muscle_manager_protocol::ProfileEventType value) { event_type_ = value; +} +inline void ProfileEvent::set_event_type(::muscle_manager_protocol::ProfileEventType value) { + _internal_set_event_type(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.ProfileEvent.event_type) } // .muscle_manager_protocol.Port port = 5; -inline bool ProfileEvent::has_port() const { +inline bool ProfileEvent::_internal_has_port() const { return this != internal_default_instance() && port_ != nullptr; } +inline bool ProfileEvent::has_port() const { + return _internal_has_port(); +} inline void ProfileEvent::clear_port() { if (GetArenaNoVirtual() == nullptr && port_ != nullptr) { delete port_; } port_ = nullptr; } -inline const ::muscle_manager_protocol::Port& ProfileEvent::port() const { +inline const ::muscle_manager_protocol::Port& ProfileEvent::_internal_port() const { const ::muscle_manager_protocol::Port* p = port_; - // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.port) return p != nullptr ? *p : *reinterpret_cast( &::muscle_manager_protocol::_Port_default_instance_); } +inline const ::muscle_manager_protocol::Port& ProfileEvent::port() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.port) + return _internal_port(); +} inline ::muscle_manager_protocol::Port* ProfileEvent::release_port() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.ProfileEvent.port) @@ -3356,24 +3912,27 @@ inline ::muscle_manager_protocol::Port* ProfileEvent::release_port() { port_ = nullptr; return temp; } -inline ::muscle_manager_protocol::Port* ProfileEvent::mutable_port() { +inline ::muscle_manager_protocol::Port* ProfileEvent::_internal_mutable_port() { if (port_ == nullptr) { auto* p = CreateMaybeMessage<::muscle_manager_protocol::Port>(GetArenaNoVirtual()); port_ = p; } - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.port) return port_; } +inline ::muscle_manager_protocol::Port* ProfileEvent::mutable_port() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ProfileEvent.port) + return _internal_mutable_port(); +} inline void ProfileEvent::set_allocated_port(::muscle_manager_protocol::Port* port) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete port_; } if (port) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - port = ::google::protobuf::internal::GetOwnedMessage( + port = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, port, submessage_arena); } @@ -3388,13 +3947,19 @@ inline void ProfileEvent::set_allocated_port(::muscle_manager_protocol::Port* po inline void ProfileEvent::clear_port_length() { port_length_ = 0; } -inline ::google::protobuf::int32 ProfileEvent::port_length() const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.port_length) +inline ::PROTOBUF_NAMESPACE_ID::int32 ProfileEvent::_internal_port_length() const { return port_length_; } -inline void ProfileEvent::set_port_length(::google::protobuf::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 ProfileEvent::port_length() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.port_length) + return _internal_port_length(); +} +inline void ProfileEvent::_internal_set_port_length(::PROTOBUF_NAMESPACE_ID::int32 value) { port_length_ = value; +} +inline void ProfileEvent::set_port_length(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_port_length(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.ProfileEvent.port_length) } @@ -3402,13 +3967,19 @@ inline void ProfileEvent::set_port_length(::google::protobuf::int32 value) { inline void ProfileEvent::clear_slot() { slot_ = 0; } -inline ::google::protobuf::int32 ProfileEvent::slot() const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.slot) +inline ::PROTOBUF_NAMESPACE_ID::int32 ProfileEvent::_internal_slot() const { return slot_; } -inline void ProfileEvent::set_slot(::google::protobuf::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 ProfileEvent::slot() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.slot) + return _internal_slot(); +} +inline void ProfileEvent::_internal_set_slot(::PROTOBUF_NAMESPACE_ID::int32 value) { slot_ = value; +} +inline void ProfileEvent::set_slot(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_set_slot(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.ProfileEvent.slot) } @@ -3416,13 +3987,19 @@ inline void ProfileEvent::set_slot(::google::protobuf::int32 value) { inline void ProfileEvent::clear_message_size() { message_size_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 ProfileEvent::message_size() const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.message_size) +inline ::PROTOBUF_NAMESPACE_ID::int64 ProfileEvent::_internal_message_size() const { return message_size_; } -inline void ProfileEvent::set_message_size(::google::protobuf::int64 value) { +inline ::PROTOBUF_NAMESPACE_ID::int64 ProfileEvent::message_size() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.ProfileEvent.message_size) + return _internal_message_size(); +} +inline void ProfileEvent::_internal_set_message_size(::PROTOBUF_NAMESPACE_ID::int64 value) { message_size_ = value; +} +inline void ProfileEvent::set_message_size(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_message_size(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.ProfileEvent.message_size) } @@ -3431,9 +4008,12 @@ inline void ProfileEvent::set_message_size(::google::protobuf::int64 value) { // Profile // repeated .muscle_manager_protocol.ProfileEvent events = 1; -inline int Profile::events_size() const { +inline int Profile::_internal_events_size() const { return events_.size(); } +inline int Profile::events_size() const { + return _internal_events_size(); +} inline void Profile::clear_events() { events_.Clear(); } @@ -3441,20 +4021,26 @@ inline ::muscle_manager_protocol::ProfileEvent* Profile::mutable_events(int inde // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Profile.events) return events_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >* Profile::mutable_events() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.Profile.events) return &events_; } +inline const ::muscle_manager_protocol::ProfileEvent& Profile::_internal_events(int index) const { + return events_.Get(index); +} inline const ::muscle_manager_protocol::ProfileEvent& Profile::events(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Profile.events) - return events_.Get(index); + return _internal_events(index); +} +inline ::muscle_manager_protocol::ProfileEvent* Profile::_internal_add_events() { + return events_.Add(); } inline ::muscle_manager_protocol::ProfileEvent* Profile::add_events() { // @@protoc_insertion_point(field_add:muscle_manager_protocol.Profile.events) - return events_.Add(); + return _internal_add_events(); } -inline const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ProfileEvent >& Profile::events() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.Profile.events) return events_; @@ -3470,82 +4056,97 @@ Profile::events() const { // string instance_name = 1; inline void RegistrationRequest::clear_instance_name() { - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& RegistrationRequest::instance_name() const { +inline const std::string& RegistrationRequest::instance_name() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.RegistrationRequest.instance_name) + return _internal_instance_name(); +} +inline void RegistrationRequest::set_instance_name(const std::string& value) { + _internal_set_instance_name(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.RegistrationRequest.instance_name) +} +inline std::string* RegistrationRequest::mutable_instance_name() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.RegistrationRequest.instance_name) + return _internal_mutable_instance_name(); +} +inline const std::string& RegistrationRequest::_internal_instance_name() const { return instance_name_.GetNoArena(); } -inline void RegistrationRequest::set_instance_name(const ::std::string& value) { +inline void RegistrationRequest::_internal_set_instance_name(const std::string& value) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.RegistrationRequest.instance_name) + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void RegistrationRequest::set_instance_name(::std::string&& value) { +inline void RegistrationRequest::set_instance_name(std::string&& value) { instance_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.RegistrationRequest.instance_name) } -#endif inline void RegistrationRequest::set_instance_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.RegistrationRequest.instance_name) } inline void RegistrationRequest::set_instance_name(const char* value, size_t size) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.RegistrationRequest.instance_name) } -inline ::std::string* RegistrationRequest::mutable_instance_name() { +inline std::string* RegistrationRequest::_internal_mutable_instance_name() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.RegistrationRequest.instance_name) - return instance_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* RegistrationRequest::release_instance_name() { +inline std::string* RegistrationRequest::release_instance_name() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.RegistrationRequest.instance_name) - return instance_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void RegistrationRequest::set_allocated_instance_name(::std::string* instance_name) { +inline void RegistrationRequest::set_allocated_instance_name(std::string* instance_name) { if (instance_name != nullptr) { } else { } - instance_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_name); + instance_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), instance_name); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.RegistrationRequest.instance_name) } // repeated string network_locations = 2; -inline int RegistrationRequest::network_locations_size() const { +inline int RegistrationRequest::_internal_network_locations_size() const { return network_locations_.size(); } +inline int RegistrationRequest::network_locations_size() const { + return _internal_network_locations_size(); +} inline void RegistrationRequest::clear_network_locations() { network_locations_.Clear(); } -inline const ::std::string& RegistrationRequest::network_locations(int index) const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.RegistrationRequest.network_locations) +inline std::string* RegistrationRequest::add_network_locations() { + // @@protoc_insertion_point(field_add_mutable:muscle_manager_protocol.RegistrationRequest.network_locations) + return _internal_add_network_locations(); +} +inline const std::string& RegistrationRequest::_internal_network_locations(int index) const { return network_locations_.Get(index); } -inline ::std::string* RegistrationRequest::mutable_network_locations(int index) { +inline const std::string& RegistrationRequest::network_locations(int index) const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.RegistrationRequest.network_locations) + return _internal_network_locations(index); +} +inline std::string* RegistrationRequest::mutable_network_locations(int index) { // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.RegistrationRequest.network_locations) return network_locations_.Mutable(index); } -inline void RegistrationRequest::set_network_locations(int index, const ::std::string& value) { +inline void RegistrationRequest::set_network_locations(int index, const std::string& value) { // @@protoc_insertion_point(field_set:muscle_manager_protocol.RegistrationRequest.network_locations) network_locations_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void RegistrationRequest::set_network_locations(int index, ::std::string&& value) { +inline void RegistrationRequest::set_network_locations(int index, std::string&& value) { // @@protoc_insertion_point(field_set:muscle_manager_protocol.RegistrationRequest.network_locations) network_locations_.Mutable(index)->assign(std::move(value)); } -#endif inline void RegistrationRequest::set_network_locations(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); network_locations_.Mutable(index)->assign(value); @@ -3556,20 +4157,17 @@ inline void RegistrationRequest::set_network_locations(int index, const char* va reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.RegistrationRequest.network_locations) } -inline ::std::string* RegistrationRequest::add_network_locations() { - // @@protoc_insertion_point(field_add_mutable:muscle_manager_protocol.RegistrationRequest.network_locations) +inline std::string* RegistrationRequest::_internal_add_network_locations() { return network_locations_.Add(); } -inline void RegistrationRequest::add_network_locations(const ::std::string& value) { +inline void RegistrationRequest::add_network_locations(const std::string& value) { network_locations_.Add()->assign(value); // @@protoc_insertion_point(field_add:muscle_manager_protocol.RegistrationRequest.network_locations) } -#if LANG_CXX11 -inline void RegistrationRequest::add_network_locations(::std::string&& value) { +inline void RegistrationRequest::add_network_locations(std::string&& value) { network_locations_.Add(std::move(value)); // @@protoc_insertion_point(field_add:muscle_manager_protocol.RegistrationRequest.network_locations) } -#endif inline void RegistrationRequest::add_network_locations(const char* value) { GOOGLE_DCHECK(value != nullptr); network_locations_.Add()->assign(value); @@ -3579,21 +4177,24 @@ inline void RegistrationRequest::add_network_locations(const char* value, size_t network_locations_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:muscle_manager_protocol.RegistrationRequest.network_locations) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& RegistrationRequest::network_locations() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.RegistrationRequest.network_locations) return network_locations_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* RegistrationRequest::mutable_network_locations() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.RegistrationRequest.network_locations) return &network_locations_; } // repeated .muscle_manager_protocol.Port ports = 3; -inline int RegistrationRequest::ports_size() const { +inline int RegistrationRequest::_internal_ports_size() const { return ports_.size(); } +inline int RegistrationRequest::ports_size() const { + return _internal_ports_size(); +} inline void RegistrationRequest::clear_ports() { ports_.Clear(); } @@ -3601,20 +4202,26 @@ inline ::muscle_manager_protocol::Port* RegistrationRequest::mutable_ports(int i // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.RegistrationRequest.ports) return ports_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Port >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Port >* RegistrationRequest::mutable_ports() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.RegistrationRequest.ports) return &ports_; } +inline const ::muscle_manager_protocol::Port& RegistrationRequest::_internal_ports(int index) const { + return ports_.Get(index); +} inline const ::muscle_manager_protocol::Port& RegistrationRequest::ports(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.RegistrationRequest.ports) - return ports_.Get(index); + return _internal_ports(index); +} +inline ::muscle_manager_protocol::Port* RegistrationRequest::_internal_add_ports() { + return ports_.Add(); } inline ::muscle_manager_protocol::Port* RegistrationRequest::add_ports() { // @@protoc_insertion_point(field_add:muscle_manager_protocol.RegistrationRequest.ports) - return ports_.Add(); + return _internal_add_ports(); } -inline const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Port >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Port >& RegistrationRequest::ports() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.RegistrationRequest.ports) return ports_; @@ -3628,66 +4235,79 @@ RegistrationRequest::ports() const { inline void RegistrationResult::clear_status() { status_ = 0; } +inline ::muscle_manager_protocol::ResultStatus RegistrationResult::_internal_status() const { + return static_cast< ::muscle_manager_protocol::ResultStatus >(status_); +} inline ::muscle_manager_protocol::ResultStatus RegistrationResult::status() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.RegistrationResult.status) - return static_cast< ::muscle_manager_protocol::ResultStatus >(status_); + return _internal_status(); } -inline void RegistrationResult::set_status(::muscle_manager_protocol::ResultStatus value) { +inline void RegistrationResult::_internal_set_status(::muscle_manager_protocol::ResultStatus value) { status_ = value; +} +inline void RegistrationResult::set_status(::muscle_manager_protocol::ResultStatus value) { + _internal_set_status(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.RegistrationResult.status) } // string error_message = 2; inline void RegistrationResult::clear_error_message() { - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& RegistrationResult::error_message() const { +inline const std::string& RegistrationResult::error_message() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.RegistrationResult.error_message) + return _internal_error_message(); +} +inline void RegistrationResult::set_error_message(const std::string& value) { + _internal_set_error_message(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.RegistrationResult.error_message) +} +inline std::string* RegistrationResult::mutable_error_message() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.RegistrationResult.error_message) + return _internal_mutable_error_message(); +} +inline const std::string& RegistrationResult::_internal_error_message() const { return error_message_.GetNoArena(); } -inline void RegistrationResult::set_error_message(const ::std::string& value) { +inline void RegistrationResult::_internal_set_error_message(const std::string& value) { - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.RegistrationResult.error_message) + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void RegistrationResult::set_error_message(::std::string&& value) { +inline void RegistrationResult::set_error_message(std::string&& value) { error_message_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.RegistrationResult.error_message) } -#endif inline void RegistrationResult::set_error_message(const char* value) { GOOGLE_DCHECK(value != nullptr); - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.RegistrationResult.error_message) } inline void RegistrationResult::set_error_message(const char* value, size_t size) { - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.RegistrationResult.error_message) } -inline ::std::string* RegistrationResult::mutable_error_message() { +inline std::string* RegistrationResult::_internal_mutable_error_message() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.RegistrationResult.error_message) - return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_message_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* RegistrationResult::release_error_message() { +inline std::string* RegistrationResult::release_error_message() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.RegistrationResult.error_message) - return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_message_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void RegistrationResult::set_allocated_error_message(::std::string* error_message) { +inline void RegistrationResult::set_allocated_error_message(std::string* error_message) { if (error_message != nullptr) { } else { } - error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + error_message_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error_message); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.RegistrationResult.error_message) } @@ -3697,107 +4317,121 @@ inline void RegistrationResult::set_allocated_error_message(::std::string* error // string sender = 1; inline void Conduit::clear_sender() { - sender_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + sender_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Conduit::sender() const { +inline const std::string& Conduit::sender() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Conduit.sender) + return _internal_sender(); +} +inline void Conduit::set_sender(const std::string& value) { + _internal_set_sender(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.Conduit.sender) +} +inline std::string* Conduit::mutable_sender() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Conduit.sender) + return _internal_mutable_sender(); +} +inline const std::string& Conduit::_internal_sender() const { return sender_.GetNoArena(); } -inline void Conduit::set_sender(const ::std::string& value) { +inline void Conduit::_internal_set_sender(const std::string& value) { - sender_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.Conduit.sender) + sender_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void Conduit::set_sender(::std::string&& value) { +inline void Conduit::set_sender(std::string&& value) { sender_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.Conduit.sender) } -#endif inline void Conduit::set_sender(const char* value) { GOOGLE_DCHECK(value != nullptr); - sender_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + sender_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.Conduit.sender) } inline void Conduit::set_sender(const char* value, size_t size) { - sender_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + sender_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.Conduit.sender) } -inline ::std::string* Conduit::mutable_sender() { +inline std::string* Conduit::_internal_mutable_sender() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Conduit.sender) - return sender_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return sender_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Conduit::release_sender() { +inline std::string* Conduit::release_sender() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.Conduit.sender) - return sender_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return sender_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Conduit::set_allocated_sender(::std::string* sender) { +inline void Conduit::set_allocated_sender(std::string* sender) { if (sender != nullptr) { } else { } - sender_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), sender); + sender_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), sender); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.Conduit.sender) } // string receiver = 2; inline void Conduit::clear_receiver() { - receiver_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + receiver_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Conduit::receiver() const { +inline const std::string& Conduit::receiver() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Conduit.receiver) + return _internal_receiver(); +} +inline void Conduit::set_receiver(const std::string& value) { + _internal_set_receiver(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.Conduit.receiver) +} +inline std::string* Conduit::mutable_receiver() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Conduit.receiver) + return _internal_mutable_receiver(); +} +inline const std::string& Conduit::_internal_receiver() const { return receiver_.GetNoArena(); } -inline void Conduit::set_receiver(const ::std::string& value) { +inline void Conduit::_internal_set_receiver(const std::string& value) { - receiver_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.Conduit.receiver) + receiver_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void Conduit::set_receiver(::std::string&& value) { +inline void Conduit::set_receiver(std::string&& value) { receiver_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.Conduit.receiver) } -#endif inline void Conduit::set_receiver(const char* value) { GOOGLE_DCHECK(value != nullptr); - receiver_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + receiver_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.Conduit.receiver) } inline void Conduit::set_receiver(const char* value, size_t size) { - receiver_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + receiver_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.Conduit.receiver) } -inline ::std::string* Conduit::mutable_receiver() { +inline std::string* Conduit::_internal_mutable_receiver() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Conduit.receiver) - return receiver_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return receiver_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Conduit::release_receiver() { +inline std::string* Conduit::release_receiver() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.Conduit.receiver) - return receiver_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return receiver_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Conduit::set_allocated_receiver(::std::string* receiver) { +inline void Conduit::set_allocated_receiver(std::string* receiver) { if (receiver != nullptr) { } else { } - receiver_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), receiver); + receiver_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), receiver); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.Conduit.receiver) } @@ -3807,54 +4441,61 @@ inline void Conduit::set_allocated_receiver(::std::string* receiver) { // string instance_name = 1; inline void PeerRequest::clear_instance_name() { - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& PeerRequest::instance_name() const { +inline const std::string& PeerRequest::instance_name() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerRequest.instance_name) + return _internal_instance_name(); +} +inline void PeerRequest::set_instance_name(const std::string& value) { + _internal_set_instance_name(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerRequest.instance_name) +} +inline std::string* PeerRequest::mutable_instance_name() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerRequest.instance_name) + return _internal_mutable_instance_name(); +} +inline const std::string& PeerRequest::_internal_instance_name() const { return instance_name_.GetNoArena(); } -inline void PeerRequest::set_instance_name(const ::std::string& value) { +inline void PeerRequest::_internal_set_instance_name(const std::string& value) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerRequest.instance_name) + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void PeerRequest::set_instance_name(::std::string&& value) { +inline void PeerRequest::set_instance_name(std::string&& value) { instance_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.PeerRequest.instance_name) } -#endif inline void PeerRequest::set_instance_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.PeerRequest.instance_name) } inline void PeerRequest::set_instance_name(const char* value, size_t size) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.PeerRequest.instance_name) } -inline ::std::string* PeerRequest::mutable_instance_name() { +inline std::string* PeerRequest::_internal_mutable_instance_name() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerRequest.instance_name) - return instance_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* PeerRequest::release_instance_name() { +inline std::string* PeerRequest::release_instance_name() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.PeerRequest.instance_name) - return instance_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void PeerRequest::set_allocated_instance_name(::std::string* instance_name) { +inline void PeerRequest::set_allocated_instance_name(std::string* instance_name) { if (instance_name != nullptr) { } else { } - instance_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_name); + instance_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), instance_name); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.PeerRequest.instance_name) } @@ -3864,85 +4505,109 @@ inline void PeerRequest::set_allocated_instance_name(::std::string* instance_nam // string peer_name = 1; inline void PeerResult_PeerDimensions::clear_peer_name() { - peer_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + peer_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& PeerResult_PeerDimensions::peer_name() const { +inline const std::string& PeerResult_PeerDimensions::peer_name() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) + return _internal_peer_name(); +} +inline void PeerResult_PeerDimensions::set_peer_name(const std::string& value) { + _internal_set_peer_name(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) +} +inline std::string* PeerResult_PeerDimensions::mutable_peer_name() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) + return _internal_mutable_peer_name(); +} +inline const std::string& PeerResult_PeerDimensions::_internal_peer_name() const { return peer_name_.GetNoArena(); } -inline void PeerResult_PeerDimensions::set_peer_name(const ::std::string& value) { +inline void PeerResult_PeerDimensions::_internal_set_peer_name(const std::string& value) { - peer_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) + peer_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void PeerResult_PeerDimensions::set_peer_name(::std::string&& value) { +inline void PeerResult_PeerDimensions::set_peer_name(std::string&& value) { peer_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) } -#endif inline void PeerResult_PeerDimensions::set_peer_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - peer_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + peer_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) } inline void PeerResult_PeerDimensions::set_peer_name(const char* value, size_t size) { - peer_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + peer_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) } -inline ::std::string* PeerResult_PeerDimensions::mutable_peer_name() { +inline std::string* PeerResult_PeerDimensions::_internal_mutable_peer_name() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) - return peer_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return peer_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* PeerResult_PeerDimensions::release_peer_name() { +inline std::string* PeerResult_PeerDimensions::release_peer_name() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) - return peer_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return peer_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void PeerResult_PeerDimensions::set_allocated_peer_name(::std::string* peer_name) { +inline void PeerResult_PeerDimensions::set_allocated_peer_name(std::string* peer_name) { if (peer_name != nullptr) { } else { } - peer_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), peer_name); + peer_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), peer_name); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.PeerResult.PeerDimensions.peer_name) } // repeated int32 dimensions = 2; -inline int PeerResult_PeerDimensions::dimensions_size() const { +inline int PeerResult_PeerDimensions::_internal_dimensions_size() const { return dimensions_.size(); } +inline int PeerResult_PeerDimensions::dimensions_size() const { + return _internal_dimensions_size(); +} inline void PeerResult_PeerDimensions::clear_dimensions() { dimensions_.Clear(); } -inline ::google::protobuf::int32 PeerResult_PeerDimensions::dimensions(int index) const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.PeerDimensions.dimensions) +inline ::PROTOBUF_NAMESPACE_ID::int32 PeerResult_PeerDimensions::_internal_dimensions(int index) const { return dimensions_.Get(index); } -inline void PeerResult_PeerDimensions::set_dimensions(int index, ::google::protobuf::int32 value) { +inline ::PROTOBUF_NAMESPACE_ID::int32 PeerResult_PeerDimensions::dimensions(int index) const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.PeerDimensions.dimensions) + return _internal_dimensions(index); +} +inline void PeerResult_PeerDimensions::set_dimensions(int index, ::PROTOBUF_NAMESPACE_ID::int32 value) { dimensions_.Set(index, value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.PeerDimensions.dimensions) } -inline void PeerResult_PeerDimensions::add_dimensions(::google::protobuf::int32 value) { +inline void PeerResult_PeerDimensions::_internal_add_dimensions(::PROTOBUF_NAMESPACE_ID::int32 value) { dimensions_.Add(value); +} +inline void PeerResult_PeerDimensions::add_dimensions(::PROTOBUF_NAMESPACE_ID::int32 value) { + _internal_add_dimensions(value); // @@protoc_insertion_point(field_add:muscle_manager_protocol.PeerResult.PeerDimensions.dimensions) } -inline const ::google::protobuf::RepeatedField< ::google::protobuf::int32 >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& +PeerResult_PeerDimensions::_internal_dimensions() const { + return dimensions_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >& PeerResult_PeerDimensions::dimensions() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.PeerResult.PeerDimensions.dimensions) - return dimensions_; + return _internal_dimensions(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* +PeerResult_PeerDimensions::_internal_mutable_dimensions() { + return &dimensions_; } -inline ::google::protobuf::RepeatedField< ::google::protobuf::int32 >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< ::PROTOBUF_NAMESPACE_ID::int32 >* PeerResult_PeerDimensions::mutable_dimensions() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.PeerResult.PeerDimensions.dimensions) - return &dimensions_; + return _internal_mutable_dimensions(); } // ------------------------------------------------------------------- @@ -3951,82 +4616,97 @@ PeerResult_PeerDimensions::mutable_dimensions() { // string instance_name = 1; inline void PeerResult_PeerLocations::clear_instance_name() { - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& PeerResult_PeerLocations::instance_name() const { +inline const std::string& PeerResult_PeerLocations::instance_name() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) + return _internal_instance_name(); +} +inline void PeerResult_PeerLocations::set_instance_name(const std::string& value) { + _internal_set_instance_name(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) +} +inline std::string* PeerResult_PeerLocations::mutable_instance_name() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) + return _internal_mutable_instance_name(); +} +inline const std::string& PeerResult_PeerLocations::_internal_instance_name() const { return instance_name_.GetNoArena(); } -inline void PeerResult_PeerLocations::set_instance_name(const ::std::string& value) { +inline void PeerResult_PeerLocations::_internal_set_instance_name(const std::string& value) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void PeerResult_PeerLocations::set_instance_name(::std::string&& value) { +inline void PeerResult_PeerLocations::set_instance_name(std::string&& value) { instance_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) } -#endif inline void PeerResult_PeerLocations::set_instance_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) } inline void PeerResult_PeerLocations::set_instance_name(const char* value, size_t size) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) } -inline ::std::string* PeerResult_PeerLocations::mutable_instance_name() { +inline std::string* PeerResult_PeerLocations::_internal_mutable_instance_name() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) - return instance_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* PeerResult_PeerLocations::release_instance_name() { +inline std::string* PeerResult_PeerLocations::release_instance_name() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) - return instance_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void PeerResult_PeerLocations::set_allocated_instance_name(::std::string* instance_name) { +inline void PeerResult_PeerLocations::set_allocated_instance_name(std::string* instance_name) { if (instance_name != nullptr) { } else { } - instance_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_name); + instance_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), instance_name); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.PeerResult.PeerLocations.instance_name) } // repeated string locations = 2; -inline int PeerResult_PeerLocations::locations_size() const { +inline int PeerResult_PeerLocations::_internal_locations_size() const { return locations_.size(); } +inline int PeerResult_PeerLocations::locations_size() const { + return _internal_locations_size(); +} inline void PeerResult_PeerLocations::clear_locations() { locations_.Clear(); } -inline const ::std::string& PeerResult_PeerLocations::locations(int index) const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.PeerLocations.locations) +inline std::string* PeerResult_PeerLocations::add_locations() { + // @@protoc_insertion_point(field_add_mutable:muscle_manager_protocol.PeerResult.PeerLocations.locations) + return _internal_add_locations(); +} +inline const std::string& PeerResult_PeerLocations::_internal_locations(int index) const { return locations_.Get(index); } -inline ::std::string* PeerResult_PeerLocations::mutable_locations(int index) { +inline const std::string& PeerResult_PeerLocations::locations(int index) const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.PeerLocations.locations) + return _internal_locations(index); +} +inline std::string* PeerResult_PeerLocations::mutable_locations(int index) { // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.PeerLocations.locations) return locations_.Mutable(index); } -inline void PeerResult_PeerLocations::set_locations(int index, const ::std::string& value) { +inline void PeerResult_PeerLocations::set_locations(int index, const std::string& value) { // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.PeerLocations.locations) locations_.Mutable(index)->assign(value); } -#if LANG_CXX11 -inline void PeerResult_PeerLocations::set_locations(int index, ::std::string&& value) { +inline void PeerResult_PeerLocations::set_locations(int index, std::string&& value) { // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.PeerLocations.locations) locations_.Mutable(index)->assign(std::move(value)); } -#endif inline void PeerResult_PeerLocations::set_locations(int index, const char* value) { GOOGLE_DCHECK(value != nullptr); locations_.Mutable(index)->assign(value); @@ -4037,20 +4717,17 @@ inline void PeerResult_PeerLocations::set_locations(int index, const char* value reinterpret_cast(value), size); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.PeerResult.PeerLocations.locations) } -inline ::std::string* PeerResult_PeerLocations::add_locations() { - // @@protoc_insertion_point(field_add_mutable:muscle_manager_protocol.PeerResult.PeerLocations.locations) +inline std::string* PeerResult_PeerLocations::_internal_add_locations() { return locations_.Add(); } -inline void PeerResult_PeerLocations::add_locations(const ::std::string& value) { +inline void PeerResult_PeerLocations::add_locations(const std::string& value) { locations_.Add()->assign(value); // @@protoc_insertion_point(field_add:muscle_manager_protocol.PeerResult.PeerLocations.locations) } -#if LANG_CXX11 -inline void PeerResult_PeerLocations::add_locations(::std::string&& value) { +inline void PeerResult_PeerLocations::add_locations(std::string&& value) { locations_.Add(std::move(value)); // @@protoc_insertion_point(field_add:muscle_manager_protocol.PeerResult.PeerLocations.locations) } -#endif inline void PeerResult_PeerLocations::add_locations(const char* value) { GOOGLE_DCHECK(value != nullptr); locations_.Add()->assign(value); @@ -4060,12 +4737,12 @@ inline void PeerResult_PeerLocations::add_locations(const char* value, size_t si locations_.Add()->assign(reinterpret_cast(value), size); // @@protoc_insertion_point(field_add_pointer:muscle_manager_protocol.PeerResult.PeerLocations.locations) } -inline const ::google::protobuf::RepeatedPtrField<::std::string>& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& PeerResult_PeerLocations::locations() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.PeerResult.PeerLocations.locations) return locations_; } -inline ::google::protobuf::RepeatedPtrField<::std::string>* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* PeerResult_PeerLocations::mutable_locations() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.PeerResult.PeerLocations.locations) return &locations_; @@ -4079,73 +4756,89 @@ PeerResult_PeerLocations::mutable_locations() { inline void PeerResult::clear_status() { status_ = 0; } +inline ::muscle_manager_protocol::ResultStatus PeerResult::_internal_status() const { + return static_cast< ::muscle_manager_protocol::ResultStatus >(status_); +} inline ::muscle_manager_protocol::ResultStatus PeerResult::status() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.status) - return static_cast< ::muscle_manager_protocol::ResultStatus >(status_); + return _internal_status(); } -inline void PeerResult::set_status(::muscle_manager_protocol::ResultStatus value) { +inline void PeerResult::_internal_set_status(::muscle_manager_protocol::ResultStatus value) { status_ = value; +} +inline void PeerResult::set_status(::muscle_manager_protocol::ResultStatus value) { + _internal_set_status(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.status) } // string error_message = 2; inline void PeerResult::clear_error_message() { - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& PeerResult::error_message() const { +inline const std::string& PeerResult::error_message() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.error_message) + return _internal_error_message(); +} +inline void PeerResult::set_error_message(const std::string& value) { + _internal_set_error_message(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.error_message) +} +inline std::string* PeerResult::mutable_error_message() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.error_message) + return _internal_mutable_error_message(); +} +inline const std::string& PeerResult::_internal_error_message() const { return error_message_.GetNoArena(); } -inline void PeerResult::set_error_message(const ::std::string& value) { +inline void PeerResult::_internal_set_error_message(const std::string& value) { - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.PeerResult.error_message) + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void PeerResult::set_error_message(::std::string&& value) { +inline void PeerResult::set_error_message(std::string&& value) { error_message_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.PeerResult.error_message) } -#endif inline void PeerResult::set_error_message(const char* value) { GOOGLE_DCHECK(value != nullptr); - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.PeerResult.error_message) } inline void PeerResult::set_error_message(const char* value, size_t size) { - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.PeerResult.error_message) } -inline ::std::string* PeerResult::mutable_error_message() { +inline std::string* PeerResult::_internal_mutable_error_message() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.error_message) - return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_message_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* PeerResult::release_error_message() { +inline std::string* PeerResult::release_error_message() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.PeerResult.error_message) - return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_message_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void PeerResult::set_allocated_error_message(::std::string* error_message) { +inline void PeerResult::set_allocated_error_message(std::string* error_message) { if (error_message != nullptr) { } else { } - error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + error_message_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error_message); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.PeerResult.error_message) } // repeated .muscle_manager_protocol.Conduit conduits = 3; -inline int PeerResult::conduits_size() const { +inline int PeerResult::_internal_conduits_size() const { return conduits_.size(); } +inline int PeerResult::conduits_size() const { + return _internal_conduits_size(); +} inline void PeerResult::clear_conduits() { conduits_.Clear(); } @@ -4153,29 +4846,38 @@ inline ::muscle_manager_protocol::Conduit* PeerResult::mutable_conduits(int inde // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.conduits) return conduits_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Conduit >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Conduit >* PeerResult::mutable_conduits() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.PeerResult.conduits) return &conduits_; } +inline const ::muscle_manager_protocol::Conduit& PeerResult::_internal_conduits(int index) const { + return conduits_.Get(index); +} inline const ::muscle_manager_protocol::Conduit& PeerResult::conduits(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.conduits) - return conduits_.Get(index); + return _internal_conduits(index); +} +inline ::muscle_manager_protocol::Conduit* PeerResult::_internal_add_conduits() { + return conduits_.Add(); } inline ::muscle_manager_protocol::Conduit* PeerResult::add_conduits() { // @@protoc_insertion_point(field_add:muscle_manager_protocol.PeerResult.conduits) - return conduits_.Add(); + return _internal_add_conduits(); } -inline const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Conduit >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Conduit >& PeerResult::conduits() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.PeerResult.conduits) return conduits_; } // repeated .muscle_manager_protocol.PeerResult.PeerDimensions peer_dimensions = 4; -inline int PeerResult::peer_dimensions_size() const { +inline int PeerResult::_internal_peer_dimensions_size() const { return peer_dimensions_.size(); } +inline int PeerResult::peer_dimensions_size() const { + return _internal_peer_dimensions_size(); +} inline void PeerResult::clear_peer_dimensions() { peer_dimensions_.Clear(); } @@ -4183,29 +4885,38 @@ inline ::muscle_manager_protocol::PeerResult_PeerDimensions* PeerResult::mutable // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.peer_dimensions) return peer_dimensions_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >* PeerResult::mutable_peer_dimensions() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.PeerResult.peer_dimensions) return &peer_dimensions_; } +inline const ::muscle_manager_protocol::PeerResult_PeerDimensions& PeerResult::_internal_peer_dimensions(int index) const { + return peer_dimensions_.Get(index); +} inline const ::muscle_manager_protocol::PeerResult_PeerDimensions& PeerResult::peer_dimensions(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.peer_dimensions) - return peer_dimensions_.Get(index); + return _internal_peer_dimensions(index); +} +inline ::muscle_manager_protocol::PeerResult_PeerDimensions* PeerResult::_internal_add_peer_dimensions() { + return peer_dimensions_.Add(); } inline ::muscle_manager_protocol::PeerResult_PeerDimensions* PeerResult::add_peer_dimensions() { // @@protoc_insertion_point(field_add:muscle_manager_protocol.PeerResult.peer_dimensions) - return peer_dimensions_.Add(); + return _internal_add_peer_dimensions(); } -inline const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerDimensions >& PeerResult::peer_dimensions() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.PeerResult.peer_dimensions) return peer_dimensions_; } // repeated .muscle_manager_protocol.PeerResult.PeerLocations peer_locations = 5; -inline int PeerResult::peer_locations_size() const { +inline int PeerResult::_internal_peer_locations_size() const { return peer_locations_.size(); } +inline int PeerResult::peer_locations_size() const { + return _internal_peer_locations_size(); +} inline void PeerResult::clear_peer_locations() { peer_locations_.Clear(); } @@ -4213,20 +4924,26 @@ inline ::muscle_manager_protocol::PeerResult_PeerLocations* PeerResult::mutable_ // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.PeerResult.peer_locations) return peer_locations_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >* PeerResult::mutable_peer_locations() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.PeerResult.peer_locations) return &peer_locations_; } +inline const ::muscle_manager_protocol::PeerResult_PeerLocations& PeerResult::_internal_peer_locations(int index) const { + return peer_locations_.Get(index); +} inline const ::muscle_manager_protocol::PeerResult_PeerLocations& PeerResult::peer_locations(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.PeerResult.peer_locations) - return peer_locations_.Get(index); + return _internal_peer_locations(index); +} +inline ::muscle_manager_protocol::PeerResult_PeerLocations* PeerResult::_internal_add_peer_locations() { + return peer_locations_.Add(); } inline ::muscle_manager_protocol::PeerResult_PeerLocations* PeerResult::add_peer_locations() { // @@protoc_insertion_point(field_add:muscle_manager_protocol.PeerResult.peer_locations) - return peer_locations_.Add(); + return _internal_add_peer_locations(); } -inline const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::PeerResult_PeerLocations >& PeerResult::peer_locations() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.PeerResult.peer_locations) return peer_locations_; @@ -4237,33 +4954,50 @@ PeerResult::peer_locations() const { // ListOfDouble // repeated double values = 1; -inline int ListOfDouble::values_size() const { +inline int ListOfDouble::_internal_values_size() const { return values_.size(); } +inline int ListOfDouble::values_size() const { + return _internal_values_size(); +} inline void ListOfDouble::clear_values() { values_.Clear(); } +inline double ListOfDouble::_internal_values(int index) const { + return values_.Get(index); +} inline double ListOfDouble::values(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.ListOfDouble.values) - return values_.Get(index); + return _internal_values(index); } inline void ListOfDouble::set_values(int index, double value) { values_.Set(index, value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.ListOfDouble.values) } -inline void ListOfDouble::add_values(double value) { +inline void ListOfDouble::_internal_add_values(double value) { values_.Add(value); +} +inline void ListOfDouble::add_values(double value) { + _internal_add_values(value); // @@protoc_insertion_point(field_add:muscle_manager_protocol.ListOfDouble.values) } -inline const ::google::protobuf::RepeatedField< double >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& +ListOfDouble::_internal_values() const { + return values_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >& ListOfDouble::values() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.ListOfDouble.values) - return values_; + return _internal_values(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* +ListOfDouble::_internal_mutable_values() { + return &values_; } -inline ::google::protobuf::RepeatedField< double >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< double >* ListOfDouble::mutable_values() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.ListOfDouble.values) - return &values_; + return _internal_mutable_values(); } // ------------------------------------------------------------------- @@ -4271,9 +5005,12 @@ ListOfDouble::mutable_values() { // ListOfListOfDouble // repeated .muscle_manager_protocol.ListOfDouble values = 1; -inline int ListOfListOfDouble::values_size() const { +inline int ListOfListOfDouble::_internal_values_size() const { return values_.size(); } +inline int ListOfListOfDouble::values_size() const { + return _internal_values_size(); +} inline void ListOfListOfDouble::clear_values() { values_.Clear(); } @@ -4281,20 +5018,26 @@ inline ::muscle_manager_protocol::ListOfDouble* ListOfListOfDouble::mutable_valu // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.ListOfListOfDouble.values) return values_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >* ListOfListOfDouble::mutable_values() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.ListOfListOfDouble.values) return &values_; } +inline const ::muscle_manager_protocol::ListOfDouble& ListOfListOfDouble::_internal_values(int index) const { + return values_.Get(index); +} inline const ::muscle_manager_protocol::ListOfDouble& ListOfListOfDouble::values(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.ListOfListOfDouble.values) - return values_.Get(index); + return _internal_values(index); +} +inline ::muscle_manager_protocol::ListOfDouble* ListOfListOfDouble::_internal_add_values() { + return values_.Add(); } inline ::muscle_manager_protocol::ListOfDouble* ListOfListOfDouble::add_values() { // @@protoc_insertion_point(field_add:muscle_manager_protocol.ListOfListOfDouble.values) - return values_.Add(); + return _internal_add_values(); } -inline const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::ListOfDouble >& ListOfListOfDouble::values() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.ListOfListOfDouble.values) return values_; @@ -4306,54 +5049,61 @@ ListOfListOfDouble::values() const { // string name = 1; inline void Setting::clear_name() { - name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Setting::name() const { +inline const std::string& Setting::name() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.name) + return _internal_name(); +} +inline void Setting::set_name(const std::string& value) { + _internal_set_name(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.name) +} +inline std::string* Setting::mutable_name() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.name) + return _internal_mutable_name(); +} +inline const std::string& Setting::_internal_name() const { return name_.GetNoArena(); } -inline void Setting::set_name(const ::std::string& value) { +inline void Setting::_internal_set_name(const std::string& value) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.name) + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void Setting::set_name(::std::string&& value) { +inline void Setting::set_name(std::string&& value) { name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.Setting.name) } -#endif inline void Setting::set_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.Setting.name) } inline void Setting::set_name(const char* value, size_t size) { - name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.Setting.name) } -inline ::std::string* Setting::mutable_name() { +inline std::string* Setting::_internal_mutable_name() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.name) - return name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Setting::release_name() { +inline std::string* Setting::release_name() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.Setting.name) - return name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Setting::set_allocated_name(::std::string* name) { +inline void Setting::set_allocated_name(std::string* name) { if (name != nullptr) { } else { } - name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), name); + name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), name); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.Setting.name) } @@ -4361,66 +5111,79 @@ inline void Setting::set_allocated_name(::std::string* name) { inline void Setting::clear_value_type() { value_type_ = 0; } +inline ::muscle_manager_protocol::SettingValueType Setting::_internal_value_type() const { + return static_cast< ::muscle_manager_protocol::SettingValueType >(value_type_); +} inline ::muscle_manager_protocol::SettingValueType Setting::value_type() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_type) - return static_cast< ::muscle_manager_protocol::SettingValueType >(value_type_); + return _internal_value_type(); } -inline void Setting::set_value_type(::muscle_manager_protocol::SettingValueType value) { +inline void Setting::_internal_set_value_type(::muscle_manager_protocol::SettingValueType value) { value_type_ = value; +} +inline void Setting::set_value_type(::muscle_manager_protocol::SettingValueType value) { + _internal_set_value_type(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.value_type) } // string value_string = 3; inline void Setting::clear_value_string() { - value_string_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + value_string_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& Setting::value_string() const { +inline const std::string& Setting::value_string() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_string) + return _internal_value_string(); +} +inline void Setting::set_value_string(const std::string& value) { + _internal_set_value_string(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.value_string) +} +inline std::string* Setting::mutable_value_string() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.value_string) + return _internal_mutable_value_string(); +} +inline const std::string& Setting::_internal_value_string() const { return value_string_.GetNoArena(); } -inline void Setting::set_value_string(const ::std::string& value) { +inline void Setting::_internal_set_value_string(const std::string& value) { - value_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.value_string) + value_string_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void Setting::set_value_string(::std::string&& value) { +inline void Setting::set_value_string(std::string&& value) { value_string_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.Setting.value_string) } -#endif inline void Setting::set_value_string(const char* value) { GOOGLE_DCHECK(value != nullptr); - value_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + value_string_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.Setting.value_string) } inline void Setting::set_value_string(const char* value, size_t size) { - value_string_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + value_string_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.Setting.value_string) } -inline ::std::string* Setting::mutable_value_string() { +inline std::string* Setting::_internal_mutable_value_string() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.value_string) - return value_string_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return value_string_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* Setting::release_value_string() { +inline std::string* Setting::release_value_string() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.Setting.value_string) - return value_string_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return value_string_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void Setting::set_allocated_value_string(::std::string* value_string) { +inline void Setting::set_allocated_value_string(std::string* value_string) { if (value_string != nullptr) { } else { } - value_string_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value_string); + value_string_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value_string); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.Setting.value_string) } @@ -4428,13 +5191,19 @@ inline void Setting::set_allocated_value_string(::std::string* value_string) { inline void Setting::clear_value_int() { value_int_ = PROTOBUF_LONGLONG(0); } -inline ::google::protobuf::int64 Setting::value_int() const { - // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_int) +inline ::PROTOBUF_NAMESPACE_ID::int64 Setting::_internal_value_int() const { return value_int_; } -inline void Setting::set_value_int(::google::protobuf::int64 value) { +inline ::PROTOBUF_NAMESPACE_ID::int64 Setting::value_int() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_int) + return _internal_value_int(); +} +inline void Setting::_internal_set_value_int(::PROTOBUF_NAMESPACE_ID::int64 value) { value_int_ = value; +} +inline void Setting::set_value_int(::PROTOBUF_NAMESPACE_ID::int64 value) { + _internal_set_value_int(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.value_int) } @@ -4442,13 +5211,19 @@ inline void Setting::set_value_int(::google::protobuf::int64 value) { inline void Setting::clear_value_float() { value_float_ = 0; } +inline double Setting::_internal_value_float() const { + return value_float_; +} inline double Setting::value_float() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_float) - return value_float_; + return _internal_value_float(); } -inline void Setting::set_value_float(double value) { +inline void Setting::_internal_set_value_float(double value) { value_float_ = value; +} +inline void Setting::set_value_float(double value) { + _internal_set_value_float(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.value_float) } @@ -4456,32 +5231,44 @@ inline void Setting::set_value_float(double value) { inline void Setting::clear_value_bool() { value_bool_ = false; } +inline bool Setting::_internal_value_bool() const { + return value_bool_; +} inline bool Setting::value_bool() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_bool) - return value_bool_; + return _internal_value_bool(); } -inline void Setting::set_value_bool(bool value) { +inline void Setting::_internal_set_value_bool(bool value) { value_bool_ = value; +} +inline void Setting::set_value_bool(bool value) { + _internal_set_value_bool(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.Setting.value_bool) } // .muscle_manager_protocol.ListOfDouble value_list_float = 7; -inline bool Setting::has_value_list_float() const { +inline bool Setting::_internal_has_value_list_float() const { return this != internal_default_instance() && value_list_float_ != nullptr; } +inline bool Setting::has_value_list_float() const { + return _internal_has_value_list_float(); +} inline void Setting::clear_value_list_float() { if (GetArenaNoVirtual() == nullptr && value_list_float_ != nullptr) { delete value_list_float_; } value_list_float_ = nullptr; } -inline const ::muscle_manager_protocol::ListOfDouble& Setting::value_list_float() const { +inline const ::muscle_manager_protocol::ListOfDouble& Setting::_internal_value_list_float() const { const ::muscle_manager_protocol::ListOfDouble* p = value_list_float_; - // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_list_float) return p != nullptr ? *p : *reinterpret_cast( &::muscle_manager_protocol::_ListOfDouble_default_instance_); } +inline const ::muscle_manager_protocol::ListOfDouble& Setting::value_list_float() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_list_float) + return _internal_value_list_float(); +} inline ::muscle_manager_protocol::ListOfDouble* Setting::release_value_list_float() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.Setting.value_list_float) @@ -4489,24 +5276,27 @@ inline ::muscle_manager_protocol::ListOfDouble* Setting::release_value_list_floa value_list_float_ = nullptr; return temp; } -inline ::muscle_manager_protocol::ListOfDouble* Setting::mutable_value_list_float() { +inline ::muscle_manager_protocol::ListOfDouble* Setting::_internal_mutable_value_list_float() { if (value_list_float_ == nullptr) { auto* p = CreateMaybeMessage<::muscle_manager_protocol::ListOfDouble>(GetArenaNoVirtual()); value_list_float_ = p; } - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.value_list_float) return value_list_float_; } +inline ::muscle_manager_protocol::ListOfDouble* Setting::mutable_value_list_float() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.value_list_float) + return _internal_mutable_value_list_float(); +} inline void Setting::set_allocated_value_list_float(::muscle_manager_protocol::ListOfDouble* value_list_float) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete value_list_float_; } if (value_list_float) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - value_list_float = ::google::protobuf::internal::GetOwnedMessage( + value_list_float = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, value_list_float, submessage_arena); } @@ -4518,21 +5308,27 @@ inline void Setting::set_allocated_value_list_float(::muscle_manager_protocol::L } // .muscle_manager_protocol.ListOfListOfDouble value_list_list_float = 8; -inline bool Setting::has_value_list_list_float() const { +inline bool Setting::_internal_has_value_list_list_float() const { return this != internal_default_instance() && value_list_list_float_ != nullptr; } +inline bool Setting::has_value_list_list_float() const { + return _internal_has_value_list_list_float(); +} inline void Setting::clear_value_list_list_float() { if (GetArenaNoVirtual() == nullptr && value_list_list_float_ != nullptr) { delete value_list_list_float_; } value_list_list_float_ = nullptr; } -inline const ::muscle_manager_protocol::ListOfListOfDouble& Setting::value_list_list_float() const { +inline const ::muscle_manager_protocol::ListOfListOfDouble& Setting::_internal_value_list_list_float() const { const ::muscle_manager_protocol::ListOfListOfDouble* p = value_list_list_float_; - // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_list_list_float) return p != nullptr ? *p : *reinterpret_cast( &::muscle_manager_protocol::_ListOfListOfDouble_default_instance_); } +inline const ::muscle_manager_protocol::ListOfListOfDouble& Setting::value_list_list_float() const { + // @@protoc_insertion_point(field_get:muscle_manager_protocol.Setting.value_list_list_float) + return _internal_value_list_list_float(); +} inline ::muscle_manager_protocol::ListOfListOfDouble* Setting::release_value_list_list_float() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.Setting.value_list_list_float) @@ -4540,24 +5336,27 @@ inline ::muscle_manager_protocol::ListOfListOfDouble* Setting::release_value_lis value_list_list_float_ = nullptr; return temp; } -inline ::muscle_manager_protocol::ListOfListOfDouble* Setting::mutable_value_list_list_float() { +inline ::muscle_manager_protocol::ListOfListOfDouble* Setting::_internal_mutable_value_list_list_float() { if (value_list_list_float_ == nullptr) { auto* p = CreateMaybeMessage<::muscle_manager_protocol::ListOfListOfDouble>(GetArenaNoVirtual()); value_list_list_float_ = p; } - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.value_list_list_float) return value_list_list_float_; } +inline ::muscle_manager_protocol::ListOfListOfDouble* Setting::mutable_value_list_list_float() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.Setting.value_list_list_float) + return _internal_mutable_value_list_list_float(); +} inline void Setting::set_allocated_value_list_list_float(::muscle_manager_protocol::ListOfListOfDouble* value_list_list_float) { - ::google::protobuf::Arena* message_arena = GetArenaNoVirtual(); + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaNoVirtual(); if (message_arena == nullptr) { delete value_list_list_float_; } if (value_list_list_float) { - ::google::protobuf::Arena* submessage_arena = nullptr; + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = nullptr; if (message_arena != submessage_arena) { - value_list_list_float = ::google::protobuf::internal::GetOwnedMessage( + value_list_list_float = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( message_arena, value_list_list_float, submessage_arena); } @@ -4577,9 +5376,12 @@ inline void Setting::set_allocated_value_list_list_float(::muscle_manager_protoc // SettingsResult // repeated .muscle_manager_protocol.Setting setting_values = 1; -inline int SettingsResult::setting_values_size() const { +inline int SettingsResult::_internal_setting_values_size() const { return setting_values_.size(); } +inline int SettingsResult::setting_values_size() const { + return _internal_setting_values_size(); +} inline void SettingsResult::clear_setting_values() { setting_values_.Clear(); } @@ -4587,20 +5389,26 @@ inline ::muscle_manager_protocol::Setting* SettingsResult::mutable_setting_value // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.SettingsResult.setting_values) return setting_values_.Mutable(index); } -inline ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Setting >* +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Setting >* SettingsResult::mutable_setting_values() { // @@protoc_insertion_point(field_mutable_list:muscle_manager_protocol.SettingsResult.setting_values) return &setting_values_; } +inline const ::muscle_manager_protocol::Setting& SettingsResult::_internal_setting_values(int index) const { + return setting_values_.Get(index); +} inline const ::muscle_manager_protocol::Setting& SettingsResult::setting_values(int index) const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.SettingsResult.setting_values) - return setting_values_.Get(index); + return _internal_setting_values(index); +} +inline ::muscle_manager_protocol::Setting* SettingsResult::_internal_add_setting_values() { + return setting_values_.Add(); } inline ::muscle_manager_protocol::Setting* SettingsResult::add_setting_values() { // @@protoc_insertion_point(field_add:muscle_manager_protocol.SettingsResult.setting_values) - return setting_values_.Add(); + return _internal_add_setting_values(); } -inline const ::google::protobuf::RepeatedPtrField< ::muscle_manager_protocol::Setting >& +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::muscle_manager_protocol::Setting >& SettingsResult::setting_values() const { // @@protoc_insertion_point(field_list:muscle_manager_protocol.SettingsResult.setting_values) return setting_values_; @@ -4612,54 +5420,61 @@ SettingsResult::setting_values() const { // string instance_name = 1; inline void DeregistrationRequest::clear_instance_name() { - instance_name_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + instance_name_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& DeregistrationRequest::instance_name() const { +inline const std::string& DeregistrationRequest::instance_name() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.DeregistrationRequest.instance_name) + return _internal_instance_name(); +} +inline void DeregistrationRequest::set_instance_name(const std::string& value) { + _internal_set_instance_name(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.DeregistrationRequest.instance_name) +} +inline std::string* DeregistrationRequest::mutable_instance_name() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.DeregistrationRequest.instance_name) + return _internal_mutable_instance_name(); +} +inline const std::string& DeregistrationRequest::_internal_instance_name() const { return instance_name_.GetNoArena(); } -inline void DeregistrationRequest::set_instance_name(const ::std::string& value) { +inline void DeregistrationRequest::_internal_set_instance_name(const std::string& value) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.DeregistrationRequest.instance_name) + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void DeregistrationRequest::set_instance_name(::std::string&& value) { +inline void DeregistrationRequest::set_instance_name(std::string&& value) { instance_name_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.DeregistrationRequest.instance_name) } -#endif inline void DeregistrationRequest::set_instance_name(const char* value) { GOOGLE_DCHECK(value != nullptr); - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.DeregistrationRequest.instance_name) } inline void DeregistrationRequest::set_instance_name(const char* value, size_t size) { - instance_name_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + instance_name_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.DeregistrationRequest.instance_name) } -inline ::std::string* DeregistrationRequest::mutable_instance_name() { +inline std::string* DeregistrationRequest::_internal_mutable_instance_name() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.DeregistrationRequest.instance_name) - return instance_name_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* DeregistrationRequest::release_instance_name() { +inline std::string* DeregistrationRequest::release_instance_name() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.DeregistrationRequest.instance_name) - return instance_name_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return instance_name_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void DeregistrationRequest::set_allocated_instance_name(::std::string* instance_name) { +inline void DeregistrationRequest::set_allocated_instance_name(std::string* instance_name) { if (instance_name != nullptr) { } else { } - instance_name_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), instance_name); + instance_name_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), instance_name); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.DeregistrationRequest.instance_name) } @@ -4671,66 +5486,79 @@ inline void DeregistrationRequest::set_allocated_instance_name(::std::string* in inline void DeregistrationResult::clear_status() { status_ = 0; } +inline ::muscle_manager_protocol::ResultStatus DeregistrationResult::_internal_status() const { + return static_cast< ::muscle_manager_protocol::ResultStatus >(status_); +} inline ::muscle_manager_protocol::ResultStatus DeregistrationResult::status() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.DeregistrationResult.status) - return static_cast< ::muscle_manager_protocol::ResultStatus >(status_); + return _internal_status(); } -inline void DeregistrationResult::set_status(::muscle_manager_protocol::ResultStatus value) { +inline void DeregistrationResult::_internal_set_status(::muscle_manager_protocol::ResultStatus value) { status_ = value; +} +inline void DeregistrationResult::set_status(::muscle_manager_protocol::ResultStatus value) { + _internal_set_status(value); // @@protoc_insertion_point(field_set:muscle_manager_protocol.DeregistrationResult.status) } // string error_message = 2; inline void DeregistrationResult::clear_error_message() { - error_message_.ClearToEmptyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + error_message_.ClearToEmptyNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline const ::std::string& DeregistrationResult::error_message() const { +inline const std::string& DeregistrationResult::error_message() const { // @@protoc_insertion_point(field_get:muscle_manager_protocol.DeregistrationResult.error_message) + return _internal_error_message(); +} +inline void DeregistrationResult::set_error_message(const std::string& value) { + _internal_set_error_message(value); + // @@protoc_insertion_point(field_set:muscle_manager_protocol.DeregistrationResult.error_message) +} +inline std::string* DeregistrationResult::mutable_error_message() { + // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.DeregistrationResult.error_message) + return _internal_mutable_error_message(); +} +inline const std::string& DeregistrationResult::_internal_error_message() const { return error_message_.GetNoArena(); } -inline void DeregistrationResult::set_error_message(const ::std::string& value) { +inline void DeregistrationResult::_internal_set_error_message(const std::string& value) { - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), value); - // @@protoc_insertion_point(field_set:muscle_manager_protocol.DeregistrationResult.error_message) + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), value); } -#if LANG_CXX11 -inline void DeregistrationResult::set_error_message(::std::string&& value) { +inline void DeregistrationResult::set_error_message(std::string&& value) { error_message_.SetNoArena( - &::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); + &::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::move(value)); // @@protoc_insertion_point(field_set_rvalue:muscle_manager_protocol.DeregistrationResult.error_message) } -#endif inline void DeregistrationResult::set_error_message(const char* value) { GOOGLE_DCHECK(value != nullptr); - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(value)); // @@protoc_insertion_point(field_set_char:muscle_manager_protocol.DeregistrationResult.error_message) } inline void DeregistrationResult::set_error_message(const char* value, size_t size) { - error_message_.SetNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), + error_message_.SetNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), ::std::string(reinterpret_cast(value), size)); // @@protoc_insertion_point(field_set_pointer:muscle_manager_protocol.DeregistrationResult.error_message) } -inline ::std::string* DeregistrationResult::mutable_error_message() { +inline std::string* DeregistrationResult::_internal_mutable_error_message() { - // @@protoc_insertion_point(field_mutable:muscle_manager_protocol.DeregistrationResult.error_message) - return error_message_.MutableNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_message_.MutableNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline ::std::string* DeregistrationResult::release_error_message() { +inline std::string* DeregistrationResult::release_error_message() { // @@protoc_insertion_point(field_release:muscle_manager_protocol.DeregistrationResult.error_message) - return error_message_.ReleaseNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited()); + return error_message_.ReleaseNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited()); } -inline void DeregistrationResult::set_allocated_error_message(::std::string* error_message) { +inline void DeregistrationResult::set_allocated_error_message(std::string* error_message) { if (error_message != nullptr) { } else { } - error_message_.SetAllocatedNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), error_message); + error_message_.SetAllocatedNoArena(&::PROTOBUF_NAMESPACE_ID::internal::GetEmptyStringAlreadyInited(), error_message); // @@protoc_insertion_point(field_set_allocated:muscle_manager_protocol.DeregistrationResult.error_message) } @@ -4780,8 +5608,7 @@ inline void DeregistrationResult::set_allocated_error_message(::std::string* err } // namespace muscle_manager_protocol -namespace google { -namespace protobuf { +PROTOBUF_NAMESPACE_OPEN template <> struct is_proto_enum< ::muscle_manager_protocol::ResultStatus> : ::std::true_type {}; template <> @@ -4809,10 +5636,9 @@ inline const EnumDescriptor* GetEnumDescriptor< ::muscle_manager_protocol::Setti return ::muscle_manager_protocol::SettingValueType_descriptor(); } -} // namespace protobuf -} // namespace google +PROTOBUF_NAMESPACE_CLOSE // @@protoc_insertion_point(global_scope) #include -#endif // PROTOBUF_INCLUDED_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_muscle_5fmanager_5fprotocol_2fmuscle_5fmanager_5fprotocol_2eproto diff --git a/libmuscle/cpp/src/ymmsl/bindings/ymmsl_fortran_c.cpp b/libmuscle/cpp/src/ymmsl/bindings/ymmsl_fortran_c.cpp index 550ce47d..57d97d95 100644 --- a/libmuscle/cpp/src/ymmsl/bindings/ymmsl_fortran_c.cpp +++ b/libmuscle/cpp/src/ymmsl/bindings/ymmsl_fortran_c.cpp @@ -25,11 +25,11 @@ void YMMSL_Settings_free_(std::intptr_t self) { return; } -int YMMSL_Settings_equals_(std::intptr_t self, std::intptr_t other) { +bool YMMSL_Settings_equals_(std::intptr_t self, std::intptr_t other) { Settings * self_p = reinterpret_cast(self); Settings * other_p = reinterpret_cast(other); bool result = ((*self_p) == *other_p); - return result ? 1 : 0; + return result; } std::size_t YMMSL_Settings_size_(std::intptr_t self) { @@ -38,19 +38,19 @@ std::size_t YMMSL_Settings_size_(std::intptr_t self) { return result; } -int YMMSL_Settings_empty_(std::intptr_t self) { +bool YMMSL_Settings_empty_(std::intptr_t self) { Settings * self_p = reinterpret_cast(self); bool result = self_p->empty(); - return result ? 1 : 0; + return result; } -int YMMSL_Settings_is_a_character_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool YMMSL_Settings_is_a_character_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; bool result = self_p->at(key_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -89,13 +89,13 @@ int YMMSL_Settings_is_a_character_(std::intptr_t self, char * key, std::size_t k } } -int YMMSL_Settings_is_a_int8_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool YMMSL_Settings_is_a_int8_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; bool result = self_p->at(key_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -134,13 +134,13 @@ int YMMSL_Settings_is_a_int8_(std::intptr_t self, char * key, std::size_t key_si } } -int YMMSL_Settings_is_a_real8_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool YMMSL_Settings_is_a_real8_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; bool result = self_p->at(key_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -179,13 +179,13 @@ int YMMSL_Settings_is_a_real8_(std::intptr_t self, char * key, std::size_t key_s } } -int YMMSL_Settings_is_a_logical_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool YMMSL_Settings_is_a_logical_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; bool result = self_p->at(key_s).is_a(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -224,13 +224,13 @@ int YMMSL_Settings_is_a_logical_(std::intptr_t self, char * key, std::size_t key } } -int YMMSL_Settings_is_a_real8array_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool YMMSL_Settings_is_a_real8array_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; bool result = self_p->at(key_s).is_a>(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -269,13 +269,13 @@ int YMMSL_Settings_is_a_real8array_(std::intptr_t self, char * key, std::size_t } } -int YMMSL_Settings_is_a_real8array2_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool YMMSL_Settings_is_a_real8array2_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; bool result = self_p->at(key_s).is_a>>(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -336,10 +336,10 @@ void YMMSL_Settings_set_real8_(std::intptr_t self, char * key, std::size_t key_s return; } -void YMMSL_Settings_set_logical_(std::intptr_t self, char * key, std::size_t key_size, int value) { +void YMMSL_Settings_set_logical_(std::intptr_t self, char * key, std::size_t key_size, bool value) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); - (*self_p)[key_s] = value != 0; + (*self_p)[key_s] = value; return; } @@ -501,13 +501,13 @@ double YMMSL_Settings_get_as_real8_(std::intptr_t self, char * key, std::size_t } } -int YMMSL_Settings_get_as_logical_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { +bool YMMSL_Settings_get_as_logical_(std::intptr_t self, char * key, std::size_t key_size, int * err_code, char ** err_msg, std::size_t * err_msg_len) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); try { *err_code = 0; bool result = self_p->at(key_s).as(); - return result ? 1 : 0; + return result; } catch (std::domain_error const & e) { *err_code = 1; @@ -652,11 +652,11 @@ void YMMSL_Settings_get_as_real8array2_(std::intptr_t self, char * key, std::siz } } -int YMMSL_Settings_contains_(std::intptr_t self, char * key, std::size_t key_size) { +bool YMMSL_Settings_contains_(std::intptr_t self, char * key, std::size_t key_size) { Settings * self_p = reinterpret_cast(self); std::string key_s(key, key_size); bool result = self_p->contains(key_s); - return result ? 1 : 0; + return result; } std::size_t YMMSL_Settings_erase_(std::intptr_t self, char * key, std::size_t key_size) { diff --git a/libmuscle/fortran/build/Makefile b/libmuscle/fortran/build/Makefile index 30c065af..0ee33445 100644 --- a/libmuscle/fortran/build/Makefile +++ b/libmuscle/fortran/build/Makefile @@ -1,3 +1,5 @@ +include check_tools.make + CPP_BUILD_DIR := $(CURDIR)/../../cpp/build DEP_DIRS := $(CPP_BUILD_DIR)/protobuf/protobuf @@ -16,6 +18,8 @@ PKG_CONFIG_EXTRA_DIRS := $(PKG_CONFIG_EXTRA_DIRS):$(CPP_BUILD_DIR)/grpc/grpc/lib PKG_CONFIG_EXTRA_DIRS := $(PKG_CONFIG_EXTRA_DIRS):$(CPP_BUILD_DIR)/msgpack/msgpack/lib/pkgconfig export PKG_CONFIG_EXTRA_DIRS +ifndef MUSCLE_DISABLE_FORTRAN + .PHONY: all all: ymmsl libmuscle @@ -29,16 +33,6 @@ install: all $(MAKE) -C ymmsl install $(MAKE) -C libmuscle install -.PHONY: clean -clean: - $(MAKE) -C ymmsl clean - $(MAKE) -C libmuscle clean - -.PHONY: distclean -distclean: - $(MAKE) -C ymmsl distclean - $(MAKE) -C libmuscle distclean - .PHONY: ymmsl ymmsl: $(MAKE) -j $(NCORES) -C ymmsl @@ -52,3 +46,37 @@ libmuscle: ymmsl tests: ymmsl libmuscle $(MAKE) -j $(NCORES) -C ymmsl tests $(MAKE) -j $(NCORES) -C libmuscle tests + +else # MUSCLE_DISABLE_FORTRAN + +.PHONY: all +all: + +.PHONY: test +test: + +.PHONY: install +install: + +.PHONY: ymmsl +ymmsl: + +.PHONY: libmuscle +libmuscle: + +.PHONY: tests +tests: + +endif # MUSCLE_DISABLE_FORTRAN + + +.PHONY: clean +clean: + $(MAKE) -C ymmsl clean + $(MAKE) -C libmuscle clean + +.PHONY: distclean +distclean: + $(MAKE) -C ymmsl distclean + $(MAKE) -C libmuscle distclean + diff --git a/libmuscle/fortran/build/check_tools.make b/libmuscle/fortran/build/check_tools.make new file mode 100644 index 00000000..6dabe361 --- /dev/null +++ b/libmuscle/fortran/build/check_tools.make @@ -0,0 +1,54 @@ +# Make module that verifies that we have all needed tools + +# Check Fortran compiler +$(info ) +$(info Looking for Fortran compiler...) +tool_var := FC +include $(TOOLDIR)/check_override.make + +tool_command := gfortran +include $(TOOLDIR)/detect_tool_implicit.make +tool_command := f95 +include $(TOOLDIR)/detect_tool_implicit.make +tool_command := f77 +include $(TOOLDIR)/detect_tool_implicit.make + +ifeq ($(origin FC), default) + $(info - No Fortran compiler found! Please install gfortran.) + $(info - Not building Fortran bindings.) + export MUSCLE_DISABLE_FORTRAN := 1 +else + $(info - Will compile Fortran files using $(FC).) +endif + +# Check MPI Fortran compiler +ifdef MUSCLE_ENABLE_MPI + $(info ) + $(info Looking for MPI Fortran compiler...) + tool_var := MPIFC + include $(TOOLDIR)/check_override.make + + tool_command := mpi$(FC) + include $(TOOLDIR)/detect_tool.make + tool_command := mpifort + include $(TOOLDIR)/detect_tool.make + tool_command := mpif90 + include $(TOOLDIR)/detect_tool.make + + ifndef MPIFC + $(info - No MPI Fortran compiler found!) + $(info - Not building Fortran bindings.) + export MUSCLE_DISABLE_FORTRAN := 1 + else + $(info - Will compile MPI Fortran files using $(MPIFC).) + endif +endif + +# Check number of cores +ifndef NCORES + NCORES := $(shell nproc 2>/dev/null || echo 2) + export NCORES +endif +$(info ) +$(info Using $(NCORES) cores to build; set NCORES to override.) +$(info ) diff --git a/libmuscle/fortran/build/libmuscle/Makefile b/libmuscle/fortran/build/libmuscle/Makefile index 6c9cd8dc..f5dcda51 100644 --- a/libmuscle/fortran/build/libmuscle/Makefile +++ b/libmuscle/fortran/build/libmuscle/Makefile @@ -11,15 +11,19 @@ libs := libmuscle_fortran.a libmuscle_fortran.so mpi_libs := libmuscle_mpi_fortran.a libmuscle_mpi_fortran.so modules := $(sources:$(srcdir)/%.f03=%.mod) mpi_modules := $(mpi_sources:$(srcdir)/%.f03=%.mod) +pkg_config_files := libmuscle_fortran.pc - -ifdef MUSCLE_ENABLE_MPI -libs += $(mpi_libs) -modules += $(mpi_modules) +ifeq ($(if $(or $(MUSCLE_ENABLE_MPI),$(and $(findstring install,$(MAKECMDGOALS)),$(wildcard libmuscle_mpi_fortran.so))),1,0),1) + libs += $(mpi_libs) + sources += $(mpi_sources) + modules += $(mpi_modules) + pkg_config_files += libmuscle_mpi_fortran.pc endif installed_modules := $(modules:%=$(PREFIX)/include/%) -installed_libs := $(libs:%=$(PREFIX)/lib/%) +installed_sources := $(sources:$(srcdir)/%=$(PREFIX)/include/%) +installed_pkg_config_files := $(pkg_config_files:%=$(PREFIX)/lib/pkgconfig/%) + LDFLAGS := -L../ymmsl -lymmsl_fortran LDFLAGS += -L../../../cpp/build/libmuscle -lmuscle @@ -49,6 +53,7 @@ test: tests clean: rm -f *.o *.lo *.mo *.mlo *.mod *.a *.so rm -f mod_dump/*.mod + rm -f libmuscle_fortran.pc libmuscle_mpi_fortran.pc make -C tests clean .PHONY: distclean @@ -57,7 +62,12 @@ distclean: clean make -C tests distclean .PHONY: install -install: $(installed_modules) $(installed_libs) +install: $(installed_sources) $(installed_modules) $(installed_pkg_config_files) + @echo + @echo Installing libmuscle Fortran to $(PREFIX) + @mkdir -p $(PREFIX)/lib + cp libmuscle*.a $(PREFIX)/lib + cp libmuscle*.so $(PREFIX)/lib %.o: $(srcdir)/%.f03 $(FC) -c $(FFLAGS) $^ -o $@ $(LDFLAGS) @@ -66,10 +76,10 @@ install: $(installed_modules) $(installed_libs) $(FC) -c -fPIC -Jmod_dump $(FFLAGS) $^ -o $@ $(LDFLAGS) %.mo: $(srcdir)/%.f03 - mpi$(FC) -c $(FFLAGS) $^ -o $@ $(LDFLAGS_MPI) + $(MPIFC) -c $(FFLAGS) $^ -o $@ $(LDFLAGS_MPI) %.mlo: $(srcdir)/%.f03 - mpi$(FC) -c -fPIC -Jmod_dump $(FFLAGS) $^ -o $@ $(LDFLAGS_MPI) + $(MPIFC) -c -fPIC -Jmod_dump $(FFLAGS) $^ -o $@ $(LDFLAGS_MPI) %.mod: %.o @@ -83,7 +93,11 @@ libmuscle_mpi_fortran.a: $(mobjects) ar rcs $@ $^ libmuscle_mpi_fortran.so: $(mlobjects) - mpi$(FC) -shared -o $@ $^ $(LDFLAGS_MPI) + $(MPIFC) -shared -o $@ $^ $(LDFLAGS_MPI) + +$(PREFIX)/include/%.f03: $(srcdir)/%.f03 + @mkdir -p $(@D) + cp $< $@ $(PREFIX)/include/%: % @mkdir -p $(@D) @@ -92,3 +106,36 @@ $(PREFIX)/include/%: % $(PREFIX)/lib/%: % @mkdir -p $(@D) cp $< $@ + +$(PREFIX)/lib/pkgconfig/%: % + @mkdir -p $(@D) + cp $< $@ + +libmuscle_fortran.pc: + @echo 'prefix=$(PREFIX)' >$@ + @echo 'exec_prefix=$${prefix}' >>$@ + @echo 'includedir=$${prefix}/include' >>$@ + @echo 'libdir=$${exec_prefix}/lib' >>$@ + @echo >>$@ + @echo 'Name: libmuscle for Fortran' >>$@ + @echo 'Description: Library for MUSCLE 3 - Fortran version' >>$@ + @echo 'URL: https://muscle3.readthedocs.io' >>$@ + @echo 'Version: $(muscle_version)' >>$@ + @echo 'Requires.private: libmuscle = $(muscle_version)' >>$@ + @echo 'Cflags: -I$${includedir}' >>$@ + @echo 'Libs: -L$${libdir} -lymmsl_fortran -lmuscle_fortran' >>$@ + +libmuscle_mpi_fortran.pc: + @echo 'prefix=$(PREFIX)' >$@ + @echo 'exec_prefix=$${prefix}' >>$@ + @echo 'includedir=$${prefix}/include' >>$@ + @echo 'libdir=$${exec_prefix}/lib' >>$@ + @echo >>$@ + @echo 'Name: libmuscle for Fortran and MPI' >>$@ + @echo 'Description: Library for MUSCLE 3 - Fortran-MPI version' >>$@ + @echo 'URL: https://muscle3.readthedocs.io' >>$@ + @echo 'Version: $(muscle_version)' >>$@ + @echo 'Requires.private: libmuscle_mpi = $(muscle_version)' >>$@ + @echo 'Cflags: -I$${includedir}' >>$@ + @echo 'Libs: -L$${libdir} -lymmsl_fortran -lmuscle_mpi_fortran' >>$@ + diff --git a/libmuscle/fortran/build/libmuscle/tests/Makefile b/libmuscle/fortran/build/libmuscle/tests/Makefile index ca7fff86..36a88bd2 100644 --- a/libmuscle/fortran/build/libmuscle/tests/Makefile +++ b/libmuscle/fortran/build/libmuscle/tests/Makefile @@ -37,17 +37,17 @@ ifeq "$(filter $(MAKECMDGOALS),$(cleantargets))" "" EXTRA_LINK_DIRS := $(foreach DIR,$(DEP_DIRS),-Wl,-rpath-link,$(DIR)/lib) -FFLAGS += -std=f2003 -I. -I.. -I../../ymmsl +FFLAGS += -std=f2003 -g -I. -I.. -I../../ymmsl CPP_BUILD_DIR := $(CURDIR)/../../../../cpp/build -LDFLAGS += $(CURDIR)/../libmuscle_fortran.a $(CURDIR)/../../ymmsl/libymmsl_fortran.a +LDFLAGS += -pthread $(CURDIR)/../libmuscle_fortran.a $(CURDIR)/../../ymmsl/libymmsl_fortran.a LDFLAGS += $(CPP_BUILD_DIR)/libmuscle/libmuscle_d.a $(CPP_BUILD_DIR)/ymmsl/libymmsl_d.a LDFLAGS2 := $(LDFLAGS) LDFLAGS2 += $(CURDIR)/../../../../cpp/build/muscle_manager_protocol/libmmp.a LDFLAGS2 += $(shell export PKG_CONFIG_PATH=$(PKG_CONFIG_EXTRA_DIRS) ; pkg-config --libs protobuf) -LDFLAGS2 += $(shell export PKG_CONFIG_PATH=$(PKG_CONFIG_EXTRA_DIRS) ; pkg-config --libs grpc grpc++) +LDFLAGS2 += $(shell export PKG_CONFIG_PATH=$(PKG_CONFIG_EXTRA_DIRS) ; pkg-config --libs grpc++) LDFLAGS2 += $(shell export PKG_CONFIG_PATH=$(PKG_CONFIG_EXTRA_DIRS) ; pkg-config --libs msgpack) LDFLAGS2 += $(EXTRA_LINK_DIRS) LDFLAGS2 += -lstdc++ diff --git a/libmuscle/fortran/build/ymmsl/Makefile b/libmuscle/fortran/build/ymmsl/Makefile index b261a358..858c892c 100644 --- a/libmuscle/fortran/build/ymmsl/Makefile +++ b/libmuscle/fortran/build/ymmsl/Makefile @@ -7,6 +7,7 @@ lobjects := $(sources:$(srcdir)/%.f03=%.lo) libs := libymmsl_fortran.a libymmsl_fortran.so modules := $(sources:$(srcdir)/%.f03=%.mod) +installed_sources := $(sources:$(srcdir)/%=$(PREFIX)/include/%) installed_modules := $(modules:%=$(PREFIX)/include/%) installed_libs := $(libs:%=$(PREFIX)/lib/%) @@ -34,7 +35,7 @@ clean: distclean: clean .PHONY: install -install: $(installed_modules) $(installed_libs) +install: $(installed_sources) $(installed_modules) $(installed_libs) %.o: $(srcdir)/%.f03 $(FC) -c $(FFLAGS) $^ -o $@ $(LDFLAGS) @@ -50,6 +51,10 @@ lib%_fortran.a: %.o lib%_fortran.so: %.lo $(FC) -shared -o $@ $^ $(LDFLAGS) +$(PREFIX)/include/%.f03: $(srcdir)/%.f03 + @mkdir -p $(@D) + cp $< $@ + $(PREFIX)/include/%: % @mkdir -p $(@D) cp $< $@ diff --git a/libmuscle/fortran/src/libmuscle/libmuscle.f03 b/libmuscle/fortran/src/libmuscle/libmuscle.f03 index 4fa88f12..edbf529d 100644 --- a/libmuscle/fortran/src/libmuscle/libmuscle.f03 +++ b/libmuscle/fortran/src/libmuscle/libmuscle.f03 @@ -40,6 +40,77 @@ module libmuscle public :: LIBMUSCLE_DataConstRef_create_settings public :: LIBMUSCLE_DataConstRef_create_copy public :: LIBMUSCLE_DataConstRef_create + public :: LIBMUSCLE_DataConstRef_create_grid_1_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid public :: LIBMUSCLE_DataConstRef_free public :: LIBMUSCLE_DataConstRef_is_a_logical public :: LIBMUSCLE_DataConstRef_is_a_character @@ -52,6 +123,11 @@ module libmuscle public :: LIBMUSCLE_DataConstRef_is_a_real8 public :: LIBMUSCLE_DataConstRef_is_a_dict public :: LIBMUSCLE_DataConstRef_is_a_list + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_logical + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_real4 + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_real8 + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_int4 + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_int8 public :: LIBMUSCLE_DataConstRef_is_a_byte_array public :: LIBMUSCLE_DataConstRef_is_nil public :: LIBMUSCLE_DataConstRef_is_a_settings @@ -70,6 +146,46 @@ module libmuscle public :: LIBMUSCLE_DataConstRef_get_item_by_key public :: LIBMUSCLE_DataConstRef_get_item_by_index public :: LIBMUSCLE_DataConstRef_get_item + public :: LIBMUSCLE_DataConstRef_num_dims + public :: LIBMUSCLE_DataConstRef_shape + public :: LIBMUSCLE_DataConstRef_elements_1_logical + public :: LIBMUSCLE_DataConstRef_elements_2_logical + public :: LIBMUSCLE_DataConstRef_elements_3_logical + public :: LIBMUSCLE_DataConstRef_elements_4_logical + public :: LIBMUSCLE_DataConstRef_elements_5_logical + public :: LIBMUSCLE_DataConstRef_elements_6_logical + public :: LIBMUSCLE_DataConstRef_elements_7_logical + public :: LIBMUSCLE_DataConstRef_elements_1_int4 + public :: LIBMUSCLE_DataConstRef_elements_2_int4 + public :: LIBMUSCLE_DataConstRef_elements_3_int4 + public :: LIBMUSCLE_DataConstRef_elements_4_int4 + public :: LIBMUSCLE_DataConstRef_elements_5_int4 + public :: LIBMUSCLE_DataConstRef_elements_6_int4 + public :: LIBMUSCLE_DataConstRef_elements_7_int4 + public :: LIBMUSCLE_DataConstRef_elements_1_int8 + public :: LIBMUSCLE_DataConstRef_elements_2_int8 + public :: LIBMUSCLE_DataConstRef_elements_3_int8 + public :: LIBMUSCLE_DataConstRef_elements_4_int8 + public :: LIBMUSCLE_DataConstRef_elements_5_int8 + public :: LIBMUSCLE_DataConstRef_elements_6_int8 + public :: LIBMUSCLE_DataConstRef_elements_7_int8 + public :: LIBMUSCLE_DataConstRef_elements_1_real4 + public :: LIBMUSCLE_DataConstRef_elements_2_real4 + public :: LIBMUSCLE_DataConstRef_elements_3_real4 + public :: LIBMUSCLE_DataConstRef_elements_4_real4 + public :: LIBMUSCLE_DataConstRef_elements_5_real4 + public :: LIBMUSCLE_DataConstRef_elements_6_real4 + public :: LIBMUSCLE_DataConstRef_elements_7_real4 + public :: LIBMUSCLE_DataConstRef_elements_1_real8 + public :: LIBMUSCLE_DataConstRef_elements_2_real8 + public :: LIBMUSCLE_DataConstRef_elements_3_real8 + public :: LIBMUSCLE_DataConstRef_elements_4_real8 + public :: LIBMUSCLE_DataConstRef_elements_5_real8 + public :: LIBMUSCLE_DataConstRef_elements_6_real8 + public :: LIBMUSCLE_DataConstRef_elements_7_real8 + public :: LIBMUSCLE_DataConstRef_elements + public :: LIBMUSCLE_DataConstRef_has_indexes + public :: LIBMUSCLE_DataConstRef_index type LIBMUSCLE_Data integer (c_intptr_t) :: ptr end type LIBMUSCLE_Data @@ -87,6 +203,77 @@ module libmuscle public :: LIBMUSCLE_Data_create_settings public :: LIBMUSCLE_Data_create_copy public :: LIBMUSCLE_Data_create + public :: LIBMUSCLE_Data_create_grid_1_logical_a + public :: LIBMUSCLE_Data_create_grid_2_logical_a + public :: LIBMUSCLE_Data_create_grid_3_logical_a + public :: LIBMUSCLE_Data_create_grid_4_logical_a + public :: LIBMUSCLE_Data_create_grid_5_logical_a + public :: LIBMUSCLE_Data_create_grid_6_logical_a + public :: LIBMUSCLE_Data_create_grid_7_logical_a + public :: LIBMUSCLE_Data_create_grid_1_int4_a + public :: LIBMUSCLE_Data_create_grid_2_int4_a + public :: LIBMUSCLE_Data_create_grid_3_int4_a + public :: LIBMUSCLE_Data_create_grid_4_int4_a + public :: LIBMUSCLE_Data_create_grid_5_int4_a + public :: LIBMUSCLE_Data_create_grid_6_int4_a + public :: LIBMUSCLE_Data_create_grid_7_int4_a + public :: LIBMUSCLE_Data_create_grid_1_int8_a + public :: LIBMUSCLE_Data_create_grid_2_int8_a + public :: LIBMUSCLE_Data_create_grid_3_int8_a + public :: LIBMUSCLE_Data_create_grid_4_int8_a + public :: LIBMUSCLE_Data_create_grid_5_int8_a + public :: LIBMUSCLE_Data_create_grid_6_int8_a + public :: LIBMUSCLE_Data_create_grid_7_int8_a + public :: LIBMUSCLE_Data_create_grid_1_real4_a + public :: LIBMUSCLE_Data_create_grid_2_real4_a + public :: LIBMUSCLE_Data_create_grid_3_real4_a + public :: LIBMUSCLE_Data_create_grid_4_real4_a + public :: LIBMUSCLE_Data_create_grid_5_real4_a + public :: LIBMUSCLE_Data_create_grid_6_real4_a + public :: LIBMUSCLE_Data_create_grid_7_real4_a + public :: LIBMUSCLE_Data_create_grid_1_real8_a + public :: LIBMUSCLE_Data_create_grid_2_real8_a + public :: LIBMUSCLE_Data_create_grid_3_real8_a + public :: LIBMUSCLE_Data_create_grid_4_real8_a + public :: LIBMUSCLE_Data_create_grid_5_real8_a + public :: LIBMUSCLE_Data_create_grid_6_real8_a + public :: LIBMUSCLE_Data_create_grid_7_real8_a + public :: LIBMUSCLE_Data_create_grid_1_logical_n + public :: LIBMUSCLE_Data_create_grid_2_logical_n + public :: LIBMUSCLE_Data_create_grid_3_logical_n + public :: LIBMUSCLE_Data_create_grid_4_logical_n + public :: LIBMUSCLE_Data_create_grid_5_logical_n + public :: LIBMUSCLE_Data_create_grid_6_logical_n + public :: LIBMUSCLE_Data_create_grid_7_logical_n + public :: LIBMUSCLE_Data_create_grid_1_int4_n + public :: LIBMUSCLE_Data_create_grid_2_int4_n + public :: LIBMUSCLE_Data_create_grid_3_int4_n + public :: LIBMUSCLE_Data_create_grid_4_int4_n + public :: LIBMUSCLE_Data_create_grid_5_int4_n + public :: LIBMUSCLE_Data_create_grid_6_int4_n + public :: LIBMUSCLE_Data_create_grid_7_int4_n + public :: LIBMUSCLE_Data_create_grid_1_int8_n + public :: LIBMUSCLE_Data_create_grid_2_int8_n + public :: LIBMUSCLE_Data_create_grid_3_int8_n + public :: LIBMUSCLE_Data_create_grid_4_int8_n + public :: LIBMUSCLE_Data_create_grid_5_int8_n + public :: LIBMUSCLE_Data_create_grid_6_int8_n + public :: LIBMUSCLE_Data_create_grid_7_int8_n + public :: LIBMUSCLE_Data_create_grid_1_real4_n + public :: LIBMUSCLE_Data_create_grid_2_real4_n + public :: LIBMUSCLE_Data_create_grid_3_real4_n + public :: LIBMUSCLE_Data_create_grid_4_real4_n + public :: LIBMUSCLE_Data_create_grid_5_real4_n + public :: LIBMUSCLE_Data_create_grid_6_real4_n + public :: LIBMUSCLE_Data_create_grid_7_real4_n + public :: LIBMUSCLE_Data_create_grid_1_real8_n + public :: LIBMUSCLE_Data_create_grid_2_real8_n + public :: LIBMUSCLE_Data_create_grid_3_real8_n + public :: LIBMUSCLE_Data_create_grid_4_real8_n + public :: LIBMUSCLE_Data_create_grid_5_real8_n + public :: LIBMUSCLE_Data_create_grid_6_real8_n + public :: LIBMUSCLE_Data_create_grid_7_real8_n + public :: LIBMUSCLE_Data_create_grid public :: LIBMUSCLE_Data_free public :: LIBMUSCLE_Data_is_a_logical public :: LIBMUSCLE_Data_is_a_character @@ -99,6 +286,11 @@ module libmuscle public :: LIBMUSCLE_Data_is_a_real8 public :: LIBMUSCLE_Data_is_a_dict public :: LIBMUSCLE_Data_is_a_list + public :: LIBMUSCLE_Data_is_a_grid_of_logical + public :: LIBMUSCLE_Data_is_a_grid_of_real4 + public :: LIBMUSCLE_Data_is_a_grid_of_real8 + public :: LIBMUSCLE_Data_is_a_grid_of_int4 + public :: LIBMUSCLE_Data_is_a_grid_of_int8 public :: LIBMUSCLE_Data_is_a_byte_array public :: LIBMUSCLE_Data_is_nil public :: LIBMUSCLE_Data_is_a_settings @@ -117,6 +309,46 @@ module libmuscle public :: LIBMUSCLE_Data_get_item_by_key public :: LIBMUSCLE_Data_get_item_by_index public :: LIBMUSCLE_Data_get_item + public :: LIBMUSCLE_Data_num_dims + public :: LIBMUSCLE_Data_shape + public :: LIBMUSCLE_Data_elements_1_logical + public :: LIBMUSCLE_Data_elements_2_logical + public :: LIBMUSCLE_Data_elements_3_logical + public :: LIBMUSCLE_Data_elements_4_logical + public :: LIBMUSCLE_Data_elements_5_logical + public :: LIBMUSCLE_Data_elements_6_logical + public :: LIBMUSCLE_Data_elements_7_logical + public :: LIBMUSCLE_Data_elements_1_int4 + public :: LIBMUSCLE_Data_elements_2_int4 + public :: LIBMUSCLE_Data_elements_3_int4 + public :: LIBMUSCLE_Data_elements_4_int4 + public :: LIBMUSCLE_Data_elements_5_int4 + public :: LIBMUSCLE_Data_elements_6_int4 + public :: LIBMUSCLE_Data_elements_7_int4 + public :: LIBMUSCLE_Data_elements_1_int8 + public :: LIBMUSCLE_Data_elements_2_int8 + public :: LIBMUSCLE_Data_elements_3_int8 + public :: LIBMUSCLE_Data_elements_4_int8 + public :: LIBMUSCLE_Data_elements_5_int8 + public :: LIBMUSCLE_Data_elements_6_int8 + public :: LIBMUSCLE_Data_elements_7_int8 + public :: LIBMUSCLE_Data_elements_1_real4 + public :: LIBMUSCLE_Data_elements_2_real4 + public :: LIBMUSCLE_Data_elements_3_real4 + public :: LIBMUSCLE_Data_elements_4_real4 + public :: LIBMUSCLE_Data_elements_5_real4 + public :: LIBMUSCLE_Data_elements_6_real4 + public :: LIBMUSCLE_Data_elements_7_real4 + public :: LIBMUSCLE_Data_elements_1_real8 + public :: LIBMUSCLE_Data_elements_2_real8 + public :: LIBMUSCLE_Data_elements_3_real8 + public :: LIBMUSCLE_Data_elements_4_real8 + public :: LIBMUSCLE_Data_elements_5_real8 + public :: LIBMUSCLE_Data_elements_6_real8 + public :: LIBMUSCLE_Data_elements_7_real8 + public :: LIBMUSCLE_Data_elements + public :: LIBMUSCLE_Data_has_indexes + public :: LIBMUSCLE_Data_index public :: LIBMUSCLE_Data_create_dict public :: LIBMUSCLE_Data_create_list public :: LIBMUSCLE_Data_create_nils @@ -260,23 +492,22 @@ module libmuscle interface - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_nil_( & - ) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_nil_() & bind(C, name="LIBMUSCLE_DataConstRef_create_nil_") use iso_c_binding end function LIBMUSCLE_DataConstRef_create_nil_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_logical_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_logical_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_logical_") use iso_c_binding - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_logical_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_character_( & - value, value_size) & + value, & + value_size) & bind(C, name="LIBMUSCLE_DataConstRef_create_character_") use iso_c_binding @@ -284,200 +515,474 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_character_( & integer (c_size_t), value, intent(in) :: value_size end function LIBMUSCLE_DataConstRef_create_character_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int1_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int1_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int1_") use iso_c_binding integer (c_int8_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int1_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int2_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int2_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int2_") use iso_c_binding integer (c_short), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int2_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int4_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int4_") use iso_c_binding integer (c_int32_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int4_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int8_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int8_") use iso_c_binding integer (c_int64_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int8_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real4_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_real4_") use iso_c_binding real (c_float), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_real4_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real8_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_real8_") use iso_c_binding real (c_double), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_real8_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_settings_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_settings_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_settings_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_copy_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_copy_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_copy_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_copy_ - subroutine LIBMUSCLE_DataConstRef_free_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_logical_a_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_logical_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int4_a_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_int4_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int8_a_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_int8_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real4_a_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_real4_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real8_a_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_real8_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_logical_n_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_logical_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int4_n_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_int4_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int8_n_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_int8_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real4_n_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_real4_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real8_n_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_real8_n_ + + subroutine LIBMUSCLE_DataConstRef_free_(self) & bind(C, name="LIBMUSCLE_DataConstRef_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_DataConstRef_free_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_logical_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_logical_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_logical_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_character_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_character_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_character_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_character_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int1_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int1_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int1_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int1_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int2_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int2_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int2_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int2_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int4_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int4_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int4_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int8_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int8_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int8_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_real4_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_real4_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_real4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_real4_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_real8_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_real8_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_real8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_real8_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_dict_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_dict_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_dict_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_dict_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_list_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_list_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_list_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_list_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_byte_array_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_logical_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_logical_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_real4_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real4_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_real8_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real8_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_int4_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int4_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_int8_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int8_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_byte_array_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_byte_array_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_byte_array_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_nil_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_nil_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_nil_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_nil_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_settings_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_settings_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_settings_ - integer (c_size_t) function LIBMUSCLE_DataConstRef_size_( & - self) & + integer (c_size_t) function LIBMUSCLE_DataConstRef_size_(self) & bind(C, name="LIBMUSCLE_DataConstRef_size_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_size_ - integer (c_int) function LIBMUSCLE_DataConstRef_as_logical_( & - self, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_DataConstRef_as_logical_( & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_logical_") use iso_c_binding @@ -488,7 +993,12 @@ integer (c_int) function LIBMUSCLE_DataConstRef_as_logical_( & end function LIBMUSCLE_DataConstRef_as_logical_ subroutine LIBMUSCLE_DataConstRef_as_character_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_character_") use iso_c_binding @@ -501,7 +1011,10 @@ subroutine LIBMUSCLE_DataConstRef_as_character_( & end subroutine LIBMUSCLE_DataConstRef_as_character_ integer (c_int) function LIBMUSCLE_DataConstRef_as_int_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int_") use iso_c_binding @@ -512,7 +1025,10 @@ integer (c_int) function LIBMUSCLE_DataConstRef_as_int_( & end function LIBMUSCLE_DataConstRef_as_int_ integer (c_int8_t) function LIBMUSCLE_DataConstRef_as_int1_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int1_") use iso_c_binding @@ -523,7 +1039,10 @@ integer (c_int8_t) function LIBMUSCLE_DataConstRef_as_int1_( & end function LIBMUSCLE_DataConstRef_as_int1_ integer (c_short) function LIBMUSCLE_DataConstRef_as_int2_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int2_") use iso_c_binding @@ -534,7 +1053,10 @@ integer (c_short) function LIBMUSCLE_DataConstRef_as_int2_( & end function LIBMUSCLE_DataConstRef_as_int2_ integer (c_int32_t) function LIBMUSCLE_DataConstRef_as_int4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int4_") use iso_c_binding @@ -545,7 +1067,10 @@ integer (c_int32_t) function LIBMUSCLE_DataConstRef_as_int4_( & end function LIBMUSCLE_DataConstRef_as_int4_ integer (c_int64_t) function LIBMUSCLE_DataConstRef_as_int8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int8_") use iso_c_binding @@ -556,7 +1081,10 @@ integer (c_int64_t) function LIBMUSCLE_DataConstRef_as_int8_( & end function LIBMUSCLE_DataConstRef_as_int8_ real (c_float) function LIBMUSCLE_DataConstRef_as_real4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_real4_") use iso_c_binding @@ -567,7 +1095,10 @@ real (c_float) function LIBMUSCLE_DataConstRef_as_real4_( & end function LIBMUSCLE_DataConstRef_as_real4_ real (c_double) function LIBMUSCLE_DataConstRef_as_real8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_real8_") use iso_c_binding @@ -578,7 +1109,10 @@ real (c_double) function LIBMUSCLE_DataConstRef_as_real8_( & end function LIBMUSCLE_DataConstRef_as_real8_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_as_settings_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_settings_") use iso_c_binding @@ -589,7 +1123,12 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_as_settings_( & end function LIBMUSCLE_DataConstRef_as_settings_ subroutine LIBMUSCLE_DataConstRef_as_byte_array_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_byte_array_") use iso_c_binding @@ -602,7 +1141,12 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array_( & end subroutine LIBMUSCLE_DataConstRef_as_byte_array_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_key_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_get_item_by_key_") use iso_c_binding @@ -615,7 +1159,11 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_key_( & end function LIBMUSCLE_DataConstRef_get_item_by_key_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_index_( & - self, i, err_code, err_msg, err_msg_len) & + self, & + i, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_get_item_by_index_") use iso_c_binding @@ -626,23 +1174,198 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_index_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_DataConstRef_get_item_by_index_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_nil_( & - ) & + integer (c_size_t) function LIBMUSCLE_DataConstRef_num_dims_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_num_dims_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_DataConstRef_num_dims_ + + subroutine LIBMUSCLE_DataConstRef_shape_( & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_shape_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_shape_ + + subroutine LIBMUSCLE_DataConstRef_elements_logical_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_logical_ + + subroutine LIBMUSCLE_DataConstRef_elements_int4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_int4_ + + subroutine LIBMUSCLE_DataConstRef_elements_int8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_int8_ + + subroutine LIBMUSCLE_DataConstRef_elements_real4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_real4_ + + subroutine LIBMUSCLE_DataConstRef_elements_real8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_real8_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_has_indexes_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_has_indexes_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_DataConstRef_has_indexes_ + + subroutine LIBMUSCLE_DataConstRef_index_( & + self, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_index_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: i + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_index_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_nil_() & bind(C, name="LIBMUSCLE_Data_create_nil_") use iso_c_binding end function LIBMUSCLE_Data_create_nil_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_logical_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_logical_(value) & bind(C, name="LIBMUSCLE_Data_create_logical_") use iso_c_binding - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value end function LIBMUSCLE_Data_create_logical_ integer (c_intptr_t) function LIBMUSCLE_Data_create_character_( & - value, value_size) & + value, & + value_size) & bind(C, name="LIBMUSCLE_Data_create_character_") use iso_c_binding @@ -650,200 +1373,474 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_character_( & integer (c_size_t), value, intent(in) :: value_size end function LIBMUSCLE_Data_create_character_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int1_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int1_(value) & bind(C, name="LIBMUSCLE_Data_create_int1_") use iso_c_binding integer (c_int8_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_int1_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int2_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int2_(value) & bind(C, name="LIBMUSCLE_Data_create_int2_") use iso_c_binding integer (c_short), value, intent(in) :: value end function LIBMUSCLE_Data_create_int2_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int4_(value) & bind(C, name="LIBMUSCLE_Data_create_int4_") use iso_c_binding integer (c_int32_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_int4_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int8_(value) & bind(C, name="LIBMUSCLE_Data_create_int8_") use iso_c_binding integer (c_int64_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_int8_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_real4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_real4_(value) & bind(C, name="LIBMUSCLE_Data_create_real4_") use iso_c_binding real (c_float), value, intent(in) :: value end function LIBMUSCLE_Data_create_real4_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_real8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_real8_(value) & bind(C, name="LIBMUSCLE_Data_create_real8_") use iso_c_binding real (c_double), value, intent(in) :: value end function LIBMUSCLE_Data_create_real8_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_settings_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_settings_(value) & bind(C, name="LIBMUSCLE_Data_create_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_settings_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_copy_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_copy_(value) & bind(C, name="LIBMUSCLE_Data_create_copy_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_copy_ - subroutine LIBMUSCLE_Data_free_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_logical_a_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_logical_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_int4_a_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_int4_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_int8_a_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_int8_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_real4_a_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_real4_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_real8_a_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_real8_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_logical_n_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_logical_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_int4_n_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_int4_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_int8_n_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_int8_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_real4_n_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_real4_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_real8_n_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_real8_n_ + + subroutine LIBMUSCLE_Data_free_(self) & bind(C, name="LIBMUSCLE_Data_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Data_free_ - integer (c_int) function LIBMUSCLE_Data_is_a_logical_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_logical_(self) & bind(C, name="LIBMUSCLE_Data_is_a_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_logical_ - integer (c_int) function LIBMUSCLE_Data_is_a_character_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_character_(self) & bind(C, name="LIBMUSCLE_Data_is_a_character_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_character_ - integer (c_int) function LIBMUSCLE_Data_is_a_int_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int_ - integer (c_int) function LIBMUSCLE_Data_is_a_int1_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int1_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int1_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int1_ - integer (c_int) function LIBMUSCLE_Data_is_a_int2_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int2_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int2_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int2_ - integer (c_int) function LIBMUSCLE_Data_is_a_int4_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int4_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int4_ - integer (c_int) function LIBMUSCLE_Data_is_a_int8_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int8_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int8_ - integer (c_int) function LIBMUSCLE_Data_is_a_real4_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_real4_(self) & bind(C, name="LIBMUSCLE_Data_is_a_real4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_real4_ - integer (c_int) function LIBMUSCLE_Data_is_a_real8_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_real8_(self) & bind(C, name="LIBMUSCLE_Data_is_a_real8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_real8_ - integer (c_int) function LIBMUSCLE_Data_is_a_dict_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_dict_(self) & bind(C, name="LIBMUSCLE_Data_is_a_dict_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_dict_ - integer (c_int) function LIBMUSCLE_Data_is_a_list_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_list_(self) & bind(C, name="LIBMUSCLE_Data_is_a_list_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_list_ - integer (c_int) function LIBMUSCLE_Data_is_a_byte_array_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_logical_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_logical_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_real4_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_real4_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_real8_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_real8_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_int4_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_int4_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_int8_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_int8_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_byte_array_(self) & bind(C, name="LIBMUSCLE_Data_is_a_byte_array_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_byte_array_ - integer (c_int) function LIBMUSCLE_Data_is_nil_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_nil_(self) & bind(C, name="LIBMUSCLE_Data_is_nil_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_nil_ - integer (c_int) function LIBMUSCLE_Data_is_a_settings_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_settings_(self) & bind(C, name="LIBMUSCLE_Data_is_a_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_settings_ - integer (c_size_t) function LIBMUSCLE_Data_size_( & - self) & + integer (c_size_t) function LIBMUSCLE_Data_size_(self) & bind(C, name="LIBMUSCLE_Data_size_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_size_ - integer (c_int) function LIBMUSCLE_Data_as_logical_( & - self, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Data_as_logical_( & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_logical_") use iso_c_binding @@ -854,7 +1851,12 @@ integer (c_int) function LIBMUSCLE_Data_as_logical_( & end function LIBMUSCLE_Data_as_logical_ subroutine LIBMUSCLE_Data_as_character_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_character_") use iso_c_binding @@ -867,7 +1869,10 @@ subroutine LIBMUSCLE_Data_as_character_( & end subroutine LIBMUSCLE_Data_as_character_ integer (c_int) function LIBMUSCLE_Data_as_int_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int_") use iso_c_binding @@ -878,7 +1883,10 @@ integer (c_int) function LIBMUSCLE_Data_as_int_( & end function LIBMUSCLE_Data_as_int_ integer (c_int8_t) function LIBMUSCLE_Data_as_int1_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int1_") use iso_c_binding @@ -889,7 +1897,10 @@ integer (c_int8_t) function LIBMUSCLE_Data_as_int1_( & end function LIBMUSCLE_Data_as_int1_ integer (c_short) function LIBMUSCLE_Data_as_int2_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int2_") use iso_c_binding @@ -900,7 +1911,10 @@ integer (c_short) function LIBMUSCLE_Data_as_int2_( & end function LIBMUSCLE_Data_as_int2_ integer (c_int32_t) function LIBMUSCLE_Data_as_int4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int4_") use iso_c_binding @@ -911,7 +1925,10 @@ integer (c_int32_t) function LIBMUSCLE_Data_as_int4_( & end function LIBMUSCLE_Data_as_int4_ integer (c_int64_t) function LIBMUSCLE_Data_as_int8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int8_") use iso_c_binding @@ -922,7 +1939,10 @@ integer (c_int64_t) function LIBMUSCLE_Data_as_int8_( & end function LIBMUSCLE_Data_as_int8_ real (c_float) function LIBMUSCLE_Data_as_real4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_real4_") use iso_c_binding @@ -933,7 +1953,10 @@ real (c_float) function LIBMUSCLE_Data_as_real4_( & end function LIBMUSCLE_Data_as_real4_ real (c_double) function LIBMUSCLE_Data_as_real8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_real8_") use iso_c_binding @@ -944,7 +1967,10 @@ real (c_double) function LIBMUSCLE_Data_as_real8_( & end function LIBMUSCLE_Data_as_real8_ integer (c_intptr_t) function LIBMUSCLE_Data_as_settings_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_settings_") use iso_c_binding @@ -955,7 +1981,12 @@ integer (c_intptr_t) function LIBMUSCLE_Data_as_settings_( & end function LIBMUSCLE_Data_as_settings_ subroutine LIBMUSCLE_Data_as_byte_array_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_byte_array_") use iso_c_binding @@ -968,7 +1999,12 @@ subroutine LIBMUSCLE_Data_as_byte_array_( & end subroutine LIBMUSCLE_Data_as_byte_array_ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_key_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_get_item_by_key_") use iso_c_binding @@ -981,7 +2017,11 @@ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_key_( & end function LIBMUSCLE_Data_get_item_by_key_ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_index_( & - self, i, err_code, err_msg, err_msg_len) & + self, & + i, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_get_item_by_index_") use iso_c_binding @@ -992,30 +2032,202 @@ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_index_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Data_get_item_by_index_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_dict_( & - ) & + integer (c_size_t) function LIBMUSCLE_Data_num_dims_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_num_dims_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_Data_num_dims_ + + subroutine LIBMUSCLE_Data_shape_( & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_shape_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_shape_ + + subroutine LIBMUSCLE_Data_elements_logical_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_logical_ + + subroutine LIBMUSCLE_Data_elements_int4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_int4_ + + subroutine LIBMUSCLE_Data_elements_int8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_int8_ + + subroutine LIBMUSCLE_Data_elements_real4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_real4_ + + subroutine LIBMUSCLE_Data_elements_real8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_real8_ + + logical (c_bool) function LIBMUSCLE_Data_has_indexes_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_has_indexes_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_Data_has_indexes_ + + subroutine LIBMUSCLE_Data_index_( & + self, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_index_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: i + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_index_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_dict_() & bind(C, name="LIBMUSCLE_Data_create_dict_") use iso_c_binding end function LIBMUSCLE_Data_create_dict_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_list_( & - ) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_list_() & bind(C, name="LIBMUSCLE_Data_create_list_") use iso_c_binding end function LIBMUSCLE_Data_create_list_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_nils_( & - size) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_nils_(size) & bind(C, name="LIBMUSCLE_Data_create_nils_") use iso_c_binding integer (c_size_t), value, intent(in) :: size end function LIBMUSCLE_Data_create_nils_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_empty_( & - size) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_empty_(size) & bind(C, name="LIBMUSCLE_Data_create_byte_array_empty_") use iso_c_binding @@ -1023,7 +2235,8 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_empty_( & end function LIBMUSCLE_Data_create_byte_array_empty_ integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_from_buf_( & - buf, buf_size) & + buf, & + buf_size) & bind(C, name="LIBMUSCLE_Data_create_byte_array_from_buf_") use iso_c_binding @@ -1032,16 +2245,19 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_from_buf_( & end function LIBMUSCLE_Data_create_byte_array_from_buf_ subroutine LIBMUSCLE_Data_set_logical_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value end subroutine LIBMUSCLE_Data_set_logical_ subroutine LIBMUSCLE_Data_set_character_( & - self, value, value_size) & + self, & + value, & + value_size) & bind(C, name="LIBMUSCLE_Data_set_character_") use iso_c_binding @@ -1051,7 +2267,8 @@ subroutine LIBMUSCLE_Data_set_character_( & end subroutine LIBMUSCLE_Data_set_character_ subroutine LIBMUSCLE_Data_set_int1_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int1_") use iso_c_binding @@ -1060,7 +2277,8 @@ subroutine LIBMUSCLE_Data_set_int1_( & end subroutine LIBMUSCLE_Data_set_int1_ subroutine LIBMUSCLE_Data_set_int2_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int2_") use iso_c_binding @@ -1069,7 +2287,8 @@ subroutine LIBMUSCLE_Data_set_int2_( & end subroutine LIBMUSCLE_Data_set_int2_ subroutine LIBMUSCLE_Data_set_int4_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int4_") use iso_c_binding @@ -1078,7 +2297,8 @@ subroutine LIBMUSCLE_Data_set_int4_( & end subroutine LIBMUSCLE_Data_set_int4_ subroutine LIBMUSCLE_Data_set_int8_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int8_") use iso_c_binding @@ -1087,7 +2307,8 @@ subroutine LIBMUSCLE_Data_set_int8_( & end subroutine LIBMUSCLE_Data_set_int8_ subroutine LIBMUSCLE_Data_set_real4_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_real4_") use iso_c_binding @@ -1096,7 +2317,8 @@ subroutine LIBMUSCLE_Data_set_real4_( & end subroutine LIBMUSCLE_Data_set_real4_ subroutine LIBMUSCLE_Data_set_real8_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_real8_") use iso_c_binding @@ -1105,7 +2327,8 @@ subroutine LIBMUSCLE_Data_set_real8_( & end subroutine LIBMUSCLE_Data_set_real8_ subroutine LIBMUSCLE_Data_set_data_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_data_") use iso_c_binding @@ -1113,8 +2336,7 @@ subroutine LIBMUSCLE_Data_set_data_( & integer (c_intptr_t), value, intent(in) :: value end subroutine LIBMUSCLE_Data_set_data_ - subroutine LIBMUSCLE_Data_set_nil_( & - self) & + subroutine LIBMUSCLE_Data_set_nil_(self) & bind(C, name="LIBMUSCLE_Data_set_nil_") use iso_c_binding @@ -1122,21 +2344,34 @@ subroutine LIBMUSCLE_Data_set_nil_( & end subroutine LIBMUSCLE_Data_set_nil_ subroutine LIBMUSCLE_Data_set_item_key_logical_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self character, intent(in) :: key integer (c_size_t), value, intent(in) :: key_size - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value integer (c_int), intent(out) :: err_code type (c_ptr), intent(out) :: err_msg integer (c_size_t), intent(out) :: err_msg_len end subroutine LIBMUSCLE_Data_set_item_key_logical_ subroutine LIBMUSCLE_Data_set_item_key_character_( & - self, key, key_size, value, value_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + value_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_character_") use iso_c_binding @@ -1151,7 +2386,13 @@ subroutine LIBMUSCLE_Data_set_item_key_character_( & end subroutine LIBMUSCLE_Data_set_item_key_character_ subroutine LIBMUSCLE_Data_set_item_key_int1_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int1_") use iso_c_binding @@ -1165,7 +2406,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int1_( & end subroutine LIBMUSCLE_Data_set_item_key_int1_ subroutine LIBMUSCLE_Data_set_item_key_int2_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int2_") use iso_c_binding @@ -1179,7 +2426,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int2_( & end subroutine LIBMUSCLE_Data_set_item_key_int2_ subroutine LIBMUSCLE_Data_set_item_key_int4_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int4_") use iso_c_binding @@ -1193,7 +2446,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int4_( & end subroutine LIBMUSCLE_Data_set_item_key_int4_ subroutine LIBMUSCLE_Data_set_item_key_int8_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int8_") use iso_c_binding @@ -1207,7 +2466,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int8_( & end subroutine LIBMUSCLE_Data_set_item_key_int8_ subroutine LIBMUSCLE_Data_set_item_key_real4_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_real4_") use iso_c_binding @@ -1221,7 +2486,13 @@ subroutine LIBMUSCLE_Data_set_item_key_real4_( & end subroutine LIBMUSCLE_Data_set_item_key_real4_ subroutine LIBMUSCLE_Data_set_item_key_real8_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_real8_") use iso_c_binding @@ -1235,7 +2506,13 @@ subroutine LIBMUSCLE_Data_set_item_key_real8_( & end subroutine LIBMUSCLE_Data_set_item_key_real8_ subroutine LIBMUSCLE_Data_set_item_key_data_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_data_") use iso_c_binding @@ -1249,20 +2526,31 @@ subroutine LIBMUSCLE_Data_set_item_key_data_( & end subroutine LIBMUSCLE_Data_set_item_key_data_ subroutine LIBMUSCLE_Data_set_item_index_logical_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self integer (c_size_t), value, intent(in) :: i - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value integer (c_int), intent(out) :: err_code type (c_ptr), intent(out) :: err_msg integer (c_size_t), intent(out) :: err_msg_len end subroutine LIBMUSCLE_Data_set_item_index_logical_ subroutine LIBMUSCLE_Data_set_item_index_character_( & - self, i, value, value_size, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + value_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_character_") use iso_c_binding @@ -1276,7 +2564,12 @@ subroutine LIBMUSCLE_Data_set_item_index_character_( & end subroutine LIBMUSCLE_Data_set_item_index_character_ subroutine LIBMUSCLE_Data_set_item_index_int1_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int1_") use iso_c_binding @@ -1289,7 +2582,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int1_( & end subroutine LIBMUSCLE_Data_set_item_index_int1_ subroutine LIBMUSCLE_Data_set_item_index_int2_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int2_") use iso_c_binding @@ -1302,7 +2600,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int2_( & end subroutine LIBMUSCLE_Data_set_item_index_int2_ subroutine LIBMUSCLE_Data_set_item_index_int4_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int4_") use iso_c_binding @@ -1315,7 +2618,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int4_( & end subroutine LIBMUSCLE_Data_set_item_index_int4_ subroutine LIBMUSCLE_Data_set_item_index_int8_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int8_") use iso_c_binding @@ -1328,7 +2636,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int8_( & end subroutine LIBMUSCLE_Data_set_item_index_int8_ subroutine LIBMUSCLE_Data_set_item_index_real4_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_real4_") use iso_c_binding @@ -1341,7 +2654,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real4_( & end subroutine LIBMUSCLE_Data_set_item_index_real4_ subroutine LIBMUSCLE_Data_set_item_index_real8_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_real8_") use iso_c_binding @@ -1354,7 +2672,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real8_( & end subroutine LIBMUSCLE_Data_set_item_index_real8_ subroutine LIBMUSCLE_Data_set_item_index_data_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_data_") use iso_c_binding @@ -1367,7 +2690,13 @@ subroutine LIBMUSCLE_Data_set_item_index_data_( & end subroutine LIBMUSCLE_Data_set_item_index_data_ subroutine LIBMUSCLE_Data_key_( & - self, i, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_key_") use iso_c_binding @@ -1381,7 +2710,11 @@ subroutine LIBMUSCLE_Data_key_( & end subroutine LIBMUSCLE_Data_key_ integer (c_intptr_t) function LIBMUSCLE_Data_value_( & - self, i, err_code, err_msg, err_msg_len) & + self, & + i, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_value_") use iso_c_binding @@ -1392,15 +2725,13 @@ integer (c_intptr_t) function LIBMUSCLE_Data_value_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Data_value_ - integer (c_intptr_t) function LIBMUSCLE_PortsDescription_create_( & - ) & + integer (c_intptr_t) function LIBMUSCLE_PortsDescription_create_() & bind(C, name="LIBMUSCLE_PortsDescription_create_") use iso_c_binding end function LIBMUSCLE_PortsDescription_create_ - subroutine LIBMUSCLE_PortsDescription_free_( & - self) & + subroutine LIBMUSCLE_PortsDescription_free_(self) & bind(C, name="LIBMUSCLE_PortsDescription_free_") use iso_c_binding @@ -1408,7 +2739,10 @@ subroutine LIBMUSCLE_PortsDescription_free_( & end subroutine LIBMUSCLE_PortsDescription_free_ subroutine LIBMUSCLE_PortsDescription_add_( & - self, op, port, port_size) & + self, & + op, & + port, & + port_size) & bind(C, name="LIBMUSCLE_PortsDescription_add_") use iso_c_binding @@ -1419,7 +2753,8 @@ subroutine LIBMUSCLE_PortsDescription_add_( & end subroutine LIBMUSCLE_PortsDescription_add_ integer (c_size_t) function LIBMUSCLE_PortsDescription_num_ports_( & - self, op) & + self, & + op) & bind(C, name="LIBMUSCLE_PortsDescription_num_ports_") use iso_c_binding @@ -1428,7 +2763,14 @@ integer (c_size_t) function LIBMUSCLE_PortsDescription_num_ports_( & end function LIBMUSCLE_PortsDescription_num_ports_ subroutine LIBMUSCLE_PortsDescription_get_( & - self, op, i, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + op, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_PortsDescription_get_") use iso_c_binding @@ -1443,7 +2785,8 @@ subroutine LIBMUSCLE_PortsDescription_get_( & end subroutine LIBMUSCLE_PortsDescription_get_ integer (c_intptr_t) function LIBMUSCLE_Message_create_td_( & - timestamp, data) & + timestamp, & + data) & bind(C, name="LIBMUSCLE_Message_create_td_") use iso_c_binding @@ -1452,7 +2795,9 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_td_( & end function LIBMUSCLE_Message_create_td_ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnd_( & - timestamp, next_timestamp, data) & + timestamp, & + next_timestamp, & + data) & bind(C, name="LIBMUSCLE_Message_create_tnd_") use iso_c_binding @@ -1462,7 +2807,9 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnd_( & end function LIBMUSCLE_Message_create_tnd_ integer (c_intptr_t) function LIBMUSCLE_Message_create_tds_( & - timestamp, data, settings) & + timestamp, & + data, & + settings) & bind(C, name="LIBMUSCLE_Message_create_tds_") use iso_c_binding @@ -1472,7 +2819,10 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_tds_( & end function LIBMUSCLE_Message_create_tds_ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnds_( & - timestamp, next_timestamp, data, settings) & + timestamp, & + next_timestamp, & + data, & + settings) & bind(C, name="LIBMUSCLE_Message_create_tnds_") use iso_c_binding @@ -1482,16 +2832,14 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnds_( & integer (c_intptr_t), value, intent(in) :: settings end function LIBMUSCLE_Message_create_tnds_ - subroutine LIBMUSCLE_Message_free_( & - self) & + subroutine LIBMUSCLE_Message_free_(self) & bind(C, name="LIBMUSCLE_Message_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Message_free_ - real (c_double) function LIBMUSCLE_Message_timestamp_( & - self) & + real (c_double) function LIBMUSCLE_Message_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_timestamp_") use iso_c_binding @@ -1499,7 +2847,8 @@ real (c_double) function LIBMUSCLE_Message_timestamp_( & end function LIBMUSCLE_Message_timestamp_ subroutine LIBMUSCLE_Message_set_timestamp_( & - self, timestamp) & + self, & + timestamp) & bind(C, name="LIBMUSCLE_Message_set_timestamp_") use iso_c_binding @@ -1507,16 +2856,14 @@ subroutine LIBMUSCLE_Message_set_timestamp_( & real (c_double), value, intent(in) :: timestamp end subroutine LIBMUSCLE_Message_set_timestamp_ - integer (c_int) function LIBMUSCLE_Message_has_next_timestamp_( & - self) & + logical (c_bool) function LIBMUSCLE_Message_has_next_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_has_next_timestamp_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Message_has_next_timestamp_ - real (c_double) function LIBMUSCLE_Message_next_timestamp_( & - self) & + real (c_double) function LIBMUSCLE_Message_next_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_next_timestamp_") use iso_c_binding @@ -1524,7 +2871,8 @@ real (c_double) function LIBMUSCLE_Message_next_timestamp_( & end function LIBMUSCLE_Message_next_timestamp_ subroutine LIBMUSCLE_Message_set_next_timestamp_( & - self, next_timestamp) & + self, & + next_timestamp) & bind(C, name="LIBMUSCLE_Message_set_next_timestamp_") use iso_c_binding @@ -1532,16 +2880,14 @@ subroutine LIBMUSCLE_Message_set_next_timestamp_( & real (c_double), value, intent(in) :: next_timestamp end subroutine LIBMUSCLE_Message_set_next_timestamp_ - subroutine LIBMUSCLE_Message_unset_next_timestamp_( & - self) & + subroutine LIBMUSCLE_Message_unset_next_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_unset_next_timestamp_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Message_unset_next_timestamp_ - integer (c_intptr_t) function LIBMUSCLE_Message_get_data_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Message_get_data_(self) & bind(C, name="LIBMUSCLE_Message_get_data_") use iso_c_binding @@ -1549,7 +2895,8 @@ integer (c_intptr_t) function LIBMUSCLE_Message_get_data_( & end function LIBMUSCLE_Message_get_data_ subroutine LIBMUSCLE_Message_set_data_d_( & - self, data) & + self, & + data) & bind(C, name="LIBMUSCLE_Message_set_data_d_") use iso_c_binding @@ -1558,7 +2905,8 @@ subroutine LIBMUSCLE_Message_set_data_d_( & end subroutine LIBMUSCLE_Message_set_data_d_ subroutine LIBMUSCLE_Message_set_data_dcr_( & - self, data) & + self, & + data) & bind(C, name="LIBMUSCLE_Message_set_data_dcr_") use iso_c_binding @@ -1566,16 +2914,14 @@ subroutine LIBMUSCLE_Message_set_data_dcr_( & integer (c_intptr_t), value, intent(in) :: data end subroutine LIBMUSCLE_Message_set_data_dcr_ - integer (c_int) function LIBMUSCLE_Message_has_settings_( & - self) & + logical (c_bool) function LIBMUSCLE_Message_has_settings_(self) & bind(C, name="LIBMUSCLE_Message_has_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Message_has_settings_ - integer (c_intptr_t) function LIBMUSCLE_Message_get_settings_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Message_get_settings_(self) & bind(C, name="LIBMUSCLE_Message_get_settings_") use iso_c_binding @@ -1583,7 +2929,8 @@ integer (c_intptr_t) function LIBMUSCLE_Message_get_settings_( & end function LIBMUSCLE_Message_get_settings_ subroutine LIBMUSCLE_Message_set_settings_( & - self, settings) & + self, & + settings) & bind(C, name="LIBMUSCLE_Message_set_settings_") use iso_c_binding @@ -1591,16 +2938,14 @@ subroutine LIBMUSCLE_Message_set_settings_( & integer (c_intptr_t), value, intent(in) :: settings end subroutine LIBMUSCLE_Message_set_settings_ - subroutine LIBMUSCLE_Message_unset_settings_( & - self) & + subroutine LIBMUSCLE_Message_unset_settings_(self) & bind(C, name="LIBMUSCLE_Message_unset_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Message_unset_settings_ - integer (c_intptr_t) function LIBMUSCLE_Instance_create_autoports_( & - cla) & + integer (c_intptr_t) function LIBMUSCLE_Instance_create_autoports_(cla) & bind(C, name="LIBMUSCLE_Instance_create_autoports_") use iso_c_binding @@ -1608,7 +2953,8 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_create_autoports_( & end function LIBMUSCLE_Instance_create_autoports_ integer (c_intptr_t) function LIBMUSCLE_Instance_create_with_ports_( & - cla, ports) & + cla, & + ports) & bind(C, name="LIBMUSCLE_Instance_create_with_ports_") use iso_c_binding @@ -1616,33 +2962,34 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_create_with_ports_( & integer (c_intptr_t), value, intent(in) :: ports end function LIBMUSCLE_Instance_create_with_ports_ - subroutine LIBMUSCLE_Instance_free_( & - self) & + subroutine LIBMUSCLE_Instance_free_(self) & bind(C, name="LIBMUSCLE_Instance_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Instance_free_ - integer (c_int) function LIBMUSCLE_Instance_reuse_instance_default_( & - self) & + logical (c_bool) function LIBMUSCLE_Instance_reuse_instance_default_(self) & bind(C, name="LIBMUSCLE_Instance_reuse_instance_default_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Instance_reuse_instance_default_ - integer (c_int) function LIBMUSCLE_Instance_reuse_instance_apply_( & - self, apply_overlay) & + logical (c_bool) function LIBMUSCLE_Instance_reuse_instance_apply_( & + self, & + apply_overlay) & bind(C, name="LIBMUSCLE_Instance_reuse_instance_apply_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self - integer (c_int), value, intent(in) :: apply_overlay + logical (c_bool), value, intent(in) :: apply_overlay end function LIBMUSCLE_Instance_reuse_instance_apply_ subroutine LIBMUSCLE_Instance_error_shutdown_( & - self, message, message_size) & + self, & + message, & + message_size) & bind(C, name="LIBMUSCLE_Instance_error_shutdown_") use iso_c_binding @@ -1651,8 +2998,13 @@ subroutine LIBMUSCLE_Instance_error_shutdown_( & integer (c_size_t), value, intent(in) :: message_size end subroutine LIBMUSCLE_Instance_error_shutdown_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_character_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_character_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_character_") use iso_c_binding @@ -1664,8 +3016,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_character_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_character_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_int8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_int8_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_int8_") use iso_c_binding @@ -1677,8 +3034,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_int8_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_int8_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8_") use iso_c_binding @@ -1690,8 +3052,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_real8_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_logical_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_logical_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_logical_") use iso_c_binding @@ -1703,8 +3070,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_logical_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_logical_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8array_") use iso_c_binding @@ -1716,8 +3088,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_real8array_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array2_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array2_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8array2_") use iso_c_binding @@ -1730,7 +3107,14 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array2_( & end function LIBMUSCLE_Instance_is_setting_a_real8array2_ subroutine LIBMUSCLE_Instance_get_setting_as_character_( & - self, name, name_size, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_character_") use iso_c_binding @@ -1745,7 +3129,12 @@ subroutine LIBMUSCLE_Instance_get_setting_as_character_( & end subroutine LIBMUSCLE_Instance_get_setting_as_character_ integer (c_int64_t) function LIBMUSCLE_Instance_get_setting_as_int8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_int8_") use iso_c_binding @@ -1758,7 +3147,12 @@ integer (c_int64_t) function LIBMUSCLE_Instance_get_setting_as_int8_( & end function LIBMUSCLE_Instance_get_setting_as_int8_ real (c_double) function LIBMUSCLE_Instance_get_setting_as_real8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8_") use iso_c_binding @@ -1770,8 +3164,13 @@ real (c_double) function LIBMUSCLE_Instance_get_setting_as_real8_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_get_setting_as_real8_ - integer (c_int) function LIBMUSCLE_Instance_get_setting_as_logical_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_get_setting_as_logical_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_logical_") use iso_c_binding @@ -1784,7 +3183,14 @@ integer (c_int) function LIBMUSCLE_Instance_get_setting_as_logical_( & end function LIBMUSCLE_Instance_get_setting_as_logical_ subroutine LIBMUSCLE_Instance_get_setting_as_real8array_( & - self, name, name_size, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8array_") use iso_c_binding @@ -1799,7 +3205,14 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array_( & end subroutine LIBMUSCLE_Instance_get_setting_as_real8array_ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_( & - self, name, name_size, ret_val, ret_val_shape, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + ret_val, & + ret_val_shape, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8array2_") use iso_c_binding @@ -1813,16 +3226,17 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_( & integer (c_size_t), intent(out) :: err_msg_len end subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_ - integer (c_intptr_t) function LIBMUSCLE_Instance_list_ports_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Instance_list_ports_(self) & bind(C, name="LIBMUSCLE_Instance_list_ports_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Instance_list_ports_ - integer (c_int) function LIBMUSCLE_Instance_is_connected_( & - self, port, port_size) & + logical (c_bool) function LIBMUSCLE_Instance_is_connected_( & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_is_connected_") use iso_c_binding @@ -1831,8 +3245,10 @@ integer (c_int) function LIBMUSCLE_Instance_is_connected_( & integer (c_size_t), value, intent(in) :: port_size end function LIBMUSCLE_Instance_is_connected_ - integer (c_int) function LIBMUSCLE_Instance_is_vector_port_( & - self, port, port_size) & + logical (c_bool) function LIBMUSCLE_Instance_is_vector_port_( & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_is_vector_port_") use iso_c_binding @@ -1841,8 +3257,10 @@ integer (c_int) function LIBMUSCLE_Instance_is_vector_port_( & integer (c_size_t), value, intent(in) :: port_size end function LIBMUSCLE_Instance_is_vector_port_ - integer (c_int) function LIBMUSCLE_Instance_is_resizable_( & - self, port, port_size) & + logical (c_bool) function LIBMUSCLE_Instance_is_resizable_( & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_is_resizable_") use iso_c_binding @@ -1852,7 +3270,9 @@ integer (c_int) function LIBMUSCLE_Instance_is_resizable_( & end function LIBMUSCLE_Instance_is_resizable_ integer (c_int) function LIBMUSCLE_Instance_get_port_length_( & - self, port, port_size) & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_get_port_length_") use iso_c_binding @@ -1862,7 +3282,10 @@ integer (c_int) function LIBMUSCLE_Instance_get_port_length_( & end function LIBMUSCLE_Instance_get_port_length_ subroutine LIBMUSCLE_Instance_set_port_length_( & - self, port, port_size, length) & + self, & + port, & + port_size, & + length) & bind(C, name="LIBMUSCLE_Instance_set_port_length_") use iso_c_binding @@ -1873,7 +3296,10 @@ subroutine LIBMUSCLE_Instance_set_port_length_( & end subroutine LIBMUSCLE_Instance_set_port_length_ subroutine LIBMUSCLE_Instance_send_pm_( & - self, port_name, port_name_size, message) & + self, & + port_name, & + port_name_size, & + message) & bind(C, name="LIBMUSCLE_Instance_send_pm_") use iso_c_binding @@ -1884,7 +3310,11 @@ subroutine LIBMUSCLE_Instance_send_pm_( & end subroutine LIBMUSCLE_Instance_send_pm_ subroutine LIBMUSCLE_Instance_send_pms_( & - self, port_name, port_name_size, message, slot) & + self, & + port_name, & + port_name_size, & + message, & + slot) & bind(C, name="LIBMUSCLE_Instance_send_pms_") use iso_c_binding @@ -1896,7 +3326,12 @@ subroutine LIBMUSCLE_Instance_send_pms_( & end subroutine LIBMUSCLE_Instance_send_pms_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_p_( & - self, port_name, port_name_size, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_p_") use iso_c_binding @@ -1909,7 +3344,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_p_( & end function LIBMUSCLE_Instance_receive_p_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_pd_( & - self, port_name, port_name_size, default_msg, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + default_msg, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_pd_") use iso_c_binding @@ -1923,7 +3364,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_pd_( & end function LIBMUSCLE_Instance_receive_pd_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_ps_( & - self, port_name, port_name_size, slot, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_ps_") use iso_c_binding @@ -1937,7 +3384,14 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_ps_( & end function LIBMUSCLE_Instance_receive_ps_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_psd_( & - self, port_name, port_name_size, slot, default_message, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + default_message, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_psd_") use iso_c_binding @@ -1952,7 +3406,12 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_psd_( & end function LIBMUSCLE_Instance_receive_psd_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_p_( & - self, port_name, port_name_size, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_p_") use iso_c_binding @@ -1965,7 +3424,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_p_( & end function LIBMUSCLE_Instance_receive_with_settings_p_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_pd_( & - self, port_name, port_name_size, default_msg, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + default_msg, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_pd_") use iso_c_binding @@ -1979,7 +3444,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_pd_( & end function LIBMUSCLE_Instance_receive_with_settings_pd_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_ps_( & - self, port_name, port_name_size, slot, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_ps_") use iso_c_binding @@ -1993,7 +3464,14 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_ps_( & end function LIBMUSCLE_Instance_receive_with_settings_ps_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_psd_( & - self, port_name, port_name_size, slot, default_msg, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + default_msg, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_psd_") use iso_c_binding @@ -2024,12 +3502,125 @@ end function LIBMUSCLE_Instance_receive_with_settings_psd_ LIBMUSCLE_DataConstRef_create_copy end interface + interface LIBMUSCLE_DataConstRef_create_grid + module procedure & + LIBMUSCLE_DataConstRef_create_grid_1_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_1_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_1_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_1_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_1_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_1_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_1_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_1_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_1_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_1_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_2_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_2_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_2_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_2_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_2_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_2_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_2_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_2_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_2_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_2_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_3_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_3_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_3_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_3_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_3_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_3_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_3_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_3_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_3_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_3_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_4_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_4_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_4_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_4_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_4_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_4_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_4_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_4_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_4_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_4_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_5_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_5_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_5_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_5_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_5_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_5_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_5_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_5_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_5_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_5_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_6_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_6_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_6_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_6_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_6_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_6_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_6_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_6_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_6_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_6_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_7_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_7_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_7_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_7_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_7_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_7_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_7_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_7_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_7_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_7_real8_a + end interface + interface LIBMUSCLE_DataConstRef_get_item module procedure & LIBMUSCLE_DataConstRef_get_item_by_key, & LIBMUSCLE_DataConstRef_get_item_by_index end interface + interface LIBMUSCLE_DataConstRef_elements + module procedure & + LIBMUSCLE_DataConstRef_elements_1_logical, & + LIBMUSCLE_DataConstRef_elements_1_real4, & + LIBMUSCLE_DataConstRef_elements_1_real8, & + LIBMUSCLE_DataConstRef_elements_1_int4, & + LIBMUSCLE_DataConstRef_elements_1_int8, & + LIBMUSCLE_DataConstRef_elements_2_logical, & + LIBMUSCLE_DataConstRef_elements_2_real4, & + LIBMUSCLE_DataConstRef_elements_2_real8, & + LIBMUSCLE_DataConstRef_elements_2_int4, & + LIBMUSCLE_DataConstRef_elements_2_int8, & + LIBMUSCLE_DataConstRef_elements_3_logical, & + LIBMUSCLE_DataConstRef_elements_3_real4, & + LIBMUSCLE_DataConstRef_elements_3_real8, & + LIBMUSCLE_DataConstRef_elements_3_int4, & + LIBMUSCLE_DataConstRef_elements_3_int8, & + LIBMUSCLE_DataConstRef_elements_4_logical, & + LIBMUSCLE_DataConstRef_elements_4_real4, & + LIBMUSCLE_DataConstRef_elements_4_real8, & + LIBMUSCLE_DataConstRef_elements_4_int4, & + LIBMUSCLE_DataConstRef_elements_4_int8, & + LIBMUSCLE_DataConstRef_elements_5_logical, & + LIBMUSCLE_DataConstRef_elements_5_real4, & + LIBMUSCLE_DataConstRef_elements_5_real8, & + LIBMUSCLE_DataConstRef_elements_5_int4, & + LIBMUSCLE_DataConstRef_elements_5_int8, & + LIBMUSCLE_DataConstRef_elements_6_logical, & + LIBMUSCLE_DataConstRef_elements_6_real4, & + LIBMUSCLE_DataConstRef_elements_6_real8, & + LIBMUSCLE_DataConstRef_elements_6_int4, & + LIBMUSCLE_DataConstRef_elements_6_int8, & + LIBMUSCLE_DataConstRef_elements_7_logical, & + LIBMUSCLE_DataConstRef_elements_7_real4, & + LIBMUSCLE_DataConstRef_elements_7_real8, & + LIBMUSCLE_DataConstRef_elements_7_int4, & + LIBMUSCLE_DataConstRef_elements_7_int8 + end interface + interface LIBMUSCLE_Data_create module procedure & LIBMUSCLE_Data_create_nil, & @@ -2045,12 +3636,125 @@ end function LIBMUSCLE_Instance_receive_with_settings_psd_ LIBMUSCLE_Data_create_copy end interface + interface LIBMUSCLE_Data_create_grid + module procedure & + LIBMUSCLE_Data_create_grid_1_logical_n, & + LIBMUSCLE_Data_create_grid_1_logical_a, & + LIBMUSCLE_Data_create_grid_1_int4_n, & + LIBMUSCLE_Data_create_grid_1_int4_a, & + LIBMUSCLE_Data_create_grid_1_int8_n, & + LIBMUSCLE_Data_create_grid_1_int8_a, & + LIBMUSCLE_Data_create_grid_1_real4_n, & + LIBMUSCLE_Data_create_grid_1_real4_a, & + LIBMUSCLE_Data_create_grid_1_real8_n, & + LIBMUSCLE_Data_create_grid_1_real8_a, & + LIBMUSCLE_Data_create_grid_2_logical_n, & + LIBMUSCLE_Data_create_grid_2_logical_a, & + LIBMUSCLE_Data_create_grid_2_int4_n, & + LIBMUSCLE_Data_create_grid_2_int4_a, & + LIBMUSCLE_Data_create_grid_2_int8_n, & + LIBMUSCLE_Data_create_grid_2_int8_a, & + LIBMUSCLE_Data_create_grid_2_real4_n, & + LIBMUSCLE_Data_create_grid_2_real4_a, & + LIBMUSCLE_Data_create_grid_2_real8_n, & + LIBMUSCLE_Data_create_grid_2_real8_a, & + LIBMUSCLE_Data_create_grid_3_logical_n, & + LIBMUSCLE_Data_create_grid_3_logical_a, & + LIBMUSCLE_Data_create_grid_3_int4_n, & + LIBMUSCLE_Data_create_grid_3_int4_a, & + LIBMUSCLE_Data_create_grid_3_int8_n, & + LIBMUSCLE_Data_create_grid_3_int8_a, & + LIBMUSCLE_Data_create_grid_3_real4_n, & + LIBMUSCLE_Data_create_grid_3_real4_a, & + LIBMUSCLE_Data_create_grid_3_real8_n, & + LIBMUSCLE_Data_create_grid_3_real8_a, & + LIBMUSCLE_Data_create_grid_4_logical_n, & + LIBMUSCLE_Data_create_grid_4_logical_a, & + LIBMUSCLE_Data_create_grid_4_int4_n, & + LIBMUSCLE_Data_create_grid_4_int4_a, & + LIBMUSCLE_Data_create_grid_4_int8_n, & + LIBMUSCLE_Data_create_grid_4_int8_a, & + LIBMUSCLE_Data_create_grid_4_real4_n, & + LIBMUSCLE_Data_create_grid_4_real4_a, & + LIBMUSCLE_Data_create_grid_4_real8_n, & + LIBMUSCLE_Data_create_grid_4_real8_a, & + LIBMUSCLE_Data_create_grid_5_logical_n, & + LIBMUSCLE_Data_create_grid_5_logical_a, & + LIBMUSCLE_Data_create_grid_5_int4_n, & + LIBMUSCLE_Data_create_grid_5_int4_a, & + LIBMUSCLE_Data_create_grid_5_int8_n, & + LIBMUSCLE_Data_create_grid_5_int8_a, & + LIBMUSCLE_Data_create_grid_5_real4_n, & + LIBMUSCLE_Data_create_grid_5_real4_a, & + LIBMUSCLE_Data_create_grid_5_real8_n, & + LIBMUSCLE_Data_create_grid_5_real8_a, & + LIBMUSCLE_Data_create_grid_6_logical_n, & + LIBMUSCLE_Data_create_grid_6_logical_a, & + LIBMUSCLE_Data_create_grid_6_int4_n, & + LIBMUSCLE_Data_create_grid_6_int4_a, & + LIBMUSCLE_Data_create_grid_6_int8_n, & + LIBMUSCLE_Data_create_grid_6_int8_a, & + LIBMUSCLE_Data_create_grid_6_real4_n, & + LIBMUSCLE_Data_create_grid_6_real4_a, & + LIBMUSCLE_Data_create_grid_6_real8_n, & + LIBMUSCLE_Data_create_grid_6_real8_a, & + LIBMUSCLE_Data_create_grid_7_logical_n, & + LIBMUSCLE_Data_create_grid_7_logical_a, & + LIBMUSCLE_Data_create_grid_7_int4_n, & + LIBMUSCLE_Data_create_grid_7_int4_a, & + LIBMUSCLE_Data_create_grid_7_int8_n, & + LIBMUSCLE_Data_create_grid_7_int8_a, & + LIBMUSCLE_Data_create_grid_7_real4_n, & + LIBMUSCLE_Data_create_grid_7_real4_a, & + LIBMUSCLE_Data_create_grid_7_real8_n, & + LIBMUSCLE_Data_create_grid_7_real8_a + end interface + interface LIBMUSCLE_Data_get_item module procedure & LIBMUSCLE_Data_get_item_by_key, & LIBMUSCLE_Data_get_item_by_index end interface + interface LIBMUSCLE_Data_elements + module procedure & + LIBMUSCLE_Data_elements_1_logical, & + LIBMUSCLE_Data_elements_1_real4, & + LIBMUSCLE_Data_elements_1_real8, & + LIBMUSCLE_Data_elements_1_int4, & + LIBMUSCLE_Data_elements_1_int8, & + LIBMUSCLE_Data_elements_2_logical, & + LIBMUSCLE_Data_elements_2_real4, & + LIBMUSCLE_Data_elements_2_real8, & + LIBMUSCLE_Data_elements_2_int4, & + LIBMUSCLE_Data_elements_2_int8, & + LIBMUSCLE_Data_elements_3_logical, & + LIBMUSCLE_Data_elements_3_real4, & + LIBMUSCLE_Data_elements_3_real8, & + LIBMUSCLE_Data_elements_3_int4, & + LIBMUSCLE_Data_elements_3_int8, & + LIBMUSCLE_Data_elements_4_logical, & + LIBMUSCLE_Data_elements_4_real4, & + LIBMUSCLE_Data_elements_4_real8, & + LIBMUSCLE_Data_elements_4_int4, & + LIBMUSCLE_Data_elements_4_int8, & + LIBMUSCLE_Data_elements_5_logical, & + LIBMUSCLE_Data_elements_5_real4, & + LIBMUSCLE_Data_elements_5_real8, & + LIBMUSCLE_Data_elements_5_int4, & + LIBMUSCLE_Data_elements_5_int8, & + LIBMUSCLE_Data_elements_6_logical, & + LIBMUSCLE_Data_elements_6_real4, & + LIBMUSCLE_Data_elements_6_real8, & + LIBMUSCLE_Data_elements_6_int4, & + LIBMUSCLE_Data_elements_6_int8, & + LIBMUSCLE_Data_elements_7_logical, & + LIBMUSCLE_Data_elements_7_real4, & + LIBMUSCLE_Data_elements_7_real8, & + LIBMUSCLE_Data_elements_7_int4, & + LIBMUSCLE_Data_elements_7_int8 + end interface + interface LIBMUSCLE_Data_create_byte_array module procedure & LIBMUSCLE_Data_create_byte_array_empty, & @@ -2151,16 +3855,14 @@ end function LIBMUSCLE_Instance_receive_with_settings_psd_ interface - integer (c_intptr_t) function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_( & - count) & + integer (c_intptr_t) function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_(count) & bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_") use iso_c_binding integer (c_int), value, intent(in) :: count end function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_ - subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_( & - self) & + subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(self) & bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_") use iso_c_binding @@ -2168,7 +3870,10 @@ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_( & end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_( & - self, i, arg, arg_size) & + self, & + i, & + arg, & + arg_size) & bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_") use iso_c_binding @@ -2184,7 +3889,8 @@ end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_ contains - function LIBMUSCLE_DataConstRef_create_nil() + function LIBMUSCLE_DataConstRef_create_nil( & + ) implicit none type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_nil @@ -2196,7 +3902,8 @@ function LIBMUSCLE_DataConstRef_create_nil() LIBMUSCLE_DataConstRef_create_nil%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_nil - function LIBMUSCLE_DataConstRef_create_logical(value) + function LIBMUSCLE_DataConstRef_create_logical( & + value) implicit none logical, intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_logical @@ -2204,12 +3911,13 @@ function LIBMUSCLE_DataConstRef_create_logical(value) integer (c_intptr_t) :: ret_val ret_val = LIBMUSCLE_DataConstRef_create_logical_( & - merge(1, 0, value)) + logical(value, c_bool)) LIBMUSCLE_DataConstRef_create_logical%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_logical - function LIBMUSCLE_DataConstRef_create_character(value) + function LIBMUSCLE_DataConstRef_create_character( & + value) implicit none character (len=*), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_character @@ -2222,7 +3930,8 @@ function LIBMUSCLE_DataConstRef_create_character(value) LIBMUSCLE_DataConstRef_create_character%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_character - function LIBMUSCLE_DataConstRef_create_int1(value) + function LIBMUSCLE_DataConstRef_create_int1( & + value) implicit none integer (LIBMUSCLE_int1), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int1 @@ -2235,7 +3944,8 @@ function LIBMUSCLE_DataConstRef_create_int1(value) LIBMUSCLE_DataConstRef_create_int1%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int1 - function LIBMUSCLE_DataConstRef_create_int2(value) + function LIBMUSCLE_DataConstRef_create_int2( & + value) implicit none integer (selected_int_kind(4)), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int2 @@ -2248,7 +3958,8 @@ function LIBMUSCLE_DataConstRef_create_int2(value) LIBMUSCLE_DataConstRef_create_int2%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int2 - function LIBMUSCLE_DataConstRef_create_int4(value) + function LIBMUSCLE_DataConstRef_create_int4( & + value) implicit none integer (LIBMUSCLE_int4), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int4 @@ -2261,7 +3972,8 @@ function LIBMUSCLE_DataConstRef_create_int4(value) LIBMUSCLE_DataConstRef_create_int4%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int4 - function LIBMUSCLE_DataConstRef_create_int8(value) + function LIBMUSCLE_DataConstRef_create_int8( & + value) implicit none integer (selected_int_kind(18)), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int8 @@ -2274,7 +3986,8 @@ function LIBMUSCLE_DataConstRef_create_int8(value) LIBMUSCLE_DataConstRef_create_int8%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int8 - function LIBMUSCLE_DataConstRef_create_real4(value) + function LIBMUSCLE_DataConstRef_create_real4( & + value) implicit none real (LIBMUSCLE_real4), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_real4 @@ -2287,7 +4000,8 @@ function LIBMUSCLE_DataConstRef_create_real4(value) LIBMUSCLE_DataConstRef_create_real4%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_real4 - function LIBMUSCLE_DataConstRef_create_real8(value) + function LIBMUSCLE_DataConstRef_create_real8( & + value) implicit none real (LIBMUSCLE_real8), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_real8 @@ -2300,7 +4014,8 @@ function LIBMUSCLE_DataConstRef_create_real8(value) LIBMUSCLE_DataConstRef_create_real8%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_real8 - function LIBMUSCLE_DataConstRef_create_settings(value) + function LIBMUSCLE_DataConstRef_create_settings( & + value) implicit none type(YMMSL_Settings), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_settings @@ -2313,7 +4028,8 @@ function LIBMUSCLE_DataConstRef_create_settings(value) LIBMUSCLE_DataConstRef_create_settings%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_settings - function LIBMUSCLE_DataConstRef_create_copy(value) + function LIBMUSCLE_DataConstRef_create_copy( & + value) implicit none type(LIBMUSCLE_DataConstRef), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_copy @@ -2326,337 +4042,8565 @@ function LIBMUSCLE_DataConstRef_create_copy(value) LIBMUSCLE_DataConstRef_create_copy%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_copy - subroutine LIBMUSCLE_DataConstRef_free(self) + function LIBMUSCLE_DataConstRef_create_grid_1_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_logical_a - call LIBMUSCLE_DataConstRef_free_( & - self%ptr) - end subroutine LIBMUSCLE_DataConstRef_free + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 1_LIBMUSCLE_size) - function LIBMUSCLE_DataConstRef_is_a_logical(self) + LIBMUSCLE_DataConstRef_create_grid_1_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_logical_a + + function LIBMUSCLE_DataConstRef_create_grid_2_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_logical + logical, dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_logical_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 2_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_logical = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_logical + LIBMUSCLE_DataConstRef_create_grid_2_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_logical_a - function LIBMUSCLE_DataConstRef_is_a_character(self) + function LIBMUSCLE_DataConstRef_create_grid_3_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_character + logical, dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_character_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 3_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_character = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_character + LIBMUSCLE_DataConstRef_create_grid_3_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_logical_a - function LIBMUSCLE_DataConstRef_is_a_int(self) + function LIBMUSCLE_DataConstRef_create_grid_4_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int + logical, dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 4_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int + LIBMUSCLE_DataConstRef_create_grid_4_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_logical_a - function LIBMUSCLE_DataConstRef_is_a_int1(self) + function LIBMUSCLE_DataConstRef_create_grid_5_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int1 + logical, dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int1_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 5_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int1 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int1 + LIBMUSCLE_DataConstRef_create_grid_5_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_logical_a - function LIBMUSCLE_DataConstRef_is_a_int2(self) + function LIBMUSCLE_DataConstRef_create_grid_6_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int2 + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int2_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 6_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int2 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int2 + LIBMUSCLE_DataConstRef_create_grid_6_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_logical_a - function LIBMUSCLE_DataConstRef_is_a_int4(self) + function LIBMUSCLE_DataConstRef_create_grid_7_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int4 + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int4_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 7_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int4 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int4 + LIBMUSCLE_DataConstRef_create_grid_7_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_logical_a - function LIBMUSCLE_DataConstRef_is_a_int8(self) + function LIBMUSCLE_DataConstRef_create_grid_1_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int8 + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int8_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int8 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int8 + LIBMUSCLE_DataConstRef_create_grid_1_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int4_a - function LIBMUSCLE_DataConstRef_is_a_real4(self) + function LIBMUSCLE_DataConstRef_create_grid_2_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_real4 + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_real4_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_real4 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_real4 + LIBMUSCLE_DataConstRef_create_grid_2_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int4_a - function LIBMUSCLE_DataConstRef_is_a_real8(self) + function LIBMUSCLE_DataConstRef_create_grid_3_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_real8 + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_real8_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_real8 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_real8 + LIBMUSCLE_DataConstRef_create_grid_3_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int4_a - function LIBMUSCLE_DataConstRef_is_a_dict(self) + function LIBMUSCLE_DataConstRef_create_grid_4_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_dict + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_dict_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_dict = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_dict + LIBMUSCLE_DataConstRef_create_grid_4_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int4_a - function LIBMUSCLE_DataConstRef_is_a_list(self) + function LIBMUSCLE_DataConstRef_create_grid_5_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_list + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_list_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_list = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_list + LIBMUSCLE_DataConstRef_create_grid_5_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int4_a - function LIBMUSCLE_DataConstRef_is_a_byte_array(self) + function LIBMUSCLE_DataConstRef_create_grid_6_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_byte_array + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_byte_array_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_byte_array = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_byte_array + LIBMUSCLE_DataConstRef_create_grid_6_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int4_a - function LIBMUSCLE_DataConstRef_is_nil(self) + function LIBMUSCLE_DataConstRef_create_grid_7_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_nil + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_nil_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_nil = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_nil + LIBMUSCLE_DataConstRef_create_grid_7_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int4_a - function LIBMUSCLE_DataConstRef_is_a_settings(self) + function LIBMUSCLE_DataConstRef_create_grid_1_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_settings + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int8_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_settings_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_settings = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_settings + LIBMUSCLE_DataConstRef_create_grid_1_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int8_a - function LIBMUSCLE_DataConstRef_size(self) + function LIBMUSCLE_DataConstRef_create_grid_2_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer (LIBMUSCLE_size) :: LIBMUSCLE_DataConstRef_size + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int8_a - integer (c_size_t) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_size_( & - self%ptr) - LIBMUSCLE_DataConstRef_size = ret_val - end function LIBMUSCLE_DataConstRef_size + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_2_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int8_a - function LIBMUSCLE_DataConstRef_as_logical(self, err_code, err_msg) + function LIBMUSCLE_DataConstRef_create_grid_3_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer, optional, intent(out) :: err_code - character(:), allocatable, optional, intent(out) :: err_msg - logical :: LIBMUSCLE_DataConstRef_as_logical + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int8_a - integer (c_int) :: ret_val - integer (c_int) :: err_code_v - type (c_ptr) :: err_msg_v - integer (c_size_t) :: err_msg_len_v - character (c_char), dimension(:), pointer :: err_msg_f - character(:), allocatable :: err_msg_p - integer (c_size_t) :: err_msg_i + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_as_logical_( & - self%ptr, & - err_code_v, & - err_msg_v, & - err_msg_len_v) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) - if (err_code_v .ne. 0) then - if (present(err_code)) then - err_code = err_code_v - if (present(err_msg)) then - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg) - do err_msg_i = 1, err_msg_len_v - err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - end if - return - else - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg_p) - do err_msg_i = 1, err_msg_len_v - err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - print *, err_msg_p - stop - end if - else - if (present(err_code)) then - err_code = 0 - end if - end if + LIBMUSCLE_DataConstRef_create_grid_3_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int8_a - LIBMUSCLE_DataConstRef_as_logical = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_as_logical + function LIBMUSCLE_DataConstRef_create_grid_4_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int8_a + + integer (c_intptr_t) :: ret_val - function LIBMUSCLE_DataConstRef_as_character(self, err_code, err_msg) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_4_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int8_a + + function LIBMUSCLE_DataConstRef_create_grid_5_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer, optional, intent(out) :: err_code - character(:), allocatable, optional, intent(out) :: err_msg - character(:), allocatable :: LIBMUSCLE_DataConstRef_as_character + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int8_a - type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character (c_char), dimension(:), pointer :: f_ret_ptr - integer :: i_loop - integer (c_int) :: err_code_v - type (c_ptr) :: err_msg_v - integer (c_size_t) :: err_msg_len_v - character (c_char), dimension(:), pointer :: err_msg_f - character(:), allocatable :: err_msg_p - integer (c_size_t) :: err_msg_i + integer (c_intptr_t) :: ret_val - call LIBMUSCLE_DataConstRef_as_character_( & - self%ptr, & - ret_val, & - ret_val_size, & - err_code_v, & - err_msg_v, & - err_msg_len_v) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) - if (err_code_v .ne. 0) then - if (present(err_code)) then - err_code = err_code_v - if (present(err_msg)) then - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg) - do err_msg_i = 1, err_msg_len_v - err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - end if - return - else - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg_p) - do err_msg_i = 1, err_msg_len_v - err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - print *, err_msg_p - stop - end if - else - if (present(err_code)) then - err_code = 0 - end if - end if + LIBMUSCLE_DataConstRef_create_grid_5_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int8_a - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) - allocate (character(ret_val_size) :: LIBMUSCLE_DataConstRef_as_character) - do i_loop = 1, ret_val_size - LIBMUSCLE_DataConstRef_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) - end do - end function LIBMUSCLE_DataConstRef_as_character + function LIBMUSCLE_DataConstRef_create_grid_6_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_6_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int8_a - function LIBMUSCLE_DataConstRef_as_int(self, err_code, err_msg) + function LIBMUSCLE_DataConstRef_create_grid_7_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer, optional, intent(out) :: err_code - character(:), allocatable, optional, intent(out) :: err_msg - integer :: LIBMUSCLE_DataConstRef_as_int + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int8_a - integer (c_int) :: ret_val - integer (c_int) :: err_code_v - type (c_ptr) :: err_msg_v - integer (c_size_t) :: err_msg_len_v - character (c_char), dimension(:), pointer :: err_msg_f - character(:), allocatable :: err_msg_p - integer (c_size_t) :: err_msg_i + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_as_int_( & - self%ptr, & - err_code_v, & - err_msg_v, & + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_7_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int8_a + + function LIBMUSCLE_DataConstRef_create_grid_1_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_1_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_2_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_2_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_3_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_3_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_4_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_4_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_5_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_5_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_6_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_6_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_7_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_7_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_1_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_1_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_2_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_2_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_3_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_3_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_4_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_4_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_5_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_5_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_6_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_6_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_7_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_7_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_1_logical_n( & + data_array, & + index_name_1) + + implicit none + logical, dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_2_logical_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + logical, dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_3_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + logical, dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_4_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + logical, dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_5_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + logical, dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_6_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_7_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_1_int4_n( & + data_array, & + index_name_1) + + implicit none + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_2_int4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_3_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_4_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_5_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_6_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_7_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_1_int8_n( & + data_array, & + index_name_1) + + implicit none + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_2_int8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_3_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_4_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_5_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_6_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_7_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_1_real4_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_2_real4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_3_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_4_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_5_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_6_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_7_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_1_real8_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_2_real8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_3_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_4_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_5_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_6_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_7_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real8_n + + subroutine LIBMUSCLE_DataConstRef_free( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + + call LIBMUSCLE_DataConstRef_free_( & + self%ptr) + end subroutine LIBMUSCLE_DataConstRef_free + + function LIBMUSCLE_DataConstRef_is_a_logical( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_logical_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_logical = ret_val + end function LIBMUSCLE_DataConstRef_is_a_logical + + function LIBMUSCLE_DataConstRef_is_a_character( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_character + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_character_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_character = ret_val + end function LIBMUSCLE_DataConstRef_is_a_character + + function LIBMUSCLE_DataConstRef_is_a_int( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int + + function LIBMUSCLE_DataConstRef_is_a_int1( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int1 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int1_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int1 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int1 + + function LIBMUSCLE_DataConstRef_is_a_int2( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int2 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int2_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int2 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int2 + + function LIBMUSCLE_DataConstRef_is_a_int4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int4 + + function LIBMUSCLE_DataConstRef_is_a_int8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int8 + + function LIBMUSCLE_DataConstRef_is_a_real4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_real4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_real4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_real4 + + function LIBMUSCLE_DataConstRef_is_a_real8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_real8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_real8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_real8 + + function LIBMUSCLE_DataConstRef_is_a_dict( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_dict + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_dict_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_dict = ret_val + end function LIBMUSCLE_DataConstRef_is_a_dict + + function LIBMUSCLE_DataConstRef_is_a_list( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_list + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_list_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_list = ret_val + end function LIBMUSCLE_DataConstRef_is_a_list + + function LIBMUSCLE_DataConstRef_is_a_grid_of_logical( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_logical_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_logical = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_logical + + function LIBMUSCLE_DataConstRef_is_a_grid_of_real4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_real4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_real4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real4 + + function LIBMUSCLE_DataConstRef_is_a_grid_of_real8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_real8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_real8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real8 + + function LIBMUSCLE_DataConstRef_is_a_grid_of_int4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_int4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_int4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int4 + + function LIBMUSCLE_DataConstRef_is_a_grid_of_int8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_int8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_int8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int8 + + function LIBMUSCLE_DataConstRef_is_a_byte_array( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_byte_array + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_byte_array_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_byte_array = ret_val + end function LIBMUSCLE_DataConstRef_is_a_byte_array + + function LIBMUSCLE_DataConstRef_is_nil( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_nil + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_nil_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_nil = ret_val + end function LIBMUSCLE_DataConstRef_is_nil + + function LIBMUSCLE_DataConstRef_is_a_settings( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_settings + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_settings_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_settings = ret_val + end function LIBMUSCLE_DataConstRef_is_a_settings + + function LIBMUSCLE_DataConstRef_size( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size) :: LIBMUSCLE_DataConstRef_size + + integer (c_size_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_size_( & + self%ptr) + LIBMUSCLE_DataConstRef_size = ret_val + end function LIBMUSCLE_DataConstRef_size + + function LIBMUSCLE_DataConstRef_as_logical( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + logical :: LIBMUSCLE_DataConstRef_as_logical + + logical (c_bool) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_logical_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_logical = ret_val + end function LIBMUSCLE_DataConstRef_as_logical + + function LIBMUSCLE_DataConstRef_as_character( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + character(:), allocatable :: LIBMUSCLE_DataConstRef_as_character + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_as_character_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + allocate (character(ret_val_size) :: LIBMUSCLE_DataConstRef_as_character) + do i_loop = 1, ret_val_size + LIBMUSCLE_DataConstRef_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) + end do + end function LIBMUSCLE_DataConstRef_as_character + + function LIBMUSCLE_DataConstRef_as_int( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer :: LIBMUSCLE_DataConstRef_as_int + + integer (c_int) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int = ret_val + end function LIBMUSCLE_DataConstRef_as_int + + function LIBMUSCLE_DataConstRef_as_int1( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int1) :: LIBMUSCLE_DataConstRef_as_int1 + + integer (c_int8_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int1_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int1 = ret_val + end function LIBMUSCLE_DataConstRef_as_int1 + + function LIBMUSCLE_DataConstRef_as_int2( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(4)) :: LIBMUSCLE_DataConstRef_as_int2 + + integer (c_short) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int2_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int2 = ret_val + end function LIBMUSCLE_DataConstRef_as_int2 + + function LIBMUSCLE_DataConstRef_as_int4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int4) :: LIBMUSCLE_DataConstRef_as_int4 + + integer (c_int32_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int4 = ret_val + end function LIBMUSCLE_DataConstRef_as_int4 + + function LIBMUSCLE_DataConstRef_as_int8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(18)) :: LIBMUSCLE_DataConstRef_as_int8 + + integer (c_int64_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int8 = ret_val + end function LIBMUSCLE_DataConstRef_as_int8 + + function LIBMUSCLE_DataConstRef_as_real4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real4) :: LIBMUSCLE_DataConstRef_as_real4 + + real (c_float) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_real4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_real4 = ret_val + end function LIBMUSCLE_DataConstRef_as_real4 + + function LIBMUSCLE_DataConstRef_as_real8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real8) :: LIBMUSCLE_DataConstRef_as_real8 + + real (c_double) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_real8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_real8 = ret_val + end function LIBMUSCLE_DataConstRef_as_real8 + + function LIBMUSCLE_DataConstRef_as_settings( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(YMMSL_Settings) :: LIBMUSCLE_DataConstRef_as_settings + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_settings_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_settings%ptr = ret_val + end function LIBMUSCLE_DataConstRef_as_settings + + subroutine LIBMUSCLE_DataConstRef_as_byte_array( & + self, & + data, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + character(len=1), dimension(:), intent(out) :: data + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_as_byte_array_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + data = f_ret_ptr + end subroutine LIBMUSCLE_DataConstRef_as_byte_array + + function LIBMUSCLE_DataConstRef_get_item_by_key( & + self, & + key, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + character (len=*), intent(in) :: key + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_key + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_get_item_by_key_( & + self%ptr, & + key, int(len(key), c_size_t), & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_get_item_by_key%ptr = ret_val + end function LIBMUSCLE_DataConstRef_get_item_by_key + + function LIBMUSCLE_DataConstRef_get_item_by_index( & + self, & + i, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size), intent(in) :: i + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_index + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_get_item_by_index_( & + self%ptr, & + i, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_get_item_by_index%ptr = ret_val + end function LIBMUSCLE_DataConstRef_get_item_by_index + + function LIBMUSCLE_DataConstRef_num_dims( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_size) :: LIBMUSCLE_DataConstRef_num_dims + + integer (c_size_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_num_dims_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_num_dims = ret_val + end function LIBMUSCLE_DataConstRef_num_dims + + subroutine LIBMUSCLE_DataConstRef_shape( & + self, & + shp, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size), dimension(:), intent(out) :: shp + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + integer (LIBMUSCLE_size), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_shape_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + shp = f_ret_ptr + end subroutine LIBMUSCLE_DataConstRef_shape + + subroutine LIBMUSCLE_DataConstRef_elements_1_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_logical + + subroutine LIBMUSCLE_DataConstRef_elements_2_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_logical + + subroutine LIBMUSCLE_DataConstRef_elements_3_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_logical + + subroutine LIBMUSCLE_DataConstRef_elements_4_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_logical + + subroutine LIBMUSCLE_DataConstRef_elements_5_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_logical + + subroutine LIBMUSCLE_DataConstRef_elements_6_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_logical + + subroutine LIBMUSCLE_DataConstRef_elements_7_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_logical + + subroutine LIBMUSCLE_DataConstRef_elements_1_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_2_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_3_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_4_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_5_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_6_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_7_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_1_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_2_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_3_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_4_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_5_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_6_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_7_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_1_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_2_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_3_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_4_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_5_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_6_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_7_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_1_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_2_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_3_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_4_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_5_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_6_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_7_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_real8 + + function LIBMUSCLE_DataConstRef_has_indexes( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + logical :: LIBMUSCLE_DataConstRef_has_indexes + + logical (c_bool) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_has_indexes_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_has_indexes = ret_val + end function LIBMUSCLE_DataConstRef_has_indexes + + function LIBMUSCLE_DataConstRef_index( & + self, & + i, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size), intent(in) :: i + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + character(:), allocatable :: LIBMUSCLE_DataConstRef_index + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_index_( & + self%ptr, & + i, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + allocate (character(ret_val_size) :: LIBMUSCLE_DataConstRef_index) + do i_loop = 1, ret_val_size + LIBMUSCLE_DataConstRef_index(i_loop:i_loop) = f_ret_ptr(i_loop) + end do + end function LIBMUSCLE_DataConstRef_index + + function LIBMUSCLE_Data_create_nil( & + ) + implicit none + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_nil + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_nil_( & + ) + + LIBMUSCLE_Data_create_nil%ptr = ret_val + end function LIBMUSCLE_Data_create_nil + + function LIBMUSCLE_Data_create_logical( & + value) + implicit none + logical, intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_logical + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_logical_( & + logical(value, c_bool)) + + LIBMUSCLE_Data_create_logical%ptr = ret_val + end function LIBMUSCLE_Data_create_logical + + function LIBMUSCLE_Data_create_character( & + value) + implicit none + character (len=*), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_character + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_character_( & + value, int(len(value), c_size_t)) + + LIBMUSCLE_Data_create_character%ptr = ret_val + end function LIBMUSCLE_Data_create_character + + function LIBMUSCLE_Data_create_int1( & + value) + implicit none + integer (LIBMUSCLE_int1), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int1 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int1_( & + value) + + LIBMUSCLE_Data_create_int1%ptr = ret_val + end function LIBMUSCLE_Data_create_int1 + + function LIBMUSCLE_Data_create_int2( & + value) + implicit none + integer (selected_int_kind(4)), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int2 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int2_( & + value) + + LIBMUSCLE_Data_create_int2%ptr = ret_val + end function LIBMUSCLE_Data_create_int2 + + function LIBMUSCLE_Data_create_int4( & + value) + implicit none + integer (LIBMUSCLE_int4), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int4 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int4_( & + value) + + LIBMUSCLE_Data_create_int4%ptr = ret_val + end function LIBMUSCLE_Data_create_int4 + + function LIBMUSCLE_Data_create_int8( & + value) + implicit none + integer (selected_int_kind(18)), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int8 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int8_( & + value) + + LIBMUSCLE_Data_create_int8%ptr = ret_val + end function LIBMUSCLE_Data_create_int8 + + function LIBMUSCLE_Data_create_real4( & + value) + implicit none + real (LIBMUSCLE_real4), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real4 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_real4_( & + value) + + LIBMUSCLE_Data_create_real4%ptr = ret_val + end function LIBMUSCLE_Data_create_real4 + + function LIBMUSCLE_Data_create_real8( & + value) + implicit none + real (LIBMUSCLE_real8), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real8 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_real8_( & + value) + + LIBMUSCLE_Data_create_real8%ptr = ret_val + end function LIBMUSCLE_Data_create_real8 + + function LIBMUSCLE_Data_create_settings( & + value) + implicit none + type(YMMSL_Settings), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_settings + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_settings_( & + value%ptr) + + LIBMUSCLE_Data_create_settings%ptr = ret_val + end function LIBMUSCLE_Data_create_settings + + function LIBMUSCLE_Data_create_copy( & + value) + implicit none + type(LIBMUSCLE_Data), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_copy + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_copy_( & + value%ptr) + + LIBMUSCLE_Data_create_copy%ptr = ret_val + end function LIBMUSCLE_Data_create_copy + + function LIBMUSCLE_Data_create_grid_1_logical_a( & + data_array) + implicit none + logical, dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_logical_a + + function LIBMUSCLE_Data_create_grid_2_logical_a( & + data_array) + implicit none + logical, dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_logical_a + + function LIBMUSCLE_Data_create_grid_3_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_logical_a + + function LIBMUSCLE_Data_create_grid_4_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_logical_a + + function LIBMUSCLE_Data_create_grid_5_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_logical_a + + function LIBMUSCLE_Data_create_grid_6_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_logical_a + + function LIBMUSCLE_Data_create_grid_7_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_logical_a + + function LIBMUSCLE_Data_create_grid_1_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int4_a + + function LIBMUSCLE_Data_create_grid_2_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int4_a + + function LIBMUSCLE_Data_create_grid_3_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int4_a + + function LIBMUSCLE_Data_create_grid_4_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int4_a + + function LIBMUSCLE_Data_create_grid_5_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int4_a + + function LIBMUSCLE_Data_create_grid_6_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int4_a + + function LIBMUSCLE_Data_create_grid_7_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int4_a + + function LIBMUSCLE_Data_create_grid_1_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int8_a + + function LIBMUSCLE_Data_create_grid_2_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int8_a + + function LIBMUSCLE_Data_create_grid_3_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int8_a + + function LIBMUSCLE_Data_create_grid_4_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int8_a + + function LIBMUSCLE_Data_create_grid_5_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int8_a + + function LIBMUSCLE_Data_create_grid_6_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int8_a + + function LIBMUSCLE_Data_create_grid_7_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int8_a + + function LIBMUSCLE_Data_create_grid_1_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real4_a + + function LIBMUSCLE_Data_create_grid_2_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real4_a + + function LIBMUSCLE_Data_create_grid_3_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real4_a + + function LIBMUSCLE_Data_create_grid_4_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real4_a + + function LIBMUSCLE_Data_create_grid_5_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real4_a + + function LIBMUSCLE_Data_create_grid_6_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real4_a + + function LIBMUSCLE_Data_create_grid_7_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real4_a + + function LIBMUSCLE_Data_create_grid_1_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real8_a + + function LIBMUSCLE_Data_create_grid_2_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real8_a + + function LIBMUSCLE_Data_create_grid_3_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real8_a + + function LIBMUSCLE_Data_create_grid_4_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real8_a + + function LIBMUSCLE_Data_create_grid_5_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real8_a + + function LIBMUSCLE_Data_create_grid_6_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real8_a + + function LIBMUSCLE_Data_create_grid_7_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real8_a + + function LIBMUSCLE_Data_create_grid_1_logical_n( & + data_array, & + index_name_1) + + implicit none + logical, dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_logical_n + + function LIBMUSCLE_Data_create_grid_2_logical_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + logical, dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_logical_n + + function LIBMUSCLE_Data_create_grid_3_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + logical, dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_logical_n + + function LIBMUSCLE_Data_create_grid_4_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + logical, dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_logical_n + + function LIBMUSCLE_Data_create_grid_5_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + logical, dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_logical_n + + function LIBMUSCLE_Data_create_grid_6_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_logical_n + + function LIBMUSCLE_Data_create_grid_7_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_logical_n + + function LIBMUSCLE_Data_create_grid_1_int4_n( & + data_array, & + index_name_1) + + implicit none + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int4_n + + function LIBMUSCLE_Data_create_grid_2_int4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int4_n + + function LIBMUSCLE_Data_create_grid_3_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int4_n + + function LIBMUSCLE_Data_create_grid_4_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int4_n + + function LIBMUSCLE_Data_create_grid_5_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int4_n + + function LIBMUSCLE_Data_create_grid_6_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int4_n + + function LIBMUSCLE_Data_create_grid_7_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int4_n + + function LIBMUSCLE_Data_create_grid_1_int8_n( & + data_array, & + index_name_1) + + implicit none + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int8_n + + function LIBMUSCLE_Data_create_grid_2_int8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int8_n + + function LIBMUSCLE_Data_create_grid_3_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int8_n + + function LIBMUSCLE_Data_create_grid_4_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int8_n + + function LIBMUSCLE_Data_create_grid_5_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int8_n + + function LIBMUSCLE_Data_create_grid_6_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int8_n + + function LIBMUSCLE_Data_create_grid_7_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int8_n + + function LIBMUSCLE_Data_create_grid_1_real4_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real4_n + + function LIBMUSCLE_Data_create_grid_2_real4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real4_n + + function LIBMUSCLE_Data_create_grid_3_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real4_n + + function LIBMUSCLE_Data_create_grid_4_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real4_n + + function LIBMUSCLE_Data_create_grid_5_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real4_n + + function LIBMUSCLE_Data_create_grid_6_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real4_n + + function LIBMUSCLE_Data_create_grid_7_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real4_n + + function LIBMUSCLE_Data_create_grid_1_real8_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real8_n + + function LIBMUSCLE_Data_create_grid_2_real8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real8_n + + function LIBMUSCLE_Data_create_grid_3_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real8_n + + function LIBMUSCLE_Data_create_grid_4_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real8_n + + function LIBMUSCLE_Data_create_grid_5_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real8_n + + function LIBMUSCLE_Data_create_grid_6_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real8_n + + function LIBMUSCLE_Data_create_grid_7_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real8_n + + subroutine LIBMUSCLE_Data_free( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + + call LIBMUSCLE_Data_free_( & + self%ptr) + end subroutine LIBMUSCLE_Data_free + + function LIBMUSCLE_Data_is_a_logical( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_logical_( & + self%ptr) + + LIBMUSCLE_Data_is_a_logical = ret_val + end function LIBMUSCLE_Data_is_a_logical + + function LIBMUSCLE_Data_is_a_character( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_character + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_character_( & + self%ptr) + + LIBMUSCLE_Data_is_a_character = ret_val + end function LIBMUSCLE_Data_is_a_character + + function LIBMUSCLE_Data_is_a_int( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int = ret_val + end function LIBMUSCLE_Data_is_a_int + + function LIBMUSCLE_Data_is_a_int1( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int1 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int1_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int1 = ret_val + end function LIBMUSCLE_Data_is_a_int1 + + function LIBMUSCLE_Data_is_a_int2( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int2 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int2_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int2 = ret_val + end function LIBMUSCLE_Data_is_a_int2 + + function LIBMUSCLE_Data_is_a_int4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int4 = ret_val + end function LIBMUSCLE_Data_is_a_int4 + + function LIBMUSCLE_Data_is_a_int8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int8 = ret_val + end function LIBMUSCLE_Data_is_a_int8 + + function LIBMUSCLE_Data_is_a_real4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_real4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_real4 = ret_val + end function LIBMUSCLE_Data_is_a_real4 + + function LIBMUSCLE_Data_is_a_real8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_real8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_real8 = ret_val + end function LIBMUSCLE_Data_is_a_real8 + + function LIBMUSCLE_Data_is_a_dict( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_dict + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_dict_( & + self%ptr) + + LIBMUSCLE_Data_is_a_dict = ret_val + end function LIBMUSCLE_Data_is_a_dict + + function LIBMUSCLE_Data_is_a_list( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_list + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_list_( & + self%ptr) + + LIBMUSCLE_Data_is_a_list = ret_val + end function LIBMUSCLE_Data_is_a_list + + function LIBMUSCLE_Data_is_a_grid_of_logical( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_logical_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_logical = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_logical + + function LIBMUSCLE_Data_is_a_grid_of_real4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_real4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_real4 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_real4 + + function LIBMUSCLE_Data_is_a_grid_of_real8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_real8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_real8 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_real8 + + function LIBMUSCLE_Data_is_a_grid_of_int4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_int4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_int4 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_int4 + + function LIBMUSCLE_Data_is_a_grid_of_int8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_int8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_int8 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_int8 + + function LIBMUSCLE_Data_is_a_byte_array( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_byte_array + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_byte_array_( & + self%ptr) + + LIBMUSCLE_Data_is_a_byte_array = ret_val + end function LIBMUSCLE_Data_is_a_byte_array + + function LIBMUSCLE_Data_is_nil( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_nil + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_nil_( & + self%ptr) + + LIBMUSCLE_Data_is_nil = ret_val + end function LIBMUSCLE_Data_is_nil + + function LIBMUSCLE_Data_is_a_settings( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_settings + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_settings_( & + self%ptr) + + LIBMUSCLE_Data_is_a_settings = ret_val + end function LIBMUSCLE_Data_is_a_settings + + function LIBMUSCLE_Data_size( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_size) :: LIBMUSCLE_Data_size + + integer (c_size_t) :: ret_val + + ret_val = LIBMUSCLE_Data_size_( & + self%ptr) + LIBMUSCLE_Data_size = ret_val + end function LIBMUSCLE_Data_size + + function LIBMUSCLE_Data_as_logical( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + logical :: LIBMUSCLE_Data_as_logical + + logical (c_bool) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_logical_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_logical = ret_val + end function LIBMUSCLE_Data_as_logical + + function LIBMUSCLE_Data_as_character( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + character(:), allocatable :: LIBMUSCLE_Data_as_character + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_as_character_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + allocate (character(ret_val_size) :: LIBMUSCLE_Data_as_character) + do i_loop = 1, ret_val_size + LIBMUSCLE_Data_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) + end do + end function LIBMUSCLE_Data_as_character + + function LIBMUSCLE_Data_as_int( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer :: LIBMUSCLE_Data_as_int + + integer (c_int) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int = ret_val + end function LIBMUSCLE_Data_as_int + + function LIBMUSCLE_Data_as_int1( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int1) :: LIBMUSCLE_Data_as_int1 + + integer (c_int8_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int1_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int1 = ret_val + end function LIBMUSCLE_Data_as_int1 + + function LIBMUSCLE_Data_as_int2( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(4)) :: LIBMUSCLE_Data_as_int2 + + integer (c_short) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int2_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int2 = ret_val + end function LIBMUSCLE_Data_as_int2 + + function LIBMUSCLE_Data_as_int4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int4) :: LIBMUSCLE_Data_as_int4 + + integer (c_int32_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int4 = ret_val + end function LIBMUSCLE_Data_as_int4 + + function LIBMUSCLE_Data_as_int8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(18)) :: LIBMUSCLE_Data_as_int8 + + integer (c_int64_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int8 = ret_val + end function LIBMUSCLE_Data_as_int8 + + function LIBMUSCLE_Data_as_real4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real4) :: LIBMUSCLE_Data_as_real4 + + real (c_float) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_real4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_real4 = ret_val + end function LIBMUSCLE_Data_as_real4 + + function LIBMUSCLE_Data_as_real8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real8) :: LIBMUSCLE_Data_as_real8 + + real (c_double) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_real8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_real8 = ret_val + end function LIBMUSCLE_Data_as_real8 + + function LIBMUSCLE_Data_as_settings( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(YMMSL_Settings) :: LIBMUSCLE_Data_as_settings + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_settings_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_settings%ptr = ret_val + end function LIBMUSCLE_Data_as_settings + + subroutine LIBMUSCLE_Data_as_byte_array( & + self, & + data, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + character(len=1), dimension(:), intent(out) :: data + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_as_byte_array_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + data = f_ret_ptr + end subroutine LIBMUSCLE_Data_as_byte_array + + function LIBMUSCLE_Data_get_item_by_key( & + self, & + key, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + character (len=*), intent(in) :: key + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_key + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_get_item_by_key_( & + self%ptr, & + key, int(len(key), c_size_t), & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_get_item_by_key%ptr = ret_val + end function LIBMUSCLE_Data_get_item_by_key + + function LIBMUSCLE_Data_get_item_by_index( & + self, & + i, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_size), intent(in) :: i + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_index + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_get_item_by_index_( & + self%ptr, & + i, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_get_item_by_index%ptr = ret_val + end function LIBMUSCLE_Data_get_item_by_index + + function LIBMUSCLE_Data_num_dims( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_size) :: LIBMUSCLE_Data_num_dims + + integer (c_size_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_num_dims_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_num_dims = ret_val + end function LIBMUSCLE_Data_num_dims + + subroutine LIBMUSCLE_Data_shape( & + self, & + shp, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_size), dimension(:), intent(out) :: shp + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + integer (LIBMUSCLE_size), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_shape_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + shp = f_ret_ptr + end subroutine LIBMUSCLE_Data_shape + + subroutine LIBMUSCLE_Data_elements_1_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_logical + + subroutine LIBMUSCLE_Data_elements_2_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_logical + + subroutine LIBMUSCLE_Data_elements_3_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_logical + + subroutine LIBMUSCLE_Data_elements_4_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_logical + + subroutine LIBMUSCLE_Data_elements_5_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_logical + + subroutine LIBMUSCLE_Data_elements_6_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2683,17 +12627,32 @@ function LIBMUSCLE_DataConstRef_as_int(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int = ret_val - end function LIBMUSCLE_DataConstRef_as_int + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_logical + + subroutine LIBMUSCLE_Data_elements_7_logical( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int1(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int1) :: LIBMUSCLE_DataConstRef_as_int1 - integer (c_int8_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2701,11 +12660,16 @@ function LIBMUSCLE_DataConstRef_as_int1(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int1_( & + call LIBMUSCLE_Data_elements_logical_( & self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2732,17 +12696,32 @@ function LIBMUSCLE_DataConstRef_as_int1(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int1 = ret_val - end function LIBMUSCLE_DataConstRef_as_int1 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_logical + + subroutine LIBMUSCLE_Data_elements_1_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int2(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(4)) :: LIBMUSCLE_DataConstRef_as_int2 - integer (c_short) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2750,11 +12729,16 @@ function LIBMUSCLE_DataConstRef_as_int2(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int2_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2781,17 +12765,32 @@ function LIBMUSCLE_DataConstRef_as_int2(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int2 = ret_val - end function LIBMUSCLE_DataConstRef_as_int2 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_int4 + + subroutine LIBMUSCLE_Data_elements_2_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int4(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int4) :: LIBMUSCLE_DataConstRef_as_int4 - integer (c_int32_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2799,11 +12798,16 @@ function LIBMUSCLE_DataConstRef_as_int4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int4_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2830,17 +12834,32 @@ function LIBMUSCLE_DataConstRef_as_int4(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int4 = ret_val - end function LIBMUSCLE_DataConstRef_as_int4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_int4 + + subroutine LIBMUSCLE_Data_elements_3_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int8(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(18)) :: LIBMUSCLE_DataConstRef_as_int8 - integer (c_int64_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2848,11 +12867,16 @@ function LIBMUSCLE_DataConstRef_as_int8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int8_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2879,17 +12903,32 @@ function LIBMUSCLE_DataConstRef_as_int8(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int8 = ret_val - end function LIBMUSCLE_DataConstRef_as_int8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_int4 + + subroutine LIBMUSCLE_Data_elements_4_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_real4(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real4) :: LIBMUSCLE_DataConstRef_as_real4 - real (c_float) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2897,11 +12936,16 @@ function LIBMUSCLE_DataConstRef_as_real4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_real4_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2928,17 +12972,32 @@ function LIBMUSCLE_DataConstRef_as_real4(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_real4 = ret_val - end function LIBMUSCLE_DataConstRef_as_real4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_int4 + + subroutine LIBMUSCLE_Data_elements_5_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_real8(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real8) :: LIBMUSCLE_DataConstRef_as_real8 - real (c_double) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2946,11 +13005,16 @@ function LIBMUSCLE_DataConstRef_as_real8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_real8_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2977,17 +13041,239 @@ function LIBMUSCLE_DataConstRef_as_real8(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_real8 = ret_val - end function LIBMUSCLE_DataConstRef_as_real8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_int4 + + subroutine LIBMUSCLE_Data_elements_6_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_settings(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_int4_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_int4 + + subroutine LIBMUSCLE_Data_elements_7_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_int4_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_int4 + + subroutine LIBMUSCLE_Data_elements_1_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_int8_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_int8 + + subroutine LIBMUSCLE_Data_elements_2_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(YMMSL_Settings) :: LIBMUSCLE_DataConstRef_as_settings - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2995,8 +13281,12 @@ function LIBMUSCLE_DataConstRef_as_settings(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_settings_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3027,19 +13317,32 @@ function LIBMUSCLE_DataConstRef_as_settings(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_settings%ptr = ret_val - end function LIBMUSCLE_DataConstRef_as_settings + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_int8 + + subroutine LIBMUSCLE_Data_elements_3_int8( & + self, & + elements, & + err_code, & + err_msg) - subroutine LIBMUSCLE_DataConstRef_as_byte_array(self, data, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - character(len=1), dimension(:), intent(out) :: data + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3047,10 +13350,12 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array(self, data, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - call LIBMUSCLE_DataConstRef_as_byte_array_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & + 3_LIBMUSCLE_size, & ret_val, & - ret_val_size, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3081,19 +13386,32 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array(self, data, err_code, err_msg) end if end if - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) - data = f_ret_ptr - end subroutine LIBMUSCLE_DataConstRef_as_byte_array + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_int8 + + subroutine LIBMUSCLE_Data_elements_4_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_get_item_by_key(self, key, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - character (len=*), intent(in) :: key + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_key - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3101,9 +13419,12 @@ function LIBMUSCLE_DataConstRef_get_item_by_key(self, key, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_get_item_by_key_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & - key, int(len(key), c_size_t), & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3134,18 +13455,32 @@ function LIBMUSCLE_DataConstRef_get_item_by_key(self, key, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_get_item_by_key%ptr = ret_val - end function LIBMUSCLE_DataConstRef_get_item_by_key + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_int8 + + subroutine LIBMUSCLE_Data_elements_5_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_get_item_by_index(self, i, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer (LIBMUSCLE_size), intent(in) :: i + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_index - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3153,9 +13488,12 @@ function LIBMUSCLE_DataConstRef_get_item_by_index(self, i, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_get_item_by_index_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & - i, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3186,361 +13524,377 @@ function LIBMUSCLE_DataConstRef_get_item_by_index(self, i, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_get_item_by_index%ptr = ret_val - end function LIBMUSCLE_DataConstRef_get_item_by_index - - function LIBMUSCLE_Data_create_nil() - implicit none - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_nil - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_nil_( & - ) - - LIBMUSCLE_Data_create_nil%ptr = ret_val - end function LIBMUSCLE_Data_create_nil - - function LIBMUSCLE_Data_create_logical(value) - implicit none - logical, intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_logical - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_logical_( & - merge(1, 0, value)) - - LIBMUSCLE_Data_create_logical%ptr = ret_val - end function LIBMUSCLE_Data_create_logical - - function LIBMUSCLE_Data_create_character(value) - implicit none - character (len=*), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_character - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_character_( & - value, int(len(value), c_size_t)) - - LIBMUSCLE_Data_create_character%ptr = ret_val - end function LIBMUSCLE_Data_create_character - - function LIBMUSCLE_Data_create_int1(value) - implicit none - integer (LIBMUSCLE_int1), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int1 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int1_( & - value) - - LIBMUSCLE_Data_create_int1%ptr = ret_val - end function LIBMUSCLE_Data_create_int1 - - function LIBMUSCLE_Data_create_int2(value) - implicit none - integer (selected_int_kind(4)), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int2 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int2_( & - value) - - LIBMUSCLE_Data_create_int2%ptr = ret_val - end function LIBMUSCLE_Data_create_int2 - - function LIBMUSCLE_Data_create_int4(value) - implicit none - integer (LIBMUSCLE_int4), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int4 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int4_( & - value) - - LIBMUSCLE_Data_create_int4%ptr = ret_val - end function LIBMUSCLE_Data_create_int4 - - function LIBMUSCLE_Data_create_int8(value) - implicit none - integer (selected_int_kind(18)), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int8 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int8_( & - value) - - LIBMUSCLE_Data_create_int8%ptr = ret_val - end function LIBMUSCLE_Data_create_int8 - - function LIBMUSCLE_Data_create_real4(value) - implicit none - real (LIBMUSCLE_real4), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real4 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_real4_( & - value) - - LIBMUSCLE_Data_create_real4%ptr = ret_val - end function LIBMUSCLE_Data_create_real4 - - function LIBMUSCLE_Data_create_real8(value) - implicit none - real (LIBMUSCLE_real8), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real8 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_real8_( & - value) - - LIBMUSCLE_Data_create_real8%ptr = ret_val - end function LIBMUSCLE_Data_create_real8 - - function LIBMUSCLE_Data_create_settings(value) - implicit none - type(YMMSL_Settings), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_settings - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_settings_( & - value%ptr) - - LIBMUSCLE_Data_create_settings%ptr = ret_val - end function LIBMUSCLE_Data_create_settings - - function LIBMUSCLE_Data_create_copy(value) - implicit none - type(LIBMUSCLE_Data), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_copy - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_copy_( & - value%ptr) - - LIBMUSCLE_Data_create_copy%ptr = ret_val - end function LIBMUSCLE_Data_create_copy - - subroutine LIBMUSCLE_Data_free(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - - call LIBMUSCLE_Data_free_( & - self%ptr) - end subroutine LIBMUSCLE_Data_free - - function LIBMUSCLE_Data_is_a_logical(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_logical - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_logical_( & - self%ptr) - - LIBMUSCLE_Data_is_a_logical = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_logical - - function LIBMUSCLE_Data_is_a_character(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_character - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_character_( & - self%ptr) - - LIBMUSCLE_Data_is_a_character = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_character - - function LIBMUSCLE_Data_is_a_int(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int - - function LIBMUSCLE_Data_is_a_int1(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int1 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int1_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int1 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int1 - - function LIBMUSCLE_Data_is_a_int2(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int2 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int2_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int2 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int2 - - function LIBMUSCLE_Data_is_a_int4(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int4 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int4_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int4 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_int8 + + subroutine LIBMUSCLE_Data_elements_6_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_int8(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int8 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int8_( & - self%ptr) + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - LIBMUSCLE_Data_is_a_int8 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int8 + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - function LIBMUSCLE_Data_is_a_real4(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_real4 + call LIBMUSCLE_Data_elements_int8_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - integer (c_int) :: ret_val + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - ret_val = LIBMUSCLE_Data_is_a_real4_( & - self%ptr) + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_int8 - LIBMUSCLE_Data_is_a_real4 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_real4 + subroutine LIBMUSCLE_Data_elements_7_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_real8(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_real8 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_real8_( & - self%ptr) + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - LIBMUSCLE_Data_is_a_real8 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_real8 + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - function LIBMUSCLE_Data_is_a_dict(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_dict + call LIBMUSCLE_Data_elements_int8_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - integer (c_int) :: ret_val + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - ret_val = LIBMUSCLE_Data_is_a_dict_( & - self%ptr) + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_int8 - LIBMUSCLE_Data_is_a_dict = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_dict + subroutine LIBMUSCLE_Data_elements_1_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_list(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_list - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_list_( & - self%ptr) + real (LIBMUSCLE_real4), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - LIBMUSCLE_Data_is_a_list = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_list + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - function LIBMUSCLE_Data_is_a_byte_array(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_byte_array + call LIBMUSCLE_Data_elements_real4_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - integer (c_int) :: ret_val + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - ret_val = LIBMUSCLE_Data_is_a_byte_array_( & - self%ptr) + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_real4 - LIBMUSCLE_Data_is_a_byte_array = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_byte_array + subroutine LIBMUSCLE_Data_elements_2_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_nil(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_nil + real (LIBMUSCLE_real4), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - integer (c_int) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_is_nil_( & - self%ptr) + call LIBMUSCLE_Data_elements_real4_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - LIBMUSCLE_Data_is_nil = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_nil + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_real4 + + subroutine LIBMUSCLE_Data_elements_3_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_settings(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_settings - - integer (c_int) :: ret_val + real (LIBMUSCLE_real4), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - ret_val = LIBMUSCLE_Data_is_a_settings_( & - self%ptr) + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - LIBMUSCLE_Data_is_a_settings = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_settings + call LIBMUSCLE_Data_elements_real4_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - function LIBMUSCLE_Data_size(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - integer (LIBMUSCLE_size) :: LIBMUSCLE_Data_size + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - integer (c_size_t) :: ret_val + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_real4 - ret_val = LIBMUSCLE_Data_size_( & - self%ptr) - LIBMUSCLE_Data_size = ret_val - end function LIBMUSCLE_Data_size + subroutine LIBMUSCLE_Data_elements_4_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_logical(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - logical :: LIBMUSCLE_Data_as_logical - integer (c_int) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3548,8 +13902,12 @@ function LIBMUSCLE_Data_as_logical(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_logical_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3580,20 +13938,32 @@ function LIBMUSCLE_Data_as_logical(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_logical = ret_val .ne. 0 - end function LIBMUSCLE_Data_as_logical + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_real4 + + subroutine LIBMUSCLE_Data_elements_5_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_character(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - character(:), allocatable :: LIBMUSCLE_Data_as_character type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character (c_char), dimension(:), pointer :: f_ret_ptr - integer :: i_loop + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3601,10 +13971,12 @@ function LIBMUSCLE_Data_as_character(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - call LIBMUSCLE_Data_as_character_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 5_LIBMUSCLE_size, & ret_val, & - ret_val_size, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3635,21 +14007,32 @@ function LIBMUSCLE_Data_as_character(self, err_code, err_msg) end if end if - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) - allocate (character(ret_val_size) :: LIBMUSCLE_Data_as_character) - do i_loop = 1, ret_val_size - LIBMUSCLE_Data_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) - end do - end function LIBMUSCLE_Data_as_character + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_real4 + + subroutine LIBMUSCLE_Data_elements_6_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer :: LIBMUSCLE_Data_as_int - integer (c_int) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3657,11 +14040,16 @@ function LIBMUSCLE_Data_as_int(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3688,17 +14076,32 @@ function LIBMUSCLE_Data_as_int(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int = ret_val - end function LIBMUSCLE_Data_as_int + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_real4 + + subroutine LIBMUSCLE_Data_elements_7_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int1(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int1) :: LIBMUSCLE_Data_as_int1 - integer (c_int8_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3706,11 +14109,16 @@ function LIBMUSCLE_Data_as_int1(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int1_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3737,17 +14145,32 @@ function LIBMUSCLE_Data_as_int1(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int1 = ret_val - end function LIBMUSCLE_Data_as_int1 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_real4 + + subroutine LIBMUSCLE_Data_elements_1_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int2(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(4)) :: LIBMUSCLE_Data_as_int2 - integer (c_short) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3755,11 +14178,16 @@ function LIBMUSCLE_Data_as_int2(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int2_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3786,17 +14214,32 @@ function LIBMUSCLE_Data_as_int2(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int2 = ret_val - end function LIBMUSCLE_Data_as_int2 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_real8 + + subroutine LIBMUSCLE_Data_elements_2_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int4(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int4) :: LIBMUSCLE_Data_as_int4 - integer (c_int32_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3804,11 +14247,16 @@ function LIBMUSCLE_Data_as_int4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int4_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3835,17 +14283,32 @@ function LIBMUSCLE_Data_as_int4(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int4 = ret_val - end function LIBMUSCLE_Data_as_int4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_real8 + + subroutine LIBMUSCLE_Data_elements_3_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int8(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(18)) :: LIBMUSCLE_Data_as_int8 - integer (c_int64_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3853,11 +14316,16 @@ function LIBMUSCLE_Data_as_int8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int8_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3884,17 +14352,32 @@ function LIBMUSCLE_Data_as_int8(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int8 = ret_val - end function LIBMUSCLE_Data_as_int8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_real8 + + subroutine LIBMUSCLE_Data_elements_4_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_real4(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real4) :: LIBMUSCLE_Data_as_real4 - real (c_float) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3902,11 +14385,16 @@ function LIBMUSCLE_Data_as_real4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_real4_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3933,17 +14421,32 @@ function LIBMUSCLE_Data_as_real4(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_real4 = ret_val - end function LIBMUSCLE_Data_as_real4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_real8 + + subroutine LIBMUSCLE_Data_elements_5_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_real8(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real8) :: LIBMUSCLE_Data_as_real8 - real (c_double) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3951,11 +14454,16 @@ function LIBMUSCLE_Data_as_real8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_real8_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3982,17 +14490,32 @@ function LIBMUSCLE_Data_as_real8(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_real8 = ret_val - end function LIBMUSCLE_Data_as_real8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_real8 + + subroutine LIBMUSCLE_Data_elements_6_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_settings(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(YMMSL_Settings) :: LIBMUSCLE_Data_as_settings - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4000,8 +14523,12 @@ function LIBMUSCLE_Data_as_settings(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_settings_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4032,19 +14559,32 @@ function LIBMUSCLE_Data_as_settings(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_settings%ptr = ret_val - end function LIBMUSCLE_Data_as_settings + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_real8 + + subroutine LIBMUSCLE_Data_elements_7_real8( & + self, & + elements, & + err_code, & + err_msg) - subroutine LIBMUSCLE_Data_as_byte_array(self, data, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self - character(len=1), dimension(:), intent(out) :: data + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4052,10 +14592,12 @@ subroutine LIBMUSCLE_Data_as_byte_array(self, data, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - call LIBMUSCLE_Data_as_byte_array_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 7_LIBMUSCLE_size, & ret_val, & - ret_val_size, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4086,19 +14628,26 @@ subroutine LIBMUSCLE_Data_as_byte_array(self, data, err_code, err_msg) end if end if - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) - data = f_ret_ptr - end subroutine LIBMUSCLE_Data_as_byte_array + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_real8 - function LIBMUSCLE_Data_get_item_by_key(self, key, err_code, err_msg) + function LIBMUSCLE_Data_has_indexes( & + self, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self - character (len=*), intent(in) :: key integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_key + logical :: LIBMUSCLE_Data_has_indexes - integer (c_intptr_t) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4106,9 +14655,8 @@ function LIBMUSCLE_Data_get_item_by_key(self, key, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_get_item_by_key_( & + ret_val = LIBMUSCLE_Data_has_indexes_( & self%ptr, & - key, int(len(key), c_size_t), & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4139,18 +14687,25 @@ function LIBMUSCLE_Data_get_item_by_key(self, key, err_code, err_msg) end if end if - LIBMUSCLE_Data_get_item_by_key%ptr = ret_val - end function LIBMUSCLE_Data_get_item_by_key + LIBMUSCLE_Data_has_indexes = ret_val + end function LIBMUSCLE_Data_has_indexes - function LIBMUSCLE_Data_get_item_by_index(self, i, err_code, err_msg) + function LIBMUSCLE_Data_index( & + self, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_index + character(:), allocatable :: LIBMUSCLE_Data_index - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4158,9 +14713,11 @@ function LIBMUSCLE_Data_get_item_by_index(self, i, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_get_item_by_index_( & + call LIBMUSCLE_Data_index_( & self%ptr, & i, & + ret_val, & + ret_val_size, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4191,10 +14748,15 @@ function LIBMUSCLE_Data_get_item_by_index(self, i, err_code, err_msg) end if end if - LIBMUSCLE_Data_get_item_by_index%ptr = ret_val - end function LIBMUSCLE_Data_get_item_by_index + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + allocate (character(ret_val_size) :: LIBMUSCLE_Data_index) + do i_loop = 1, ret_val_size + LIBMUSCLE_Data_index(i_loop:i_loop) = f_ret_ptr(i_loop) + end do + end function LIBMUSCLE_Data_index - function LIBMUSCLE_Data_create_dict() + function LIBMUSCLE_Data_create_dict( & + ) implicit none type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_dict @@ -4206,7 +14768,8 @@ function LIBMUSCLE_Data_create_dict() LIBMUSCLE_Data_create_dict%ptr = ret_val end function LIBMUSCLE_Data_create_dict - function LIBMUSCLE_Data_create_list() + function LIBMUSCLE_Data_create_list( & + ) implicit none type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_list @@ -4218,7 +14781,8 @@ function LIBMUSCLE_Data_create_list() LIBMUSCLE_Data_create_list%ptr = ret_val end function LIBMUSCLE_Data_create_list - function LIBMUSCLE_Data_create_nils(size) + function LIBMUSCLE_Data_create_nils( & + size) implicit none integer (LIBMUSCLE_size), intent(in) :: size type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_nils @@ -4231,7 +14795,8 @@ function LIBMUSCLE_Data_create_nils(size) LIBMUSCLE_Data_create_nils%ptr = ret_val end function LIBMUSCLE_Data_create_nils - function LIBMUSCLE_Data_create_byte_array_empty(size) + function LIBMUSCLE_Data_create_byte_array_empty( & + size) implicit none integer (LIBMUSCLE_size), intent(in) :: size type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_byte_array_empty @@ -4244,7 +14809,8 @@ function LIBMUSCLE_Data_create_byte_array_empty(size) LIBMUSCLE_Data_create_byte_array_empty%ptr = ret_val end function LIBMUSCLE_Data_create_byte_array_empty - function LIBMUSCLE_Data_create_byte_array_from_buf(buf) + function LIBMUSCLE_Data_create_byte_array_from_buf( & + buf) implicit none character(len=1), dimension(:), intent(in) :: buf type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_byte_array_from_buf @@ -4257,17 +14823,21 @@ function LIBMUSCLE_Data_create_byte_array_from_buf(buf) LIBMUSCLE_Data_create_byte_array_from_buf%ptr = ret_val end function LIBMUSCLE_Data_create_byte_array_from_buf - subroutine LIBMUSCLE_Data_set_logical(self, value) + subroutine LIBMUSCLE_Data_set_logical( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self logical, intent(in) :: value call LIBMUSCLE_Data_set_logical_( & self%ptr, & - merge(1, 0, value)) + logical(value, c_bool)) end subroutine LIBMUSCLE_Data_set_logical - subroutine LIBMUSCLE_Data_set_character(self, value) + subroutine LIBMUSCLE_Data_set_character( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: value @@ -4277,7 +14847,9 @@ subroutine LIBMUSCLE_Data_set_character(self, value) value, int(len(value), c_size_t)) end subroutine LIBMUSCLE_Data_set_character - subroutine LIBMUSCLE_Data_set_int1(self, value) + subroutine LIBMUSCLE_Data_set_int1( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_int1), intent(in) :: value @@ -4287,7 +14859,9 @@ subroutine LIBMUSCLE_Data_set_int1(self, value) value) end subroutine LIBMUSCLE_Data_set_int1 - subroutine LIBMUSCLE_Data_set_int2(self, value) + subroutine LIBMUSCLE_Data_set_int2( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (selected_int_kind(4)), intent(in) :: value @@ -4297,7 +14871,9 @@ subroutine LIBMUSCLE_Data_set_int2(self, value) value) end subroutine LIBMUSCLE_Data_set_int2 - subroutine LIBMUSCLE_Data_set_int4(self, value) + subroutine LIBMUSCLE_Data_set_int4( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_int4), intent(in) :: value @@ -4307,7 +14883,9 @@ subroutine LIBMUSCLE_Data_set_int4(self, value) value) end subroutine LIBMUSCLE_Data_set_int4 - subroutine LIBMUSCLE_Data_set_int8(self, value) + subroutine LIBMUSCLE_Data_set_int8( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (selected_int_kind(18)), intent(in) :: value @@ -4317,7 +14895,9 @@ subroutine LIBMUSCLE_Data_set_int8(self, value) value) end subroutine LIBMUSCLE_Data_set_int8 - subroutine LIBMUSCLE_Data_set_real4(self, value) + subroutine LIBMUSCLE_Data_set_real4( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self real (LIBMUSCLE_real4), intent(in) :: value @@ -4327,7 +14907,9 @@ subroutine LIBMUSCLE_Data_set_real4(self, value) value) end subroutine LIBMUSCLE_Data_set_real4 - subroutine LIBMUSCLE_Data_set_real8(self, value) + subroutine LIBMUSCLE_Data_set_real8( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self real (LIBMUSCLE_real8), intent(in) :: value @@ -4337,7 +14919,9 @@ subroutine LIBMUSCLE_Data_set_real8(self, value) value) end subroutine LIBMUSCLE_Data_set_real8 - subroutine LIBMUSCLE_Data_set_data(self, value) + subroutine LIBMUSCLE_Data_set_data( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self type(LIBMUSCLE_Data), intent(in) :: value @@ -4347,7 +14931,8 @@ subroutine LIBMUSCLE_Data_set_data(self, value) value%ptr) end subroutine LIBMUSCLE_Data_set_data - subroutine LIBMUSCLE_Data_set_nil(self) + subroutine LIBMUSCLE_Data_set_nil( & + self) implicit none type(LIBMUSCLE_Data), intent(in) :: self @@ -4355,7 +14940,12 @@ subroutine LIBMUSCLE_Data_set_nil(self) self%ptr) end subroutine LIBMUSCLE_Data_set_nil - subroutine LIBMUSCLE_Data_set_item_key_logical(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_logical( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4373,7 +14963,7 @@ subroutine LIBMUSCLE_Data_set_item_key_logical(self, key, value, err_code, err_m call LIBMUSCLE_Data_set_item_key_logical_( & self%ptr, & key, int(len(key), c_size_t), & - merge(1, 0, value), & + logical(value, c_bool), & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4405,7 +14995,12 @@ subroutine LIBMUSCLE_Data_set_item_key_logical(self, key, value, err_code, err_m end subroutine LIBMUSCLE_Data_set_item_key_logical - subroutine LIBMUSCLE_Data_set_item_key_character(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_character( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4455,7 +15050,12 @@ subroutine LIBMUSCLE_Data_set_item_key_character(self, key, value, err_code, err end subroutine LIBMUSCLE_Data_set_item_key_character - subroutine LIBMUSCLE_Data_set_item_key_int1(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int1( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4505,7 +15105,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int1(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int1 - subroutine LIBMUSCLE_Data_set_item_key_int2(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int2( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4555,7 +15160,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int2(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int2 - subroutine LIBMUSCLE_Data_set_item_key_int4(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int4( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4605,7 +15215,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int4(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int4 - subroutine LIBMUSCLE_Data_set_item_key_int8(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int8( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4655,7 +15270,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int8(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int8 - subroutine LIBMUSCLE_Data_set_item_key_real4(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_real4( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4705,7 +15325,12 @@ subroutine LIBMUSCLE_Data_set_item_key_real4(self, key, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_key_real4 - subroutine LIBMUSCLE_Data_set_item_key_real8(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_real8( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4755,7 +15380,12 @@ subroutine LIBMUSCLE_Data_set_item_key_real8(self, key, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_key_real8 - subroutine LIBMUSCLE_Data_set_item_key_data(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_data( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4805,7 +15435,12 @@ subroutine LIBMUSCLE_Data_set_item_key_data(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_data - subroutine LIBMUSCLE_Data_set_item_index_logical(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_logical( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -4823,7 +15458,7 @@ subroutine LIBMUSCLE_Data_set_item_index_logical(self, i, value, err_code, err_m call LIBMUSCLE_Data_set_item_index_logical_( & self%ptr, & i, & - merge(1, 0, value), & + logical(value, c_bool), & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4855,7 +15490,12 @@ subroutine LIBMUSCLE_Data_set_item_index_logical(self, i, value, err_code, err_m end subroutine LIBMUSCLE_Data_set_item_index_logical - subroutine LIBMUSCLE_Data_set_item_index_character(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_character( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -4905,7 +15545,12 @@ subroutine LIBMUSCLE_Data_set_item_index_character(self, i, value, err_code, err end subroutine LIBMUSCLE_Data_set_item_index_character - subroutine LIBMUSCLE_Data_set_item_index_int1(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int1( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -4955,7 +15600,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int1(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int1 - subroutine LIBMUSCLE_Data_set_item_index_int2(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int2( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5005,7 +15655,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int2(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int2 - subroutine LIBMUSCLE_Data_set_item_index_int4(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int4( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5055,7 +15710,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int4(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int4 - subroutine LIBMUSCLE_Data_set_item_index_int8(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int8( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5105,7 +15765,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int8(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int8 - subroutine LIBMUSCLE_Data_set_item_index_real4(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_real4( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5155,7 +15820,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real4(self, i, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_index_real4 - subroutine LIBMUSCLE_Data_set_item_index_real8(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_real8( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5205,7 +15875,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real8(self, i, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_index_real8 - subroutine LIBMUSCLE_Data_set_item_index_data(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_data( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5255,7 +15930,11 @@ subroutine LIBMUSCLE_Data_set_item_index_data(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_data - function LIBMUSCLE_Data_key(self, i, err_code, err_msg) + function LIBMUSCLE_Data_key( & + self, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5316,7 +15995,11 @@ function LIBMUSCLE_Data_key(self, i, err_code, err_msg) end do end function LIBMUSCLE_Data_key - function LIBMUSCLE_Data_value(self, i, err_code, err_msg) + function LIBMUSCLE_Data_value( & + self, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5368,7 +16051,8 @@ function LIBMUSCLE_Data_value(self, i, err_code, err_msg) LIBMUSCLE_Data_value%ptr = ret_val end function LIBMUSCLE_Data_value - function LIBMUSCLE_PortsDescription_create() + function LIBMUSCLE_PortsDescription_create( & + ) implicit none type(LIBMUSCLE_PortsDescription) :: LIBMUSCLE_PortsDescription_create @@ -5380,7 +16064,8 @@ function LIBMUSCLE_PortsDescription_create() LIBMUSCLE_PortsDescription_create%ptr = ret_val end function LIBMUSCLE_PortsDescription_create - subroutine LIBMUSCLE_PortsDescription_free(self) + subroutine LIBMUSCLE_PortsDescription_free( & + self) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self @@ -5388,7 +16073,10 @@ subroutine LIBMUSCLE_PortsDescription_free(self) self%ptr) end subroutine LIBMUSCLE_PortsDescription_free - subroutine LIBMUSCLE_PortsDescription_add(self, op, port) + subroutine LIBMUSCLE_PortsDescription_add( & + self, & + op, & + port) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self integer(YMMSL_Operator), intent(in) :: op @@ -5400,7 +16088,9 @@ subroutine LIBMUSCLE_PortsDescription_add(self, op, port) port, int(len(port), c_size_t)) end subroutine LIBMUSCLE_PortsDescription_add - function LIBMUSCLE_PortsDescription_num_ports(self, op) + function LIBMUSCLE_PortsDescription_num_ports( & + self, & + op) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self integer(YMMSL_Operator), intent(in) :: op @@ -5414,7 +16104,12 @@ function LIBMUSCLE_PortsDescription_num_ports(self, op) LIBMUSCLE_PortsDescription_num_ports = ret_val end function LIBMUSCLE_PortsDescription_num_ports - function LIBMUSCLE_PortsDescription_get(self, op, i, err_code, err_msg) + function LIBMUSCLE_PortsDescription_get( & + self, & + op, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self integer(YMMSL_Operator), intent(in) :: op @@ -5477,7 +16172,9 @@ function LIBMUSCLE_PortsDescription_get(self, op, i, err_code, err_msg) end do end function LIBMUSCLE_PortsDescription_get - function LIBMUSCLE_Message_create_td(timestamp, data) + function LIBMUSCLE_Message_create_td( & + timestamp, & + data) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp type(LIBMUSCLE_Data), intent(in) :: data @@ -5492,7 +16189,10 @@ function LIBMUSCLE_Message_create_td(timestamp, data) LIBMUSCLE_Message_create_td%ptr = ret_val end function LIBMUSCLE_Message_create_td - function LIBMUSCLE_Message_create_tnd(timestamp, next_timestamp, data) + function LIBMUSCLE_Message_create_tnd( & + timestamp, & + next_timestamp, & + data) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp real (LIBMUSCLE_real8), intent(in) :: next_timestamp @@ -5509,7 +16209,10 @@ function LIBMUSCLE_Message_create_tnd(timestamp, next_timestamp, data) LIBMUSCLE_Message_create_tnd%ptr = ret_val end function LIBMUSCLE_Message_create_tnd - function LIBMUSCLE_Message_create_tds(timestamp, data, settings) + function LIBMUSCLE_Message_create_tds( & + timestamp, & + data, & + settings) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp type(LIBMUSCLE_Data), intent(in) :: data @@ -5526,7 +16229,11 @@ function LIBMUSCLE_Message_create_tds(timestamp, data, settings) LIBMUSCLE_Message_create_tds%ptr = ret_val end function LIBMUSCLE_Message_create_tds - function LIBMUSCLE_Message_create_tnds(timestamp, next_timestamp, data, settings) + function LIBMUSCLE_Message_create_tnds( & + timestamp, & + next_timestamp, & + data, & + settings) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp real (LIBMUSCLE_real8), intent(in) :: next_timestamp @@ -5545,7 +16252,8 @@ function LIBMUSCLE_Message_create_tnds(timestamp, next_timestamp, data, settings LIBMUSCLE_Message_create_tnds%ptr = ret_val end function LIBMUSCLE_Message_create_tnds - subroutine LIBMUSCLE_Message_free(self) + subroutine LIBMUSCLE_Message_free( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self @@ -5553,7 +16261,8 @@ subroutine LIBMUSCLE_Message_free(self) self%ptr) end subroutine LIBMUSCLE_Message_free - function LIBMUSCLE_Message_timestamp(self) + function LIBMUSCLE_Message_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8) :: LIBMUSCLE_Message_timestamp @@ -5565,7 +16274,9 @@ function LIBMUSCLE_Message_timestamp(self) LIBMUSCLE_Message_timestamp = ret_val end function LIBMUSCLE_Message_timestamp - subroutine LIBMUSCLE_Message_set_timestamp(self, timestamp) + subroutine LIBMUSCLE_Message_set_timestamp( & + self, & + timestamp) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8), intent(in) :: timestamp @@ -5575,20 +16286,22 @@ subroutine LIBMUSCLE_Message_set_timestamp(self, timestamp) timestamp) end subroutine LIBMUSCLE_Message_set_timestamp - function LIBMUSCLE_Message_has_next_timestamp(self) + function LIBMUSCLE_Message_has_next_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self logical :: LIBMUSCLE_Message_has_next_timestamp - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Message_has_next_timestamp_( & self%ptr) - LIBMUSCLE_Message_has_next_timestamp = ret_val .ne. 0 + LIBMUSCLE_Message_has_next_timestamp = ret_val end function LIBMUSCLE_Message_has_next_timestamp - function LIBMUSCLE_Message_next_timestamp(self) + function LIBMUSCLE_Message_next_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8) :: LIBMUSCLE_Message_next_timestamp @@ -5600,7 +16313,9 @@ function LIBMUSCLE_Message_next_timestamp(self) LIBMUSCLE_Message_next_timestamp = ret_val end function LIBMUSCLE_Message_next_timestamp - subroutine LIBMUSCLE_Message_set_next_timestamp(self, next_timestamp) + subroutine LIBMUSCLE_Message_set_next_timestamp( & + self, & + next_timestamp) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8), intent(in) :: next_timestamp @@ -5610,7 +16325,8 @@ subroutine LIBMUSCLE_Message_set_next_timestamp(self, next_timestamp) next_timestamp) end subroutine LIBMUSCLE_Message_set_next_timestamp - subroutine LIBMUSCLE_Message_unset_next_timestamp(self) + subroutine LIBMUSCLE_Message_unset_next_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self @@ -5618,7 +16334,8 @@ subroutine LIBMUSCLE_Message_unset_next_timestamp(self) self%ptr) end subroutine LIBMUSCLE_Message_unset_next_timestamp - function LIBMUSCLE_Message_get_data(self) + function LIBMUSCLE_Message_get_data( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_Message_get_data @@ -5631,7 +16348,9 @@ function LIBMUSCLE_Message_get_data(self) LIBMUSCLE_Message_get_data%ptr = ret_val end function LIBMUSCLE_Message_get_data - subroutine LIBMUSCLE_Message_set_data_d(self, data) + subroutine LIBMUSCLE_Message_set_data_d( & + self, & + data) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(LIBMUSCLE_Data), intent(in) :: data @@ -5641,7 +16360,9 @@ subroutine LIBMUSCLE_Message_set_data_d(self, data) data%ptr) end subroutine LIBMUSCLE_Message_set_data_d - subroutine LIBMUSCLE_Message_set_data_dcr(self, data) + subroutine LIBMUSCLE_Message_set_data_dcr( & + self, & + data) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(LIBMUSCLE_DataConstRef), intent(in) :: data @@ -5651,20 +16372,22 @@ subroutine LIBMUSCLE_Message_set_data_dcr(self, data) data%ptr) end subroutine LIBMUSCLE_Message_set_data_dcr - function LIBMUSCLE_Message_has_settings(self) + function LIBMUSCLE_Message_has_settings( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self logical :: LIBMUSCLE_Message_has_settings - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Message_has_settings_( & self%ptr) - LIBMUSCLE_Message_has_settings = ret_val .ne. 0 + LIBMUSCLE_Message_has_settings = ret_val end function LIBMUSCLE_Message_has_settings - function LIBMUSCLE_Message_get_settings(self) + function LIBMUSCLE_Message_get_settings( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(YMMSL_Settings) :: LIBMUSCLE_Message_get_settings @@ -5677,7 +16400,9 @@ function LIBMUSCLE_Message_get_settings(self) LIBMUSCLE_Message_get_settings%ptr = ret_val end function LIBMUSCLE_Message_get_settings - subroutine LIBMUSCLE_Message_set_settings(self, settings) + subroutine LIBMUSCLE_Message_set_settings( & + self, & + settings) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(YMMSL_Settings), intent(in) :: settings @@ -5687,7 +16412,8 @@ subroutine LIBMUSCLE_Message_set_settings(self, settings) settings%ptr) end subroutine LIBMUSCLE_Message_set_settings - subroutine LIBMUSCLE_Message_unset_settings(self) + subroutine LIBMUSCLE_Message_unset_settings( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self @@ -5741,7 +16467,8 @@ type(LIBMUSCLE_Instance) function LIBMUSCLE_Instance_create_with_ports(ports) call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(cla) end function LIBMUSCLE_Instance_create_with_ports - subroutine LIBMUSCLE_Instance_free(self) + subroutine LIBMUSCLE_Instance_free( & + self) implicit none type(LIBMUSCLE_Instance), intent(in) :: self @@ -5749,35 +16476,40 @@ subroutine LIBMUSCLE_Instance_free(self) self%ptr) end subroutine LIBMUSCLE_Instance_free - function LIBMUSCLE_Instance_reuse_instance_default(self) + function LIBMUSCLE_Instance_reuse_instance_default( & + self) implicit none type(LIBMUSCLE_Instance), intent(in) :: self logical :: LIBMUSCLE_Instance_reuse_instance_default - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_reuse_instance_default_( & self%ptr) - LIBMUSCLE_Instance_reuse_instance_default = ret_val .ne. 0 + LIBMUSCLE_Instance_reuse_instance_default = ret_val end function LIBMUSCLE_Instance_reuse_instance_default - function LIBMUSCLE_Instance_reuse_instance_apply(self, apply_overlay) + function LIBMUSCLE_Instance_reuse_instance_apply( & + self, & + apply_overlay) implicit none type(LIBMUSCLE_Instance), intent(in) :: self logical, intent(in) :: apply_overlay logical :: LIBMUSCLE_Instance_reuse_instance_apply - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_reuse_instance_apply_( & self%ptr, & - merge(1, 0, apply_overlay)) + logical(apply_overlay, c_bool)) - LIBMUSCLE_Instance_reuse_instance_apply = ret_val .ne. 0 + LIBMUSCLE_Instance_reuse_instance_apply = ret_val end function LIBMUSCLE_Instance_reuse_instance_apply - subroutine LIBMUSCLE_Instance_error_shutdown(self, message) + subroutine LIBMUSCLE_Instance_error_shutdown( & + self, & + message) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: message @@ -5787,7 +16519,11 @@ subroutine LIBMUSCLE_Instance_error_shutdown(self, message) message, int(len(message), c_size_t)) end subroutine LIBMUSCLE_Instance_error_shutdown - function LIBMUSCLE_Instance_is_setting_a_character(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_character( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -5795,7 +16531,7 @@ function LIBMUSCLE_Instance_is_setting_a_character(self, name, err_code, err_msg character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_character - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -5836,10 +16572,14 @@ function LIBMUSCLE_Instance_is_setting_a_character(self, name, err_code, err_msg end if end if - LIBMUSCLE_Instance_is_setting_a_character = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_character = ret_val end function LIBMUSCLE_Instance_is_setting_a_character - function LIBMUSCLE_Instance_is_setting_a_int8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_int8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -5847,7 +16587,7 @@ function LIBMUSCLE_Instance_is_setting_a_int8(self, name, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_int8 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -5888,10 +16628,14 @@ function LIBMUSCLE_Instance_is_setting_a_int8(self, name, err_code, err_msg) end if end if - LIBMUSCLE_Instance_is_setting_a_int8 = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_int8 = ret_val end function LIBMUSCLE_Instance_is_setting_a_int8 - function LIBMUSCLE_Instance_is_setting_a_real8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_real8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -5899,7 +16643,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8(self, name, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_real8 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -5940,10 +16684,14 @@ function LIBMUSCLE_Instance_is_setting_a_real8(self, name, err_code, err_msg) end if end if - LIBMUSCLE_Instance_is_setting_a_real8 = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_real8 = ret_val end function LIBMUSCLE_Instance_is_setting_a_real8 - function LIBMUSCLE_Instance_is_setting_a_logical(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_logical( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -5951,7 +16699,7 @@ function LIBMUSCLE_Instance_is_setting_a_logical(self, name, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_logical - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -5992,10 +16740,14 @@ function LIBMUSCLE_Instance_is_setting_a_logical(self, name, err_code, err_msg) end if end if - LIBMUSCLE_Instance_is_setting_a_logical = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_logical = ret_val end function LIBMUSCLE_Instance_is_setting_a_logical - function LIBMUSCLE_Instance_is_setting_a_real8array(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_real8array( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6003,7 +16755,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8array(self, name, err_code, err_ms character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_real8array - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6044,10 +16796,14 @@ function LIBMUSCLE_Instance_is_setting_a_real8array(self, name, err_code, err_ms end if end if - LIBMUSCLE_Instance_is_setting_a_real8array = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_real8array = ret_val end function LIBMUSCLE_Instance_is_setting_a_real8array - function LIBMUSCLE_Instance_is_setting_a_real8array2(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_real8array2( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6055,7 +16811,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8array2(self, name, err_code, err_m character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_real8array2 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6096,10 +16852,14 @@ function LIBMUSCLE_Instance_is_setting_a_real8array2(self, name, err_code, err_m end if end if - LIBMUSCLE_Instance_is_setting_a_real8array2 = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_real8array2 = ret_val end function LIBMUSCLE_Instance_is_setting_a_real8array2 - function LIBMUSCLE_Instance_get_setting_as_character(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_character( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6160,7 +16920,11 @@ function LIBMUSCLE_Instance_get_setting_as_character(self, name, err_code, err_m end do end function LIBMUSCLE_Instance_get_setting_as_character - function LIBMUSCLE_Instance_get_setting_as_int8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_int8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6211,7 +16975,11 @@ function LIBMUSCLE_Instance_get_setting_as_int8(self, name, err_code, err_msg) LIBMUSCLE_Instance_get_setting_as_int8 = ret_val end function LIBMUSCLE_Instance_get_setting_as_int8 - function LIBMUSCLE_Instance_get_setting_as_real8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_real8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6262,7 +17030,11 @@ function LIBMUSCLE_Instance_get_setting_as_real8(self, name, err_code, err_msg) LIBMUSCLE_Instance_get_setting_as_real8 = ret_val end function LIBMUSCLE_Instance_get_setting_as_real8 - function LIBMUSCLE_Instance_get_setting_as_logical(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_logical( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6270,7 +17042,7 @@ function LIBMUSCLE_Instance_get_setting_as_logical(self, name, err_code, err_msg character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_get_setting_as_logical - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6311,10 +17083,15 @@ function LIBMUSCLE_Instance_get_setting_as_logical(self, name, err_code, err_msg end if end if - LIBMUSCLE_Instance_get_setting_as_logical = ret_val .ne. 0 + LIBMUSCLE_Instance_get_setting_as_logical = ret_val end function LIBMUSCLE_Instance_get_setting_as_logical - subroutine LIBMUSCLE_Instance_get_setting_as_real8array(self, name, value, err_code, err_msg) + subroutine LIBMUSCLE_Instance_get_setting_as_real8array( & + self, & + name, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6371,7 +17148,12 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array(self, name, value, err_c value = f_ret_ptr end subroutine LIBMUSCLE_Instance_get_setting_as_real8array - subroutine LIBMUSCLE_Instance_get_setting_as_real8array2(self, name, value, err_code, err_msg) + subroutine LIBMUSCLE_Instance_get_setting_as_real8array2( & + self, & + name, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6428,7 +17210,8 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2(self, name, value, err_ value = f_ret_ptr end subroutine LIBMUSCLE_Instance_get_setting_as_real8array2 - function LIBMUSCLE_Instance_list_ports(self) + function LIBMUSCLE_Instance_list_ports( & + self) implicit none type(LIBMUSCLE_Instance), intent(in) :: self type(LIBMUSCLE_PortsDescription) :: LIBMUSCLE_Instance_list_ports @@ -6441,52 +17224,60 @@ function LIBMUSCLE_Instance_list_ports(self) LIBMUSCLE_Instance_list_ports%ptr = ret_val end function LIBMUSCLE_Instance_list_ports - function LIBMUSCLE_Instance_is_connected(self, port) + function LIBMUSCLE_Instance_is_connected( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port logical :: LIBMUSCLE_Instance_is_connected - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_is_connected_( & self%ptr, & port, int(len(port), c_size_t)) - LIBMUSCLE_Instance_is_connected = ret_val .ne. 0 + LIBMUSCLE_Instance_is_connected = ret_val end function LIBMUSCLE_Instance_is_connected - function LIBMUSCLE_Instance_is_vector_port(self, port) + function LIBMUSCLE_Instance_is_vector_port( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port logical :: LIBMUSCLE_Instance_is_vector_port - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_is_vector_port_( & self%ptr, & port, int(len(port), c_size_t)) - LIBMUSCLE_Instance_is_vector_port = ret_val .ne. 0 + LIBMUSCLE_Instance_is_vector_port = ret_val end function LIBMUSCLE_Instance_is_vector_port - function LIBMUSCLE_Instance_is_resizable(self, port) + function LIBMUSCLE_Instance_is_resizable( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port logical :: LIBMUSCLE_Instance_is_resizable - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_is_resizable_( & self%ptr, & port, int(len(port), c_size_t)) - LIBMUSCLE_Instance_is_resizable = ret_val .ne. 0 + LIBMUSCLE_Instance_is_resizable = ret_val end function LIBMUSCLE_Instance_is_resizable - function LIBMUSCLE_Instance_get_port_length(self, port) + function LIBMUSCLE_Instance_get_port_length( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port @@ -6500,7 +17291,10 @@ function LIBMUSCLE_Instance_get_port_length(self, port) LIBMUSCLE_Instance_get_port_length = ret_val end function LIBMUSCLE_Instance_get_port_length - subroutine LIBMUSCLE_Instance_set_port_length(self, port, length) + subroutine LIBMUSCLE_Instance_set_port_length( & + self, & + port, & + length) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port @@ -6512,7 +17306,10 @@ subroutine LIBMUSCLE_Instance_set_port_length(self, port, length) length) end subroutine LIBMUSCLE_Instance_set_port_length - subroutine LIBMUSCLE_Instance_send_pm(self, port_name, message) + subroutine LIBMUSCLE_Instance_send_pm( & + self, & + port_name, & + message) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6524,7 +17321,11 @@ subroutine LIBMUSCLE_Instance_send_pm(self, port_name, message) message%ptr) end subroutine LIBMUSCLE_Instance_send_pm - subroutine LIBMUSCLE_Instance_send_pms(self, port_name, message, slot) + subroutine LIBMUSCLE_Instance_send_pms( & + self, & + port_name, & + message, & + slot) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6538,7 +17339,11 @@ subroutine LIBMUSCLE_Instance_send_pms(self, port_name, message, slot) slot) end subroutine LIBMUSCLE_Instance_send_pms - function LIBMUSCLE_Instance_receive_p(self, port_name, err_code, err_msg) + function LIBMUSCLE_Instance_receive_p( & + self, & + port_name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6590,7 +17395,12 @@ function LIBMUSCLE_Instance_receive_p(self, port_name, err_code, err_msg) LIBMUSCLE_Instance_receive_p%ptr = ret_val end function LIBMUSCLE_Instance_receive_p - function LIBMUSCLE_Instance_receive_pd(self, port_name, default_msg, err_code, err_msg) + function LIBMUSCLE_Instance_receive_pd( & + self, & + port_name, & + default_msg, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6644,7 +17454,12 @@ function LIBMUSCLE_Instance_receive_pd(self, port_name, default_msg, err_code, e LIBMUSCLE_Instance_receive_pd%ptr = ret_val end function LIBMUSCLE_Instance_receive_pd - function LIBMUSCLE_Instance_receive_ps(self, port_name, slot, err_code, err_msg) + function LIBMUSCLE_Instance_receive_ps( & + self, & + port_name, & + slot, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6698,7 +17513,13 @@ function LIBMUSCLE_Instance_receive_ps(self, port_name, slot, err_code, err_msg) LIBMUSCLE_Instance_receive_ps%ptr = ret_val end function LIBMUSCLE_Instance_receive_ps - function LIBMUSCLE_Instance_receive_psd(self, port_name, slot, default_message, err_code, err_msg) + function LIBMUSCLE_Instance_receive_psd( & + self, & + port_name, & + slot, & + default_message, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6754,7 +17575,11 @@ function LIBMUSCLE_Instance_receive_psd(self, port_name, slot, default_message, LIBMUSCLE_Instance_receive_psd%ptr = ret_val end function LIBMUSCLE_Instance_receive_psd - function LIBMUSCLE_Instance_receive_with_settings_p(self, port_name, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_p( & + self, & + port_name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6806,7 +17631,12 @@ function LIBMUSCLE_Instance_receive_with_settings_p(self, port_name, err_code, e LIBMUSCLE_Instance_receive_with_settings_p%ptr = ret_val end function LIBMUSCLE_Instance_receive_with_settings_p - function LIBMUSCLE_Instance_receive_with_settings_pd(self, port_name, default_msg, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_pd( & + self, & + port_name, & + default_msg, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6860,7 +17690,12 @@ function LIBMUSCLE_Instance_receive_with_settings_pd(self, port_name, default_ms LIBMUSCLE_Instance_receive_with_settings_pd%ptr = ret_val end function LIBMUSCLE_Instance_receive_with_settings_pd - function LIBMUSCLE_Instance_receive_with_settings_ps(self, port_name, slot, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_ps( & + self, & + port_name, & + slot, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6914,7 +17749,13 @@ function LIBMUSCLE_Instance_receive_with_settings_ps(self, port_name, slot, err_ LIBMUSCLE_Instance_receive_with_settings_ps%ptr = ret_val end function LIBMUSCLE_Instance_receive_with_settings_ps - function LIBMUSCLE_Instance_receive_with_settings_psd(self, port_name, slot, default_msg, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_psd( & + self, & + port_name, & + slot, & + default_msg, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6971,7 +17812,8 @@ function LIBMUSCLE_Instance_receive_with_settings_psd(self, port_name, slot, def end function LIBMUSCLE_Instance_receive_with_settings_psd - function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create(count) + function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create( & + count) implicit none integer, intent(in) :: count type(LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs) :: LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create @@ -6984,7 +17826,8 @@ function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create(count) LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create%ptr = ret_val end function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create - subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free(self) + subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free( & + self) implicit none type(LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs), intent(in) :: self @@ -6992,7 +17835,10 @@ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free(self) self%ptr) end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free - subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg(self, i, arg) + subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg( & + self, & + i, & + arg) implicit none type(LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs), intent(in) :: self integer, intent(in) :: i diff --git a/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f03 b/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f03 index 12025e32..5f56e3ab 100644 --- a/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f03 +++ b/libmuscle/fortran/src/libmuscle/libmuscle_mpi.f03 @@ -41,6 +41,77 @@ module libmuscle_mpi public :: LIBMUSCLE_DataConstRef_create_settings public :: LIBMUSCLE_DataConstRef_create_copy public :: LIBMUSCLE_DataConstRef_create + public :: LIBMUSCLE_DataConstRef_create_grid_1_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_logical_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_int4_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_int8_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_real4_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_2_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_3_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_4_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_5_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_6_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_7_real8_a + public :: LIBMUSCLE_DataConstRef_create_grid_1_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_logical_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_int4_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_int8_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_real4_n + public :: LIBMUSCLE_DataConstRef_create_grid_1_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_2_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_3_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_4_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_5_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_6_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid_7_real8_n + public :: LIBMUSCLE_DataConstRef_create_grid public :: LIBMUSCLE_DataConstRef_free public :: LIBMUSCLE_DataConstRef_is_a_logical public :: LIBMUSCLE_DataConstRef_is_a_character @@ -53,6 +124,11 @@ module libmuscle_mpi public :: LIBMUSCLE_DataConstRef_is_a_real8 public :: LIBMUSCLE_DataConstRef_is_a_dict public :: LIBMUSCLE_DataConstRef_is_a_list + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_logical + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_real4 + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_real8 + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_int4 + public :: LIBMUSCLE_DataConstRef_is_a_grid_of_int8 public :: LIBMUSCLE_DataConstRef_is_a_byte_array public :: LIBMUSCLE_DataConstRef_is_nil public :: LIBMUSCLE_DataConstRef_is_a_settings @@ -71,6 +147,46 @@ module libmuscle_mpi public :: LIBMUSCLE_DataConstRef_get_item_by_key public :: LIBMUSCLE_DataConstRef_get_item_by_index public :: LIBMUSCLE_DataConstRef_get_item + public :: LIBMUSCLE_DataConstRef_num_dims + public :: LIBMUSCLE_DataConstRef_shape + public :: LIBMUSCLE_DataConstRef_elements_1_logical + public :: LIBMUSCLE_DataConstRef_elements_2_logical + public :: LIBMUSCLE_DataConstRef_elements_3_logical + public :: LIBMUSCLE_DataConstRef_elements_4_logical + public :: LIBMUSCLE_DataConstRef_elements_5_logical + public :: LIBMUSCLE_DataConstRef_elements_6_logical + public :: LIBMUSCLE_DataConstRef_elements_7_logical + public :: LIBMUSCLE_DataConstRef_elements_1_int4 + public :: LIBMUSCLE_DataConstRef_elements_2_int4 + public :: LIBMUSCLE_DataConstRef_elements_3_int4 + public :: LIBMUSCLE_DataConstRef_elements_4_int4 + public :: LIBMUSCLE_DataConstRef_elements_5_int4 + public :: LIBMUSCLE_DataConstRef_elements_6_int4 + public :: LIBMUSCLE_DataConstRef_elements_7_int4 + public :: LIBMUSCLE_DataConstRef_elements_1_int8 + public :: LIBMUSCLE_DataConstRef_elements_2_int8 + public :: LIBMUSCLE_DataConstRef_elements_3_int8 + public :: LIBMUSCLE_DataConstRef_elements_4_int8 + public :: LIBMUSCLE_DataConstRef_elements_5_int8 + public :: LIBMUSCLE_DataConstRef_elements_6_int8 + public :: LIBMUSCLE_DataConstRef_elements_7_int8 + public :: LIBMUSCLE_DataConstRef_elements_1_real4 + public :: LIBMUSCLE_DataConstRef_elements_2_real4 + public :: LIBMUSCLE_DataConstRef_elements_3_real4 + public :: LIBMUSCLE_DataConstRef_elements_4_real4 + public :: LIBMUSCLE_DataConstRef_elements_5_real4 + public :: LIBMUSCLE_DataConstRef_elements_6_real4 + public :: LIBMUSCLE_DataConstRef_elements_7_real4 + public :: LIBMUSCLE_DataConstRef_elements_1_real8 + public :: LIBMUSCLE_DataConstRef_elements_2_real8 + public :: LIBMUSCLE_DataConstRef_elements_3_real8 + public :: LIBMUSCLE_DataConstRef_elements_4_real8 + public :: LIBMUSCLE_DataConstRef_elements_5_real8 + public :: LIBMUSCLE_DataConstRef_elements_6_real8 + public :: LIBMUSCLE_DataConstRef_elements_7_real8 + public :: LIBMUSCLE_DataConstRef_elements + public :: LIBMUSCLE_DataConstRef_has_indexes + public :: LIBMUSCLE_DataConstRef_index type LIBMUSCLE_Data integer (c_intptr_t) :: ptr end type LIBMUSCLE_Data @@ -88,6 +204,77 @@ module libmuscle_mpi public :: LIBMUSCLE_Data_create_settings public :: LIBMUSCLE_Data_create_copy public :: LIBMUSCLE_Data_create + public :: LIBMUSCLE_Data_create_grid_1_logical_a + public :: LIBMUSCLE_Data_create_grid_2_logical_a + public :: LIBMUSCLE_Data_create_grid_3_logical_a + public :: LIBMUSCLE_Data_create_grid_4_logical_a + public :: LIBMUSCLE_Data_create_grid_5_logical_a + public :: LIBMUSCLE_Data_create_grid_6_logical_a + public :: LIBMUSCLE_Data_create_grid_7_logical_a + public :: LIBMUSCLE_Data_create_grid_1_int4_a + public :: LIBMUSCLE_Data_create_grid_2_int4_a + public :: LIBMUSCLE_Data_create_grid_3_int4_a + public :: LIBMUSCLE_Data_create_grid_4_int4_a + public :: LIBMUSCLE_Data_create_grid_5_int4_a + public :: LIBMUSCLE_Data_create_grid_6_int4_a + public :: LIBMUSCLE_Data_create_grid_7_int4_a + public :: LIBMUSCLE_Data_create_grid_1_int8_a + public :: LIBMUSCLE_Data_create_grid_2_int8_a + public :: LIBMUSCLE_Data_create_grid_3_int8_a + public :: LIBMUSCLE_Data_create_grid_4_int8_a + public :: LIBMUSCLE_Data_create_grid_5_int8_a + public :: LIBMUSCLE_Data_create_grid_6_int8_a + public :: LIBMUSCLE_Data_create_grid_7_int8_a + public :: LIBMUSCLE_Data_create_grid_1_real4_a + public :: LIBMUSCLE_Data_create_grid_2_real4_a + public :: LIBMUSCLE_Data_create_grid_3_real4_a + public :: LIBMUSCLE_Data_create_grid_4_real4_a + public :: LIBMUSCLE_Data_create_grid_5_real4_a + public :: LIBMUSCLE_Data_create_grid_6_real4_a + public :: LIBMUSCLE_Data_create_grid_7_real4_a + public :: LIBMUSCLE_Data_create_grid_1_real8_a + public :: LIBMUSCLE_Data_create_grid_2_real8_a + public :: LIBMUSCLE_Data_create_grid_3_real8_a + public :: LIBMUSCLE_Data_create_grid_4_real8_a + public :: LIBMUSCLE_Data_create_grid_5_real8_a + public :: LIBMUSCLE_Data_create_grid_6_real8_a + public :: LIBMUSCLE_Data_create_grid_7_real8_a + public :: LIBMUSCLE_Data_create_grid_1_logical_n + public :: LIBMUSCLE_Data_create_grid_2_logical_n + public :: LIBMUSCLE_Data_create_grid_3_logical_n + public :: LIBMUSCLE_Data_create_grid_4_logical_n + public :: LIBMUSCLE_Data_create_grid_5_logical_n + public :: LIBMUSCLE_Data_create_grid_6_logical_n + public :: LIBMUSCLE_Data_create_grid_7_logical_n + public :: LIBMUSCLE_Data_create_grid_1_int4_n + public :: LIBMUSCLE_Data_create_grid_2_int4_n + public :: LIBMUSCLE_Data_create_grid_3_int4_n + public :: LIBMUSCLE_Data_create_grid_4_int4_n + public :: LIBMUSCLE_Data_create_grid_5_int4_n + public :: LIBMUSCLE_Data_create_grid_6_int4_n + public :: LIBMUSCLE_Data_create_grid_7_int4_n + public :: LIBMUSCLE_Data_create_grid_1_int8_n + public :: LIBMUSCLE_Data_create_grid_2_int8_n + public :: LIBMUSCLE_Data_create_grid_3_int8_n + public :: LIBMUSCLE_Data_create_grid_4_int8_n + public :: LIBMUSCLE_Data_create_grid_5_int8_n + public :: LIBMUSCLE_Data_create_grid_6_int8_n + public :: LIBMUSCLE_Data_create_grid_7_int8_n + public :: LIBMUSCLE_Data_create_grid_1_real4_n + public :: LIBMUSCLE_Data_create_grid_2_real4_n + public :: LIBMUSCLE_Data_create_grid_3_real4_n + public :: LIBMUSCLE_Data_create_grid_4_real4_n + public :: LIBMUSCLE_Data_create_grid_5_real4_n + public :: LIBMUSCLE_Data_create_grid_6_real4_n + public :: LIBMUSCLE_Data_create_grid_7_real4_n + public :: LIBMUSCLE_Data_create_grid_1_real8_n + public :: LIBMUSCLE_Data_create_grid_2_real8_n + public :: LIBMUSCLE_Data_create_grid_3_real8_n + public :: LIBMUSCLE_Data_create_grid_4_real8_n + public :: LIBMUSCLE_Data_create_grid_5_real8_n + public :: LIBMUSCLE_Data_create_grid_6_real8_n + public :: LIBMUSCLE_Data_create_grid_7_real8_n + public :: LIBMUSCLE_Data_create_grid public :: LIBMUSCLE_Data_free public :: LIBMUSCLE_Data_is_a_logical public :: LIBMUSCLE_Data_is_a_character @@ -100,6 +287,11 @@ module libmuscle_mpi public :: LIBMUSCLE_Data_is_a_real8 public :: LIBMUSCLE_Data_is_a_dict public :: LIBMUSCLE_Data_is_a_list + public :: LIBMUSCLE_Data_is_a_grid_of_logical + public :: LIBMUSCLE_Data_is_a_grid_of_real4 + public :: LIBMUSCLE_Data_is_a_grid_of_real8 + public :: LIBMUSCLE_Data_is_a_grid_of_int4 + public :: LIBMUSCLE_Data_is_a_grid_of_int8 public :: LIBMUSCLE_Data_is_a_byte_array public :: LIBMUSCLE_Data_is_nil public :: LIBMUSCLE_Data_is_a_settings @@ -118,6 +310,46 @@ module libmuscle_mpi public :: LIBMUSCLE_Data_get_item_by_key public :: LIBMUSCLE_Data_get_item_by_index public :: LIBMUSCLE_Data_get_item + public :: LIBMUSCLE_Data_num_dims + public :: LIBMUSCLE_Data_shape + public :: LIBMUSCLE_Data_elements_1_logical + public :: LIBMUSCLE_Data_elements_2_logical + public :: LIBMUSCLE_Data_elements_3_logical + public :: LIBMUSCLE_Data_elements_4_logical + public :: LIBMUSCLE_Data_elements_5_logical + public :: LIBMUSCLE_Data_elements_6_logical + public :: LIBMUSCLE_Data_elements_7_logical + public :: LIBMUSCLE_Data_elements_1_int4 + public :: LIBMUSCLE_Data_elements_2_int4 + public :: LIBMUSCLE_Data_elements_3_int4 + public :: LIBMUSCLE_Data_elements_4_int4 + public :: LIBMUSCLE_Data_elements_5_int4 + public :: LIBMUSCLE_Data_elements_6_int4 + public :: LIBMUSCLE_Data_elements_7_int4 + public :: LIBMUSCLE_Data_elements_1_int8 + public :: LIBMUSCLE_Data_elements_2_int8 + public :: LIBMUSCLE_Data_elements_3_int8 + public :: LIBMUSCLE_Data_elements_4_int8 + public :: LIBMUSCLE_Data_elements_5_int8 + public :: LIBMUSCLE_Data_elements_6_int8 + public :: LIBMUSCLE_Data_elements_7_int8 + public :: LIBMUSCLE_Data_elements_1_real4 + public :: LIBMUSCLE_Data_elements_2_real4 + public :: LIBMUSCLE_Data_elements_3_real4 + public :: LIBMUSCLE_Data_elements_4_real4 + public :: LIBMUSCLE_Data_elements_5_real4 + public :: LIBMUSCLE_Data_elements_6_real4 + public :: LIBMUSCLE_Data_elements_7_real4 + public :: LIBMUSCLE_Data_elements_1_real8 + public :: LIBMUSCLE_Data_elements_2_real8 + public :: LIBMUSCLE_Data_elements_3_real8 + public :: LIBMUSCLE_Data_elements_4_real8 + public :: LIBMUSCLE_Data_elements_5_real8 + public :: LIBMUSCLE_Data_elements_6_real8 + public :: LIBMUSCLE_Data_elements_7_real8 + public :: LIBMUSCLE_Data_elements + public :: LIBMUSCLE_Data_has_indexes + public :: LIBMUSCLE_Data_index public :: LIBMUSCLE_Data_create_dict public :: LIBMUSCLE_Data_create_list public :: LIBMUSCLE_Data_create_nils @@ -265,23 +497,22 @@ module libmuscle_mpi interface - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_nil_( & - ) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_nil_() & bind(C, name="LIBMUSCLE_DataConstRef_create_nil_") use iso_c_binding end function LIBMUSCLE_DataConstRef_create_nil_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_logical_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_logical_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_logical_") use iso_c_binding - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_logical_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_character_( & - value, value_size) & + value, & + value_size) & bind(C, name="LIBMUSCLE_DataConstRef_create_character_") use iso_c_binding @@ -289,200 +520,474 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_character_( & integer (c_size_t), value, intent(in) :: value_size end function LIBMUSCLE_DataConstRef_create_character_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int1_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int1_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int1_") use iso_c_binding integer (c_int8_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int1_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int2_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int2_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int2_") use iso_c_binding integer (c_short), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int2_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int4_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int4_") use iso_c_binding integer (c_int32_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int4_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_int8_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_int8_") use iso_c_binding integer (c_int64_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_int8_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real4_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_real4_") use iso_c_binding real (c_float), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_real4_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_real8_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_real8_") use iso_c_binding real (c_double), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_real8_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_settings_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_settings_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_settings_ - integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_copy_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_copy_(value) & bind(C, name="LIBMUSCLE_DataConstRef_create_copy_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_DataConstRef_create_copy_ - subroutine LIBMUSCLE_DataConstRef_free_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_logical_a_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_logical_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int4_a_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_int4_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int8_a_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_int8_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real4_a_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_real4_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real8_a_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_DataConstRef_create_grid_real8_a_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_logical_n_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_logical_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int4_n_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_int4_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_int8_n_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_int8_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real4_n_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_real4_n_ + + integer (c_intptr_t) function LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_DataConstRef_create_grid_real8_n_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_DataConstRef_create_grid_real8_n_ + + subroutine LIBMUSCLE_DataConstRef_free_(self) & bind(C, name="LIBMUSCLE_DataConstRef_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_DataConstRef_free_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_logical_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_logical_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_logical_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_character_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_character_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_character_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_character_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int1_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int1_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int1_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int1_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int2_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int2_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int2_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int2_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int4_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int4_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int4_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_int8_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_int8_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_int8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_int8_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_real4_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_real4_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_real4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_real4_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_real8_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_real8_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_real8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_real8_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_dict_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_dict_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_dict_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_dict_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_list_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_list_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_list_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_list_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_byte_array_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_logical_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_logical_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_real4_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real4_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_real8_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real8_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_int4_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int4_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_grid_of_int8_(self) & + bind(C, name="LIBMUSCLE_DataConstRef_is_a_grid_of_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int8_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_byte_array_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_byte_array_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_byte_array_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_nil_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_nil_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_nil_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_nil_ - integer (c_int) function LIBMUSCLE_DataConstRef_is_a_settings_( & - self) & + logical (c_bool) function LIBMUSCLE_DataConstRef_is_a_settings_(self) & bind(C, name="LIBMUSCLE_DataConstRef_is_a_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_is_a_settings_ - integer (c_size_t) function LIBMUSCLE_DataConstRef_size_( & - self) & + integer (c_size_t) function LIBMUSCLE_DataConstRef_size_(self) & bind(C, name="LIBMUSCLE_DataConstRef_size_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_DataConstRef_size_ - integer (c_int) function LIBMUSCLE_DataConstRef_as_logical_( & - self, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_DataConstRef_as_logical_( & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_logical_") use iso_c_binding @@ -493,7 +998,12 @@ integer (c_int) function LIBMUSCLE_DataConstRef_as_logical_( & end function LIBMUSCLE_DataConstRef_as_logical_ subroutine LIBMUSCLE_DataConstRef_as_character_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_character_") use iso_c_binding @@ -506,7 +1016,10 @@ subroutine LIBMUSCLE_DataConstRef_as_character_( & end subroutine LIBMUSCLE_DataConstRef_as_character_ integer (c_int) function LIBMUSCLE_DataConstRef_as_int_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int_") use iso_c_binding @@ -517,7 +1030,10 @@ integer (c_int) function LIBMUSCLE_DataConstRef_as_int_( & end function LIBMUSCLE_DataConstRef_as_int_ integer (c_int8_t) function LIBMUSCLE_DataConstRef_as_int1_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int1_") use iso_c_binding @@ -528,7 +1044,10 @@ integer (c_int8_t) function LIBMUSCLE_DataConstRef_as_int1_( & end function LIBMUSCLE_DataConstRef_as_int1_ integer (c_short) function LIBMUSCLE_DataConstRef_as_int2_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int2_") use iso_c_binding @@ -539,7 +1058,10 @@ integer (c_short) function LIBMUSCLE_DataConstRef_as_int2_( & end function LIBMUSCLE_DataConstRef_as_int2_ integer (c_int32_t) function LIBMUSCLE_DataConstRef_as_int4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int4_") use iso_c_binding @@ -550,7 +1072,10 @@ integer (c_int32_t) function LIBMUSCLE_DataConstRef_as_int4_( & end function LIBMUSCLE_DataConstRef_as_int4_ integer (c_int64_t) function LIBMUSCLE_DataConstRef_as_int8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_int8_") use iso_c_binding @@ -561,7 +1086,10 @@ integer (c_int64_t) function LIBMUSCLE_DataConstRef_as_int8_( & end function LIBMUSCLE_DataConstRef_as_int8_ real (c_float) function LIBMUSCLE_DataConstRef_as_real4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_real4_") use iso_c_binding @@ -572,7 +1100,10 @@ real (c_float) function LIBMUSCLE_DataConstRef_as_real4_( & end function LIBMUSCLE_DataConstRef_as_real4_ real (c_double) function LIBMUSCLE_DataConstRef_as_real8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_real8_") use iso_c_binding @@ -583,7 +1114,10 @@ real (c_double) function LIBMUSCLE_DataConstRef_as_real8_( & end function LIBMUSCLE_DataConstRef_as_real8_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_as_settings_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_settings_") use iso_c_binding @@ -594,7 +1128,12 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_as_settings_( & end function LIBMUSCLE_DataConstRef_as_settings_ subroutine LIBMUSCLE_DataConstRef_as_byte_array_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_as_byte_array_") use iso_c_binding @@ -607,7 +1146,12 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array_( & end subroutine LIBMUSCLE_DataConstRef_as_byte_array_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_key_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_get_item_by_key_") use iso_c_binding @@ -620,7 +1164,11 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_key_( & end function LIBMUSCLE_DataConstRef_get_item_by_key_ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_index_( & - self, i, err_code, err_msg, err_msg_len) & + self, & + i, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_DataConstRef_get_item_by_index_") use iso_c_binding @@ -631,23 +1179,198 @@ integer (c_intptr_t) function LIBMUSCLE_DataConstRef_get_item_by_index_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_DataConstRef_get_item_by_index_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_nil_( & - ) & + integer (c_size_t) function LIBMUSCLE_DataConstRef_num_dims_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_num_dims_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_DataConstRef_num_dims_ + + subroutine LIBMUSCLE_DataConstRef_shape_( & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_shape_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_shape_ + + subroutine LIBMUSCLE_DataConstRef_elements_logical_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_logical_ + + subroutine LIBMUSCLE_DataConstRef_elements_int4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_int4_ + + subroutine LIBMUSCLE_DataConstRef_elements_int8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_int8_ + + subroutine LIBMUSCLE_DataConstRef_elements_real4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_real4_ + + subroutine LIBMUSCLE_DataConstRef_elements_real8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_elements_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_elements_real8_ + + logical (c_bool) function LIBMUSCLE_DataConstRef_has_indexes_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_has_indexes_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_DataConstRef_has_indexes_ + + subroutine LIBMUSCLE_DataConstRef_index_( & + self, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_DataConstRef_index_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: i + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_DataConstRef_index_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_nil_() & bind(C, name="LIBMUSCLE_Data_create_nil_") use iso_c_binding end function LIBMUSCLE_Data_create_nil_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_logical_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_logical_(value) & bind(C, name="LIBMUSCLE_Data_create_logical_") use iso_c_binding - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value end function LIBMUSCLE_Data_create_logical_ integer (c_intptr_t) function LIBMUSCLE_Data_create_character_( & - value, value_size) & + value, & + value_size) & bind(C, name="LIBMUSCLE_Data_create_character_") use iso_c_binding @@ -655,200 +1378,474 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_character_( & integer (c_size_t), value, intent(in) :: value_size end function LIBMUSCLE_Data_create_character_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int1_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int1_(value) & bind(C, name="LIBMUSCLE_Data_create_int1_") use iso_c_binding integer (c_int8_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_int1_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int2_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int2_(value) & bind(C, name="LIBMUSCLE_Data_create_int2_") use iso_c_binding integer (c_short), value, intent(in) :: value end function LIBMUSCLE_Data_create_int2_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int4_(value) & bind(C, name="LIBMUSCLE_Data_create_int4_") use iso_c_binding integer (c_int32_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_int4_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_int8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_int8_(value) & bind(C, name="LIBMUSCLE_Data_create_int8_") use iso_c_binding integer (c_int64_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_int8_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_real4_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_real4_(value) & bind(C, name="LIBMUSCLE_Data_create_real4_") use iso_c_binding real (c_float), value, intent(in) :: value end function LIBMUSCLE_Data_create_real4_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_real8_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_real8_(value) & bind(C, name="LIBMUSCLE_Data_create_real8_") use iso_c_binding real (c_double), value, intent(in) :: value end function LIBMUSCLE_Data_create_real8_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_settings_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_settings_(value) & bind(C, name="LIBMUSCLE_Data_create_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_settings_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_copy_( & - value) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_copy_(value) & bind(C, name="LIBMUSCLE_Data_create_copy_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: value end function LIBMUSCLE_Data_create_copy_ - subroutine LIBMUSCLE_Data_free_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_logical_a_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_logical_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_int4_a_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_int4_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_int8_a_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_int8_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_real4_a_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_real4_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, & + data_array_shape, & + data_array_ndims) & + bind(C, name="LIBMUSCLE_Data_create_grid_real8_a_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + end function LIBMUSCLE_Data_create_grid_real8_a_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_logical_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_logical_n_") + + use iso_c_binding + logical (c_bool), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_logical_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_int4_n_") + + use iso_c_binding + integer (c_int32_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_int4_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_int8_n_") + + use iso_c_binding + integer (c_int64_t), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_int8_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_real4_n_") + + use iso_c_binding + real (c_float), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_real4_n_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + data_array_shape, & + data_array_ndims, & + index_name_1, & + index_name_1_size, & + index_name_2, & + index_name_2_size, & + index_name_3, & + index_name_3_size, & + index_name_4, & + index_name_4_size, & + index_name_5, & + index_name_5_size, & + index_name_6, & + index_name_6_size, & + index_name_7, & + index_name_7_size) & + bind(C, name="LIBMUSCLE_Data_create_grid_real8_n_") + + use iso_c_binding + real (c_double), dimension(*), intent(in) :: data_array + integer (c_size_t), dimension(1), intent(in) :: data_array_shape + integer (c_size_t), value, intent(in) :: data_array_ndims + character, intent(in) :: index_name_1 + integer (c_size_t), value, intent(in) :: index_name_1_size + character, intent(in) :: index_name_2 + integer (c_size_t), value, intent(in) :: index_name_2_size + character, intent(in) :: index_name_3 + integer (c_size_t), value, intent(in) :: index_name_3_size + character, intent(in) :: index_name_4 + integer (c_size_t), value, intent(in) :: index_name_4_size + character, intent(in) :: index_name_5 + integer (c_size_t), value, intent(in) :: index_name_5_size + character, intent(in) :: index_name_6 + integer (c_size_t), value, intent(in) :: index_name_6_size + character, intent(in) :: index_name_7 + integer (c_size_t), value, intent(in) :: index_name_7_size + end function LIBMUSCLE_Data_create_grid_real8_n_ + + subroutine LIBMUSCLE_Data_free_(self) & bind(C, name="LIBMUSCLE_Data_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Data_free_ - integer (c_int) function LIBMUSCLE_Data_is_a_logical_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_logical_(self) & bind(C, name="LIBMUSCLE_Data_is_a_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_logical_ - integer (c_int) function LIBMUSCLE_Data_is_a_character_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_character_(self) & bind(C, name="LIBMUSCLE_Data_is_a_character_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_character_ - integer (c_int) function LIBMUSCLE_Data_is_a_int_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int_ - integer (c_int) function LIBMUSCLE_Data_is_a_int1_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int1_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int1_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int1_ - integer (c_int) function LIBMUSCLE_Data_is_a_int2_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int2_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int2_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int2_ - integer (c_int) function LIBMUSCLE_Data_is_a_int4_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int4_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int4_ - integer (c_int) function LIBMUSCLE_Data_is_a_int8_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_int8_(self) & bind(C, name="LIBMUSCLE_Data_is_a_int8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_int8_ - integer (c_int) function LIBMUSCLE_Data_is_a_real4_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_real4_(self) & bind(C, name="LIBMUSCLE_Data_is_a_real4_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_real4_ - integer (c_int) function LIBMUSCLE_Data_is_a_real8_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_real8_(self) & bind(C, name="LIBMUSCLE_Data_is_a_real8_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_real8_ - integer (c_int) function LIBMUSCLE_Data_is_a_dict_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_dict_(self) & bind(C, name="LIBMUSCLE_Data_is_a_dict_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_dict_ - integer (c_int) function LIBMUSCLE_Data_is_a_list_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_list_(self) & bind(C, name="LIBMUSCLE_Data_is_a_list_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_list_ - integer (c_int) function LIBMUSCLE_Data_is_a_byte_array_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_logical_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_logical_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_real4_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_real4_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_real8_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_real8_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_int4_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_int4_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_grid_of_int8_(self) & + bind(C, name="LIBMUSCLE_Data_is_a_grid_of_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + end function LIBMUSCLE_Data_is_a_grid_of_int8_ + + logical (c_bool) function LIBMUSCLE_Data_is_a_byte_array_(self) & bind(C, name="LIBMUSCLE_Data_is_a_byte_array_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_byte_array_ - integer (c_int) function LIBMUSCLE_Data_is_nil_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_nil_(self) & bind(C, name="LIBMUSCLE_Data_is_nil_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_nil_ - integer (c_int) function LIBMUSCLE_Data_is_a_settings_( & - self) & + logical (c_bool) function LIBMUSCLE_Data_is_a_settings_(self) & bind(C, name="LIBMUSCLE_Data_is_a_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_is_a_settings_ - integer (c_size_t) function LIBMUSCLE_Data_size_( & - self) & + integer (c_size_t) function LIBMUSCLE_Data_size_(self) & bind(C, name="LIBMUSCLE_Data_size_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Data_size_ - integer (c_int) function LIBMUSCLE_Data_as_logical_( & - self, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Data_as_logical_( & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_logical_") use iso_c_binding @@ -859,7 +1856,12 @@ integer (c_int) function LIBMUSCLE_Data_as_logical_( & end function LIBMUSCLE_Data_as_logical_ subroutine LIBMUSCLE_Data_as_character_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_character_") use iso_c_binding @@ -872,7 +1874,10 @@ subroutine LIBMUSCLE_Data_as_character_( & end subroutine LIBMUSCLE_Data_as_character_ integer (c_int) function LIBMUSCLE_Data_as_int_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int_") use iso_c_binding @@ -883,7 +1888,10 @@ integer (c_int) function LIBMUSCLE_Data_as_int_( & end function LIBMUSCLE_Data_as_int_ integer (c_int8_t) function LIBMUSCLE_Data_as_int1_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int1_") use iso_c_binding @@ -894,7 +1902,10 @@ integer (c_int8_t) function LIBMUSCLE_Data_as_int1_( & end function LIBMUSCLE_Data_as_int1_ integer (c_short) function LIBMUSCLE_Data_as_int2_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int2_") use iso_c_binding @@ -905,7 +1916,10 @@ integer (c_short) function LIBMUSCLE_Data_as_int2_( & end function LIBMUSCLE_Data_as_int2_ integer (c_int32_t) function LIBMUSCLE_Data_as_int4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int4_") use iso_c_binding @@ -916,7 +1930,10 @@ integer (c_int32_t) function LIBMUSCLE_Data_as_int4_( & end function LIBMUSCLE_Data_as_int4_ integer (c_int64_t) function LIBMUSCLE_Data_as_int8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_int8_") use iso_c_binding @@ -927,7 +1944,10 @@ integer (c_int64_t) function LIBMUSCLE_Data_as_int8_( & end function LIBMUSCLE_Data_as_int8_ real (c_float) function LIBMUSCLE_Data_as_real4_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_real4_") use iso_c_binding @@ -938,7 +1958,10 @@ real (c_float) function LIBMUSCLE_Data_as_real4_( & end function LIBMUSCLE_Data_as_real4_ real (c_double) function LIBMUSCLE_Data_as_real8_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_real8_") use iso_c_binding @@ -949,7 +1972,10 @@ real (c_double) function LIBMUSCLE_Data_as_real8_( & end function LIBMUSCLE_Data_as_real8_ integer (c_intptr_t) function LIBMUSCLE_Data_as_settings_( & - self, err_code, err_msg, err_msg_len) & + self, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_settings_") use iso_c_binding @@ -960,7 +1986,12 @@ integer (c_intptr_t) function LIBMUSCLE_Data_as_settings_( & end function LIBMUSCLE_Data_as_settings_ subroutine LIBMUSCLE_Data_as_byte_array_( & - self, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_as_byte_array_") use iso_c_binding @@ -973,7 +2004,12 @@ subroutine LIBMUSCLE_Data_as_byte_array_( & end subroutine LIBMUSCLE_Data_as_byte_array_ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_key_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_get_item_by_key_") use iso_c_binding @@ -986,7 +2022,11 @@ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_key_( & end function LIBMUSCLE_Data_get_item_by_key_ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_index_( & - self, i, err_code, err_msg, err_msg_len) & + self, & + i, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_get_item_by_index_") use iso_c_binding @@ -997,30 +2037,202 @@ integer (c_intptr_t) function LIBMUSCLE_Data_get_item_by_index_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Data_get_item_by_index_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_dict_( & - ) & + integer (c_size_t) function LIBMUSCLE_Data_num_dims_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_num_dims_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_Data_num_dims_ + + subroutine LIBMUSCLE_Data_shape_( & + self, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_shape_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_shape_ + + subroutine LIBMUSCLE_Data_elements_logical_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_logical_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_logical_ + + subroutine LIBMUSCLE_Data_elements_int4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_int4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_int4_ + + subroutine LIBMUSCLE_Data_elements_int8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_int8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_int8_ + + subroutine LIBMUSCLE_Data_elements_real4_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_real4_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_real4_ + + subroutine LIBMUSCLE_Data_elements_real8_( & + self, & + ndims, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_elements_real8_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: ndims + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), dimension(1), intent(out) :: ret_val_shape + integer (c_int), intent(out) :: ret_val_format + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_elements_real8_ + + logical (c_bool) function LIBMUSCLE_Data_has_indexes_( & + self, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_has_indexes_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end function LIBMUSCLE_Data_has_indexes_ + + subroutine LIBMUSCLE_Data_index_( & + self, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & + bind(C, name="LIBMUSCLE_Data_index_") + + use iso_c_binding + integer (c_intptr_t), value, intent(in) :: self + integer (c_size_t), value, intent(in) :: i + type (c_ptr), intent(out) :: ret_val + integer (c_size_t), intent(out) :: ret_val_size + integer (c_int), intent(out) :: err_code + type (c_ptr), intent(out) :: err_msg + integer (c_size_t), intent(out) :: err_msg_len + end subroutine LIBMUSCLE_Data_index_ + + integer (c_intptr_t) function LIBMUSCLE_Data_create_dict_() & bind(C, name="LIBMUSCLE_Data_create_dict_") use iso_c_binding end function LIBMUSCLE_Data_create_dict_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_list_( & - ) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_list_() & bind(C, name="LIBMUSCLE_Data_create_list_") use iso_c_binding end function LIBMUSCLE_Data_create_list_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_nils_( & - size) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_nils_(size) & bind(C, name="LIBMUSCLE_Data_create_nils_") use iso_c_binding integer (c_size_t), value, intent(in) :: size end function LIBMUSCLE_Data_create_nils_ - integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_empty_( & - size) & + integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_empty_(size) & bind(C, name="LIBMUSCLE_Data_create_byte_array_empty_") use iso_c_binding @@ -1028,7 +2240,8 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_empty_( & end function LIBMUSCLE_Data_create_byte_array_empty_ integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_from_buf_( & - buf, buf_size) & + buf, & + buf_size) & bind(C, name="LIBMUSCLE_Data_create_byte_array_from_buf_") use iso_c_binding @@ -1037,16 +2250,19 @@ integer (c_intptr_t) function LIBMUSCLE_Data_create_byte_array_from_buf_( & end function LIBMUSCLE_Data_create_byte_array_from_buf_ subroutine LIBMUSCLE_Data_set_logical_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value end subroutine LIBMUSCLE_Data_set_logical_ subroutine LIBMUSCLE_Data_set_character_( & - self, value, value_size) & + self, & + value, & + value_size) & bind(C, name="LIBMUSCLE_Data_set_character_") use iso_c_binding @@ -1056,7 +2272,8 @@ subroutine LIBMUSCLE_Data_set_character_( & end subroutine LIBMUSCLE_Data_set_character_ subroutine LIBMUSCLE_Data_set_int1_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int1_") use iso_c_binding @@ -1065,7 +2282,8 @@ subroutine LIBMUSCLE_Data_set_int1_( & end subroutine LIBMUSCLE_Data_set_int1_ subroutine LIBMUSCLE_Data_set_int2_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int2_") use iso_c_binding @@ -1074,7 +2292,8 @@ subroutine LIBMUSCLE_Data_set_int2_( & end subroutine LIBMUSCLE_Data_set_int2_ subroutine LIBMUSCLE_Data_set_int4_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int4_") use iso_c_binding @@ -1083,7 +2302,8 @@ subroutine LIBMUSCLE_Data_set_int4_( & end subroutine LIBMUSCLE_Data_set_int4_ subroutine LIBMUSCLE_Data_set_int8_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_int8_") use iso_c_binding @@ -1092,7 +2312,8 @@ subroutine LIBMUSCLE_Data_set_int8_( & end subroutine LIBMUSCLE_Data_set_int8_ subroutine LIBMUSCLE_Data_set_real4_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_real4_") use iso_c_binding @@ -1101,7 +2322,8 @@ subroutine LIBMUSCLE_Data_set_real4_( & end subroutine LIBMUSCLE_Data_set_real4_ subroutine LIBMUSCLE_Data_set_real8_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_real8_") use iso_c_binding @@ -1110,7 +2332,8 @@ subroutine LIBMUSCLE_Data_set_real8_( & end subroutine LIBMUSCLE_Data_set_real8_ subroutine LIBMUSCLE_Data_set_data_( & - self, value) & + self, & + value) & bind(C, name="LIBMUSCLE_Data_set_data_") use iso_c_binding @@ -1118,8 +2341,7 @@ subroutine LIBMUSCLE_Data_set_data_( & integer (c_intptr_t), value, intent(in) :: value end subroutine LIBMUSCLE_Data_set_data_ - subroutine LIBMUSCLE_Data_set_nil_( & - self) & + subroutine LIBMUSCLE_Data_set_nil_(self) & bind(C, name="LIBMUSCLE_Data_set_nil_") use iso_c_binding @@ -1127,21 +2349,34 @@ subroutine LIBMUSCLE_Data_set_nil_( & end subroutine LIBMUSCLE_Data_set_nil_ subroutine LIBMUSCLE_Data_set_item_key_logical_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self character, intent(in) :: key integer (c_size_t), value, intent(in) :: key_size - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value integer (c_int), intent(out) :: err_code type (c_ptr), intent(out) :: err_msg integer (c_size_t), intent(out) :: err_msg_len end subroutine LIBMUSCLE_Data_set_item_key_logical_ subroutine LIBMUSCLE_Data_set_item_key_character_( & - self, key, key_size, value, value_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + value_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_character_") use iso_c_binding @@ -1156,7 +2391,13 @@ subroutine LIBMUSCLE_Data_set_item_key_character_( & end subroutine LIBMUSCLE_Data_set_item_key_character_ subroutine LIBMUSCLE_Data_set_item_key_int1_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int1_") use iso_c_binding @@ -1170,7 +2411,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int1_( & end subroutine LIBMUSCLE_Data_set_item_key_int1_ subroutine LIBMUSCLE_Data_set_item_key_int2_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int2_") use iso_c_binding @@ -1184,7 +2431,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int2_( & end subroutine LIBMUSCLE_Data_set_item_key_int2_ subroutine LIBMUSCLE_Data_set_item_key_int4_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int4_") use iso_c_binding @@ -1198,7 +2451,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int4_( & end subroutine LIBMUSCLE_Data_set_item_key_int4_ subroutine LIBMUSCLE_Data_set_item_key_int8_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_int8_") use iso_c_binding @@ -1212,7 +2471,13 @@ subroutine LIBMUSCLE_Data_set_item_key_int8_( & end subroutine LIBMUSCLE_Data_set_item_key_int8_ subroutine LIBMUSCLE_Data_set_item_key_real4_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_real4_") use iso_c_binding @@ -1226,7 +2491,13 @@ subroutine LIBMUSCLE_Data_set_item_key_real4_( & end subroutine LIBMUSCLE_Data_set_item_key_real4_ subroutine LIBMUSCLE_Data_set_item_key_real8_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_real8_") use iso_c_binding @@ -1240,7 +2511,13 @@ subroutine LIBMUSCLE_Data_set_item_key_real8_( & end subroutine LIBMUSCLE_Data_set_item_key_real8_ subroutine LIBMUSCLE_Data_set_item_key_data_( & - self, key, key_size, value, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_key_data_") use iso_c_binding @@ -1254,20 +2531,31 @@ subroutine LIBMUSCLE_Data_set_item_key_data_( & end subroutine LIBMUSCLE_Data_set_item_key_data_ subroutine LIBMUSCLE_Data_set_item_index_logical_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self integer (c_size_t), value, intent(in) :: i - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value integer (c_int), intent(out) :: err_code type (c_ptr), intent(out) :: err_msg integer (c_size_t), intent(out) :: err_msg_len end subroutine LIBMUSCLE_Data_set_item_index_logical_ subroutine LIBMUSCLE_Data_set_item_index_character_( & - self, i, value, value_size, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + value_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_character_") use iso_c_binding @@ -1281,7 +2569,12 @@ subroutine LIBMUSCLE_Data_set_item_index_character_( & end subroutine LIBMUSCLE_Data_set_item_index_character_ subroutine LIBMUSCLE_Data_set_item_index_int1_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int1_") use iso_c_binding @@ -1294,7 +2587,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int1_( & end subroutine LIBMUSCLE_Data_set_item_index_int1_ subroutine LIBMUSCLE_Data_set_item_index_int2_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int2_") use iso_c_binding @@ -1307,7 +2605,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int2_( & end subroutine LIBMUSCLE_Data_set_item_index_int2_ subroutine LIBMUSCLE_Data_set_item_index_int4_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int4_") use iso_c_binding @@ -1320,7 +2623,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int4_( & end subroutine LIBMUSCLE_Data_set_item_index_int4_ subroutine LIBMUSCLE_Data_set_item_index_int8_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_int8_") use iso_c_binding @@ -1333,7 +2641,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int8_( & end subroutine LIBMUSCLE_Data_set_item_index_int8_ subroutine LIBMUSCLE_Data_set_item_index_real4_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_real4_") use iso_c_binding @@ -1346,7 +2659,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real4_( & end subroutine LIBMUSCLE_Data_set_item_index_real4_ subroutine LIBMUSCLE_Data_set_item_index_real8_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_real8_") use iso_c_binding @@ -1359,7 +2677,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real8_( & end subroutine LIBMUSCLE_Data_set_item_index_real8_ subroutine LIBMUSCLE_Data_set_item_index_data_( & - self, i, value, err_code, err_msg, err_msg_len) & + self, & + i, & + value, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_set_item_index_data_") use iso_c_binding @@ -1372,7 +2695,13 @@ subroutine LIBMUSCLE_Data_set_item_index_data_( & end subroutine LIBMUSCLE_Data_set_item_index_data_ subroutine LIBMUSCLE_Data_key_( & - self, i, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_key_") use iso_c_binding @@ -1386,7 +2715,11 @@ subroutine LIBMUSCLE_Data_key_( & end subroutine LIBMUSCLE_Data_key_ integer (c_intptr_t) function LIBMUSCLE_Data_value_( & - self, i, err_code, err_msg, err_msg_len) & + self, & + i, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Data_value_") use iso_c_binding @@ -1397,15 +2730,13 @@ integer (c_intptr_t) function LIBMUSCLE_Data_value_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Data_value_ - integer (c_intptr_t) function LIBMUSCLE_PortsDescription_create_( & - ) & + integer (c_intptr_t) function LIBMUSCLE_PortsDescription_create_() & bind(C, name="LIBMUSCLE_PortsDescription_create_") use iso_c_binding end function LIBMUSCLE_PortsDescription_create_ - subroutine LIBMUSCLE_PortsDescription_free_( & - self) & + subroutine LIBMUSCLE_PortsDescription_free_(self) & bind(C, name="LIBMUSCLE_PortsDescription_free_") use iso_c_binding @@ -1413,7 +2744,10 @@ subroutine LIBMUSCLE_PortsDescription_free_( & end subroutine LIBMUSCLE_PortsDescription_free_ subroutine LIBMUSCLE_PortsDescription_add_( & - self, op, port, port_size) & + self, & + op, & + port, & + port_size) & bind(C, name="LIBMUSCLE_PortsDescription_add_") use iso_c_binding @@ -1424,7 +2758,8 @@ subroutine LIBMUSCLE_PortsDescription_add_( & end subroutine LIBMUSCLE_PortsDescription_add_ integer (c_size_t) function LIBMUSCLE_PortsDescription_num_ports_( & - self, op) & + self, & + op) & bind(C, name="LIBMUSCLE_PortsDescription_num_ports_") use iso_c_binding @@ -1433,7 +2768,14 @@ integer (c_size_t) function LIBMUSCLE_PortsDescription_num_ports_( & end function LIBMUSCLE_PortsDescription_num_ports_ subroutine LIBMUSCLE_PortsDescription_get_( & - self, op, i, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + op, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_PortsDescription_get_") use iso_c_binding @@ -1448,7 +2790,8 @@ subroutine LIBMUSCLE_PortsDescription_get_( & end subroutine LIBMUSCLE_PortsDescription_get_ integer (c_intptr_t) function LIBMUSCLE_Message_create_td_( & - timestamp, data) & + timestamp, & + data) & bind(C, name="LIBMUSCLE_Message_create_td_") use iso_c_binding @@ -1457,7 +2800,9 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_td_( & end function LIBMUSCLE_Message_create_td_ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnd_( & - timestamp, next_timestamp, data) & + timestamp, & + next_timestamp, & + data) & bind(C, name="LIBMUSCLE_Message_create_tnd_") use iso_c_binding @@ -1467,7 +2812,9 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnd_( & end function LIBMUSCLE_Message_create_tnd_ integer (c_intptr_t) function LIBMUSCLE_Message_create_tds_( & - timestamp, data, settings) & + timestamp, & + data, & + settings) & bind(C, name="LIBMUSCLE_Message_create_tds_") use iso_c_binding @@ -1477,7 +2824,10 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_tds_( & end function LIBMUSCLE_Message_create_tds_ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnds_( & - timestamp, next_timestamp, data, settings) & + timestamp, & + next_timestamp, & + data, & + settings) & bind(C, name="LIBMUSCLE_Message_create_tnds_") use iso_c_binding @@ -1487,16 +2837,14 @@ integer (c_intptr_t) function LIBMUSCLE_Message_create_tnds_( & integer (c_intptr_t), value, intent(in) :: settings end function LIBMUSCLE_Message_create_tnds_ - subroutine LIBMUSCLE_Message_free_( & - self) & + subroutine LIBMUSCLE_Message_free_(self) & bind(C, name="LIBMUSCLE_Message_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Message_free_ - real (c_double) function LIBMUSCLE_Message_timestamp_( & - self) & + real (c_double) function LIBMUSCLE_Message_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_timestamp_") use iso_c_binding @@ -1504,7 +2852,8 @@ real (c_double) function LIBMUSCLE_Message_timestamp_( & end function LIBMUSCLE_Message_timestamp_ subroutine LIBMUSCLE_Message_set_timestamp_( & - self, timestamp) & + self, & + timestamp) & bind(C, name="LIBMUSCLE_Message_set_timestamp_") use iso_c_binding @@ -1512,16 +2861,14 @@ subroutine LIBMUSCLE_Message_set_timestamp_( & real (c_double), value, intent(in) :: timestamp end subroutine LIBMUSCLE_Message_set_timestamp_ - integer (c_int) function LIBMUSCLE_Message_has_next_timestamp_( & - self) & + logical (c_bool) function LIBMUSCLE_Message_has_next_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_has_next_timestamp_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Message_has_next_timestamp_ - real (c_double) function LIBMUSCLE_Message_next_timestamp_( & - self) & + real (c_double) function LIBMUSCLE_Message_next_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_next_timestamp_") use iso_c_binding @@ -1529,7 +2876,8 @@ real (c_double) function LIBMUSCLE_Message_next_timestamp_( & end function LIBMUSCLE_Message_next_timestamp_ subroutine LIBMUSCLE_Message_set_next_timestamp_( & - self, next_timestamp) & + self, & + next_timestamp) & bind(C, name="LIBMUSCLE_Message_set_next_timestamp_") use iso_c_binding @@ -1537,16 +2885,14 @@ subroutine LIBMUSCLE_Message_set_next_timestamp_( & real (c_double), value, intent(in) :: next_timestamp end subroutine LIBMUSCLE_Message_set_next_timestamp_ - subroutine LIBMUSCLE_Message_unset_next_timestamp_( & - self) & + subroutine LIBMUSCLE_Message_unset_next_timestamp_(self) & bind(C, name="LIBMUSCLE_Message_unset_next_timestamp_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Message_unset_next_timestamp_ - integer (c_intptr_t) function LIBMUSCLE_Message_get_data_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Message_get_data_(self) & bind(C, name="LIBMUSCLE_Message_get_data_") use iso_c_binding @@ -1554,7 +2900,8 @@ integer (c_intptr_t) function LIBMUSCLE_Message_get_data_( & end function LIBMUSCLE_Message_get_data_ subroutine LIBMUSCLE_Message_set_data_d_( & - self, data) & + self, & + data) & bind(C, name="LIBMUSCLE_Message_set_data_d_") use iso_c_binding @@ -1563,7 +2910,8 @@ subroutine LIBMUSCLE_Message_set_data_d_( & end subroutine LIBMUSCLE_Message_set_data_d_ subroutine LIBMUSCLE_Message_set_data_dcr_( & - self, data) & + self, & + data) & bind(C, name="LIBMUSCLE_Message_set_data_dcr_") use iso_c_binding @@ -1571,16 +2919,14 @@ subroutine LIBMUSCLE_Message_set_data_dcr_( & integer (c_intptr_t), value, intent(in) :: data end subroutine LIBMUSCLE_Message_set_data_dcr_ - integer (c_int) function LIBMUSCLE_Message_has_settings_( & - self) & + logical (c_bool) function LIBMUSCLE_Message_has_settings_(self) & bind(C, name="LIBMUSCLE_Message_has_settings_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Message_has_settings_ - integer (c_intptr_t) function LIBMUSCLE_Message_get_settings_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Message_get_settings_(self) & bind(C, name="LIBMUSCLE_Message_get_settings_") use iso_c_binding @@ -1588,7 +2934,8 @@ integer (c_intptr_t) function LIBMUSCLE_Message_get_settings_( & end function LIBMUSCLE_Message_get_settings_ subroutine LIBMUSCLE_Message_set_settings_( & - self, settings) & + self, & + settings) & bind(C, name="LIBMUSCLE_Message_set_settings_") use iso_c_binding @@ -1596,8 +2943,7 @@ subroutine LIBMUSCLE_Message_set_settings_( & integer (c_intptr_t), value, intent(in) :: settings end subroutine LIBMUSCLE_Message_set_settings_ - subroutine LIBMUSCLE_Message_unset_settings_( & - self) & + subroutine LIBMUSCLE_Message_unset_settings_(self) & bind(C, name="LIBMUSCLE_Message_unset_settings_") use iso_c_binding @@ -1605,7 +2951,9 @@ subroutine LIBMUSCLE_Message_unset_settings_( & end subroutine LIBMUSCLE_Message_unset_settings_ integer (c_intptr_t) function LIBMUSCLE_Instance_create_autoports_cr_( & - cla, communicator, root) & + cla, & + communicator, & + root) & bind(C, name="LIBMUSCLE_Instance_create_autoports_cr_") use iso_c_binding @@ -1614,80 +2962,48 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_create_autoports_cr_( & integer (c_int), value, intent(in) :: root end function LIBMUSCLE_Instance_create_autoports_cr_ - integer (c_intptr_t) function LIBMUSCLE_Instance_create_autoports_c_( & - cla, communicator) & - bind(C, name="LIBMUSCLE_Instance_create_autoports_c_") + integer (c_intptr_t) function LIBMUSCLE_Instance_create_with_ports_cr_( & + cla, & + ports, & + communicator, & + root) & + bind(C, name="LIBMUSCLE_Instance_create_with_ports_cr_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: cla - integer (c_int), value, intent(in) :: communicator - end function LIBMUSCLE_Instance_create_autoports_c_ - - integer (c_intptr_t) function LIBMUSCLE_Instance_create_autoports_( & - cla) & - bind(C, name="LIBMUSCLE_Instance_create_autoports_") - - use iso_c_binding - integer (c_intptr_t), value, intent(in) :: cla - end function LIBMUSCLE_Instance_create_autoports_ - - integer (c_intptr_t) function LIBMUSCLE_Instance_create_with_ports_cr_( & - cla, ports, communicator, root) & - bind(C, name="LIBMUSCLE_Instance_create_with_ports_cr_") - - use iso_c_binding - integer (c_intptr_t), value, intent(in) :: cla - integer (c_intptr_t), value, intent(in) :: ports + integer (c_intptr_t), value, intent(in) :: ports integer (c_int), value, intent(in) :: communicator integer (c_int), value, intent(in) :: root end function LIBMUSCLE_Instance_create_with_ports_cr_ - integer (c_intptr_t) function LIBMUSCLE_Instance_create_with_ports_c_( & - cla, ports, communicator) & - bind(C, name="LIBMUSCLE_Instance_create_with_ports_c_") - - use iso_c_binding - integer (c_intptr_t), value, intent(in) :: cla - integer (c_intptr_t), value, intent(in) :: ports - integer (c_int), value, intent(in) :: communicator - end function LIBMUSCLE_Instance_create_with_ports_c_ - - integer (c_intptr_t) function LIBMUSCLE_Instance_create_with_ports_( & - cla, ports) & - bind(C, name="LIBMUSCLE_Instance_create_with_ports_") - - use iso_c_binding - integer (c_intptr_t), value, intent(in) :: cla - integer (c_intptr_t), value, intent(in) :: ports - end function LIBMUSCLE_Instance_create_with_ports_ - - subroutine LIBMUSCLE_Instance_free_( & - self) & + subroutine LIBMUSCLE_Instance_free_(self) & bind(C, name="LIBMUSCLE_Instance_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine LIBMUSCLE_Instance_free_ - integer (c_int) function LIBMUSCLE_Instance_reuse_instance_default_( & - self) & + logical (c_bool) function LIBMUSCLE_Instance_reuse_instance_default_(self) & bind(C, name="LIBMUSCLE_Instance_reuse_instance_default_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Instance_reuse_instance_default_ - integer (c_int) function LIBMUSCLE_Instance_reuse_instance_apply_( & - self, apply_overlay) & + logical (c_bool) function LIBMUSCLE_Instance_reuse_instance_apply_( & + self, & + apply_overlay) & bind(C, name="LIBMUSCLE_Instance_reuse_instance_apply_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self - integer (c_int), value, intent(in) :: apply_overlay + logical (c_bool), value, intent(in) :: apply_overlay end function LIBMUSCLE_Instance_reuse_instance_apply_ subroutine LIBMUSCLE_Instance_error_shutdown_( & - self, message, message_size) & + self, & + message, & + message_size) & bind(C, name="LIBMUSCLE_Instance_error_shutdown_") use iso_c_binding @@ -1696,8 +3012,13 @@ subroutine LIBMUSCLE_Instance_error_shutdown_( & integer (c_size_t), value, intent(in) :: message_size end subroutine LIBMUSCLE_Instance_error_shutdown_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_character_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_character_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_character_") use iso_c_binding @@ -1709,8 +3030,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_character_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_character_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_int8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_int8_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_int8_") use iso_c_binding @@ -1722,8 +3048,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_int8_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_int8_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8_") use iso_c_binding @@ -1735,8 +3066,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_real8_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_logical_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_logical_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_logical_") use iso_c_binding @@ -1748,8 +3084,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_logical_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_logical_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8array_") use iso_c_binding @@ -1761,8 +3102,13 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_is_setting_a_real8array_ - integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array2_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_is_setting_a_real8array2_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_is_setting_a_real8array2_") use iso_c_binding @@ -1775,7 +3121,14 @@ integer (c_int) function LIBMUSCLE_Instance_is_setting_a_real8array2_( & end function LIBMUSCLE_Instance_is_setting_a_real8array2_ subroutine LIBMUSCLE_Instance_get_setting_as_character_( & - self, name, name_size, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_character_") use iso_c_binding @@ -1790,7 +3143,12 @@ subroutine LIBMUSCLE_Instance_get_setting_as_character_( & end subroutine LIBMUSCLE_Instance_get_setting_as_character_ integer (c_int64_t) function LIBMUSCLE_Instance_get_setting_as_int8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_int8_") use iso_c_binding @@ -1803,7 +3161,12 @@ integer (c_int64_t) function LIBMUSCLE_Instance_get_setting_as_int8_( & end function LIBMUSCLE_Instance_get_setting_as_int8_ real (c_double) function LIBMUSCLE_Instance_get_setting_as_real8_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8_") use iso_c_binding @@ -1815,8 +3178,13 @@ real (c_double) function LIBMUSCLE_Instance_get_setting_as_real8_( & integer (c_size_t), intent(out) :: err_msg_len end function LIBMUSCLE_Instance_get_setting_as_real8_ - integer (c_int) function LIBMUSCLE_Instance_get_setting_as_logical_( & - self, name, name_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function LIBMUSCLE_Instance_get_setting_as_logical_( & + self, & + name, & + name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_logical_") use iso_c_binding @@ -1829,7 +3197,14 @@ integer (c_int) function LIBMUSCLE_Instance_get_setting_as_logical_( & end function LIBMUSCLE_Instance_get_setting_as_logical_ subroutine LIBMUSCLE_Instance_get_setting_as_real8array_( & - self, name, name_size, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8array_") use iso_c_binding @@ -1844,7 +3219,14 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array_( & end subroutine LIBMUSCLE_Instance_get_setting_as_real8array_ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_( & - self, name, name_size, ret_val, ret_val_shape, err_code, err_msg, err_msg_len) & + self, & + name, & + name_size, & + ret_val, & + ret_val_shape, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_get_setting_as_real8array2_") use iso_c_binding @@ -1858,16 +3240,17 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_( & integer (c_size_t), intent(out) :: err_msg_len end subroutine LIBMUSCLE_Instance_get_setting_as_real8array2_ - integer (c_intptr_t) function LIBMUSCLE_Instance_list_ports_( & - self) & + integer (c_intptr_t) function LIBMUSCLE_Instance_list_ports_(self) & bind(C, name="LIBMUSCLE_Instance_list_ports_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function LIBMUSCLE_Instance_list_ports_ - integer (c_int) function LIBMUSCLE_Instance_is_connected_( & - self, port, port_size) & + logical (c_bool) function LIBMUSCLE_Instance_is_connected_( & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_is_connected_") use iso_c_binding @@ -1876,8 +3259,10 @@ integer (c_int) function LIBMUSCLE_Instance_is_connected_( & integer (c_size_t), value, intent(in) :: port_size end function LIBMUSCLE_Instance_is_connected_ - integer (c_int) function LIBMUSCLE_Instance_is_vector_port_( & - self, port, port_size) & + logical (c_bool) function LIBMUSCLE_Instance_is_vector_port_( & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_is_vector_port_") use iso_c_binding @@ -1886,8 +3271,10 @@ integer (c_int) function LIBMUSCLE_Instance_is_vector_port_( & integer (c_size_t), value, intent(in) :: port_size end function LIBMUSCLE_Instance_is_vector_port_ - integer (c_int) function LIBMUSCLE_Instance_is_resizable_( & - self, port, port_size) & + logical (c_bool) function LIBMUSCLE_Instance_is_resizable_( & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_is_resizable_") use iso_c_binding @@ -1897,7 +3284,9 @@ integer (c_int) function LIBMUSCLE_Instance_is_resizable_( & end function LIBMUSCLE_Instance_is_resizable_ integer (c_int) function LIBMUSCLE_Instance_get_port_length_( & - self, port, port_size) & + self, & + port, & + port_size) & bind(C, name="LIBMUSCLE_Instance_get_port_length_") use iso_c_binding @@ -1907,7 +3296,10 @@ integer (c_int) function LIBMUSCLE_Instance_get_port_length_( & end function LIBMUSCLE_Instance_get_port_length_ subroutine LIBMUSCLE_Instance_set_port_length_( & - self, port, port_size, length) & + self, & + port, & + port_size, & + length) & bind(C, name="LIBMUSCLE_Instance_set_port_length_") use iso_c_binding @@ -1918,7 +3310,10 @@ subroutine LIBMUSCLE_Instance_set_port_length_( & end subroutine LIBMUSCLE_Instance_set_port_length_ subroutine LIBMUSCLE_Instance_send_pm_( & - self, port_name, port_name_size, message) & + self, & + port_name, & + port_name_size, & + message) & bind(C, name="LIBMUSCLE_Instance_send_pm_") use iso_c_binding @@ -1929,7 +3324,11 @@ subroutine LIBMUSCLE_Instance_send_pm_( & end subroutine LIBMUSCLE_Instance_send_pm_ subroutine LIBMUSCLE_Instance_send_pms_( & - self, port_name, port_name_size, message, slot) & + self, & + port_name, & + port_name_size, & + message, & + slot) & bind(C, name="LIBMUSCLE_Instance_send_pms_") use iso_c_binding @@ -1941,7 +3340,12 @@ subroutine LIBMUSCLE_Instance_send_pms_( & end subroutine LIBMUSCLE_Instance_send_pms_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_p_( & - self, port_name, port_name_size, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_p_") use iso_c_binding @@ -1954,7 +3358,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_p_( & end function LIBMUSCLE_Instance_receive_p_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_pd_( & - self, port_name, port_name_size, default_msg, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + default_msg, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_pd_") use iso_c_binding @@ -1968,7 +3378,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_pd_( & end function LIBMUSCLE_Instance_receive_pd_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_ps_( & - self, port_name, port_name_size, slot, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_ps_") use iso_c_binding @@ -1982,7 +3398,14 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_ps_( & end function LIBMUSCLE_Instance_receive_ps_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_psd_( & - self, port_name, port_name_size, slot, default_message, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + default_message, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_psd_") use iso_c_binding @@ -1997,7 +3420,12 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_psd_( & end function LIBMUSCLE_Instance_receive_psd_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_p_( & - self, port_name, port_name_size, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_p_") use iso_c_binding @@ -2010,7 +3438,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_p_( & end function LIBMUSCLE_Instance_receive_with_settings_p_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_pd_( & - self, port_name, port_name_size, default_msg, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + default_msg, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_pd_") use iso_c_binding @@ -2024,7 +3458,13 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_pd_( & end function LIBMUSCLE_Instance_receive_with_settings_pd_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_ps_( & - self, port_name, port_name_size, slot, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_ps_") use iso_c_binding @@ -2038,7 +3478,14 @@ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_ps_( & end function LIBMUSCLE_Instance_receive_with_settings_ps_ integer (c_intptr_t) function LIBMUSCLE_Instance_receive_with_settings_psd_( & - self, port_name, port_name_size, slot, default_msg, err_code, err_msg, err_msg_len) & + self, & + port_name, & + port_name_size, & + slot, & + default_msg, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="LIBMUSCLE_Instance_receive_with_settings_psd_") use iso_c_binding @@ -2069,12 +3516,125 @@ end function LIBMUSCLE_Instance_receive_with_settings_psd_ LIBMUSCLE_DataConstRef_create_copy end interface + interface LIBMUSCLE_DataConstRef_create_grid + module procedure & + LIBMUSCLE_DataConstRef_create_grid_1_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_1_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_1_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_1_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_1_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_1_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_1_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_1_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_1_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_1_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_2_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_2_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_2_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_2_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_2_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_2_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_2_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_2_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_2_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_2_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_3_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_3_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_3_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_3_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_3_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_3_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_3_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_3_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_3_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_3_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_4_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_4_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_4_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_4_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_4_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_4_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_4_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_4_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_4_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_4_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_5_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_5_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_5_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_5_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_5_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_5_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_5_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_5_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_5_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_5_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_6_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_6_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_6_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_6_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_6_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_6_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_6_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_6_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_6_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_6_real8_a, & + LIBMUSCLE_DataConstRef_create_grid_7_logical_n, & + LIBMUSCLE_DataConstRef_create_grid_7_logical_a, & + LIBMUSCLE_DataConstRef_create_grid_7_int4_n, & + LIBMUSCLE_DataConstRef_create_grid_7_int4_a, & + LIBMUSCLE_DataConstRef_create_grid_7_int8_n, & + LIBMUSCLE_DataConstRef_create_grid_7_int8_a, & + LIBMUSCLE_DataConstRef_create_grid_7_real4_n, & + LIBMUSCLE_DataConstRef_create_grid_7_real4_a, & + LIBMUSCLE_DataConstRef_create_grid_7_real8_n, & + LIBMUSCLE_DataConstRef_create_grid_7_real8_a + end interface + interface LIBMUSCLE_DataConstRef_get_item module procedure & LIBMUSCLE_DataConstRef_get_item_by_key, & LIBMUSCLE_DataConstRef_get_item_by_index end interface + interface LIBMUSCLE_DataConstRef_elements + module procedure & + LIBMUSCLE_DataConstRef_elements_1_logical, & + LIBMUSCLE_DataConstRef_elements_1_real4, & + LIBMUSCLE_DataConstRef_elements_1_real8, & + LIBMUSCLE_DataConstRef_elements_1_int4, & + LIBMUSCLE_DataConstRef_elements_1_int8, & + LIBMUSCLE_DataConstRef_elements_2_logical, & + LIBMUSCLE_DataConstRef_elements_2_real4, & + LIBMUSCLE_DataConstRef_elements_2_real8, & + LIBMUSCLE_DataConstRef_elements_2_int4, & + LIBMUSCLE_DataConstRef_elements_2_int8, & + LIBMUSCLE_DataConstRef_elements_3_logical, & + LIBMUSCLE_DataConstRef_elements_3_real4, & + LIBMUSCLE_DataConstRef_elements_3_real8, & + LIBMUSCLE_DataConstRef_elements_3_int4, & + LIBMUSCLE_DataConstRef_elements_3_int8, & + LIBMUSCLE_DataConstRef_elements_4_logical, & + LIBMUSCLE_DataConstRef_elements_4_real4, & + LIBMUSCLE_DataConstRef_elements_4_real8, & + LIBMUSCLE_DataConstRef_elements_4_int4, & + LIBMUSCLE_DataConstRef_elements_4_int8, & + LIBMUSCLE_DataConstRef_elements_5_logical, & + LIBMUSCLE_DataConstRef_elements_5_real4, & + LIBMUSCLE_DataConstRef_elements_5_real8, & + LIBMUSCLE_DataConstRef_elements_5_int4, & + LIBMUSCLE_DataConstRef_elements_5_int8, & + LIBMUSCLE_DataConstRef_elements_6_logical, & + LIBMUSCLE_DataConstRef_elements_6_real4, & + LIBMUSCLE_DataConstRef_elements_6_real8, & + LIBMUSCLE_DataConstRef_elements_6_int4, & + LIBMUSCLE_DataConstRef_elements_6_int8, & + LIBMUSCLE_DataConstRef_elements_7_logical, & + LIBMUSCLE_DataConstRef_elements_7_real4, & + LIBMUSCLE_DataConstRef_elements_7_real8, & + LIBMUSCLE_DataConstRef_elements_7_int4, & + LIBMUSCLE_DataConstRef_elements_7_int8 + end interface + interface LIBMUSCLE_Data_create module procedure & LIBMUSCLE_Data_create_nil, & @@ -2090,12 +3650,125 @@ end function LIBMUSCLE_Instance_receive_with_settings_psd_ LIBMUSCLE_Data_create_copy end interface + interface LIBMUSCLE_Data_create_grid + module procedure & + LIBMUSCLE_Data_create_grid_1_logical_n, & + LIBMUSCLE_Data_create_grid_1_logical_a, & + LIBMUSCLE_Data_create_grid_1_int4_n, & + LIBMUSCLE_Data_create_grid_1_int4_a, & + LIBMUSCLE_Data_create_grid_1_int8_n, & + LIBMUSCLE_Data_create_grid_1_int8_a, & + LIBMUSCLE_Data_create_grid_1_real4_n, & + LIBMUSCLE_Data_create_grid_1_real4_a, & + LIBMUSCLE_Data_create_grid_1_real8_n, & + LIBMUSCLE_Data_create_grid_1_real8_a, & + LIBMUSCLE_Data_create_grid_2_logical_n, & + LIBMUSCLE_Data_create_grid_2_logical_a, & + LIBMUSCLE_Data_create_grid_2_int4_n, & + LIBMUSCLE_Data_create_grid_2_int4_a, & + LIBMUSCLE_Data_create_grid_2_int8_n, & + LIBMUSCLE_Data_create_grid_2_int8_a, & + LIBMUSCLE_Data_create_grid_2_real4_n, & + LIBMUSCLE_Data_create_grid_2_real4_a, & + LIBMUSCLE_Data_create_grid_2_real8_n, & + LIBMUSCLE_Data_create_grid_2_real8_a, & + LIBMUSCLE_Data_create_grid_3_logical_n, & + LIBMUSCLE_Data_create_grid_3_logical_a, & + LIBMUSCLE_Data_create_grid_3_int4_n, & + LIBMUSCLE_Data_create_grid_3_int4_a, & + LIBMUSCLE_Data_create_grid_3_int8_n, & + LIBMUSCLE_Data_create_grid_3_int8_a, & + LIBMUSCLE_Data_create_grid_3_real4_n, & + LIBMUSCLE_Data_create_grid_3_real4_a, & + LIBMUSCLE_Data_create_grid_3_real8_n, & + LIBMUSCLE_Data_create_grid_3_real8_a, & + LIBMUSCLE_Data_create_grid_4_logical_n, & + LIBMUSCLE_Data_create_grid_4_logical_a, & + LIBMUSCLE_Data_create_grid_4_int4_n, & + LIBMUSCLE_Data_create_grid_4_int4_a, & + LIBMUSCLE_Data_create_grid_4_int8_n, & + LIBMUSCLE_Data_create_grid_4_int8_a, & + LIBMUSCLE_Data_create_grid_4_real4_n, & + LIBMUSCLE_Data_create_grid_4_real4_a, & + LIBMUSCLE_Data_create_grid_4_real8_n, & + LIBMUSCLE_Data_create_grid_4_real8_a, & + LIBMUSCLE_Data_create_grid_5_logical_n, & + LIBMUSCLE_Data_create_grid_5_logical_a, & + LIBMUSCLE_Data_create_grid_5_int4_n, & + LIBMUSCLE_Data_create_grid_5_int4_a, & + LIBMUSCLE_Data_create_grid_5_int8_n, & + LIBMUSCLE_Data_create_grid_5_int8_a, & + LIBMUSCLE_Data_create_grid_5_real4_n, & + LIBMUSCLE_Data_create_grid_5_real4_a, & + LIBMUSCLE_Data_create_grid_5_real8_n, & + LIBMUSCLE_Data_create_grid_5_real8_a, & + LIBMUSCLE_Data_create_grid_6_logical_n, & + LIBMUSCLE_Data_create_grid_6_logical_a, & + LIBMUSCLE_Data_create_grid_6_int4_n, & + LIBMUSCLE_Data_create_grid_6_int4_a, & + LIBMUSCLE_Data_create_grid_6_int8_n, & + LIBMUSCLE_Data_create_grid_6_int8_a, & + LIBMUSCLE_Data_create_grid_6_real4_n, & + LIBMUSCLE_Data_create_grid_6_real4_a, & + LIBMUSCLE_Data_create_grid_6_real8_n, & + LIBMUSCLE_Data_create_grid_6_real8_a, & + LIBMUSCLE_Data_create_grid_7_logical_n, & + LIBMUSCLE_Data_create_grid_7_logical_a, & + LIBMUSCLE_Data_create_grid_7_int4_n, & + LIBMUSCLE_Data_create_grid_7_int4_a, & + LIBMUSCLE_Data_create_grid_7_int8_n, & + LIBMUSCLE_Data_create_grid_7_int8_a, & + LIBMUSCLE_Data_create_grid_7_real4_n, & + LIBMUSCLE_Data_create_grid_7_real4_a, & + LIBMUSCLE_Data_create_grid_7_real8_n, & + LIBMUSCLE_Data_create_grid_7_real8_a + end interface + interface LIBMUSCLE_Data_get_item module procedure & LIBMUSCLE_Data_get_item_by_key, & LIBMUSCLE_Data_get_item_by_index end interface + interface LIBMUSCLE_Data_elements + module procedure & + LIBMUSCLE_Data_elements_1_logical, & + LIBMUSCLE_Data_elements_1_real4, & + LIBMUSCLE_Data_elements_1_real8, & + LIBMUSCLE_Data_elements_1_int4, & + LIBMUSCLE_Data_elements_1_int8, & + LIBMUSCLE_Data_elements_2_logical, & + LIBMUSCLE_Data_elements_2_real4, & + LIBMUSCLE_Data_elements_2_real8, & + LIBMUSCLE_Data_elements_2_int4, & + LIBMUSCLE_Data_elements_2_int8, & + LIBMUSCLE_Data_elements_3_logical, & + LIBMUSCLE_Data_elements_3_real4, & + LIBMUSCLE_Data_elements_3_real8, & + LIBMUSCLE_Data_elements_3_int4, & + LIBMUSCLE_Data_elements_3_int8, & + LIBMUSCLE_Data_elements_4_logical, & + LIBMUSCLE_Data_elements_4_real4, & + LIBMUSCLE_Data_elements_4_real8, & + LIBMUSCLE_Data_elements_4_int4, & + LIBMUSCLE_Data_elements_4_int8, & + LIBMUSCLE_Data_elements_5_logical, & + LIBMUSCLE_Data_elements_5_real4, & + LIBMUSCLE_Data_elements_5_real8, & + LIBMUSCLE_Data_elements_5_int4, & + LIBMUSCLE_Data_elements_5_int8, & + LIBMUSCLE_Data_elements_6_logical, & + LIBMUSCLE_Data_elements_6_real4, & + LIBMUSCLE_Data_elements_6_real8, & + LIBMUSCLE_Data_elements_6_int4, & + LIBMUSCLE_Data_elements_6_int8, & + LIBMUSCLE_Data_elements_7_logical, & + LIBMUSCLE_Data_elements_7_real4, & + LIBMUSCLE_Data_elements_7_real8, & + LIBMUSCLE_Data_elements_7_int4, & + LIBMUSCLE_Data_elements_7_int8 + end interface + interface LIBMUSCLE_Data_create_byte_array module procedure & LIBMUSCLE_Data_create_byte_array_empty, & @@ -2200,16 +3873,14 @@ end function LIBMUSCLE_Instance_receive_with_settings_psd_ interface - integer (c_intptr_t) function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_( & - count) & + integer (c_intptr_t) function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_(count) & bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_") use iso_c_binding integer (c_int), value, intent(in) :: count end function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create_ - subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_( & - self) & + subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(self) & bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_") use iso_c_binding @@ -2217,7 +3888,10 @@ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_( & end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_( & - self, i, arg, arg_size) & + self, & + i, & + arg, & + arg_size) & bind(C, name="LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_") use iso_c_binding @@ -2233,7 +3907,8 @@ end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg_ contains - function LIBMUSCLE_DataConstRef_create_nil() + function LIBMUSCLE_DataConstRef_create_nil( & + ) implicit none type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_nil @@ -2245,7 +3920,8 @@ function LIBMUSCLE_DataConstRef_create_nil() LIBMUSCLE_DataConstRef_create_nil%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_nil - function LIBMUSCLE_DataConstRef_create_logical(value) + function LIBMUSCLE_DataConstRef_create_logical( & + value) implicit none logical, intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_logical @@ -2253,12 +3929,13 @@ function LIBMUSCLE_DataConstRef_create_logical(value) integer (c_intptr_t) :: ret_val ret_val = LIBMUSCLE_DataConstRef_create_logical_( & - merge(1, 0, value)) + logical(value, c_bool)) LIBMUSCLE_DataConstRef_create_logical%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_logical - function LIBMUSCLE_DataConstRef_create_character(value) + function LIBMUSCLE_DataConstRef_create_character( & + value) implicit none character (len=*), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_character @@ -2271,7 +3948,8 @@ function LIBMUSCLE_DataConstRef_create_character(value) LIBMUSCLE_DataConstRef_create_character%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_character - function LIBMUSCLE_DataConstRef_create_int1(value) + function LIBMUSCLE_DataConstRef_create_int1( & + value) implicit none integer (LIBMUSCLE_int1), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int1 @@ -2284,7 +3962,8 @@ function LIBMUSCLE_DataConstRef_create_int1(value) LIBMUSCLE_DataConstRef_create_int1%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int1 - function LIBMUSCLE_DataConstRef_create_int2(value) + function LIBMUSCLE_DataConstRef_create_int2( & + value) implicit none integer (selected_int_kind(4)), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int2 @@ -2297,7 +3976,8 @@ function LIBMUSCLE_DataConstRef_create_int2(value) LIBMUSCLE_DataConstRef_create_int2%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int2 - function LIBMUSCLE_DataConstRef_create_int4(value) + function LIBMUSCLE_DataConstRef_create_int4( & + value) implicit none integer (LIBMUSCLE_int4), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int4 @@ -2310,7 +3990,8 @@ function LIBMUSCLE_DataConstRef_create_int4(value) LIBMUSCLE_DataConstRef_create_int4%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int4 - function LIBMUSCLE_DataConstRef_create_int8(value) + function LIBMUSCLE_DataConstRef_create_int8( & + value) implicit none integer (selected_int_kind(18)), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_int8 @@ -2323,7 +4004,8 @@ function LIBMUSCLE_DataConstRef_create_int8(value) LIBMUSCLE_DataConstRef_create_int8%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_int8 - function LIBMUSCLE_DataConstRef_create_real4(value) + function LIBMUSCLE_DataConstRef_create_real4( & + value) implicit none real (LIBMUSCLE_real4), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_real4 @@ -2336,7 +4018,8 @@ function LIBMUSCLE_DataConstRef_create_real4(value) LIBMUSCLE_DataConstRef_create_real4%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_real4 - function LIBMUSCLE_DataConstRef_create_real8(value) + function LIBMUSCLE_DataConstRef_create_real8( & + value) implicit none real (LIBMUSCLE_real8), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_real8 @@ -2349,7 +4032,8 @@ function LIBMUSCLE_DataConstRef_create_real8(value) LIBMUSCLE_DataConstRef_create_real8%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_real8 - function LIBMUSCLE_DataConstRef_create_settings(value) + function LIBMUSCLE_DataConstRef_create_settings( & + value) implicit none type(YMMSL_Settings), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_settings @@ -2362,7 +4046,8 @@ function LIBMUSCLE_DataConstRef_create_settings(value) LIBMUSCLE_DataConstRef_create_settings%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_settings - function LIBMUSCLE_DataConstRef_create_copy(value) + function LIBMUSCLE_DataConstRef_create_copy( & + value) implicit none type(LIBMUSCLE_DataConstRef), intent(in) :: value type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_copy @@ -2375,325 +4060,8548 @@ function LIBMUSCLE_DataConstRef_create_copy(value) LIBMUSCLE_DataConstRef_create_copy%ptr = ret_val end function LIBMUSCLE_DataConstRef_create_copy - subroutine LIBMUSCLE_DataConstRef_free(self) + function LIBMUSCLE_DataConstRef_create_grid_1_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_logical_a - call LIBMUSCLE_DataConstRef_free_( & - self%ptr) - end subroutine LIBMUSCLE_DataConstRef_free + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 1_LIBMUSCLE_size) - function LIBMUSCLE_DataConstRef_is_a_logical(self) + LIBMUSCLE_DataConstRef_create_grid_1_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_logical_a + + function LIBMUSCLE_DataConstRef_create_grid_2_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_logical + logical, dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_logical_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 2_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_logical = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_logical + LIBMUSCLE_DataConstRef_create_grid_2_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_logical_a - function LIBMUSCLE_DataConstRef_is_a_character(self) + function LIBMUSCLE_DataConstRef_create_grid_3_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_character + logical, dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_character_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 3_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_character = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_character + LIBMUSCLE_DataConstRef_create_grid_3_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_logical_a - function LIBMUSCLE_DataConstRef_is_a_int(self) + function LIBMUSCLE_DataConstRef_create_grid_4_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int + logical, dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 4_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int + LIBMUSCLE_DataConstRef_create_grid_4_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_logical_a - function LIBMUSCLE_DataConstRef_is_a_int1(self) + function LIBMUSCLE_DataConstRef_create_grid_5_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int1 + logical, dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int1_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 5_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int1 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int1 + LIBMUSCLE_DataConstRef_create_grid_5_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_logical_a - function LIBMUSCLE_DataConstRef_is_a_int2(self) + function LIBMUSCLE_DataConstRef_create_grid_6_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int2 + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int2_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 6_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int2 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int2 + LIBMUSCLE_DataConstRef_create_grid_6_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_logical_a - function LIBMUSCLE_DataConstRef_is_a_int4(self) + function LIBMUSCLE_DataConstRef_create_grid_7_logical_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int4 + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_logical_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int4_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 7_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int4 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int4 + LIBMUSCLE_DataConstRef_create_grid_7_logical_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_logical_a - function LIBMUSCLE_DataConstRef_is_a_int8(self) + function LIBMUSCLE_DataConstRef_create_grid_1_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_int8 + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_int8_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_int8 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_int8 + LIBMUSCLE_DataConstRef_create_grid_1_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int4_a - function LIBMUSCLE_DataConstRef_is_a_real4(self) + function LIBMUSCLE_DataConstRef_create_grid_2_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_real4 + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_real4_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_real4 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_real4 + LIBMUSCLE_DataConstRef_create_grid_2_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int4_a - function LIBMUSCLE_DataConstRef_is_a_real8(self) + function LIBMUSCLE_DataConstRef_create_grid_3_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_real8 + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_real8_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_real8 = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_real8 + LIBMUSCLE_DataConstRef_create_grid_3_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int4_a - function LIBMUSCLE_DataConstRef_is_a_dict(self) + function LIBMUSCLE_DataConstRef_create_grid_4_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_dict + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_dict_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_dict = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_dict + LIBMUSCLE_DataConstRef_create_grid_4_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int4_a - function LIBMUSCLE_DataConstRef_is_a_list(self) + function LIBMUSCLE_DataConstRef_create_grid_5_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_list + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_list_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_list = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_list + LIBMUSCLE_DataConstRef_create_grid_5_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int4_a - function LIBMUSCLE_DataConstRef_is_a_byte_array(self) + function LIBMUSCLE_DataConstRef_create_grid_6_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_byte_array + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_byte_array_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_byte_array = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_byte_array + LIBMUSCLE_DataConstRef_create_grid_6_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int4_a - function LIBMUSCLE_DataConstRef_is_nil(self) + function LIBMUSCLE_DataConstRef_create_grid_7_int4_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_nil + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int4_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_nil_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_nil = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_nil + LIBMUSCLE_DataConstRef_create_grid_7_int4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int4_a - function LIBMUSCLE_DataConstRef_is_a_settings(self) + function LIBMUSCLE_DataConstRef_create_grid_1_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - logical :: LIBMUSCLE_DataConstRef_is_a_settings + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int8_a - integer (c_int) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_is_a_settings_( & - self%ptr) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) - LIBMUSCLE_DataConstRef_is_a_settings = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_is_a_settings + LIBMUSCLE_DataConstRef_create_grid_1_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int8_a - function LIBMUSCLE_DataConstRef_size(self) + function LIBMUSCLE_DataConstRef_create_grid_2_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer (LIBMUSCLE_size) :: LIBMUSCLE_DataConstRef_size + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int8_a - integer (c_size_t) :: ret_val + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_size_( & - self%ptr) - LIBMUSCLE_DataConstRef_size = ret_val - end function LIBMUSCLE_DataConstRef_size + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_2_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int8_a - function LIBMUSCLE_DataConstRef_as_logical(self, err_code, err_msg) + function LIBMUSCLE_DataConstRef_create_grid_3_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer, optional, intent(out) :: err_code - character(:), allocatable, optional, intent(out) :: err_msg - logical :: LIBMUSCLE_DataConstRef_as_logical + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int8_a - integer (c_int) :: ret_val - integer (c_int) :: err_code_v - type (c_ptr) :: err_msg_v - integer (c_size_t) :: err_msg_len_v - character (c_char), dimension(:), pointer :: err_msg_f - character(:), allocatable :: err_msg_p - integer (c_size_t) :: err_msg_i + integer (c_intptr_t) :: ret_val - ret_val = LIBMUSCLE_DataConstRef_as_logical_( & - self%ptr, & - err_code_v, & - err_msg_v, & - err_msg_len_v) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) - if (err_code_v .ne. 0) then - if (present(err_code)) then - err_code = err_code_v - if (present(err_msg)) then - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg) - do err_msg_i = 1, err_msg_len_v - err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - end if - return - else - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg_p) - do err_msg_i = 1, err_msg_len_v - err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - print *, err_msg_p - stop - end if - else - if (present(err_code)) then - err_code = 0 - end if - end if + LIBMUSCLE_DataConstRef_create_grid_3_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int8_a - LIBMUSCLE_DataConstRef_as_logical = ret_val .ne. 0 - end function LIBMUSCLE_DataConstRef_as_logical + function LIBMUSCLE_DataConstRef_create_grid_4_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_4_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int8_a - function LIBMUSCLE_DataConstRef_as_character(self, err_code, err_msg) + function LIBMUSCLE_DataConstRef_create_grid_5_int8_a( & + data_array) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer, optional, intent(out) :: err_code - character(:), allocatable, optional, intent(out) :: err_msg - character(:), allocatable :: LIBMUSCLE_DataConstRef_as_character + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int8_a - type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character (c_char), dimension(:), pointer :: f_ret_ptr - integer :: i_loop - integer (c_int) :: err_code_v - type (c_ptr) :: err_msg_v - integer (c_size_t) :: err_msg_len_v - character (c_char), dimension(:), pointer :: err_msg_f - character(:), allocatable :: err_msg_p - integer (c_size_t) :: err_msg_i + integer (c_intptr_t) :: ret_val - call LIBMUSCLE_DataConstRef_as_character_( & - self%ptr, & - ret_val, & - ret_val_size, & - err_code_v, & - err_msg_v, & - err_msg_len_v) + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) - if (err_code_v .ne. 0) then - if (present(err_code)) then - err_code = err_code_v - if (present(err_msg)) then - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg) - do err_msg_i = 1, err_msg_len_v - err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - end if - return - else - call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) - allocate (character(err_msg_len_v) :: err_msg_p) - do err_msg_i = 1, err_msg_len_v - err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) - end do - print *, err_msg_p - stop - end if - else - if (present(err_code)) then - err_code = 0 - end if - end if + LIBMUSCLE_DataConstRef_create_grid_5_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int8_a - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + function LIBMUSCLE_DataConstRef_create_grid_6_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_6_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int8_a + + function LIBMUSCLE_DataConstRef_create_grid_7_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_7_int8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int8_a + + function LIBMUSCLE_DataConstRef_create_grid_1_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_1_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_2_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_2_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_3_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_3_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_4_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_4_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_5_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_5_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_6_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_6_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_7_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_7_real4_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real4_a + + function LIBMUSCLE_DataConstRef_create_grid_1_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_1_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_2_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_2_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_3_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_3_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_4_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_4_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_5_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_5_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_6_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_6_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_7_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_DataConstRef_create_grid_7_real8_a%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real8_a + + function LIBMUSCLE_DataConstRef_create_grid_1_logical_n( & + data_array, & + index_name_1) + + implicit none + logical, dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_2_logical_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + logical, dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_3_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + logical, dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_4_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + logical, dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_5_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + logical, dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_6_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_7_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_logical_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_logical_n + + function LIBMUSCLE_DataConstRef_create_grid_1_int4_n( & + data_array, & + index_name_1) + + implicit none + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_2_int4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_3_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_4_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_5_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_6_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_7_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_int4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int4_n + + function LIBMUSCLE_DataConstRef_create_grid_1_int8_n( & + data_array, & + index_name_1) + + implicit none + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_2_int8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_3_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_4_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_5_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_6_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_7_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_int8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_int8_n + + function LIBMUSCLE_DataConstRef_create_grid_1_real4_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_2_real4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_3_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_4_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_5_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_6_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_7_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_real4_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real4_n + + function LIBMUSCLE_DataConstRef_create_grid_1_real8_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_1_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_1_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_1_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_2_real8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_2_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_2_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_2_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_3_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_3_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_3_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_3_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_4_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_4_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_4_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_4_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_5_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_5_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_5_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_5_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_6_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_6_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_6_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_6_real8_n + + function LIBMUSCLE_DataConstRef_create_grid_7_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_create_grid_7_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_DataConstRef_create_grid_7_real8_n%ptr = ret_val + end function LIBMUSCLE_DataConstRef_create_grid_7_real8_n + + subroutine LIBMUSCLE_DataConstRef_free( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + + call LIBMUSCLE_DataConstRef_free_( & + self%ptr) + end subroutine LIBMUSCLE_DataConstRef_free + + function LIBMUSCLE_DataConstRef_is_a_logical( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_logical_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_logical = ret_val + end function LIBMUSCLE_DataConstRef_is_a_logical + + function LIBMUSCLE_DataConstRef_is_a_character( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_character + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_character_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_character = ret_val + end function LIBMUSCLE_DataConstRef_is_a_character + + function LIBMUSCLE_DataConstRef_is_a_int( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int + + function LIBMUSCLE_DataConstRef_is_a_int1( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int1 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int1_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int1 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int1 + + function LIBMUSCLE_DataConstRef_is_a_int2( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int2 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int2_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int2 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int2 + + function LIBMUSCLE_DataConstRef_is_a_int4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int4 + + function LIBMUSCLE_DataConstRef_is_a_int8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_int8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_int8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_int8 + + function LIBMUSCLE_DataConstRef_is_a_real4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_real4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_real4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_real4 + + function LIBMUSCLE_DataConstRef_is_a_real8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_real8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_real8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_real8 + + function LIBMUSCLE_DataConstRef_is_a_dict( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_dict + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_dict_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_dict = ret_val + end function LIBMUSCLE_DataConstRef_is_a_dict + + function LIBMUSCLE_DataConstRef_is_a_list( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_list + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_list_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_list = ret_val + end function LIBMUSCLE_DataConstRef_is_a_list + + function LIBMUSCLE_DataConstRef_is_a_grid_of_logical( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_logical_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_logical = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_logical + + function LIBMUSCLE_DataConstRef_is_a_grid_of_real4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_real4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_real4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real4 + + function LIBMUSCLE_DataConstRef_is_a_grid_of_real8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_real8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_real8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_real8 + + function LIBMUSCLE_DataConstRef_is_a_grid_of_int4( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_int4_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_int4 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int4 + + function LIBMUSCLE_DataConstRef_is_a_grid_of_int8( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_grid_of_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_grid_of_int8_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_grid_of_int8 = ret_val + end function LIBMUSCLE_DataConstRef_is_a_grid_of_int8 + + function LIBMUSCLE_DataConstRef_is_a_byte_array( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_byte_array + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_byte_array_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_byte_array = ret_val + end function LIBMUSCLE_DataConstRef_is_a_byte_array + + function LIBMUSCLE_DataConstRef_is_nil( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_nil + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_nil_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_nil = ret_val + end function LIBMUSCLE_DataConstRef_is_nil + + function LIBMUSCLE_DataConstRef_is_a_settings( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical :: LIBMUSCLE_DataConstRef_is_a_settings + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_is_a_settings_( & + self%ptr) + + LIBMUSCLE_DataConstRef_is_a_settings = ret_val + end function LIBMUSCLE_DataConstRef_is_a_settings + + function LIBMUSCLE_DataConstRef_size( & + self) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size) :: LIBMUSCLE_DataConstRef_size + + integer (c_size_t) :: ret_val + + ret_val = LIBMUSCLE_DataConstRef_size_( & + self%ptr) + LIBMUSCLE_DataConstRef_size = ret_val + end function LIBMUSCLE_DataConstRef_size + + function LIBMUSCLE_DataConstRef_as_logical( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + logical :: LIBMUSCLE_DataConstRef_as_logical + + logical (c_bool) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_logical_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_logical = ret_val + end function LIBMUSCLE_DataConstRef_as_logical + + function LIBMUSCLE_DataConstRef_as_character( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + character(:), allocatable :: LIBMUSCLE_DataConstRef_as_character + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_as_character_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) allocate (character(ret_val_size) :: LIBMUSCLE_DataConstRef_as_character) do i_loop = 1, ret_val_size - LIBMUSCLE_DataConstRef_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) + LIBMUSCLE_DataConstRef_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) + end do + end function LIBMUSCLE_DataConstRef_as_character + + function LIBMUSCLE_DataConstRef_as_int( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer :: LIBMUSCLE_DataConstRef_as_int + + integer (c_int) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int = ret_val + end function LIBMUSCLE_DataConstRef_as_int + + function LIBMUSCLE_DataConstRef_as_int1( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int1) :: LIBMUSCLE_DataConstRef_as_int1 + + integer (c_int8_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int1_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int1 = ret_val + end function LIBMUSCLE_DataConstRef_as_int1 + + function LIBMUSCLE_DataConstRef_as_int2( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(4)) :: LIBMUSCLE_DataConstRef_as_int2 + + integer (c_short) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int2_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int2 = ret_val + end function LIBMUSCLE_DataConstRef_as_int2 + + function LIBMUSCLE_DataConstRef_as_int4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int4) :: LIBMUSCLE_DataConstRef_as_int4 + + integer (c_int32_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int4 = ret_val + end function LIBMUSCLE_DataConstRef_as_int4 + + function LIBMUSCLE_DataConstRef_as_int8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(18)) :: LIBMUSCLE_DataConstRef_as_int8 + + integer (c_int64_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_int8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_int8 = ret_val + end function LIBMUSCLE_DataConstRef_as_int8 + + function LIBMUSCLE_DataConstRef_as_real4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real4) :: LIBMUSCLE_DataConstRef_as_real4 + + real (c_float) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_real4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_real4 = ret_val + end function LIBMUSCLE_DataConstRef_as_real4 + + function LIBMUSCLE_DataConstRef_as_real8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real8) :: LIBMUSCLE_DataConstRef_as_real8 + + real (c_double) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_real8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_real8 = ret_val + end function LIBMUSCLE_DataConstRef_as_real8 + + function LIBMUSCLE_DataConstRef_as_settings( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(YMMSL_Settings) :: LIBMUSCLE_DataConstRef_as_settings + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_as_settings_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_as_settings%ptr = ret_val + end function LIBMUSCLE_DataConstRef_as_settings + + subroutine LIBMUSCLE_DataConstRef_as_byte_array( & + self, & + data, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + character(len=1), dimension(:), intent(out) :: data + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_as_byte_array_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + data = f_ret_ptr + end subroutine LIBMUSCLE_DataConstRef_as_byte_array + + function LIBMUSCLE_DataConstRef_get_item_by_key( & + self, & + key, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + character (len=*), intent(in) :: key + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_key + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_get_item_by_key_( & + self%ptr, & + key, int(len(key), c_size_t), & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_get_item_by_key%ptr = ret_val + end function LIBMUSCLE_DataConstRef_get_item_by_key + + function LIBMUSCLE_DataConstRef_get_item_by_index( & + self, & + i, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size), intent(in) :: i + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_index + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_get_item_by_index_( & + self%ptr, & + i, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_get_item_by_index%ptr = ret_val + end function LIBMUSCLE_DataConstRef_get_item_by_index + + function LIBMUSCLE_DataConstRef_num_dims( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_size) :: LIBMUSCLE_DataConstRef_num_dims + + integer (c_size_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_num_dims_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_num_dims = ret_val + end function LIBMUSCLE_DataConstRef_num_dims + + subroutine LIBMUSCLE_DataConstRef_shape( & + self, & + shp, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size), dimension(:), intent(out) :: shp + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + integer (LIBMUSCLE_size), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_shape_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + shp = f_ret_ptr + end subroutine LIBMUSCLE_DataConstRef_shape + + subroutine LIBMUSCLE_DataConstRef_elements_1_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_logical + + subroutine LIBMUSCLE_DataConstRef_elements_2_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_logical + + subroutine LIBMUSCLE_DataConstRef_elements_3_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_logical + + subroutine LIBMUSCLE_DataConstRef_elements_4_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_logical + + subroutine LIBMUSCLE_DataConstRef_elements_5_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_logical + + subroutine LIBMUSCLE_DataConstRef_elements_6_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_logical + + subroutine LIBMUSCLE_DataConstRef_elements_7_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + logical, dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_logical_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_logical + + subroutine LIBMUSCLE_DataConstRef_elements_1_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_2_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_3_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_4_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_5_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_6_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_7_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int4_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_int4 + + subroutine LIBMUSCLE_DataConstRef_elements_1_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_2_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_3_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_4_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_5_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_6_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_7_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_int8_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_int8 + + subroutine LIBMUSCLE_DataConstRef_elements_1_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_2_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_3_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_4_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_5_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_6_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_7_real4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real4_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_real4 + + subroutine LIBMUSCLE_DataConstRef_elements_1_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_1_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_2_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_2_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_3_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_3_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_4_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_4_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_5_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_5_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_6_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_6_real8 + + subroutine LIBMUSCLE_DataConstRef_elements_7_real8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_elements_real8_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_DataConstRef_elements_7_real8 + + function LIBMUSCLE_DataConstRef_has_indexes( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + logical :: LIBMUSCLE_DataConstRef_has_indexes + + logical (c_bool) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_DataConstRef_has_indexes_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_DataConstRef_has_indexes = ret_val + end function LIBMUSCLE_DataConstRef_has_indexes + + function LIBMUSCLE_DataConstRef_index( & + self, & + i, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_DataConstRef), intent(in) :: self + integer (LIBMUSCLE_size), intent(in) :: i + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + character(:), allocatable :: LIBMUSCLE_DataConstRef_index + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_DataConstRef_index_( & + self%ptr, & + i, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + allocate (character(ret_val_size) :: LIBMUSCLE_DataConstRef_index) + do i_loop = 1, ret_val_size + LIBMUSCLE_DataConstRef_index(i_loop:i_loop) = f_ret_ptr(i_loop) + end do + end function LIBMUSCLE_DataConstRef_index + + function LIBMUSCLE_Data_create_nil( & + ) + implicit none + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_nil + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_nil_( & + ) + + LIBMUSCLE_Data_create_nil%ptr = ret_val + end function LIBMUSCLE_Data_create_nil + + function LIBMUSCLE_Data_create_logical( & + value) + implicit none + logical, intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_logical + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_logical_( & + logical(value, c_bool)) + + LIBMUSCLE_Data_create_logical%ptr = ret_val + end function LIBMUSCLE_Data_create_logical + + function LIBMUSCLE_Data_create_character( & + value) + implicit none + character (len=*), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_character + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_character_( & + value, int(len(value), c_size_t)) + + LIBMUSCLE_Data_create_character%ptr = ret_val + end function LIBMUSCLE_Data_create_character + + function LIBMUSCLE_Data_create_int1( & + value) + implicit none + integer (LIBMUSCLE_int1), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int1 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int1_( & + value) + + LIBMUSCLE_Data_create_int1%ptr = ret_val + end function LIBMUSCLE_Data_create_int1 + + function LIBMUSCLE_Data_create_int2( & + value) + implicit none + integer (selected_int_kind(4)), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int2 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int2_( & + value) + + LIBMUSCLE_Data_create_int2%ptr = ret_val + end function LIBMUSCLE_Data_create_int2 + + function LIBMUSCLE_Data_create_int4( & + value) + implicit none + integer (LIBMUSCLE_int4), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int4 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int4_( & + value) + + LIBMUSCLE_Data_create_int4%ptr = ret_val + end function LIBMUSCLE_Data_create_int4 + + function LIBMUSCLE_Data_create_int8( & + value) + implicit none + integer (selected_int_kind(18)), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int8 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_int8_( & + value) + + LIBMUSCLE_Data_create_int8%ptr = ret_val + end function LIBMUSCLE_Data_create_int8 + + function LIBMUSCLE_Data_create_real4( & + value) + implicit none + real (LIBMUSCLE_real4), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real4 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_real4_( & + value) + + LIBMUSCLE_Data_create_real4%ptr = ret_val + end function LIBMUSCLE_Data_create_real4 + + function LIBMUSCLE_Data_create_real8( & + value) + implicit none + real (LIBMUSCLE_real8), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real8 + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_real8_( & + value) + + LIBMUSCLE_Data_create_real8%ptr = ret_val + end function LIBMUSCLE_Data_create_real8 + + function LIBMUSCLE_Data_create_settings( & + value) + implicit none + type(YMMSL_Settings), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_settings + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_settings_( & + value%ptr) + + LIBMUSCLE_Data_create_settings%ptr = ret_val + end function LIBMUSCLE_Data_create_settings + + function LIBMUSCLE_Data_create_copy( & + value) + implicit none + type(LIBMUSCLE_Data), intent(in) :: value + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_copy + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_copy_( & + value%ptr) + + LIBMUSCLE_Data_create_copy%ptr = ret_val + end function LIBMUSCLE_Data_create_copy + + function LIBMUSCLE_Data_create_grid_1_logical_a( & + data_array) + implicit none + logical, dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_logical_a + + function LIBMUSCLE_Data_create_grid_2_logical_a( & + data_array) + implicit none + logical, dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_logical_a + + function LIBMUSCLE_Data_create_grid_3_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_logical_a + + function LIBMUSCLE_Data_create_grid_4_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_logical_a + + function LIBMUSCLE_Data_create_grid_5_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_logical_a + + function LIBMUSCLE_Data_create_grid_6_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_logical_a + + function LIBMUSCLE_Data_create_grid_7_logical_a( & + data_array) + implicit none + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_logical_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_a_( & + logical(data_array, c_bool), int(shape(logical(data_array, c_bool)), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_logical_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_logical_a + + function LIBMUSCLE_Data_create_grid_1_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int4_a + + function LIBMUSCLE_Data_create_grid_2_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int4_a + + function LIBMUSCLE_Data_create_grid_3_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int4_a + + function LIBMUSCLE_Data_create_grid_4_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int4_a + + function LIBMUSCLE_Data_create_grid_5_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int4_a + + function LIBMUSCLE_Data_create_grid_6_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int4_a + + function LIBMUSCLE_Data_create_grid_7_int4_a( & + data_array) + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_int4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int4_a + + function LIBMUSCLE_Data_create_grid_1_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int8_a + + function LIBMUSCLE_Data_create_grid_2_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int8_a + + function LIBMUSCLE_Data_create_grid_3_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int8_a + + function LIBMUSCLE_Data_create_grid_4_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int8_a + + function LIBMUSCLE_Data_create_grid_5_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int8_a + + function LIBMUSCLE_Data_create_grid_6_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int8_a + + function LIBMUSCLE_Data_create_grid_7_int8_a( & + data_array) + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_int8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int8_a + + function LIBMUSCLE_Data_create_grid_1_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real4_a + + function LIBMUSCLE_Data_create_grid_2_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real4_a + + function LIBMUSCLE_Data_create_grid_3_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real4_a + + function LIBMUSCLE_Data_create_grid_4_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real4_a + + function LIBMUSCLE_Data_create_grid_5_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real4_a + + function LIBMUSCLE_Data_create_grid_6_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real4_a + + function LIBMUSCLE_Data_create_grid_7_real4_a( & + data_array) + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real4_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_real4_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real4_a + + function LIBMUSCLE_Data_create_grid_1_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 1_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_1_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real8_a + + function LIBMUSCLE_Data_create_grid_2_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 2_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_2_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real8_a + + function LIBMUSCLE_Data_create_grid_3_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 3_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_3_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real8_a + + function LIBMUSCLE_Data_create_grid_4_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 4_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_4_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real8_a + + function LIBMUSCLE_Data_create_grid_5_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 5_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_5_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real8_a + + function LIBMUSCLE_Data_create_grid_6_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 6_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_6_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real8_a + + function LIBMUSCLE_Data_create_grid_7_real8_a( & + data_array) + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real8_a + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_a_( & + data_array, int(shape(data_array), c_size_t), 7_LIBMUSCLE_size) + + LIBMUSCLE_Data_create_grid_7_real8_a%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real8_a + + function LIBMUSCLE_Data_create_grid_1_logical_n( & + data_array, & + index_name_1) + + implicit none + logical, dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_logical_n + + function LIBMUSCLE_Data_create_grid_2_logical_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + logical, dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_logical_n + + function LIBMUSCLE_Data_create_grid_3_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + logical, dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_logical_n + + function LIBMUSCLE_Data_create_grid_4_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + logical, dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_logical_n + + function LIBMUSCLE_Data_create_grid_5_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + logical, dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_logical_n + + function LIBMUSCLE_Data_create_grid_6_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + logical, dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_logical_n + + function LIBMUSCLE_Data_create_grid_7_logical_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + logical, dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_logical_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_logical_n_( & + logical(data_array, c_bool), & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_logical_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_logical_n + + function LIBMUSCLE_Data_create_grid_1_int4_n( & + data_array, & + index_name_1) + + implicit none + integer (LIBMUSCLE_int4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int4_n + + function LIBMUSCLE_Data_create_grid_2_int4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int4_n + + function LIBMUSCLE_Data_create_grid_3_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int4_n + + function LIBMUSCLE_Data_create_grid_4_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int4_n + + function LIBMUSCLE_Data_create_grid_5_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int4_n + + function LIBMUSCLE_Data_create_grid_6_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int4_n + + function LIBMUSCLE_Data_create_grid_7_int4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_int4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int4_n + + function LIBMUSCLE_Data_create_grid_1_int8_n( & + data_array, & + index_name_1) + + implicit none + integer (selected_int_kind(18)), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_int8_n + + function LIBMUSCLE_Data_create_grid_2_int8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + integer (selected_int_kind(18)), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_int8_n + + function LIBMUSCLE_Data_create_grid_3_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_int8_n + + function LIBMUSCLE_Data_create_grid_4_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_int8_n + + function LIBMUSCLE_Data_create_grid_5_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_int8_n + + function LIBMUSCLE_Data_create_grid_6_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_int8_n + + function LIBMUSCLE_Data_create_grid_7_int8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_int8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_int8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_int8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_int8_n + + function LIBMUSCLE_Data_create_grid_1_real4_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real4), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real4_n + + function LIBMUSCLE_Data_create_grid_2_real4_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real4_n + + function LIBMUSCLE_Data_create_grid_3_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real4_n + + function LIBMUSCLE_Data_create_grid_4_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real4_n + + function LIBMUSCLE_Data_create_grid_5_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real4_n + + function LIBMUSCLE_Data_create_grid_6_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real4_n + + function LIBMUSCLE_Data_create_grid_7_real4_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real4_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real4_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_real4_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real4_n + + function LIBMUSCLE_Data_create_grid_1_real8_n( & + data_array, & + index_name_1) + + implicit none + real (LIBMUSCLE_real8), dimension(:), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_1_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 1_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_1_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_1_real8_n + + function LIBMUSCLE_Data_create_grid_2_real8_n( & + data_array, & + index_name_1, & + index_name_2) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_2_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 2_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_2_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_2_real8_n + + function LIBMUSCLE_Data_create_grid_3_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_3_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 3_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_3_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_3_real8_n + + function LIBMUSCLE_Data_create_grid_4_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_4_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 4_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_4_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_4_real8_n + + function LIBMUSCLE_Data_create_grid_5_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_5_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 5_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_5_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_5_real8_n + + function LIBMUSCLE_Data_create_grid_6_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_6_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 6_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_1, int(len(index_name_1), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_6_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_6_real8_n + + function LIBMUSCLE_Data_create_grid_7_real8_n( & + data_array, & + index_name_1, & + index_name_2, & + index_name_3, & + index_name_4, & + index_name_5, & + index_name_6, & + index_name_7) + + implicit none + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(in) :: data_array + character (len=*), intent(in) :: index_name_1 + character (len=*), intent(in) :: index_name_2 + character (len=*), intent(in) :: index_name_3 + character (len=*), intent(in) :: index_name_4 + character (len=*), intent(in) :: index_name_5 + character (len=*), intent(in) :: index_name_6 + character (len=*), intent(in) :: index_name_7 + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_grid_7_real8_n + + integer (c_intptr_t) :: ret_val + + ret_val = LIBMUSCLE_Data_create_grid_real8_n_( & + data_array, & + int(shape(data_array), c_size_t), & + 7_LIBMUSCLE_size, & + index_name_1, int(len(index_name_1), c_size_t), & + index_name_2, int(len(index_name_2), c_size_t), & + index_name_3, int(len(index_name_3), c_size_t), & + index_name_4, int(len(index_name_4), c_size_t), & + index_name_5, int(len(index_name_5), c_size_t), & + index_name_6, int(len(index_name_6), c_size_t), & + index_name_7, int(len(index_name_7), c_size_t) & + ) + + LIBMUSCLE_Data_create_grid_7_real8_n%ptr = ret_val + end function LIBMUSCLE_Data_create_grid_7_real8_n + + subroutine LIBMUSCLE_Data_free( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + + call LIBMUSCLE_Data_free_( & + self%ptr) + end subroutine LIBMUSCLE_Data_free + + function LIBMUSCLE_Data_is_a_logical( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_logical_( & + self%ptr) + + LIBMUSCLE_Data_is_a_logical = ret_val + end function LIBMUSCLE_Data_is_a_logical + + function LIBMUSCLE_Data_is_a_character( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_character + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_character_( & + self%ptr) + + LIBMUSCLE_Data_is_a_character = ret_val + end function LIBMUSCLE_Data_is_a_character + + function LIBMUSCLE_Data_is_a_int( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int = ret_val + end function LIBMUSCLE_Data_is_a_int + + function LIBMUSCLE_Data_is_a_int1( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int1 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int1_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int1 = ret_val + end function LIBMUSCLE_Data_is_a_int1 + + function LIBMUSCLE_Data_is_a_int2( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int2 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int2_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int2 = ret_val + end function LIBMUSCLE_Data_is_a_int2 + + function LIBMUSCLE_Data_is_a_int4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int4 = ret_val + end function LIBMUSCLE_Data_is_a_int4 + + function LIBMUSCLE_Data_is_a_int8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_int8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_int8 = ret_val + end function LIBMUSCLE_Data_is_a_int8 + + function LIBMUSCLE_Data_is_a_real4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_real4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_real4 = ret_val + end function LIBMUSCLE_Data_is_a_real4 + + function LIBMUSCLE_Data_is_a_real8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_real8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_real8 = ret_val + end function LIBMUSCLE_Data_is_a_real8 + + function LIBMUSCLE_Data_is_a_dict( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_dict + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_dict_( & + self%ptr) + + LIBMUSCLE_Data_is_a_dict = ret_val + end function LIBMUSCLE_Data_is_a_dict + + function LIBMUSCLE_Data_is_a_list( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_list + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_list_( & + self%ptr) + + LIBMUSCLE_Data_is_a_list = ret_val + end function LIBMUSCLE_Data_is_a_list + + function LIBMUSCLE_Data_is_a_grid_of_logical( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_logical + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_logical_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_logical = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_logical + + function LIBMUSCLE_Data_is_a_grid_of_real4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_real4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_real4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_real4 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_real4 + + function LIBMUSCLE_Data_is_a_grid_of_real8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_real8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_real8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_real8 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_real8 + + function LIBMUSCLE_Data_is_a_grid_of_int4( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_int4 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_int4_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_int4 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_int4 + + function LIBMUSCLE_Data_is_a_grid_of_int8( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_grid_of_int8 + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_grid_of_int8_( & + self%ptr) + + LIBMUSCLE_Data_is_a_grid_of_int8 = ret_val + end function LIBMUSCLE_Data_is_a_grid_of_int8 + + function LIBMUSCLE_Data_is_a_byte_array( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_byte_array + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_byte_array_( & + self%ptr) + + LIBMUSCLE_Data_is_a_byte_array = ret_val + end function LIBMUSCLE_Data_is_a_byte_array + + function LIBMUSCLE_Data_is_nil( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_nil + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_nil_( & + self%ptr) + + LIBMUSCLE_Data_is_nil = ret_val + end function LIBMUSCLE_Data_is_nil + + function LIBMUSCLE_Data_is_a_settings( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical :: LIBMUSCLE_Data_is_a_settings + + logical (c_bool) :: ret_val + + ret_val = LIBMUSCLE_Data_is_a_settings_( & + self%ptr) + + LIBMUSCLE_Data_is_a_settings = ret_val + end function LIBMUSCLE_Data_is_a_settings + + function LIBMUSCLE_Data_size( & + self) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_size) :: LIBMUSCLE_Data_size + + integer (c_size_t) :: ret_val + + ret_val = LIBMUSCLE_Data_size_( & + self%ptr) + LIBMUSCLE_Data_size = ret_val + end function LIBMUSCLE_Data_size + + function LIBMUSCLE_Data_as_logical( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + logical :: LIBMUSCLE_Data_as_logical + + logical (c_bool) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_logical_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_logical = ret_val + end function LIBMUSCLE_Data_as_logical + + function LIBMUSCLE_Data_as_character( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + character(:), allocatable :: LIBMUSCLE_Data_as_character + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_as_character_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + allocate (character(ret_val_size) :: LIBMUSCLE_Data_as_character) + do i_loop = 1, ret_val_size + LIBMUSCLE_Data_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) end do - end function LIBMUSCLE_DataConstRef_as_character + end function LIBMUSCLE_Data_as_character + + function LIBMUSCLE_Data_as_int( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer :: LIBMUSCLE_Data_as_int + + integer (c_int) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int = ret_val + end function LIBMUSCLE_Data_as_int + + function LIBMUSCLE_Data_as_int1( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int1) :: LIBMUSCLE_Data_as_int1 + + integer (c_int8_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int1_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int1 = ret_val + end function LIBMUSCLE_Data_as_int1 + + function LIBMUSCLE_Data_as_int2( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(4)) :: LIBMUSCLE_Data_as_int2 + + integer (c_short) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int2_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int2 = ret_val + end function LIBMUSCLE_Data_as_int2 + + function LIBMUSCLE_Data_as_int4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_int4) :: LIBMUSCLE_Data_as_int4 + + integer (c_int32_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int4 = ret_val + end function LIBMUSCLE_Data_as_int4 + + function LIBMUSCLE_Data_as_int8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (selected_int_kind(18)) :: LIBMUSCLE_Data_as_int8 + + integer (c_int64_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_int8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_int8 = ret_val + end function LIBMUSCLE_Data_as_int8 + + function LIBMUSCLE_Data_as_real4( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real4) :: LIBMUSCLE_Data_as_real4 + + real (c_float) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_real4_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_real4 = ret_val + end function LIBMUSCLE_Data_as_real4 + + function LIBMUSCLE_Data_as_real8( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + real (LIBMUSCLE_real8) :: LIBMUSCLE_Data_as_real8 + + real (c_double) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_real8_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_real8 = ret_val + end function LIBMUSCLE_Data_as_real8 + + function LIBMUSCLE_Data_as_settings( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(YMMSL_Settings) :: LIBMUSCLE_Data_as_settings + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_as_settings_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_as_settings%ptr = ret_val + end function LIBMUSCLE_Data_as_settings + + subroutine LIBMUSCLE_Data_as_byte_array( & + self, & + data, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + character(len=1), dimension(:), intent(out) :: data + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_as_byte_array_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + data = f_ret_ptr + end subroutine LIBMUSCLE_Data_as_byte_array + + function LIBMUSCLE_Data_get_item_by_key( & + self, & + key, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + character (len=*), intent(in) :: key + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_key + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_get_item_by_key_( & + self%ptr, & + key, int(len(key), c_size_t), & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_get_item_by_key%ptr = ret_val + end function LIBMUSCLE_Data_get_item_by_key + + function LIBMUSCLE_Data_get_item_by_index( & + self, & + i, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_size), intent(in) :: i + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_index + + integer (c_intptr_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_get_item_by_index_( & + self%ptr, & + i, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_get_item_by_index%ptr = ret_val + end function LIBMUSCLE_Data_get_item_by_index + + function LIBMUSCLE_Data_num_dims( & + self, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + integer (LIBMUSCLE_size) :: LIBMUSCLE_Data_num_dims + + integer (c_size_t) :: ret_val + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + ret_val = LIBMUSCLE_Data_num_dims_( & + self%ptr, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + LIBMUSCLE_Data_num_dims = ret_val + end function LIBMUSCLE_Data_num_dims + + subroutine LIBMUSCLE_Data_shape( & + self, & + shp, & + err_code, & + err_msg) + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_size), dimension(:), intent(out) :: shp + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + integer (LIBMUSCLE_size), pointer, dimension(:) :: f_ret_ptr + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_shape_( & + self%ptr, & + ret_val, & + ret_val_size, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + shp = f_ret_ptr + end subroutine LIBMUSCLE_Data_shape + + subroutine LIBMUSCLE_Data_elements_1_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_logical + + subroutine LIBMUSCLE_Data_elements_2_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_logical + + subroutine LIBMUSCLE_Data_elements_3_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_logical + + subroutine LIBMUSCLE_Data_elements_4_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_logical + + subroutine LIBMUSCLE_Data_elements_5_logical( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_logical_( & + self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_logical + + subroutine LIBMUSCLE_Data_elements_6_logical( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer :: LIBMUSCLE_DataConstRef_as_int - integer (c_int) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2701,11 +12609,16 @@ function LIBMUSCLE_DataConstRef_as_int(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int_( & + call LIBMUSCLE_Data_elements_logical_( & self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2732,17 +12645,32 @@ function LIBMUSCLE_DataConstRef_as_int(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int = ret_val - end function LIBMUSCLE_DataConstRef_as_int + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_logical + + subroutine LIBMUSCLE_Data_elements_7_logical( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int1(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + logical, dimension(:, :, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int1) :: LIBMUSCLE_DataConstRef_as_int1 - integer (c_int8_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + logical (c_bool), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + logical (c_bool), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2750,11 +12678,16 @@ function LIBMUSCLE_DataConstRef_as_int1(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int1_( & + call LIBMUSCLE_Data_elements_logical_( & self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2781,17 +12714,32 @@ function LIBMUSCLE_DataConstRef_as_int1(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int1 = ret_val - end function LIBMUSCLE_DataConstRef_as_int1 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ logical (c_bool):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_logical + + subroutine LIBMUSCLE_Data_elements_1_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int2(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(4)) :: LIBMUSCLE_DataConstRef_as_int2 - integer (c_short) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2799,11 +12747,16 @@ function LIBMUSCLE_DataConstRef_as_int2(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int2_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2830,17 +12783,32 @@ function LIBMUSCLE_DataConstRef_as_int2(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int2 = ret_val - end function LIBMUSCLE_DataConstRef_as_int2 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_int4 + + subroutine LIBMUSCLE_Data_elements_2_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int4(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int4) :: LIBMUSCLE_DataConstRef_as_int4 - integer (c_int32_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2848,11 +12816,16 @@ function LIBMUSCLE_DataConstRef_as_int4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int4_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2879,17 +12852,32 @@ function LIBMUSCLE_DataConstRef_as_int4(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int4 = ret_val - end function LIBMUSCLE_DataConstRef_as_int4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_int4 + + subroutine LIBMUSCLE_Data_elements_3_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_int8(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(18)) :: LIBMUSCLE_DataConstRef_as_int8 - integer (c_int64_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2897,11 +12885,16 @@ function LIBMUSCLE_DataConstRef_as_int8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_int8_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2928,17 +12921,32 @@ function LIBMUSCLE_DataConstRef_as_int8(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_int8 = ret_val - end function LIBMUSCLE_DataConstRef_as_int8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_int4 + + subroutine LIBMUSCLE_Data_elements_4_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_real4(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real4) :: LIBMUSCLE_DataConstRef_as_real4 - real (c_float) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2946,11 +12954,16 @@ function LIBMUSCLE_DataConstRef_as_real4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_real4_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -2977,17 +12990,32 @@ function LIBMUSCLE_DataConstRef_as_real4(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_real4 = ret_val - end function LIBMUSCLE_DataConstRef_as_real4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_int4 + + subroutine LIBMUSCLE_Data_elements_5_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_real8(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real8) :: LIBMUSCLE_DataConstRef_as_real8 - real (c_double) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -2995,11 +13023,16 @@ function LIBMUSCLE_DataConstRef_as_real8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_real8_( & + call LIBMUSCLE_Data_elements_int4_( & self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3026,17 +13059,239 @@ function LIBMUSCLE_DataConstRef_as_real8(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_real8 = ret_val - end function LIBMUSCLE_DataConstRef_as_real8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_int4 + + subroutine LIBMUSCLE_Data_elements_6_int4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_as_settings(self, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_int4_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_int4 + + subroutine LIBMUSCLE_Data_elements_7_int4( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (LIBMUSCLE_int4), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int32_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int32_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_int4_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int32_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_int4 + + subroutine LIBMUSCLE_Data_elements_1_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg + + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i + + call LIBMUSCLE_Data_elements_int8_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) + + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_int8 + + subroutine LIBMUSCLE_Data_elements_2_int8( & + self, & + elements, & + err_code, & + err_msg) + + implicit none + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(YMMSL_Settings) :: LIBMUSCLE_DataConstRef_as_settings - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3044,8 +13299,12 @@ function LIBMUSCLE_DataConstRef_as_settings(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_as_settings_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3076,19 +13335,32 @@ function LIBMUSCLE_DataConstRef_as_settings(self, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_as_settings%ptr = ret_val - end function LIBMUSCLE_DataConstRef_as_settings + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_int8 + + subroutine LIBMUSCLE_Data_elements_3_int8( & + self, & + elements, & + err_code, & + err_msg) - subroutine LIBMUSCLE_DataConstRef_as_byte_array(self, data, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - character(len=1), dimension(:), intent(out) :: data + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3096,10 +13368,12 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array(self, data, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - call LIBMUSCLE_DataConstRef_as_byte_array_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & + 3_LIBMUSCLE_size, & ret_val, & - ret_val_size, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3130,19 +13404,32 @@ subroutine LIBMUSCLE_DataConstRef_as_byte_array(self, data, err_code, err_msg) end if end if - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) - data = f_ret_ptr - end subroutine LIBMUSCLE_DataConstRef_as_byte_array + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_int8 + + subroutine LIBMUSCLE_Data_elements_4_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_get_item_by_key(self, key, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - character (len=*), intent(in) :: key + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_key - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3150,9 +13437,12 @@ function LIBMUSCLE_DataConstRef_get_item_by_key(self, key, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_get_item_by_key_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & - key, int(len(key), c_size_t), & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3183,18 +13473,32 @@ function LIBMUSCLE_DataConstRef_get_item_by_key(self, key, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_get_item_by_key%ptr = ret_val - end function LIBMUSCLE_DataConstRef_get_item_by_key + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_int8 + + subroutine LIBMUSCLE_Data_elements_5_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_DataConstRef_get_item_by_index(self, i, err_code, err_msg) implicit none - type(LIBMUSCLE_DataConstRef), intent(in) :: self - integer (LIBMUSCLE_size), intent(in) :: i + type(LIBMUSCLE_Data), intent(in) :: self + integer (selected_int_kind(18)), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_DataConstRef_get_item_by_index - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3202,9 +13506,12 @@ function LIBMUSCLE_DataConstRef_get_item_by_index(self, i, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_DataConstRef_get_item_by_index_( & + call LIBMUSCLE_Data_elements_int8_( & self%ptr, & - i, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3235,361 +13542,377 @@ function LIBMUSCLE_DataConstRef_get_item_by_index(self, i, err_code, err_msg) end if end if - LIBMUSCLE_DataConstRef_get_item_by_index%ptr = ret_val - end function LIBMUSCLE_DataConstRef_get_item_by_index - - function LIBMUSCLE_Data_create_nil() - implicit none - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_nil - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_nil_( & - ) - - LIBMUSCLE_Data_create_nil%ptr = ret_val - end function LIBMUSCLE_Data_create_nil - - function LIBMUSCLE_Data_create_logical(value) - implicit none - logical, intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_logical - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_logical_( & - merge(1, 0, value)) - - LIBMUSCLE_Data_create_logical%ptr = ret_val - end function LIBMUSCLE_Data_create_logical - - function LIBMUSCLE_Data_create_character(value) - implicit none - character (len=*), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_character - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_character_( & - value, int(len(value), c_size_t)) - - LIBMUSCLE_Data_create_character%ptr = ret_val - end function LIBMUSCLE_Data_create_character - - function LIBMUSCLE_Data_create_int1(value) - implicit none - integer (LIBMUSCLE_int1), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int1 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int1_( & - value) - - LIBMUSCLE_Data_create_int1%ptr = ret_val - end function LIBMUSCLE_Data_create_int1 - - function LIBMUSCLE_Data_create_int2(value) - implicit none - integer (selected_int_kind(4)), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int2 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int2_( & - value) - - LIBMUSCLE_Data_create_int2%ptr = ret_val - end function LIBMUSCLE_Data_create_int2 - - function LIBMUSCLE_Data_create_int4(value) - implicit none - integer (LIBMUSCLE_int4), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int4 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int4_( & - value) - - LIBMUSCLE_Data_create_int4%ptr = ret_val - end function LIBMUSCLE_Data_create_int4 - - function LIBMUSCLE_Data_create_int8(value) - implicit none - integer (selected_int_kind(18)), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_int8 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_int8_( & - value) - - LIBMUSCLE_Data_create_int8%ptr = ret_val - end function LIBMUSCLE_Data_create_int8 - - function LIBMUSCLE_Data_create_real4(value) - implicit none - real (LIBMUSCLE_real4), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real4 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_real4_( & - value) - - LIBMUSCLE_Data_create_real4%ptr = ret_val - end function LIBMUSCLE_Data_create_real4 - - function LIBMUSCLE_Data_create_real8(value) - implicit none - real (LIBMUSCLE_real8), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_real8 - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_real8_( & - value) - - LIBMUSCLE_Data_create_real8%ptr = ret_val - end function LIBMUSCLE_Data_create_real8 - - function LIBMUSCLE_Data_create_settings(value) - implicit none - type(YMMSL_Settings), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_settings - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_settings_( & - value%ptr) - - LIBMUSCLE_Data_create_settings%ptr = ret_val - end function LIBMUSCLE_Data_create_settings - - function LIBMUSCLE_Data_create_copy(value) - implicit none - type(LIBMUSCLE_Data), intent(in) :: value - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_copy - - integer (c_intptr_t) :: ret_val - - ret_val = LIBMUSCLE_Data_create_copy_( & - value%ptr) - - LIBMUSCLE_Data_create_copy%ptr = ret_val - end function LIBMUSCLE_Data_create_copy - - subroutine LIBMUSCLE_Data_free(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - - call LIBMUSCLE_Data_free_( & - self%ptr) - end subroutine LIBMUSCLE_Data_free - - function LIBMUSCLE_Data_is_a_logical(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_logical - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_logical_( & - self%ptr) - - LIBMUSCLE_Data_is_a_logical = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_logical - - function LIBMUSCLE_Data_is_a_character(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_character - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_character_( & - self%ptr) - - LIBMUSCLE_Data_is_a_character = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_character - - function LIBMUSCLE_Data_is_a_int(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int - - function LIBMUSCLE_Data_is_a_int1(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int1 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int1_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int1 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int1 - - function LIBMUSCLE_Data_is_a_int2(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int2 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int2_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int2 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int2 - - function LIBMUSCLE_Data_is_a_int4(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int4 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int4_( & - self%ptr) - - LIBMUSCLE_Data_is_a_int4 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_int8 + + subroutine LIBMUSCLE_Data_elements_6_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_int8(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_int8 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_int8_( & - self%ptr) + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - LIBMUSCLE_Data_is_a_int8 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_int8 + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - function LIBMUSCLE_Data_is_a_real4(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_real4 + call LIBMUSCLE_Data_elements_int8_( & + self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - integer (c_int) :: ret_val + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - ret_val = LIBMUSCLE_Data_is_a_real4_( & - self%ptr) + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_int8 - LIBMUSCLE_Data_is_a_real4 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_real4 + subroutine LIBMUSCLE_Data_elements_7_int8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_real8(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_real8 - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_real8_( & - self%ptr) + integer (selected_int_kind(18)), dimension(:, :, :, :, :, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - LIBMUSCLE_Data_is_a_real8 = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_real8 + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + integer (c_int64_t), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + integer (c_int64_t), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - function LIBMUSCLE_Data_is_a_dict(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_dict + call LIBMUSCLE_Data_elements_int8_( & + self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - integer (c_int) :: ret_val + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - ret_val = LIBMUSCLE_Data_is_a_dict_( & - self%ptr) + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ integer (c_int64_t):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_int8 - LIBMUSCLE_Data_is_a_dict = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_dict + subroutine LIBMUSCLE_Data_elements_1_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_list(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_list - - integer (c_int) :: ret_val - - ret_val = LIBMUSCLE_Data_is_a_list_( & - self%ptr) + real (LIBMUSCLE_real4), dimension(:), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - LIBMUSCLE_Data_is_a_list = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_list + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - function LIBMUSCLE_Data_is_a_byte_array(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_byte_array + call LIBMUSCLE_Data_elements_real4_( & + self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - integer (c_int) :: ret_val + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - ret_val = LIBMUSCLE_Data_is_a_byte_array_( & - self%ptr) + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_real4 - LIBMUSCLE_Data_is_a_byte_array = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_byte_array + subroutine LIBMUSCLE_Data_elements_2_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_nil(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_nil + real (LIBMUSCLE_real4), dimension(:, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - integer (c_int) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_is_nil_( & - self%ptr) + call LIBMUSCLE_Data_elements_real4_( & + self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - LIBMUSCLE_Data_is_nil = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_nil + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if + + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_real4 + + subroutine LIBMUSCLE_Data_elements_3_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_is_a_settings(self) implicit none type(LIBMUSCLE_Data), intent(in) :: self - logical :: LIBMUSCLE_Data_is_a_settings - - integer (c_int) :: ret_val + real (LIBMUSCLE_real4), dimension(:, :, :), intent(out) :: elements + integer, optional, intent(out) :: err_code + character(:), allocatable, optional, intent(out) :: err_msg - ret_val = LIBMUSCLE_Data_is_a_settings_( & - self%ptr) + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear + integer (c_int) :: err_code_v + type (c_ptr) :: err_msg_v + integer (c_size_t) :: err_msg_len_v + character (c_char), dimension(:), pointer :: err_msg_f + character(:), allocatable :: err_msg_p + integer (c_size_t) :: err_msg_i - LIBMUSCLE_Data_is_a_settings = ret_val .ne. 0 - end function LIBMUSCLE_Data_is_a_settings + call LIBMUSCLE_Data_elements_real4_( & + self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & + err_code_v, & + err_msg_v, & + err_msg_len_v) - function LIBMUSCLE_Data_size(self) - implicit none - type(LIBMUSCLE_Data), intent(in) :: self - integer (LIBMUSCLE_size) :: LIBMUSCLE_Data_size + if (err_code_v .ne. 0) then + if (present(err_code)) then + err_code = err_code_v + if (present(err_msg)) then + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg) + do err_msg_i = 1, err_msg_len_v + err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + end if + return + else + call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/)) + allocate (character(err_msg_len_v) :: err_msg_p) + do err_msg_i = 1, err_msg_len_v + err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i) + end do + print *, err_msg_p + stop + end if + else + if (present(err_code)) then + err_code = 0 + end if + end if - integer (c_size_t) :: ret_val + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_real4 - ret_val = LIBMUSCLE_Data_size_( & - self%ptr) - LIBMUSCLE_Data_size = ret_val - end function LIBMUSCLE_Data_size + subroutine LIBMUSCLE_Data_elements_4_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_logical(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - logical :: LIBMUSCLE_Data_as_logical - integer (c_int) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3597,8 +13920,12 @@ function LIBMUSCLE_Data_as_logical(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_logical_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3629,20 +13956,32 @@ function LIBMUSCLE_Data_as_logical(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_logical = ret_val .ne. 0 - end function LIBMUSCLE_Data_as_logical + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_real4 + + subroutine LIBMUSCLE_Data_elements_5_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_character(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - character(:), allocatable :: LIBMUSCLE_Data_as_character type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character (c_char), dimension(:), pointer :: f_ret_ptr - integer :: i_loop + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3650,10 +13989,12 @@ function LIBMUSCLE_Data_as_character(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - call LIBMUSCLE_Data_as_character_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 5_LIBMUSCLE_size, & ret_val, & - ret_val_size, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -3684,21 +14025,32 @@ function LIBMUSCLE_Data_as_character(self, err_code, err_msg) end if end if - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) - allocate (character(ret_val_size) :: LIBMUSCLE_Data_as_character) - do i_loop = 1, ret_val_size - LIBMUSCLE_Data_as_character(i_loop:i_loop) = f_ret_ptr(i_loop) - end do - end function LIBMUSCLE_Data_as_character + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_real4 + + subroutine LIBMUSCLE_Data_elements_6_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer :: LIBMUSCLE_Data_as_int - integer (c_int) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3706,11 +14058,16 @@ function LIBMUSCLE_Data_as_int(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3737,17 +14094,32 @@ function LIBMUSCLE_Data_as_int(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int = ret_val - end function LIBMUSCLE_Data_as_int + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_real4 + + subroutine LIBMUSCLE_Data_elements_7_real4( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int1(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real4), dimension(:, :, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int1) :: LIBMUSCLE_Data_as_int1 - integer (c_int8_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_float), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_float), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3755,11 +14127,16 @@ function LIBMUSCLE_Data_as_int1(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int1_( & + call LIBMUSCLE_Data_elements_real4_( & self%ptr, & + 7_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3786,17 +14163,32 @@ function LIBMUSCLE_Data_as_int1(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int1 = ret_val - end function LIBMUSCLE_Data_as_int1 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_float):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_real4 + + subroutine LIBMUSCLE_Data_elements_1_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int2(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(4)) :: LIBMUSCLE_Data_as_int2 - integer (c_short) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(1) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3804,11 +14196,16 @@ function LIBMUSCLE_Data_as_int2(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int2_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 1_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3835,17 +14232,32 @@ function LIBMUSCLE_Data_as_int2(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int2 = ret_val - end function LIBMUSCLE_Data_as_int2 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/1/)) + end if + end subroutine LIBMUSCLE_Data_elements_1_real8 + + subroutine LIBMUSCLE_Data_elements_2_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int4(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (LIBMUSCLE_int4) :: LIBMUSCLE_Data_as_int4 - integer (c_int32_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(2) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3853,11 +14265,16 @@ function LIBMUSCLE_Data_as_int4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int4_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 2_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3884,17 +14301,32 @@ function LIBMUSCLE_Data_as_int4(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int4 = ret_val - end function LIBMUSCLE_Data_as_int4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_2_real8 + + subroutine LIBMUSCLE_Data_elements_3_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_int8(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - integer (selected_int_kind(18)) :: LIBMUSCLE_Data_as_int8 - integer (c_int64_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(3) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3902,11 +14334,16 @@ function LIBMUSCLE_Data_as_int8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_int8_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 3_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3933,17 +14370,32 @@ function LIBMUSCLE_Data_as_int8(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_int8 = ret_val - end function LIBMUSCLE_Data_as_int8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_3_real8 + + subroutine LIBMUSCLE_Data_elements_4_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_real4(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real4) :: LIBMUSCLE_Data_as_real4 - real (c_float) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(4) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -3951,11 +14403,16 @@ function LIBMUSCLE_Data_as_real4(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_real4_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 4_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -3982,17 +14439,32 @@ function LIBMUSCLE_Data_as_real4(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_real4 = ret_val - end function LIBMUSCLE_Data_as_real4 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_4_real8 + + subroutine LIBMUSCLE_Data_elements_5_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_real8(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - real (LIBMUSCLE_real8) :: LIBMUSCLE_Data_as_real8 - real (c_double) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(5) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4000,11 +14472,16 @@ function LIBMUSCLE_Data_as_real8(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_real8_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 5_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) + if (err_code_v .ne. 0) then if (present(err_code)) then err_code = err_code_v @@ -4031,17 +14508,32 @@ function LIBMUSCLE_Data_as_real8(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_real8 = ret_val - end function LIBMUSCLE_Data_as_real8 + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_5_real8 + + subroutine LIBMUSCLE_Data_elements_6_real8( & + self, & + elements, & + err_code, & + err_msg) - function LIBMUSCLE_Data_as_settings(self, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(YMMSL_Settings) :: LIBMUSCLE_Data_as_settings - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t), dimension(6) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4049,8 +14541,12 @@ function LIBMUSCLE_Data_as_settings(self, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_as_settings_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 6_LIBMUSCLE_size, & + ret_val, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4081,19 +14577,32 @@ function LIBMUSCLE_Data_as_settings(self, err_code, err_msg) end if end if - LIBMUSCLE_Data_as_settings%ptr = ret_val - end function LIBMUSCLE_Data_as_settings + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_6_real8 + + subroutine LIBMUSCLE_Data_elements_7_real8( & + self, & + elements, & + err_code, & + err_msg) - subroutine LIBMUSCLE_Data_as_byte_array(self, data, err_code, err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self - character(len=1), dimension(:), intent(out) :: data + real (LIBMUSCLE_real8), dimension(:, :, :, :, :, :, :), intent(out) :: elements integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg type (c_ptr) :: ret_val - integer (c_size_t) :: ret_val_size - character(len=1), pointer, dimension(:) :: f_ret_ptr + integer (c_size_t), dimension(7) :: ret_val_shape + integer (c_int) :: ret_val_format + real (c_double), pointer, dimension(:, :, :, :, :, :, :) :: f_ret_ptr + real (c_double), pointer, dimension(:) :: f_ret_ptr_linear integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4101,10 +14610,12 @@ subroutine LIBMUSCLE_Data_as_byte_array(self, data, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - call LIBMUSCLE_Data_as_byte_array_( & + call LIBMUSCLE_Data_elements_real8_( & self%ptr, & + 7_LIBMUSCLE_size, & ret_val, & - ret_val_size, & + ret_val_shape, & + ret_val_format, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4135,19 +14646,26 @@ subroutine LIBMUSCLE_Data_as_byte_array(self, data, err_code, err_msg) end if end if - call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) - data = f_ret_ptr - end subroutine LIBMUSCLE_Data_as_byte_array + if (ret_val_format .eq. 0) then + call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape) + elements = f_ret_ptr + else + call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/)) + elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ real (c_double):: /), (/7, 6, 5, 4, 3, 2, 1/)) + end if + end subroutine LIBMUSCLE_Data_elements_7_real8 - function LIBMUSCLE_Data_get_item_by_key(self, key, err_code, err_msg) + function LIBMUSCLE_Data_has_indexes( & + self, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self - character (len=*), intent(in) :: key integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_key + logical :: LIBMUSCLE_Data_has_indexes - integer (c_intptr_t) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4155,9 +14673,8 @@ function LIBMUSCLE_Data_get_item_by_key(self, key, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_get_item_by_key_( & + ret_val = LIBMUSCLE_Data_has_indexes_( & self%ptr, & - key, int(len(key), c_size_t), & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4188,18 +14705,25 @@ function LIBMUSCLE_Data_get_item_by_key(self, key, err_code, err_msg) end if end if - LIBMUSCLE_Data_get_item_by_key%ptr = ret_val - end function LIBMUSCLE_Data_get_item_by_key + LIBMUSCLE_Data_has_indexes = ret_val + end function LIBMUSCLE_Data_has_indexes - function LIBMUSCLE_Data_get_item_by_index(self, i, err_code, err_msg) + function LIBMUSCLE_Data_index( & + self, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i integer, optional, intent(out) :: err_code character(:), allocatable, optional, intent(out) :: err_msg - type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_get_item_by_index + character(:), allocatable :: LIBMUSCLE_Data_index - integer (c_intptr_t) :: ret_val + type (c_ptr) :: ret_val + integer (c_size_t) :: ret_val_size + character (c_char), dimension(:), pointer :: f_ret_ptr + integer :: i_loop integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -4207,9 +14731,11 @@ function LIBMUSCLE_Data_get_item_by_index(self, i, err_code, err_msg) character(:), allocatable :: err_msg_p integer (c_size_t) :: err_msg_i - ret_val = LIBMUSCLE_Data_get_item_by_index_( & + call LIBMUSCLE_Data_index_( & self%ptr, & i, & + ret_val, & + ret_val_size, & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4240,10 +14766,15 @@ function LIBMUSCLE_Data_get_item_by_index(self, i, err_code, err_msg) end if end if - LIBMUSCLE_Data_get_item_by_index%ptr = ret_val - end function LIBMUSCLE_Data_get_item_by_index + call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/)) + allocate (character(ret_val_size) :: LIBMUSCLE_Data_index) + do i_loop = 1, ret_val_size + LIBMUSCLE_Data_index(i_loop:i_loop) = f_ret_ptr(i_loop) + end do + end function LIBMUSCLE_Data_index - function LIBMUSCLE_Data_create_dict() + function LIBMUSCLE_Data_create_dict( & + ) implicit none type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_dict @@ -4255,7 +14786,8 @@ function LIBMUSCLE_Data_create_dict() LIBMUSCLE_Data_create_dict%ptr = ret_val end function LIBMUSCLE_Data_create_dict - function LIBMUSCLE_Data_create_list() + function LIBMUSCLE_Data_create_list( & + ) implicit none type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_list @@ -4267,7 +14799,8 @@ function LIBMUSCLE_Data_create_list() LIBMUSCLE_Data_create_list%ptr = ret_val end function LIBMUSCLE_Data_create_list - function LIBMUSCLE_Data_create_nils(size) + function LIBMUSCLE_Data_create_nils( & + size) implicit none integer (LIBMUSCLE_size), intent(in) :: size type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_nils @@ -4280,7 +14813,8 @@ function LIBMUSCLE_Data_create_nils(size) LIBMUSCLE_Data_create_nils%ptr = ret_val end function LIBMUSCLE_Data_create_nils - function LIBMUSCLE_Data_create_byte_array_empty(size) + function LIBMUSCLE_Data_create_byte_array_empty( & + size) implicit none integer (LIBMUSCLE_size), intent(in) :: size type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_byte_array_empty @@ -4293,7 +14827,8 @@ function LIBMUSCLE_Data_create_byte_array_empty(size) LIBMUSCLE_Data_create_byte_array_empty%ptr = ret_val end function LIBMUSCLE_Data_create_byte_array_empty - function LIBMUSCLE_Data_create_byte_array_from_buf(buf) + function LIBMUSCLE_Data_create_byte_array_from_buf( & + buf) implicit none character(len=1), dimension(:), intent(in) :: buf type(LIBMUSCLE_Data) :: LIBMUSCLE_Data_create_byte_array_from_buf @@ -4306,17 +14841,21 @@ function LIBMUSCLE_Data_create_byte_array_from_buf(buf) LIBMUSCLE_Data_create_byte_array_from_buf%ptr = ret_val end function LIBMUSCLE_Data_create_byte_array_from_buf - subroutine LIBMUSCLE_Data_set_logical(self, value) + subroutine LIBMUSCLE_Data_set_logical( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self logical, intent(in) :: value call LIBMUSCLE_Data_set_logical_( & self%ptr, & - merge(1, 0, value)) + logical(value, c_bool)) end subroutine LIBMUSCLE_Data_set_logical - subroutine LIBMUSCLE_Data_set_character(self, value) + subroutine LIBMUSCLE_Data_set_character( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: value @@ -4326,7 +14865,9 @@ subroutine LIBMUSCLE_Data_set_character(self, value) value, int(len(value), c_size_t)) end subroutine LIBMUSCLE_Data_set_character - subroutine LIBMUSCLE_Data_set_int1(self, value) + subroutine LIBMUSCLE_Data_set_int1( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_int1), intent(in) :: value @@ -4336,7 +14877,9 @@ subroutine LIBMUSCLE_Data_set_int1(self, value) value) end subroutine LIBMUSCLE_Data_set_int1 - subroutine LIBMUSCLE_Data_set_int2(self, value) + subroutine LIBMUSCLE_Data_set_int2( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (selected_int_kind(4)), intent(in) :: value @@ -4346,7 +14889,9 @@ subroutine LIBMUSCLE_Data_set_int2(self, value) value) end subroutine LIBMUSCLE_Data_set_int2 - subroutine LIBMUSCLE_Data_set_int4(self, value) + subroutine LIBMUSCLE_Data_set_int4( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_int4), intent(in) :: value @@ -4356,7 +14901,9 @@ subroutine LIBMUSCLE_Data_set_int4(self, value) value) end subroutine LIBMUSCLE_Data_set_int4 - subroutine LIBMUSCLE_Data_set_int8(self, value) + subroutine LIBMUSCLE_Data_set_int8( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (selected_int_kind(18)), intent(in) :: value @@ -4366,7 +14913,9 @@ subroutine LIBMUSCLE_Data_set_int8(self, value) value) end subroutine LIBMUSCLE_Data_set_int8 - subroutine LIBMUSCLE_Data_set_real4(self, value) + subroutine LIBMUSCLE_Data_set_real4( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self real (LIBMUSCLE_real4), intent(in) :: value @@ -4376,7 +14925,9 @@ subroutine LIBMUSCLE_Data_set_real4(self, value) value) end subroutine LIBMUSCLE_Data_set_real4 - subroutine LIBMUSCLE_Data_set_real8(self, value) + subroutine LIBMUSCLE_Data_set_real8( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self real (LIBMUSCLE_real8), intent(in) :: value @@ -4386,7 +14937,9 @@ subroutine LIBMUSCLE_Data_set_real8(self, value) value) end subroutine LIBMUSCLE_Data_set_real8 - subroutine LIBMUSCLE_Data_set_data(self, value) + subroutine LIBMUSCLE_Data_set_data( & + self, & + value) implicit none type(LIBMUSCLE_Data), intent(in) :: self type(LIBMUSCLE_Data), intent(in) :: value @@ -4396,7 +14949,8 @@ subroutine LIBMUSCLE_Data_set_data(self, value) value%ptr) end subroutine LIBMUSCLE_Data_set_data - subroutine LIBMUSCLE_Data_set_nil(self) + subroutine LIBMUSCLE_Data_set_nil( & + self) implicit none type(LIBMUSCLE_Data), intent(in) :: self @@ -4404,7 +14958,12 @@ subroutine LIBMUSCLE_Data_set_nil(self) self%ptr) end subroutine LIBMUSCLE_Data_set_nil - subroutine LIBMUSCLE_Data_set_item_key_logical(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_logical( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4422,7 +14981,7 @@ subroutine LIBMUSCLE_Data_set_item_key_logical(self, key, value, err_code, err_m call LIBMUSCLE_Data_set_item_key_logical_( & self%ptr, & key, int(len(key), c_size_t), & - merge(1, 0, value), & + logical(value, c_bool), & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4454,7 +15013,12 @@ subroutine LIBMUSCLE_Data_set_item_key_logical(self, key, value, err_code, err_m end subroutine LIBMUSCLE_Data_set_item_key_logical - subroutine LIBMUSCLE_Data_set_item_key_character(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_character( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4504,7 +15068,12 @@ subroutine LIBMUSCLE_Data_set_item_key_character(self, key, value, err_code, err end subroutine LIBMUSCLE_Data_set_item_key_character - subroutine LIBMUSCLE_Data_set_item_key_int1(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int1( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4554,7 +15123,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int1(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int1 - subroutine LIBMUSCLE_Data_set_item_key_int2(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int2( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4604,7 +15178,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int2(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int2 - subroutine LIBMUSCLE_Data_set_item_key_int4(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int4( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4654,7 +15233,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int4(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int4 - subroutine LIBMUSCLE_Data_set_item_key_int8(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_int8( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4704,7 +15288,12 @@ subroutine LIBMUSCLE_Data_set_item_key_int8(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_int8 - subroutine LIBMUSCLE_Data_set_item_key_real4(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_real4( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4754,7 +15343,12 @@ subroutine LIBMUSCLE_Data_set_item_key_real4(self, key, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_key_real4 - subroutine LIBMUSCLE_Data_set_item_key_real8(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_real8( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4804,7 +15398,12 @@ subroutine LIBMUSCLE_Data_set_item_key_real8(self, key, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_key_real8 - subroutine LIBMUSCLE_Data_set_item_key_data(self, key, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_key_data( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self character (len=*), intent(in) :: key @@ -4854,7 +15453,12 @@ subroutine LIBMUSCLE_Data_set_item_key_data(self, key, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_key_data - subroutine LIBMUSCLE_Data_set_item_index_logical(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_logical( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -4872,7 +15476,7 @@ subroutine LIBMUSCLE_Data_set_item_index_logical(self, i, value, err_code, err_m call LIBMUSCLE_Data_set_item_index_logical_( & self%ptr, & i, & - merge(1, 0, value), & + logical(value, c_bool), & err_code_v, & err_msg_v, & err_msg_len_v) @@ -4904,7 +15508,12 @@ subroutine LIBMUSCLE_Data_set_item_index_logical(self, i, value, err_code, err_m end subroutine LIBMUSCLE_Data_set_item_index_logical - subroutine LIBMUSCLE_Data_set_item_index_character(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_character( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -4954,7 +15563,12 @@ subroutine LIBMUSCLE_Data_set_item_index_character(self, i, value, err_code, err end subroutine LIBMUSCLE_Data_set_item_index_character - subroutine LIBMUSCLE_Data_set_item_index_int1(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int1( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5004,7 +15618,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int1(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int1 - subroutine LIBMUSCLE_Data_set_item_index_int2(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int2( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5054,7 +15673,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int2(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int2 - subroutine LIBMUSCLE_Data_set_item_index_int4(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int4( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5104,7 +15728,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int4(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int4 - subroutine LIBMUSCLE_Data_set_item_index_int8(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_int8( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5154,7 +15783,12 @@ subroutine LIBMUSCLE_Data_set_item_index_int8(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_int8 - subroutine LIBMUSCLE_Data_set_item_index_real4(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_real4( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5204,7 +15838,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real4(self, i, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_index_real4 - subroutine LIBMUSCLE_Data_set_item_index_real8(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_real8( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5254,7 +15893,12 @@ subroutine LIBMUSCLE_Data_set_item_index_real8(self, i, value, err_code, err_msg end subroutine LIBMUSCLE_Data_set_item_index_real8 - subroutine LIBMUSCLE_Data_set_item_index_data(self, i, value, err_code, err_msg) + subroutine LIBMUSCLE_Data_set_item_index_data( & + self, & + i, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5304,7 +15948,11 @@ subroutine LIBMUSCLE_Data_set_item_index_data(self, i, value, err_code, err_msg) end subroutine LIBMUSCLE_Data_set_item_index_data - function LIBMUSCLE_Data_key(self, i, err_code, err_msg) + function LIBMUSCLE_Data_key( & + self, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5365,7 +16013,11 @@ function LIBMUSCLE_Data_key(self, i, err_code, err_msg) end do end function LIBMUSCLE_Data_key - function LIBMUSCLE_Data_value(self, i, err_code, err_msg) + function LIBMUSCLE_Data_value( & + self, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Data), intent(in) :: self integer (LIBMUSCLE_size), intent(in) :: i @@ -5417,7 +16069,8 @@ function LIBMUSCLE_Data_value(self, i, err_code, err_msg) LIBMUSCLE_Data_value%ptr = ret_val end function LIBMUSCLE_Data_value - function LIBMUSCLE_PortsDescription_create() + function LIBMUSCLE_PortsDescription_create( & + ) implicit none type(LIBMUSCLE_PortsDescription) :: LIBMUSCLE_PortsDescription_create @@ -5429,7 +16082,8 @@ function LIBMUSCLE_PortsDescription_create() LIBMUSCLE_PortsDescription_create%ptr = ret_val end function LIBMUSCLE_PortsDescription_create - subroutine LIBMUSCLE_PortsDescription_free(self) + subroutine LIBMUSCLE_PortsDescription_free( & + self) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self @@ -5437,7 +16091,10 @@ subroutine LIBMUSCLE_PortsDescription_free(self) self%ptr) end subroutine LIBMUSCLE_PortsDescription_free - subroutine LIBMUSCLE_PortsDescription_add(self, op, port) + subroutine LIBMUSCLE_PortsDescription_add( & + self, & + op, & + port) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self integer(YMMSL_Operator), intent(in) :: op @@ -5449,7 +16106,9 @@ subroutine LIBMUSCLE_PortsDescription_add(self, op, port) port, int(len(port), c_size_t)) end subroutine LIBMUSCLE_PortsDescription_add - function LIBMUSCLE_PortsDescription_num_ports(self, op) + function LIBMUSCLE_PortsDescription_num_ports( & + self, & + op) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self integer(YMMSL_Operator), intent(in) :: op @@ -5463,7 +16122,12 @@ function LIBMUSCLE_PortsDescription_num_ports(self, op) LIBMUSCLE_PortsDescription_num_ports = ret_val end function LIBMUSCLE_PortsDescription_num_ports - function LIBMUSCLE_PortsDescription_get(self, op, i, err_code, err_msg) + function LIBMUSCLE_PortsDescription_get( & + self, & + op, & + i, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_PortsDescription), intent(in) :: self integer(YMMSL_Operator), intent(in) :: op @@ -5526,7 +16190,9 @@ function LIBMUSCLE_PortsDescription_get(self, op, i, err_code, err_msg) end do end function LIBMUSCLE_PortsDescription_get - function LIBMUSCLE_Message_create_td(timestamp, data) + function LIBMUSCLE_Message_create_td( & + timestamp, & + data) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp type(LIBMUSCLE_Data), intent(in) :: data @@ -5541,7 +16207,10 @@ function LIBMUSCLE_Message_create_td(timestamp, data) LIBMUSCLE_Message_create_td%ptr = ret_val end function LIBMUSCLE_Message_create_td - function LIBMUSCLE_Message_create_tnd(timestamp, next_timestamp, data) + function LIBMUSCLE_Message_create_tnd( & + timestamp, & + next_timestamp, & + data) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp real (LIBMUSCLE_real8), intent(in) :: next_timestamp @@ -5558,7 +16227,10 @@ function LIBMUSCLE_Message_create_tnd(timestamp, next_timestamp, data) LIBMUSCLE_Message_create_tnd%ptr = ret_val end function LIBMUSCLE_Message_create_tnd - function LIBMUSCLE_Message_create_tds(timestamp, data, settings) + function LIBMUSCLE_Message_create_tds( & + timestamp, & + data, & + settings) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp type(LIBMUSCLE_Data), intent(in) :: data @@ -5575,7 +16247,11 @@ function LIBMUSCLE_Message_create_tds(timestamp, data, settings) LIBMUSCLE_Message_create_tds%ptr = ret_val end function LIBMUSCLE_Message_create_tds - function LIBMUSCLE_Message_create_tnds(timestamp, next_timestamp, data, settings) + function LIBMUSCLE_Message_create_tnds( & + timestamp, & + next_timestamp, & + data, & + settings) implicit none real (LIBMUSCLE_real8), intent(in) :: timestamp real (LIBMUSCLE_real8), intent(in) :: next_timestamp @@ -5594,7 +16270,8 @@ function LIBMUSCLE_Message_create_tnds(timestamp, next_timestamp, data, settings LIBMUSCLE_Message_create_tnds%ptr = ret_val end function LIBMUSCLE_Message_create_tnds - subroutine LIBMUSCLE_Message_free(self) + subroutine LIBMUSCLE_Message_free( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self @@ -5602,7 +16279,8 @@ subroutine LIBMUSCLE_Message_free(self) self%ptr) end subroutine LIBMUSCLE_Message_free - function LIBMUSCLE_Message_timestamp(self) + function LIBMUSCLE_Message_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8) :: LIBMUSCLE_Message_timestamp @@ -5614,7 +16292,9 @@ function LIBMUSCLE_Message_timestamp(self) LIBMUSCLE_Message_timestamp = ret_val end function LIBMUSCLE_Message_timestamp - subroutine LIBMUSCLE_Message_set_timestamp(self, timestamp) + subroutine LIBMUSCLE_Message_set_timestamp( & + self, & + timestamp) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8), intent(in) :: timestamp @@ -5624,20 +16304,22 @@ subroutine LIBMUSCLE_Message_set_timestamp(self, timestamp) timestamp) end subroutine LIBMUSCLE_Message_set_timestamp - function LIBMUSCLE_Message_has_next_timestamp(self) + function LIBMUSCLE_Message_has_next_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self logical :: LIBMUSCLE_Message_has_next_timestamp - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Message_has_next_timestamp_( & self%ptr) - LIBMUSCLE_Message_has_next_timestamp = ret_val .ne. 0 + LIBMUSCLE_Message_has_next_timestamp = ret_val end function LIBMUSCLE_Message_has_next_timestamp - function LIBMUSCLE_Message_next_timestamp(self) + function LIBMUSCLE_Message_next_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8) :: LIBMUSCLE_Message_next_timestamp @@ -5649,7 +16331,9 @@ function LIBMUSCLE_Message_next_timestamp(self) LIBMUSCLE_Message_next_timestamp = ret_val end function LIBMUSCLE_Message_next_timestamp - subroutine LIBMUSCLE_Message_set_next_timestamp(self, next_timestamp) + subroutine LIBMUSCLE_Message_set_next_timestamp( & + self, & + next_timestamp) implicit none type(LIBMUSCLE_Message), intent(in) :: self real (LIBMUSCLE_real8), intent(in) :: next_timestamp @@ -5659,7 +16343,8 @@ subroutine LIBMUSCLE_Message_set_next_timestamp(self, next_timestamp) next_timestamp) end subroutine LIBMUSCLE_Message_set_next_timestamp - subroutine LIBMUSCLE_Message_unset_next_timestamp(self) + subroutine LIBMUSCLE_Message_unset_next_timestamp( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self @@ -5667,7 +16352,8 @@ subroutine LIBMUSCLE_Message_unset_next_timestamp(self) self%ptr) end subroutine LIBMUSCLE_Message_unset_next_timestamp - function LIBMUSCLE_Message_get_data(self) + function LIBMUSCLE_Message_get_data( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(LIBMUSCLE_DataConstRef) :: LIBMUSCLE_Message_get_data @@ -5680,7 +16366,9 @@ function LIBMUSCLE_Message_get_data(self) LIBMUSCLE_Message_get_data%ptr = ret_val end function LIBMUSCLE_Message_get_data - subroutine LIBMUSCLE_Message_set_data_d(self, data) + subroutine LIBMUSCLE_Message_set_data_d( & + self, & + data) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(LIBMUSCLE_Data), intent(in) :: data @@ -5690,7 +16378,9 @@ subroutine LIBMUSCLE_Message_set_data_d(self, data) data%ptr) end subroutine LIBMUSCLE_Message_set_data_d - subroutine LIBMUSCLE_Message_set_data_dcr(self, data) + subroutine LIBMUSCLE_Message_set_data_dcr( & + self, & + data) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(LIBMUSCLE_DataConstRef), intent(in) :: data @@ -5700,20 +16390,22 @@ subroutine LIBMUSCLE_Message_set_data_dcr(self, data) data%ptr) end subroutine LIBMUSCLE_Message_set_data_dcr - function LIBMUSCLE_Message_has_settings(self) + function LIBMUSCLE_Message_has_settings( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self logical :: LIBMUSCLE_Message_has_settings - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Message_has_settings_( & self%ptr) - LIBMUSCLE_Message_has_settings = ret_val .ne. 0 + LIBMUSCLE_Message_has_settings = ret_val end function LIBMUSCLE_Message_has_settings - function LIBMUSCLE_Message_get_settings(self) + function LIBMUSCLE_Message_get_settings( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(YMMSL_Settings) :: LIBMUSCLE_Message_get_settings @@ -5726,7 +16418,9 @@ function LIBMUSCLE_Message_get_settings(self) LIBMUSCLE_Message_get_settings%ptr = ret_val end function LIBMUSCLE_Message_get_settings - subroutine LIBMUSCLE_Message_set_settings(self, settings) + subroutine LIBMUSCLE_Message_set_settings( & + self, & + settings) implicit none type(LIBMUSCLE_Message), intent(in) :: self type(YMMSL_Settings), intent(in) :: settings @@ -5736,7 +16430,8 @@ subroutine LIBMUSCLE_Message_set_settings(self, settings) settings%ptr) end subroutine LIBMUSCLE_Message_set_settings - subroutine LIBMUSCLE_Message_unset_settings(self) + subroutine LIBMUSCLE_Message_unset_settings( & + self) implicit none type(LIBMUSCLE_Message), intent(in) :: self @@ -5897,7 +16592,8 @@ type(LIBMUSCLE_Instance) function LIBMUSCLE_Instance_create_with_ports( & call LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free_(cla) end function LIBMUSCLE_Instance_create_with_ports - subroutine LIBMUSCLE_Instance_free(self) + subroutine LIBMUSCLE_Instance_free( & + self) implicit none type(LIBMUSCLE_Instance), intent(in) :: self @@ -5905,35 +16601,40 @@ subroutine LIBMUSCLE_Instance_free(self) self%ptr) end subroutine LIBMUSCLE_Instance_free - function LIBMUSCLE_Instance_reuse_instance_default(self) + function LIBMUSCLE_Instance_reuse_instance_default( & + self) implicit none type(LIBMUSCLE_Instance), intent(in) :: self logical :: LIBMUSCLE_Instance_reuse_instance_default - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_reuse_instance_default_( & self%ptr) - LIBMUSCLE_Instance_reuse_instance_default = ret_val .ne. 0 + LIBMUSCLE_Instance_reuse_instance_default = ret_val end function LIBMUSCLE_Instance_reuse_instance_default - function LIBMUSCLE_Instance_reuse_instance_apply(self, apply_overlay) + function LIBMUSCLE_Instance_reuse_instance_apply( & + self, & + apply_overlay) implicit none type(LIBMUSCLE_Instance), intent(in) :: self logical, intent(in) :: apply_overlay logical :: LIBMUSCLE_Instance_reuse_instance_apply - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_reuse_instance_apply_( & self%ptr, & - merge(1, 0, apply_overlay)) + logical(apply_overlay, c_bool)) - LIBMUSCLE_Instance_reuse_instance_apply = ret_val .ne. 0 + LIBMUSCLE_Instance_reuse_instance_apply = ret_val end function LIBMUSCLE_Instance_reuse_instance_apply - subroutine LIBMUSCLE_Instance_error_shutdown(self, message) + subroutine LIBMUSCLE_Instance_error_shutdown( & + self, & + message) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: message @@ -5943,7 +16644,11 @@ subroutine LIBMUSCLE_Instance_error_shutdown(self, message) message, int(len(message), c_size_t)) end subroutine LIBMUSCLE_Instance_error_shutdown - function LIBMUSCLE_Instance_is_setting_a_character(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_character( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -5951,7 +16656,7 @@ function LIBMUSCLE_Instance_is_setting_a_character(self, name, err_code, err_msg character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_character - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -5992,10 +16697,14 @@ function LIBMUSCLE_Instance_is_setting_a_character(self, name, err_code, err_msg end if end if - LIBMUSCLE_Instance_is_setting_a_character = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_character = ret_val end function LIBMUSCLE_Instance_is_setting_a_character - function LIBMUSCLE_Instance_is_setting_a_int8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_int8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6003,7 +16712,7 @@ function LIBMUSCLE_Instance_is_setting_a_int8(self, name, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_int8 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6044,10 +16753,14 @@ function LIBMUSCLE_Instance_is_setting_a_int8(self, name, err_code, err_msg) end if end if - LIBMUSCLE_Instance_is_setting_a_int8 = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_int8 = ret_val end function LIBMUSCLE_Instance_is_setting_a_int8 - function LIBMUSCLE_Instance_is_setting_a_real8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_real8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6055,7 +16768,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8(self, name, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_real8 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6096,10 +16809,14 @@ function LIBMUSCLE_Instance_is_setting_a_real8(self, name, err_code, err_msg) end if end if - LIBMUSCLE_Instance_is_setting_a_real8 = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_real8 = ret_val end function LIBMUSCLE_Instance_is_setting_a_real8 - function LIBMUSCLE_Instance_is_setting_a_logical(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_logical( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6107,7 +16824,7 @@ function LIBMUSCLE_Instance_is_setting_a_logical(self, name, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_logical - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6148,10 +16865,14 @@ function LIBMUSCLE_Instance_is_setting_a_logical(self, name, err_code, err_msg) end if end if - LIBMUSCLE_Instance_is_setting_a_logical = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_logical = ret_val end function LIBMUSCLE_Instance_is_setting_a_logical - function LIBMUSCLE_Instance_is_setting_a_real8array(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_real8array( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6159,7 +16880,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8array(self, name, err_code, err_ms character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_real8array - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6200,10 +16921,14 @@ function LIBMUSCLE_Instance_is_setting_a_real8array(self, name, err_code, err_ms end if end if - LIBMUSCLE_Instance_is_setting_a_real8array = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_real8array = ret_val end function LIBMUSCLE_Instance_is_setting_a_real8array - function LIBMUSCLE_Instance_is_setting_a_real8array2(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_is_setting_a_real8array2( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6211,7 +16936,7 @@ function LIBMUSCLE_Instance_is_setting_a_real8array2(self, name, err_code, err_m character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_is_setting_a_real8array2 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6252,10 +16977,14 @@ function LIBMUSCLE_Instance_is_setting_a_real8array2(self, name, err_code, err_m end if end if - LIBMUSCLE_Instance_is_setting_a_real8array2 = ret_val .ne. 0 + LIBMUSCLE_Instance_is_setting_a_real8array2 = ret_val end function LIBMUSCLE_Instance_is_setting_a_real8array2 - function LIBMUSCLE_Instance_get_setting_as_character(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_character( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6316,7 +17045,11 @@ function LIBMUSCLE_Instance_get_setting_as_character(self, name, err_code, err_m end do end function LIBMUSCLE_Instance_get_setting_as_character - function LIBMUSCLE_Instance_get_setting_as_int8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_int8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6367,7 +17100,11 @@ function LIBMUSCLE_Instance_get_setting_as_int8(self, name, err_code, err_msg) LIBMUSCLE_Instance_get_setting_as_int8 = ret_val end function LIBMUSCLE_Instance_get_setting_as_int8 - function LIBMUSCLE_Instance_get_setting_as_real8(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_real8( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6418,7 +17155,11 @@ function LIBMUSCLE_Instance_get_setting_as_real8(self, name, err_code, err_msg) LIBMUSCLE_Instance_get_setting_as_real8 = ret_val end function LIBMUSCLE_Instance_get_setting_as_real8 - function LIBMUSCLE_Instance_get_setting_as_logical(self, name, err_code, err_msg) + function LIBMUSCLE_Instance_get_setting_as_logical( & + self, & + name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6426,7 +17167,7 @@ function LIBMUSCLE_Instance_get_setting_as_logical(self, name, err_code, err_msg character(:), allocatable, optional, intent(out) :: err_msg logical :: LIBMUSCLE_Instance_get_setting_as_logical - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -6467,10 +17208,15 @@ function LIBMUSCLE_Instance_get_setting_as_logical(self, name, err_code, err_msg end if end if - LIBMUSCLE_Instance_get_setting_as_logical = ret_val .ne. 0 + LIBMUSCLE_Instance_get_setting_as_logical = ret_val end function LIBMUSCLE_Instance_get_setting_as_logical - subroutine LIBMUSCLE_Instance_get_setting_as_real8array(self, name, value, err_code, err_msg) + subroutine LIBMUSCLE_Instance_get_setting_as_real8array( & + self, & + name, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6527,7 +17273,12 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array(self, name, value, err_c value = f_ret_ptr end subroutine LIBMUSCLE_Instance_get_setting_as_real8array - subroutine LIBMUSCLE_Instance_get_setting_as_real8array2(self, name, value, err_code, err_msg) + subroutine LIBMUSCLE_Instance_get_setting_as_real8array2( & + self, & + name, & + value, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: name @@ -6584,7 +17335,8 @@ subroutine LIBMUSCLE_Instance_get_setting_as_real8array2(self, name, value, err_ value = f_ret_ptr end subroutine LIBMUSCLE_Instance_get_setting_as_real8array2 - function LIBMUSCLE_Instance_list_ports(self) + function LIBMUSCLE_Instance_list_ports( & + self) implicit none type(LIBMUSCLE_Instance), intent(in) :: self type(LIBMUSCLE_PortsDescription) :: LIBMUSCLE_Instance_list_ports @@ -6597,52 +17349,60 @@ function LIBMUSCLE_Instance_list_ports(self) LIBMUSCLE_Instance_list_ports%ptr = ret_val end function LIBMUSCLE_Instance_list_ports - function LIBMUSCLE_Instance_is_connected(self, port) + function LIBMUSCLE_Instance_is_connected( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port logical :: LIBMUSCLE_Instance_is_connected - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_is_connected_( & self%ptr, & port, int(len(port), c_size_t)) - LIBMUSCLE_Instance_is_connected = ret_val .ne. 0 + LIBMUSCLE_Instance_is_connected = ret_val end function LIBMUSCLE_Instance_is_connected - function LIBMUSCLE_Instance_is_vector_port(self, port) + function LIBMUSCLE_Instance_is_vector_port( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port logical :: LIBMUSCLE_Instance_is_vector_port - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_is_vector_port_( & self%ptr, & port, int(len(port), c_size_t)) - LIBMUSCLE_Instance_is_vector_port = ret_val .ne. 0 + LIBMUSCLE_Instance_is_vector_port = ret_val end function LIBMUSCLE_Instance_is_vector_port - function LIBMUSCLE_Instance_is_resizable(self, port) + function LIBMUSCLE_Instance_is_resizable( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port logical :: LIBMUSCLE_Instance_is_resizable - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = LIBMUSCLE_Instance_is_resizable_( & self%ptr, & port, int(len(port), c_size_t)) - LIBMUSCLE_Instance_is_resizable = ret_val .ne. 0 + LIBMUSCLE_Instance_is_resizable = ret_val end function LIBMUSCLE_Instance_is_resizable - function LIBMUSCLE_Instance_get_port_length(self, port) + function LIBMUSCLE_Instance_get_port_length( & + self, & + port) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port @@ -6656,7 +17416,10 @@ function LIBMUSCLE_Instance_get_port_length(self, port) LIBMUSCLE_Instance_get_port_length = ret_val end function LIBMUSCLE_Instance_get_port_length - subroutine LIBMUSCLE_Instance_set_port_length(self, port, length) + subroutine LIBMUSCLE_Instance_set_port_length( & + self, & + port, & + length) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port @@ -6668,7 +17431,10 @@ subroutine LIBMUSCLE_Instance_set_port_length(self, port, length) length) end subroutine LIBMUSCLE_Instance_set_port_length - subroutine LIBMUSCLE_Instance_send_pm(self, port_name, message) + subroutine LIBMUSCLE_Instance_send_pm( & + self, & + port_name, & + message) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6680,7 +17446,11 @@ subroutine LIBMUSCLE_Instance_send_pm(self, port_name, message) message%ptr) end subroutine LIBMUSCLE_Instance_send_pm - subroutine LIBMUSCLE_Instance_send_pms(self, port_name, message, slot) + subroutine LIBMUSCLE_Instance_send_pms( & + self, & + port_name, & + message, & + slot) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6694,7 +17464,11 @@ subroutine LIBMUSCLE_Instance_send_pms(self, port_name, message, slot) slot) end subroutine LIBMUSCLE_Instance_send_pms - function LIBMUSCLE_Instance_receive_p(self, port_name, err_code, err_msg) + function LIBMUSCLE_Instance_receive_p( & + self, & + port_name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6746,7 +17520,12 @@ function LIBMUSCLE_Instance_receive_p(self, port_name, err_code, err_msg) LIBMUSCLE_Instance_receive_p%ptr = ret_val end function LIBMUSCLE_Instance_receive_p - function LIBMUSCLE_Instance_receive_pd(self, port_name, default_msg, err_code, err_msg) + function LIBMUSCLE_Instance_receive_pd( & + self, & + port_name, & + default_msg, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6800,7 +17579,12 @@ function LIBMUSCLE_Instance_receive_pd(self, port_name, default_msg, err_code, e LIBMUSCLE_Instance_receive_pd%ptr = ret_val end function LIBMUSCLE_Instance_receive_pd - function LIBMUSCLE_Instance_receive_ps(self, port_name, slot, err_code, err_msg) + function LIBMUSCLE_Instance_receive_ps( & + self, & + port_name, & + slot, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6854,7 +17638,13 @@ function LIBMUSCLE_Instance_receive_ps(self, port_name, slot, err_code, err_msg) LIBMUSCLE_Instance_receive_ps%ptr = ret_val end function LIBMUSCLE_Instance_receive_ps - function LIBMUSCLE_Instance_receive_psd(self, port_name, slot, default_message, err_code, err_msg) + function LIBMUSCLE_Instance_receive_psd( & + self, & + port_name, & + slot, & + default_message, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6910,7 +17700,11 @@ function LIBMUSCLE_Instance_receive_psd(self, port_name, slot, default_message, LIBMUSCLE_Instance_receive_psd%ptr = ret_val end function LIBMUSCLE_Instance_receive_psd - function LIBMUSCLE_Instance_receive_with_settings_p(self, port_name, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_p( & + self, & + port_name, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -6962,7 +17756,12 @@ function LIBMUSCLE_Instance_receive_with_settings_p(self, port_name, err_code, e LIBMUSCLE_Instance_receive_with_settings_p%ptr = ret_val end function LIBMUSCLE_Instance_receive_with_settings_p - function LIBMUSCLE_Instance_receive_with_settings_pd(self, port_name, default_msg, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_pd( & + self, & + port_name, & + default_msg, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -7016,7 +17815,12 @@ function LIBMUSCLE_Instance_receive_with_settings_pd(self, port_name, default_ms LIBMUSCLE_Instance_receive_with_settings_pd%ptr = ret_val end function LIBMUSCLE_Instance_receive_with_settings_pd - function LIBMUSCLE_Instance_receive_with_settings_ps(self, port_name, slot, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_ps( & + self, & + port_name, & + slot, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -7070,7 +17874,13 @@ function LIBMUSCLE_Instance_receive_with_settings_ps(self, port_name, slot, err_ LIBMUSCLE_Instance_receive_with_settings_ps%ptr = ret_val end function LIBMUSCLE_Instance_receive_with_settings_ps - function LIBMUSCLE_Instance_receive_with_settings_psd(self, port_name, slot, default_msg, err_code, err_msg) + function LIBMUSCLE_Instance_receive_with_settings_psd( & + self, & + port_name, & + slot, & + default_msg, & + err_code, & + err_msg) implicit none type(LIBMUSCLE_Instance), intent(in) :: self character (len=*), intent(in) :: port_name @@ -7127,7 +17937,8 @@ function LIBMUSCLE_Instance_receive_with_settings_psd(self, port_name, slot, def end function LIBMUSCLE_Instance_receive_with_settings_psd - function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create(count) + function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create( & + count) implicit none integer, intent(in) :: count type(LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs) :: LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create @@ -7140,7 +17951,8 @@ function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create(count) LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create%ptr = ret_val end function LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_create - subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free(self) + subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free( & + self) implicit none type(LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs), intent(in) :: self @@ -7148,7 +17960,10 @@ subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free(self) self%ptr) end subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_free - subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg(self, i, arg) + subroutine LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs_set_arg( & + self, & + i, & + arg) implicit none type(LIBMUSCLE_IMPL_BINDINGS_CmdLineArgs), intent(in) :: self integer, intent(in) :: i diff --git a/libmuscle/fortran/src/libmuscle/tests/fortran_micro_model_test.f03 b/libmuscle/fortran/src/libmuscle/tests/fortran_micro_model_test.f03 index dbfbd1cd..cd63a53c 100644 --- a/libmuscle/fortran/src/libmuscle/tests/fortran_micro_model_test.f03 +++ b/libmuscle/fortran/src/libmuscle/tests/fortran_micro_model_test.f03 @@ -10,10 +10,14 @@ program micro_model type(LIBMUSCLE_PortsDescription) :: ports type(LIBMUSCLE_Instance) :: instance type(LIBMUSCLE_Message) :: msg - type(LIBMUSCLE_DataConstRef) :: rdata + type(LIBMUSCLE_DataConstRef) :: rdata, rdata2, rgrid type(LIBMUSCLE_Message) :: message - type(LIBMUSCLE_Data) :: sdata + type(LIBMUSCLE_Data) :: sdata, sgrid integer :: i, err_code + integer (LIBMUSCLE_size), dimension(2) :: rshape + real (LIBMUSCLE_real8), dimension(:, :), allocatable :: test_grid + integer (LIBMUSCLE_int8), dimension(2, 3) :: test_grid_data + character(len=14) :: reply logical :: is_int @@ -37,16 +41,37 @@ program micro_model msg = LIBMUSCLE_Instance_receive(instance, 'in') rdata = LIBMUSCLE_Message_get_data(msg) - call assert_eq_character(LIBMUSCLE_DataConstRef_as_character(rdata), 'testing') + rdata2 = LIBMUSCLE_DataConstRef_get_item(rdata, 'message') + call assert_eq_character(LIBMUSCLE_DataConstRef_as_character(rdata2), 'testing') + call LIBMUSCLE_DataConstRef_free(rdata2) + + rgrid = LIBMUSCLE_DataConstRef_get_item(rdata, 'test_grid') + call assert_true(LIBMUSCLE_DataConstref_is_a_grid_of_real8(rgrid)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(rgrid), 2_LIBMUSCLE_size) + call LIBMUSCLE_DataConstRef_shape(rgrid, rshape) + call assert_eq_size(rshape(1), 2_LIBMUSCLE_size) + call assert_eq_size(rshape(2), 3_LIBMUSCLE_size) + + allocate (test_grid(rshape(1), rshape(2))) + call LIBMUSCLE_DataConstRef_elements(rgrid, test_grid) + call assert_eq_real8(test_grid(1, 2), 2.0d0) + + deallocate (test_grid) + call LIBMUSCLE_DataConstRef_free(rgrid) call LIBMUSCLE_DataConstRef_free(rdata) ! O_F write (reply, '(A12, " ", I0)') 'testing back', i - sdata = LIBMUSCLE_Data_create(reply) + test_grid_data = int(reshape((/1, 4, 2, 5, 3, 6/), (/2, 3/)), LIBMUSCLE_int8) + sgrid = LIBMUSCLE_Data_create_grid(test_grid_data) + sdata = LIBMUSCLE_Data_create_dict() + call LIBMUSCLE_Data_set_item(sdata, 'reply', reply) + call LIBMUSCLE_Data_set_item(sdata, 'test_grid', sgrid) message = LIBMUSCLE_Message_create(LIBMUSCLE_Message_timestamp(msg), sdata) call LIBMUSCLE_Instance_send(instance, 'out', message) call LIBMUSCLE_Message_free(message) call LIBMUSCLE_Data_free(sdata) + call LIBMUSCLE_Data_free(sgrid) call LIBMUSCLE_Message_free(msg) i = i + 1 diff --git a/libmuscle/fortran/src/libmuscle/tests/test_fortran_api.f03 b/libmuscle/fortran/src/libmuscle/tests/test_data.f03 similarity index 50% rename from libmuscle/fortran/src/libmuscle/tests/test_fortran_api.f03 rename to libmuscle/fortran/src/libmuscle/tests/test_data.f03 index a9d1965a..6cb22ff1 100644 --- a/libmuscle/fortran/src/libmuscle/tests/test_fortran_api.f03 +++ b/libmuscle/fortran/src/libmuscle/tests/test_data.f03 @@ -127,7 +127,6 @@ subroutine test_data_basic_types call assert_eq_real8(LIBMUSCLE_Data_as_real8(d1), 3.1415926536d0) call LIBMUSCLE_Data_free(d1) print *, '[ OK ] data.real8' - end subroutine test_data_basic_types subroutine test_data_settings @@ -187,7 +186,6 @@ subroutine test_data_copy_assign print *, '[ OK ] data.assign' end subroutine test_data_copy_assign - subroutine test_data_dict use libmuscle @@ -244,7 +242,6 @@ subroutine test_data_dict print *, '[ OK ] data.dict' end subroutine test_data_dict - subroutine test_data_list use libmuscle @@ -336,6 +333,132 @@ subroutine test_data_list print *, '[ OK ] data.list_set_item' end subroutine test_data_list + subroutine test_data_grid + use libmuscle + + implicit none + integer, parameter :: int4 = LIBMUSCLE_int4 + integer, parameter :: int8 = LIBMUSCLE_int8 + integer, parameter :: sz = LIBMUSCLE_size + integer, parameter :: real4 = LIBMUSCLE_real4 + integer, parameter :: real8 = LIBMUSCLE_real8 + + logical, dimension(3) :: ad1, ad1_b + logical, dimension(2, 2, 2, 2, 2, 2, 2) :: ad7, ad7_b + integer (int4), dimension(1, 2, 1, 1, 1) :: ai45, ai45_b + integer (int8), dimension(2, 3, 4) :: ai83, ai83_b + real (real4), dimension(2, 3) :: ar42, ar42_b + real (real8), dimension(2, 2, 2, 2, 2, 3) :: ar86, ar86_b + + integer (sz), dimension(7) :: shp + + type(LIBMUSCLE_DataConstRef) :: d1 + type(LIBMUSCLE_Data) :: d2 + + print *, '[ RUN ] data.create_grid' + ad1 = (/.true., .false., .false./) + d1 = LIBMUSCLE_DataConstRef_create_grid(ad1) + call assert_true(LIBMUSCLE_DataConstRef_is_a_grid_of_logical(d1)) + call assert_false(LIBMUSCLE_DataConstRef_is_a_grid_of_int4(d1)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(d1), 1_sz) + call LIBMUSCLE_DataConstRef_shape(d1, shp) + call assert_eq_size(shp(1), 3_sz) + call assert_false(LIBMUSCLE_DataConstRef_has_indexes(d1)) + call LIBMUSCLE_DataConstRef_elements(d1, ad1_b) + call assert_true(all(ad1_b .eqv. ad1)) + call LIBMUSCLE_DataConstRef_free(d1) + + ad7 = reshape(spread(.true., 1, 128), (/2, 2, 2, 2, 2, 2, 2/)) + d1 = LIBMUSCLE_DataConstRef_create_grid(ad7) + call assert_true(LIBMUSCLE_DataConstRef_is_a_grid_of_logical(d1)) + call assert_false(LIBMUSCLE_DataConstRef_is_a_dict(d1)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(d1), 7_sz) + call LIBMUSCLE_DataConstRef_shape(d1, shp) + call assert_true(all(shp .eq. (/2, 2, 2, 2, 2, 2, 2/))) + call assert_false(LIBMUSCLE_DataConstRef_has_indexes(d1)) + call LIBMUSCLE_DataConstRef_elements(d1, ad7_b) + call assert_true(all(ad7 .eqv. ad7_b)) + call LIBMUSCLE_DataConstRef_free(d1) + + ai45 = reshape((/13_int4, 42_int4/), (/1, 2, 1, 1, 1/)) + d1 = LIBMUSCLE_DataConstRef_create_grid(ai45) + call assert_true(LIBMUSCLE_DataConstRef_is_a_grid_of_int4(d1)) + call assert_false(LIBMUSCLE_DataConstRef_is_a_int4(d1)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(d1), 5_sz) + call LIBMUSCLE_DataConstRef_shape(d1, shp) + call assert_true(all(shp(1:5) .eq. (/1, 2, 1, 1, 1/))) + call assert_false(LIBMUSCLE_DataConstRef_has_indexes(d1)) + call LIBMUSCLE_DataConstRef_elements(d1, ai45_b) + call assert_true(all(ai45 .eq. ai45_b)) + call LIBMUSCLE_DataConstRef_free(d1) + + ai83 = reshape(spread((/7_int8, -3_int8/), 1, 12), (/2, 3, 4/)) + d1 = LIBMUSCLE_DataConstRef_create_grid(ai83) + call assert_true(LIBMUSCLE_DataConstRef_is_a_grid_of_int8(d1)) + call assert_false(LIBMUSCLE_DataConstRef_is_a_character(d1)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(d1), 3_sz) + call LIBMUSCLE_DataConstRef_shape(d1, shp) + call assert_true(all(shp(1:3) .eq. (/2, 3, 4/))) + call assert_false(LIBMUSCLE_DataConstRef_has_indexes(d1)) + call LIBMUSCLE_DataConstRef_elements(d1, ai83_b) + call assert_true(all(ai83 .eq. ai83_b)) + call LIBMUSCLE_DataConstRef_free(d1) + + ar42 = reshape(spread((/3.3_real4, -7.6_real4/), 1, 3), (/2, 3/)) + d1 = LIBMUSCLE_DataConstRef_create_grid(ar42) + call assert_true(LIBMUSCLE_DataConstRef_is_a_grid_of_real4(d1)) + call assert_false(LIBMUSCLE_DataConstRef_is_a_logical(d1)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(d1), 2_sz) + call LIBMUSCLE_DataConstRef_shape(d1, shp) + call assert_true(all(shp(1:2) .eq. (/2, 3/))) + call assert_false(LIBMUSCLE_DataConstRef_has_indexes(d1)) + call LIBMUSCLE_DataConstRef_elements(d1, ar42_b) + call assert_true(all(ar42 .eq. ar42_b)) + call LIBMUSCLE_DataConstRef_free(d1) + + ar86 = reshape(spread(3.14_real8, 1, 96), (/2, 2, 2, 2, 2, 3/)) + d1 = LIBMUSCLE_DataConstRef_create_grid(ar86) + call assert_true(LIBMUSCLE_DataConstRef_is_a_grid_of_real8(d1)) + call assert_false(LIBMUSCLE_DataConstRef_is_a_byte_array(d1)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(d1), 6_sz) + call LIBMUSCLE_DataConstRef_shape(d1, shp) + call assert_true(all(shp(1:6) .eq. (/2, 2, 2, 2, 2, 3/))) + call assert_false(LIBMUSCLE_DataConstRef_has_indexes(d1)) + call LIBMUSCLE_DataConstRef_elements(d1, ar86_b) + call assert_true(all(ar86 .eq. ar86_b)) + call LIBMUSCLE_DataConstRef_free(d1) + + ! Data instead of DataConstRef + ai83 = reshape(spread((/7_int8, -3_int8/), 1, 12), (/2, 3, 4/)) + d2 = LIBMUSCLE_Data_create_grid(ai83) + call assert_true(LIBMUSCLE_Data_is_a_grid_of_int8(d2)) + call assert_false(LIBMUSCLE_Data_is_a_character(d2)) + call assert_eq_size(LIBMUSCLE_Data_num_dims(d2), 3_sz) + call LIBMUSCLE_Data_shape(d2, shp) + call assert_true(all(shp(1:3) .eq. (/2, 3, 4/))) + call assert_false(LIBMUSCLE_Data_has_indexes(d2)) + call LIBMUSCLE_Data_elements(d2, ai83_b) + call assert_true(all(ai83 .eq. ai83_b)) + call LIBMUSCLE_Data_free(d2) + + ! Indexes + ar42 = reshape(spread((/3.3_real4, -7.6_real4/), 1, 3), (/2, 3/)) + d1 = LIBMUSCLE_DataConstRef_create_grid(ar42, 'x', 'y') + call assert_true(LIBMUSCLE_DataConstRef_is_a_grid_of_real4(d1)) + call assert_false(LIBMUSCLE_DataConstRef_is_a_logical(d1)) + call assert_eq_size(LIBMUSCLE_DataConstRef_num_dims(d1), 2_sz) + call LIBMUSCLE_DataConstRef_shape(d1, shp) + call assert_true(all(shp(1:2) .eq. (/2, 3/))) + call assert_true(LIBMUSCLE_DataConstRef_has_indexes(d1)) + call assert_eq_character(LIBMUSCLE_DataConstRef_index(d1, 1_sz), 'x') + call assert_eq_character(LIBMUSCLE_DataConstRef_index(d1, 2_sz), 'y') + call LIBMUSCLE_DataConstRef_elements(d1, ar42_b) + call assert_true(all(ar42 .eq. ar42_b)) + call LIBMUSCLE_DataConstRef_free(d1) + + print *, '[ OK ] data.create_grid' + end subroutine test_data_grid + subroutine test_data_byte_array use libmuscle @@ -381,441 +504,25 @@ subroutine test_data_byte_array print *, '[ OK ] data.byte_array' end subroutine test_data_byte_array - - - subroutine test_data - call test_data_basic_types - call test_data_copy_assign - call test_data_dict - call test_data_list - call test_data_byte_array - call test_data_settings - end subroutine test_data - - - subroutine test_settings_create - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1 - - print *, '[ RUN ] settings.create' - s1 = YMMSL_Settings_create() - call assert_true(YMMSL_Settings_empty(s1)) - call YMMSL_Settings_free(s1) - print *, '[ OK ] settings.create' - end subroutine test_settings_create - - - subroutine test_settings_equals - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1, s2 - - print *, '[ RUN ] settings.equals' - s1 = YMMSL_Settings_create() - s2 = YMMSL_Settings_create() - call assert_true(YMMSL_Settings_equals(s1, s2)) - - call YMMSL_Settings_set(s1, 'key', 'value') - call assert_false(YMMSL_Settings_equals(s1, s2)) - - call YMMSL_Settings_set(s2, 'key', 'value') - call assert_true(YMMSL_Settings_equals(s1, s2)) - - call YMMSL_Settings_free(s1) - call YMMSL_Settings_free(s2) - print *, '[ OK ] settings.equals' - end subroutine test_settings_equals - - - subroutine test_settings_size - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1 - - print *, '[ RUN ] settings.size' - s1 = YMMSL_Settings_create() - - call assert_eq_size(YMMSL_Settings_size(s1), 0_YMMSL_size) - - call YMMSL_Settings_free(s1) - print *, '[ OK ] settings.size' - end subroutine test_settings_size - - - subroutine test_settings_set_get_as - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1 - real(YMMSL_real8), dimension(2) :: ra1, ra2 - real(YMMSL_real8), dimension(3, 2) :: ra3, ra4 - - print *, '[ RUN ] settings.set_get_as' - s1 = YMMSL_Settings_create() - ra1 = (/1.0d0, 2.0d0/) - ra3 = reshape((/1.0d0, 2.0d0, 3.0d0, 4.0d0, 5.0d0, 6.0d0/), (/3, 2/)) - - call YMMSL_Settings_set(s1, 'key1', 'value1') - call YMMSL_Settings_set(s1, 'key2', 42424242424242_YMMSL_int8) - call YMMSL_Settings_set(s1, 'key3', .false.) - call YMMSL_Settings_set(s1, 'key4', 13.13d0) - call YMMSL_Settings_set(s1, 'key5', ra1) - call YMMSL_Settings_set(s1, 'key6', ra3) - - call assert_true(YMMSL_Settings_contains(s1, 'key1')) - call assert_true(YMMSL_Settings_contains(s1, 'key2')) - call assert_true(YMMSL_Settings_contains(s1, 'key3')) - call assert_true(YMMSL_Settings_contains(s1, 'key4')) - call assert_true(YMMSL_Settings_contains(s1, 'key5')) - call assert_true(YMMSL_Settings_contains(s1, 'key6')) - call assert_false(YMMSL_Settings_contains(s1, 'nokey')) - - call assert_eq_character(YMMSL_Settings_get_as_character(s1, 'key1'), 'value1') - call assert_eq_int8(YMMSL_Settings_get_as_int8(s1, 'key2'), 42424242424242_YMMSL_int8) - call assert_eq_logical(YMMSL_Settings_get_as_logical(s1, 'key3'), .false.) - call assert_eq_real8(YMMSL_Settings_get_as_real8(s1, 'key4'), 13.13d0) - call YMMSL_Settings_get_as_real8array(s1, 'key5', ra2) - call assert_eq_real8array(ra2, ra1) - call YMMSL_Settings_get_as_real8array2(s1, 'key6', ra4) - call assert_eq_real8array2(ra4, ra3) - - call YMMSL_Settings_free(s1) - print *, '[ OK ] settings.set_get_as' - end subroutine test_settings_set_get_as - - - subroutine test_settings_is_a - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1 - real(YMMSL_real8), dimension(2) :: ra1 - real(YMMSL_real8), dimension(3, 2) :: ra2 - logical :: l1 - integer :: err_code - - print *, '[ RUN ] settings.is_a' - s1 = YMMSL_Settings_create() - ra1 = (/1.0d0, 2.0d0/) - ra2 = reshape((/1.0d0, 2.0d0, 3.0d0, 4.0d0, 5.0d0, 6.0d0/), (/3, 2/)) - - call YMMSL_Settings_set(s1, 'key1', 'value1') - call YMMSL_Settings_set(s1, 'key2', 42424242424242_YMMSL_int8) - call YMMSL_Settings_set(s1, 'key3', .false.) - call YMMSL_Settings_set(s1, 'key4', 13.13d0) - call YMMSL_Settings_set(s1, 'key5', ra1) - call YMMSL_Settings_set(s1, 'key6', ra2) - - call assert_true(YMMSL_Settings_is_a_character(s1, 'key1')) - call assert_true(YMMSL_Settings_is_a_int8(s1, 'key2')) - call assert_true(YMMSL_Settings_is_a_logical(s1, 'key3')) - call assert_true(YMMSL_Settings_is_a_real8(s1, 'key4')) - call assert_true(YMMSL_Settings_is_a_real8array(s1, 'key5')) - call assert_true(YMMSL_Settings_is_a_real8array2(s1, 'key6')) - - call assert_false(YMMSL_Settings_is_a_int8(s1, 'key1')) - call assert_false(YMMSL_Settings_is_a_logical(s1, 'key1')) - call assert_false(YMMSL_Settings_is_a_real8(s1, 'key1')) - call assert_false(YMMSL_Settings_is_a_real8array(s1, 'key1')) - call assert_false(YMMSL_Settings_is_a_real8array2(s1, 'key1')) - - l1 = YMMSL_Settings_is_a_logical(s1, 'nokey', err_code) - call assert_eq_integer(err_code, YMMSL_out_of_range) - - call YMMSL_Settings_free(s1) - print *, '[ OK ] settings.is_a' - end subroutine test_settings_is_a - - - subroutine test_settings_erase - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1 - - print *, '[ RUN ] settings.erase' - s1 = YMMSL_Settings_create() - call YMMSL_Settings_set(s1, 'key', 'value') - call assert_true(YMMSL_Settings_contains(s1, 'key')) - call assert_eq_size(YMMSL_Settings_erase(s1, 'key'), 1_YMMSL_size) - call assert_false(YMMSL_Settings_contains(s1, 'key')) - call assert_eq_size(YMMSL_Settings_erase(s1, 'key'), 0_YMMSL_size) - call YMMSL_Settings_free(s1) - print *, '[ OK ] settings.erase' - end subroutine test_settings_erase - - - subroutine test_settings_clear - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1 - - print *, '[ RUN ] settings.clear' - s1 = YMMSL_Settings_create() - call YMMSL_Settings_set(s1, 'key1', 'value') - call YMMSL_Settings_set(s1, 'key2', 42_YMMSL_int8) - - call assert_true(YMMSL_Settings_contains(s1, 'key1')) - call assert_true(YMMSL_Settings_contains(s1, 'key2')) - - call YMMSL_Settings_clear(s1) - - call assert_false(YMMSL_Settings_contains(s1, 'key1')) - call assert_false(YMMSL_Settings_contains(s1, 'key2')) - call assert_eq_size(YMMSL_Settings_size(s1), 0_YMMSL_size) - - call YMMSL_Settings_free(s1) - print *, '[ OK ] settings.clear' - end subroutine test_settings_clear - - - subroutine test_settings_key - use ymmsl - implicit none - - type(YMMSL_Settings) :: s1 - character(len=:), allocatable :: c1, c2, err_msg - integer :: err_code - - print *, '[ RUN ] settings.key' - s1 = YMMSL_Settings_create() - call YMMSL_Settings_set(s1, 'key1', 'value') - call YMMSL_Settings_set(s1, 'key2', 42_YMMSL_int8) - - c1 = YMMSL_Settings_key(s1, 1_YMMSL_size, err_code) - call assert_eq_integer(err_code, YMMSL_success) - c2 = YMMSL_Settings_key(s1, 2_YMMSL_size, err_code) - call assert_eq_integer(err_code, YMMSL_success) - - call assert_true((c1 .eq. 'key1') .or. (c1 .eq. 'key2')) - call assert_true((c2 .eq. 'key1') .or. (c2 .eq. 'key2')) - call assert_true(c1 .ne. c2) - - c1 = YMMSL_Settings_key(s1, 0_YMMSL_size, err_code, err_msg) - call assert_eq_integer(err_code, YMMSL_out_of_range) - - c1 = YMMSL_Settings_key(s1, 3_YMMSL_size, err_code) - call assert_eq_integer(err_code, YMMSL_out_of_range) - - deallocate(c1) - deallocate(c2) - call YMMSL_Settings_free(s1) - print *, '[ OK ] settings.key' - end subroutine test_settings_key - - - subroutine test_settings - call test_settings_create - call test_settings_equals - call test_settings_size - call test_settings_set_get_as - call test_settings_erase - call test_settings_clear - call test_settings_is_a - call test_settings_key - end subroutine test_settings - - subroutine test_message_create - use libmuscle - use ymmsl - implicit none - - type(LIBMUSCLE_Data) :: d1 - type(LIBMUSCLE_Message) :: m1 - type(YMMSL_Settings) :: s1 - - print *, '[ RUN ] message.create' - d1 = LIBMUSCLE_Data_create() - - m1 = LIBMUSCLE_Message_create(0.0d0, d1) - call LIBMUSCLE_Message_free(m1) - - m1 = LIBMUSCLE_Message_create(0.0d0, 1.0d0, d1) - call LIBMUSCLE_Message_free(m1) - - s1 = YMMSL_Settings_create() - m1 = LIBMUSCLE_Message_create(0.0d0, d1, s1) - call LIBMUSCLE_Message_free(m1) - call YMMSL_Settings_free(s1) - - s1 = YMMSL_Settings_create() - m1 = LIBMUSCLE_Message_create(0.0d0, 10.0d0, d1, s1) - call LIBMUSCLE_Message_free(m1) - call YMMSL_Settings_free(s1) - - call LIBMUSCLE_Data_free(d1) - print *, '[ OK ] message.create' - end subroutine test_message_create - - subroutine test_message_timestamps - use libmuscle - implicit none - - type(LIBMUSCLE_Data) :: d1 - type(LIBMUSCLE_Message) :: m1 - - print *, '[ RUN ] message.timestamps' - d1 = LIBMUSCLE_Data_create() - m1 = LIBMUSCLE_Message_create(23.4d0, d1) - - call assert_eq_real8(LIBMUSCLE_Message_timestamp(m1), 23.4d0) - call LIBMUSCLE_Message_set_timestamp(m1, 12.8d0) - call assert_eq_real8(LIBMUSCLE_Message_timestamp(m1), 12.8d0) - - call assert_false(LIBMUSCLE_Message_has_next_timestamp(m1)) - call LIBMUSCLE_Message_set_next_timestamp(m1, 101.0d0) - call assert_true(LIBMUSCLE_Message_has_next_timestamp(m1)) - call assert_eq_real8(LIBMUSCLE_Message_next_timestamp(m1), 101.0d0) - call LIBMUSCLE_Message_unset_next_timestamp(m1) - call assert_false(LIBMUSCLE_Message_has_next_timestamp(m1)) - - call LIBMUSCLE_Message_free(m1) - call LIBMUSCLE_Data_free(d1) - print *, '[ OK ] message.timestamps' - end subroutine test_message_timestamps - - subroutine test_message_data - use libmuscle - implicit none - - type(LIBMUSCLE_Data) :: d1, d2 - type(LIBMUSCLE_DataConstRef) :: d3 - type(LIBMUSCLE_Message) :: m1 - - print *, '[ RUN ] message.data' - d1 = LIBMUSCLE_Data_create('Testing') - m1 = LIBMUSCLE_Message_create(0.0d0, d1) - call LIBMUSCLE_Data_free(d1) - - d3 = LIBMUSCLE_Message_get_data(m1) - call assert_eq_character(LIBMUSCLE_DataConstRef_as_character(d3), 'Testing') - call LIBMUSCLE_DataConstRef_free(d3) - - d2 = LIBMUSCLE_Data_create(1001) - call LIBMUSCLE_Message_set_data(m1, d2) - call LIBMUSCLE_Data_free(d2) - - d3 = LIBMUSCLE_Message_get_data(m1) - call assert_eq_int4(LIBMUSCLE_DataConstRef_as_int4(d3), 1001_LIBMUSCLE_int4) - call LIBMUSCLE_DataConstRef_free(d3) - - d3 = LIBMUSCLE_DataConstRef_create('Still testing') - call LIBMUSCLE_Message_set_data(m1, d3) - call LIBMUSCLE_DataConstRef_free(d3) - - d3 = LIBMUSCLE_Message_get_data(m1) - call assert_eq_character(LIBMUSCLE_DataConstRef_as_character(d3), 'Still testing') - call LIBMUSCLE_DataConstRef_free(d3) - - call LIBMUSCLE_Message_free(m1) - print *, '[ OK ] message.data' - end subroutine test_message_data - - subroutine test_message_settings - use libmuscle - use ymmsl - implicit none - - type(LIBMUSCLE_Data) :: d1 - type(YMMSL_Settings) :: s1, s2 - type(LIBMUSCLE_Message) :: m1 - - print *, '[ RUN ] message.settings' - d1 = LIBMUSCLE_Data_create() - m1 = LIBMUSCLE_Message_create(0.0d0, d1) - call assert_false(LIBMUSCLE_Message_has_settings(m1)) - call LIBMUSCLE_Message_free(m1) - call LIBMUSCLE_Data_free(d1) - - d1 = LIBMUSCLE_Data_create() - s1 = YMMSL_Settings_create() - call YMMSL_Settings_set(s1, 'key', 'value') - m1 = LIBMUSCLE_Message_create(0.0d0, d1, s1) - call YMMSL_Settings_free(s1) - call LIBMUSCLE_Data_free(d1) - - call assert_true(LIBMUSCLE_Message_has_settings(m1)) - s2 = LIBMUSCLE_Message_get_settings(m1) - call assert_eq_character(YMMSL_Settings_get_as_character(s2, 'key'), 'value') - call YMMSL_Settings_free(s2) - - s1 = YMMSL_Settings_create() - call YMMSL_Settings_set(s1, 'key2', 'value2') - call LIBMUSCLE_Message_set_settings(m1, s1) - call YMMSL_Settings_free(s1) - - s2 = LIBMUSCLE_Message_get_settings(m1) - call assert_eq_character(YMMSL_Settings_get_as_character(s2, 'key2'), 'value2') - call YMMSL_Settings_free(s2) - - call LIBMUSCLE_Message_unset_settings(m1) - call assert_false(LIBMUSCLE_Message_has_settings(m1)) - - call LIBMUSCLE_Message_free(m1) - print *, '[ OK ] message.settings' - end subroutine test_message_settings - - subroutine test_message - call test_message_create - call test_message_timestamps - call test_message_data - call test_message_settings - end subroutine test_message - - subroutine test_operator - use ymmsl - - integer(YMMSL_Operator) :: o1 - - print *, '[ RUN ] operator.use' - o1 = YMMSL_Operator_NONE - o1 = YMMSL_Operator_F_INIT - o1 = YMMSL_Operator_O_I - o1 = YMMSL_Operator_S - o1 = YMMSL_Operator_B - o1 = YMMSL_Operator_O_F - print *, '[ OK ] operator.use' - end subroutine test_operator - - subroutine test_ports_description - use libmuscle - use ymmsl - implicit none - - type(LIBMUSCLE_PortsDescription) :: pd - - print *, '[ RUN ] ports_description.use' - pd = LIBMUSCLE_PortsDescription_create() - call assert_eq_size(LIBMUSCLE_PortsDescription_num_ports(pd, YMMSL_Operator_F_INIT), 0_LIBMUSCLE_size) - call LIBMUSCLE_PortsDescription_add(pd, YMMSL_Operator_F_INIT, 'init_state') - call assert_eq_size(LIBMUSCLE_PortsDescription_num_ports(pd, YMMSL_Operator_F_INIT), 1_LIBMUSCLE_size) - call assert_eq_character(LIBMUSCLE_PortsDescription_get(pd, YMMSL_Operator_F_INIT, 1_LIBMUSCLE_size), 'init_state') - call LIBMUSCLE_PortsDescription_free(pd) - print *, '[ OK ] ports_description.use' - end subroutine test_ports_description - end module tests -program test_fortran_api +program test_data use tests implicit none print *, '' - print *, '[==========] Fortran API test' - - call test_data - call test_settings - call test_operator - call test_message - call test_ports_description - - print *, '[==========] Fortran API test' - print *, '[ PASSED ] Fortran API test' + print *, '[==========] Fortran API Data' + + call test_data_basic_types + call test_data_copy_assign + call test_data_dict + call test_data_list + call test_data_grid + call test_data_byte_array + call test_data_settings + + print *, '[==========] Fortran API Data' + print *, '[ PASSED ] Fortran API Data' print *, '' -end program test_fortran_api +end program test_data diff --git a/libmuscle/fortran/src/libmuscle/tests/test_message.f03 b/libmuscle/fortran/src/libmuscle/tests/test_message.f03 new file mode 100644 index 00000000..43ca94cc --- /dev/null +++ b/libmuscle/fortran/src/libmuscle/tests/test_message.f03 @@ -0,0 +1,162 @@ +module tests + use assert + implicit none +contains + subroutine test_message_create + use libmuscle + use ymmsl + implicit none + + type(LIBMUSCLE_Data) :: d1 + type(LIBMUSCLE_Message) :: m1 + type(YMMSL_Settings) :: s1 + + print *, '[ RUN ] message.create' + d1 = LIBMUSCLE_Data_create() + + m1 = LIBMUSCLE_Message_create(0.0d0, d1) + call LIBMUSCLE_Message_free(m1) + + m1 = LIBMUSCLE_Message_create(0.0d0, 1.0d0, d1) + call LIBMUSCLE_Message_free(m1) + + s1 = YMMSL_Settings_create() + m1 = LIBMUSCLE_Message_create(0.0d0, d1, s1) + call LIBMUSCLE_Message_free(m1) + call YMMSL_Settings_free(s1) + + s1 = YMMSL_Settings_create() + m1 = LIBMUSCLE_Message_create(0.0d0, 10.0d0, d1, s1) + call LIBMUSCLE_Message_free(m1) + call YMMSL_Settings_free(s1) + + call LIBMUSCLE_Data_free(d1) + print *, '[ OK ] message.create' + end subroutine test_message_create + + subroutine test_message_timestamps + use libmuscle + implicit none + + type(LIBMUSCLE_Data) :: d1 + type(LIBMUSCLE_Message) :: m1 + + print *, '[ RUN ] message.timestamps' + d1 = LIBMUSCLE_Data_create() + m1 = LIBMUSCLE_Message_create(23.4d0, d1) + + call assert_eq_real8(LIBMUSCLE_Message_timestamp(m1), 23.4d0) + call LIBMUSCLE_Message_set_timestamp(m1, 12.8d0) + call assert_eq_real8(LIBMUSCLE_Message_timestamp(m1), 12.8d0) + + call assert_false(LIBMUSCLE_Message_has_next_timestamp(m1)) + call LIBMUSCLE_Message_set_next_timestamp(m1, 101.0d0) + call assert_true(LIBMUSCLE_Message_has_next_timestamp(m1)) + call assert_eq_real8(LIBMUSCLE_Message_next_timestamp(m1), 101.0d0) + call LIBMUSCLE_Message_unset_next_timestamp(m1) + call assert_false(LIBMUSCLE_Message_has_next_timestamp(m1)) + + call LIBMUSCLE_Message_free(m1) + call LIBMUSCLE_Data_free(d1) + print *, '[ OK ] message.timestamps' + end subroutine test_message_timestamps + + subroutine test_message_data + use libmuscle + implicit none + + type(LIBMUSCLE_Data) :: d1, d2 + type(LIBMUSCLE_DataConstRef) :: d3 + type(LIBMUSCLE_Message) :: m1 + + print *, '[ RUN ] message.data' + d1 = LIBMUSCLE_Data_create('Testing') + m1 = LIBMUSCLE_Message_create(0.0d0, d1) + call LIBMUSCLE_Data_free(d1) + + d3 = LIBMUSCLE_Message_get_data(m1) + call assert_eq_character(LIBMUSCLE_DataConstRef_as_character(d3), 'Testing') + call LIBMUSCLE_DataConstRef_free(d3) + + d2 = LIBMUSCLE_Data_create(1001) + call LIBMUSCLE_Message_set_data(m1, d2) + call LIBMUSCLE_Data_free(d2) + + d3 = LIBMUSCLE_Message_get_data(m1) + call assert_eq_int4(LIBMUSCLE_DataConstRef_as_int4(d3), 1001_LIBMUSCLE_int4) + call LIBMUSCLE_DataConstRef_free(d3) + + d3 = LIBMUSCLE_DataConstRef_create('Still testing') + call LIBMUSCLE_Message_set_data(m1, d3) + call LIBMUSCLE_DataConstRef_free(d3) + + d3 = LIBMUSCLE_Message_get_data(m1) + call assert_eq_character(LIBMUSCLE_DataConstRef_as_character(d3), 'Still testing') + call LIBMUSCLE_DataConstRef_free(d3) + + call LIBMUSCLE_Message_free(m1) + print *, '[ OK ] message.data' + end subroutine test_message_data + + subroutine test_message_settings + use libmuscle + use ymmsl + implicit none + + type(LIBMUSCLE_Data) :: d1 + type(YMMSL_Settings) :: s1, s2 + type(LIBMUSCLE_Message) :: m1 + + print *, '[ RUN ] message.settings' + d1 = LIBMUSCLE_Data_create() + m1 = LIBMUSCLE_Message_create(0.0d0, d1) + call assert_false(LIBMUSCLE_Message_has_settings(m1)) + call LIBMUSCLE_Message_free(m1) + call LIBMUSCLE_Data_free(d1) + + d1 = LIBMUSCLE_Data_create() + s1 = YMMSL_Settings_create() + call YMMSL_Settings_set(s1, 'key', 'value') + m1 = LIBMUSCLE_Message_create(0.0d0, d1, s1) + call YMMSL_Settings_free(s1) + call LIBMUSCLE_Data_free(d1) + + call assert_true(LIBMUSCLE_Message_has_settings(m1)) + s2 = LIBMUSCLE_Message_get_settings(m1) + call assert_eq_character(YMMSL_Settings_get_as_character(s2, 'key'), 'value') + call YMMSL_Settings_free(s2) + + s1 = YMMSL_Settings_create() + call YMMSL_Settings_set(s1, 'key2', 'value2') + call LIBMUSCLE_Message_set_settings(m1, s1) + call YMMSL_Settings_free(s1) + + s2 = LIBMUSCLE_Message_get_settings(m1) + call assert_eq_character(YMMSL_Settings_get_as_character(s2, 'key2'), 'value2') + call YMMSL_Settings_free(s2) + + call LIBMUSCLE_Message_unset_settings(m1) + call assert_false(LIBMUSCLE_Message_has_settings(m1)) + + call LIBMUSCLE_Message_free(m1) + print *, '[ OK ] message.settings' + end subroutine test_message_settings +end module tests + +program test_message + use tests + implicit none + + print *, '' + print *, '[==========] Fortran API Message' + + call test_message_create + call test_message_timestamps + call test_message_data + call test_message_settings + + print *, '[==========] Fortran API Message' + print *, '[ PASSED ] Fortran API Message' + print *, '' +end program test_message + diff --git a/libmuscle/fortran/src/libmuscle/tests/test_operator.f03 b/libmuscle/fortran/src/libmuscle/tests/test_operator.f03 new file mode 100644 index 00000000..42fa9b30 --- /dev/null +++ b/libmuscle/fortran/src/libmuscle/tests/test_operator.f03 @@ -0,0 +1,34 @@ +module tests + use assert + implicit none +contains + subroutine test_operator_use + use ymmsl + + integer(YMMSL_Operator) :: o1 + + print *, '[ RUN ] operator.use' + o1 = YMMSL_Operator_NONE + o1 = YMMSL_Operator_F_INIT + o1 = YMMSL_Operator_O_I + o1 = YMMSL_Operator_S + o1 = YMMSL_Operator_B + o1 = YMMSL_Operator_O_F + print *, '[ OK ] operator.use' + end subroutine test_operator_use +end module tests + +program test_operator + use tests + implicit none + + print *, '' + print *, '[==========] Fortran API Operator' + + call test_operator_use + + print *, '[==========] Fortran API Operator' + print *, '[ PASSED ] Fortran API Operator' + print *, '' +end program test_operator + diff --git a/libmuscle/fortran/src/libmuscle/tests/test_ports_description.f03 b/libmuscle/fortran/src/libmuscle/tests/test_ports_description.f03 new file mode 100644 index 00000000..e53f1caa --- /dev/null +++ b/libmuscle/fortran/src/libmuscle/tests/test_ports_description.f03 @@ -0,0 +1,36 @@ +module tests + use assert + implicit none +contains + subroutine test_ports_description_use + use libmuscle + use ymmsl + implicit none + + type(LIBMUSCLE_PortsDescription) :: pd + + print *, '[ RUN ] ports_description.use' + pd = LIBMUSCLE_PortsDescription_create() + call assert_eq_size(LIBMUSCLE_PortsDescription_num_ports(pd, YMMSL_Operator_F_INIT), 0_LIBMUSCLE_size) + call LIBMUSCLE_PortsDescription_add(pd, YMMSL_Operator_F_INIT, 'init_state') + call assert_eq_size(LIBMUSCLE_PortsDescription_num_ports(pd, YMMSL_Operator_F_INIT), 1_LIBMUSCLE_size) + call assert_eq_character(LIBMUSCLE_PortsDescription_get(pd, YMMSL_Operator_F_INIT, 1_LIBMUSCLE_size), 'init_state') + call LIBMUSCLE_PortsDescription_free(pd) + print *, '[ OK ] ports_description.use' + end subroutine test_ports_description_use +end module tests + +program test_ports_description + use tests + implicit none + + print *, '' + print *, '[==========] Fortran API PortsDescription' + + call test_ports_description_use + + print *, '[==========] Fortran API PortsDescription' + print *, '[ PASSED ] Fortran API PortsDescription' + print *, '' +end program test_ports_description + diff --git a/libmuscle/fortran/src/libmuscle/tests/test_settings.f03 b/libmuscle/fortran/src/libmuscle/tests/test_settings.f03 new file mode 100644 index 00000000..5de4dc68 --- /dev/null +++ b/libmuscle/fortran/src/libmuscle/tests/test_settings.f03 @@ -0,0 +1,234 @@ +module tests + use assert + implicit none +contains + subroutine test_settings_create + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1 + + print *, '[ RUN ] settings.create' + s1 = YMMSL_Settings_create() + call assert_true(YMMSL_Settings_empty(s1)) + call YMMSL_Settings_free(s1) + print *, '[ OK ] settings.create' + end subroutine test_settings_create + + subroutine test_settings_equals + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1, s2 + + print *, '[ RUN ] settings.equals' + s1 = YMMSL_Settings_create() + s2 = YMMSL_Settings_create() + call assert_true(YMMSL_Settings_equals(s1, s2)) + + call YMMSL_Settings_set(s1, 'key', 'value') + call assert_false(YMMSL_Settings_equals(s1, s2)) + + call YMMSL_Settings_set(s2, 'key', 'value') + call assert_true(YMMSL_Settings_equals(s1, s2)) + + call YMMSL_Settings_free(s1) + call YMMSL_Settings_free(s2) + print *, '[ OK ] settings.equals' + end subroutine test_settings_equals + + subroutine test_settings_size + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1 + + print *, '[ RUN ] settings.size' + s1 = YMMSL_Settings_create() + + call assert_eq_size(YMMSL_Settings_size(s1), 0_YMMSL_size) + + call YMMSL_Settings_free(s1) + print *, '[ OK ] settings.size' + end subroutine test_settings_size + + subroutine test_settings_set_get_as + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1 + real(YMMSL_real8), dimension(2) :: ra1, ra2 + real(YMMSL_real8), dimension(3, 2) :: ra3, ra4 + + print *, '[ RUN ] settings.set_get_as' + s1 = YMMSL_Settings_create() + ra1 = (/1.0d0, 2.0d0/) + ra3 = reshape((/1.0d0, 2.0d0, 3.0d0, 4.0d0, 5.0d0, 6.0d0/), (/3, 2/)) + + call YMMSL_Settings_set(s1, 'key1', 'value1') + call YMMSL_Settings_set(s1, 'key2', 42424242424242_YMMSL_int8) + call YMMSL_Settings_set(s1, 'key3', .false.) + call YMMSL_Settings_set(s1, 'key4', 13.13d0) + call YMMSL_Settings_set(s1, 'key5', ra1) + call YMMSL_Settings_set(s1, 'key6', ra3) + + call assert_true(YMMSL_Settings_contains(s1, 'key1')) + call assert_true(YMMSL_Settings_contains(s1, 'key2')) + call assert_true(YMMSL_Settings_contains(s1, 'key3')) + call assert_true(YMMSL_Settings_contains(s1, 'key4')) + call assert_true(YMMSL_Settings_contains(s1, 'key5')) + call assert_true(YMMSL_Settings_contains(s1, 'key6')) + call assert_false(YMMSL_Settings_contains(s1, 'nokey')) + + call assert_eq_character(YMMSL_Settings_get_as_character(s1, 'key1'), 'value1') + call assert_eq_int8(YMMSL_Settings_get_as_int8(s1, 'key2'), 42424242424242_YMMSL_int8) + call assert_eq_logical(YMMSL_Settings_get_as_logical(s1, 'key3'), .false.) + call assert_eq_real8(YMMSL_Settings_get_as_real8(s1, 'key4'), 13.13d0) + call YMMSL_Settings_get_as_real8array(s1, 'key5', ra2) + call assert_eq_real8array(ra2, ra1) + call YMMSL_Settings_get_as_real8array2(s1, 'key6', ra4) + call assert_eq_real8array2(ra4, ra3) + + call YMMSL_Settings_free(s1) + print *, '[ OK ] settings.set_get_as' + end subroutine test_settings_set_get_as + + subroutine test_settings_is_a + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1 + real(YMMSL_real8), dimension(2) :: ra1 + real(YMMSL_real8), dimension(3, 2) :: ra2 + logical :: l1 + integer :: err_code + + print *, '[ RUN ] settings.is_a' + s1 = YMMSL_Settings_create() + ra1 = (/1.0d0, 2.0d0/) + ra2 = reshape((/1.0d0, 2.0d0, 3.0d0, 4.0d0, 5.0d0, 6.0d0/), (/3, 2/)) + + call YMMSL_Settings_set(s1, 'key1', 'value1') + call YMMSL_Settings_set(s1, 'key2', 42424242424242_YMMSL_int8) + call YMMSL_Settings_set(s1, 'key3', .false.) + call YMMSL_Settings_set(s1, 'key4', 13.13d0) + call YMMSL_Settings_set(s1, 'key5', ra1) + call YMMSL_Settings_set(s1, 'key6', ra2) + + call assert_true(YMMSL_Settings_is_a_character(s1, 'key1')) + call assert_true(YMMSL_Settings_is_a_int8(s1, 'key2')) + call assert_true(YMMSL_Settings_is_a_logical(s1, 'key3')) + call assert_true(YMMSL_Settings_is_a_real8(s1, 'key4')) + call assert_true(YMMSL_Settings_is_a_real8array(s1, 'key5')) + call assert_true(YMMSL_Settings_is_a_real8array2(s1, 'key6')) + + call assert_false(YMMSL_Settings_is_a_int8(s1, 'key1')) + call assert_false(YMMSL_Settings_is_a_logical(s1, 'key1')) + call assert_false(YMMSL_Settings_is_a_real8(s1, 'key1')) + call assert_false(YMMSL_Settings_is_a_real8array(s1, 'key1')) + call assert_false(YMMSL_Settings_is_a_real8array2(s1, 'key1')) + + l1 = YMMSL_Settings_is_a_logical(s1, 'nokey', err_code) + call assert_eq_integer(err_code, YMMSL_out_of_range) + + call YMMSL_Settings_free(s1) + print *, '[ OK ] settings.is_a' + end subroutine test_settings_is_a + + subroutine test_settings_erase + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1 + + print *, '[ RUN ] settings.erase' + s1 = YMMSL_Settings_create() + call YMMSL_Settings_set(s1, 'key', 'value') + call assert_true(YMMSL_Settings_contains(s1, 'key')) + call assert_eq_size(YMMSL_Settings_erase(s1, 'key'), 1_YMMSL_size) + call assert_false(YMMSL_Settings_contains(s1, 'key')) + call assert_eq_size(YMMSL_Settings_erase(s1, 'key'), 0_YMMSL_size) + call YMMSL_Settings_free(s1) + print *, '[ OK ] settings.erase' + end subroutine test_settings_erase + + subroutine test_settings_clear + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1 + + print *, '[ RUN ] settings.clear' + s1 = YMMSL_Settings_create() + call YMMSL_Settings_set(s1, 'key1', 'value') + call YMMSL_Settings_set(s1, 'key2', 42_YMMSL_int8) + + call assert_true(YMMSL_Settings_contains(s1, 'key1')) + call assert_true(YMMSL_Settings_contains(s1, 'key2')) + + call YMMSL_Settings_clear(s1) + + call assert_false(YMMSL_Settings_contains(s1, 'key1')) + call assert_false(YMMSL_Settings_contains(s1, 'key2')) + call assert_eq_size(YMMSL_Settings_size(s1), 0_YMMSL_size) + + call YMMSL_Settings_free(s1) + print *, '[ OK ] settings.clear' + end subroutine test_settings_clear + + subroutine test_settings_key + use ymmsl + implicit none + + type(YMMSL_Settings) :: s1 + character(len=:), allocatable :: c1, c2, err_msg + integer :: err_code + + print *, '[ RUN ] settings.key' + s1 = YMMSL_Settings_create() + call YMMSL_Settings_set(s1, 'key1', 'value') + call YMMSL_Settings_set(s1, 'key2', 42_YMMSL_int8) + + c1 = YMMSL_Settings_key(s1, 1_YMMSL_size, err_code) + call assert_eq_integer(err_code, YMMSL_success) + c2 = YMMSL_Settings_key(s1, 2_YMMSL_size, err_code) + call assert_eq_integer(err_code, YMMSL_success) + + call assert_true((c1 .eq. 'key1') .or. (c1 .eq. 'key2')) + call assert_true((c2 .eq. 'key1') .or. (c2 .eq. 'key2')) + call assert_true(c1 .ne. c2) + + c1 = YMMSL_Settings_key(s1, 0_YMMSL_size, err_code, err_msg) + call assert_eq_integer(err_code, YMMSL_out_of_range) + + c1 = YMMSL_Settings_key(s1, 3_YMMSL_size, err_code) + call assert_eq_integer(err_code, YMMSL_out_of_range) + + deallocate(c1) + deallocate(c2) + call YMMSL_Settings_free(s1) + print *, '[ OK ] settings.key' + end subroutine test_settings_key +end module tests + +program test_settings + use tests + implicit none + + print *, '' + print *, '[==========] Fortran API Settings' + + call test_settings_create + call test_settings_equals + call test_settings_size + call test_settings_set_get_as + call test_settings_erase + call test_settings_clear + call test_settings_is_a + call test_settings_key + + print *, '[==========] Fortran API Settings' + print *, '[ PASSED ] Fortran API Settings' + print *, '' +end program test_settings + diff --git a/libmuscle/fortran/src/ymmsl/ymmsl.f03 b/libmuscle/fortran/src/ymmsl/ymmsl.f03 index f679527f..cdeec328 100644 --- a/libmuscle/fortran/src/ymmsl/ymmsl.f03 +++ b/libmuscle/fortran/src/ymmsl/ymmsl.f03 @@ -66,23 +66,22 @@ module ymmsl interface - integer (c_intptr_t) function YMMSL_Settings_create_( & - ) & + integer (c_intptr_t) function YMMSL_Settings_create_() & bind(C, name="YMMSL_Settings_create_") use iso_c_binding end function YMMSL_Settings_create_ - subroutine YMMSL_Settings_free_( & - self) & + subroutine YMMSL_Settings_free_(self) & bind(C, name="YMMSL_Settings_free_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end subroutine YMMSL_Settings_free_ - integer (c_int) function YMMSL_Settings_equals_( & - self, other) & + logical (c_bool) function YMMSL_Settings_equals_( & + self, & + other) & bind(C, name="YMMSL_Settings_equals_") use iso_c_binding @@ -90,24 +89,27 @@ integer (c_int) function YMMSL_Settings_equals_( & integer (c_intptr_t), value, intent(in) :: other end function YMMSL_Settings_equals_ - integer (c_size_t) function YMMSL_Settings_size_( & - self) & + integer (c_size_t) function YMMSL_Settings_size_(self) & bind(C, name="YMMSL_Settings_size_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function YMMSL_Settings_size_ - integer (c_int) function YMMSL_Settings_empty_( & - self) & + logical (c_bool) function YMMSL_Settings_empty_(self) & bind(C, name="YMMSL_Settings_empty_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self end function YMMSL_Settings_empty_ - integer (c_int) function YMMSL_Settings_is_a_character_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function YMMSL_Settings_is_a_character_( & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_is_a_character_") use iso_c_binding @@ -119,8 +121,13 @@ integer (c_int) function YMMSL_Settings_is_a_character_( & integer (c_size_t), intent(out) :: err_msg_len end function YMMSL_Settings_is_a_character_ - integer (c_int) function YMMSL_Settings_is_a_int8_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function YMMSL_Settings_is_a_int8_( & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_is_a_int8_") use iso_c_binding @@ -132,8 +139,13 @@ integer (c_int) function YMMSL_Settings_is_a_int8_( & integer (c_size_t), intent(out) :: err_msg_len end function YMMSL_Settings_is_a_int8_ - integer (c_int) function YMMSL_Settings_is_a_real8_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function YMMSL_Settings_is_a_real8_( & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_is_a_real8_") use iso_c_binding @@ -145,8 +157,13 @@ integer (c_int) function YMMSL_Settings_is_a_real8_( & integer (c_size_t), intent(out) :: err_msg_len end function YMMSL_Settings_is_a_real8_ - integer (c_int) function YMMSL_Settings_is_a_logical_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function YMMSL_Settings_is_a_logical_( & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_is_a_logical_") use iso_c_binding @@ -158,8 +175,13 @@ integer (c_int) function YMMSL_Settings_is_a_logical_( & integer (c_size_t), intent(out) :: err_msg_len end function YMMSL_Settings_is_a_logical_ - integer (c_int) function YMMSL_Settings_is_a_real8array_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function YMMSL_Settings_is_a_real8array_( & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_is_a_real8array_") use iso_c_binding @@ -171,8 +193,13 @@ integer (c_int) function YMMSL_Settings_is_a_real8array_( & integer (c_size_t), intent(out) :: err_msg_len end function YMMSL_Settings_is_a_real8array_ - integer (c_int) function YMMSL_Settings_is_a_real8array2_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function YMMSL_Settings_is_a_real8array2_( & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_is_a_real8array2_") use iso_c_binding @@ -185,7 +212,11 @@ integer (c_int) function YMMSL_Settings_is_a_real8array2_( & end function YMMSL_Settings_is_a_real8array2_ subroutine YMMSL_Settings_set_character_( & - self, key, key_size, value, value_size) & + self, & + key, & + key_size, & + value, & + value_size) & bind(C, name="YMMSL_Settings_set_character_") use iso_c_binding @@ -197,7 +228,10 @@ subroutine YMMSL_Settings_set_character_( & end subroutine YMMSL_Settings_set_character_ subroutine YMMSL_Settings_set_int8_( & - self, key, key_size, value) & + self, & + key, & + key_size, & + value) & bind(C, name="YMMSL_Settings_set_int8_") use iso_c_binding @@ -208,7 +242,10 @@ subroutine YMMSL_Settings_set_int8_( & end subroutine YMMSL_Settings_set_int8_ subroutine YMMSL_Settings_set_real8_( & - self, key, key_size, value) & + self, & + key, & + key_size, & + value) & bind(C, name="YMMSL_Settings_set_real8_") use iso_c_binding @@ -219,18 +256,25 @@ subroutine YMMSL_Settings_set_real8_( & end subroutine YMMSL_Settings_set_real8_ subroutine YMMSL_Settings_set_logical_( & - self, key, key_size, value) & + self, & + key, & + key_size, & + value) & bind(C, name="YMMSL_Settings_set_logical_") use iso_c_binding integer (c_intptr_t), value, intent(in) :: self character, intent(in) :: key integer (c_size_t), value, intent(in) :: key_size - integer (c_int), value, intent(in) :: value + logical (c_bool), value, intent(in) :: value end subroutine YMMSL_Settings_set_logical_ subroutine YMMSL_Settings_set_real8array_( & - self, key, key_size, value, value_size) & + self, & + key, & + key_size, & + value, & + value_size) & bind(C, name="YMMSL_Settings_set_real8array_") use iso_c_binding @@ -242,7 +286,11 @@ subroutine YMMSL_Settings_set_real8array_( & end subroutine YMMSL_Settings_set_real8array_ subroutine YMMSL_Settings_set_real8array2_( & - self, key, key_size, value, value_shape) & + self, & + key, & + key_size, & + value, & + value_shape) & bind(C, name="YMMSL_Settings_set_real8array2_") use iso_c_binding @@ -254,7 +302,14 @@ subroutine YMMSL_Settings_set_real8array2_( & end subroutine YMMSL_Settings_set_real8array2_ subroutine YMMSL_Settings_get_as_character_( & - self, key, key_size, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_get_as_character_") use iso_c_binding @@ -269,7 +324,12 @@ subroutine YMMSL_Settings_get_as_character_( & end subroutine YMMSL_Settings_get_as_character_ integer (c_int64_t) function YMMSL_Settings_get_as_int8_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_get_as_int8_") use iso_c_binding @@ -282,7 +342,12 @@ integer (c_int64_t) function YMMSL_Settings_get_as_int8_( & end function YMMSL_Settings_get_as_int8_ real (c_double) function YMMSL_Settings_get_as_real8_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_get_as_real8_") use iso_c_binding @@ -294,8 +359,13 @@ real (c_double) function YMMSL_Settings_get_as_real8_( & integer (c_size_t), intent(out) :: err_msg_len end function YMMSL_Settings_get_as_real8_ - integer (c_int) function YMMSL_Settings_get_as_logical_( & - self, key, key_size, err_code, err_msg, err_msg_len) & + logical (c_bool) function YMMSL_Settings_get_as_logical_( & + self, & + key, & + key_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_get_as_logical_") use iso_c_binding @@ -308,7 +378,14 @@ integer (c_int) function YMMSL_Settings_get_as_logical_( & end function YMMSL_Settings_get_as_logical_ subroutine YMMSL_Settings_get_as_real8array_( & - self, key, key_size, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_get_as_real8array_") use iso_c_binding @@ -323,7 +400,14 @@ subroutine YMMSL_Settings_get_as_real8array_( & end subroutine YMMSL_Settings_get_as_real8array_ subroutine YMMSL_Settings_get_as_real8array2_( & - self, key, key_size, ret_val, ret_val_shape, err_code, err_msg, err_msg_len) & + self, & + key, & + key_size, & + ret_val, & + ret_val_shape, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_get_as_real8array2_") use iso_c_binding @@ -337,8 +421,10 @@ subroutine YMMSL_Settings_get_as_real8array2_( & integer (c_size_t), intent(out) :: err_msg_len end subroutine YMMSL_Settings_get_as_real8array2_ - integer (c_int) function YMMSL_Settings_contains_( & - self, key, key_size) & + logical (c_bool) function YMMSL_Settings_contains_( & + self, & + key, & + key_size) & bind(C, name="YMMSL_Settings_contains_") use iso_c_binding @@ -348,7 +434,9 @@ integer (c_int) function YMMSL_Settings_contains_( & end function YMMSL_Settings_contains_ integer (c_size_t) function YMMSL_Settings_erase_( & - self, key, key_size) & + self, & + key, & + key_size) & bind(C, name="YMMSL_Settings_erase_") use iso_c_binding @@ -357,8 +445,7 @@ integer (c_size_t) function YMMSL_Settings_erase_( & integer (c_size_t), value, intent(in) :: key_size end function YMMSL_Settings_erase_ - subroutine YMMSL_Settings_clear_( & - self) & + subroutine YMMSL_Settings_clear_(self) & bind(C, name="YMMSL_Settings_clear_") use iso_c_binding @@ -366,7 +453,13 @@ subroutine YMMSL_Settings_clear_( & end subroutine YMMSL_Settings_clear_ subroutine YMMSL_Settings_key_( & - self, i, ret_val, ret_val_size, err_code, err_msg, err_msg_len) & + self, & + i, & + ret_val, & + ret_val_size, & + err_code, & + err_msg, & + err_msg_len) & bind(C, name="YMMSL_Settings_key_") use iso_c_binding @@ -394,7 +487,8 @@ end subroutine YMMSL_Settings_key_ contains - function YMMSL_Settings_create() + function YMMSL_Settings_create( & + ) implicit none type(YMMSL_Settings) :: YMMSL_Settings_create @@ -406,7 +500,8 @@ function YMMSL_Settings_create() YMMSL_Settings_create%ptr = ret_val end function YMMSL_Settings_create - subroutine YMMSL_Settings_free(self) + subroutine YMMSL_Settings_free( & + self) implicit none type(YMMSL_Settings), intent(in) :: self @@ -414,22 +509,25 @@ subroutine YMMSL_Settings_free(self) self%ptr) end subroutine YMMSL_Settings_free - function YMMSL_Settings_equals(self, other) + function YMMSL_Settings_equals( & + self, & + other) implicit none type(YMMSL_Settings), intent(in) :: self type(YMMSL_Settings), intent(in) :: other logical :: YMMSL_Settings_equals - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = YMMSL_Settings_equals_( & self%ptr, & other%ptr) - YMMSL_Settings_equals = ret_val .ne. 0 + YMMSL_Settings_equals = ret_val end function YMMSL_Settings_equals - function YMMSL_Settings_size(self) + function YMMSL_Settings_size( & + self) implicit none type(YMMSL_Settings), intent(in) :: self integer (YMMSL_size) :: YMMSL_Settings_size @@ -441,20 +539,25 @@ function YMMSL_Settings_size(self) YMMSL_Settings_size = ret_val end function YMMSL_Settings_size - function YMMSL_Settings_empty(self) + function YMMSL_Settings_empty( & + self) implicit none type(YMMSL_Settings), intent(in) :: self logical :: YMMSL_Settings_empty - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = YMMSL_Settings_empty_( & self%ptr) - YMMSL_Settings_empty = ret_val .ne. 0 + YMMSL_Settings_empty = ret_val end function YMMSL_Settings_empty - function YMMSL_Settings_is_a_character(self, key, err_code, err_msg) + function YMMSL_Settings_is_a_character( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -462,7 +565,7 @@ function YMMSL_Settings_is_a_character(self, key, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: YMMSL_Settings_is_a_character - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -503,10 +606,14 @@ function YMMSL_Settings_is_a_character(self, key, err_code, err_msg) end if end if - YMMSL_Settings_is_a_character = ret_val .ne. 0 + YMMSL_Settings_is_a_character = ret_val end function YMMSL_Settings_is_a_character - function YMMSL_Settings_is_a_int8(self, key, err_code, err_msg) + function YMMSL_Settings_is_a_int8( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -514,7 +621,7 @@ function YMMSL_Settings_is_a_int8(self, key, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: YMMSL_Settings_is_a_int8 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -555,10 +662,14 @@ function YMMSL_Settings_is_a_int8(self, key, err_code, err_msg) end if end if - YMMSL_Settings_is_a_int8 = ret_val .ne. 0 + YMMSL_Settings_is_a_int8 = ret_val end function YMMSL_Settings_is_a_int8 - function YMMSL_Settings_is_a_real8(self, key, err_code, err_msg) + function YMMSL_Settings_is_a_real8( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -566,7 +677,7 @@ function YMMSL_Settings_is_a_real8(self, key, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: YMMSL_Settings_is_a_real8 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -607,10 +718,14 @@ function YMMSL_Settings_is_a_real8(self, key, err_code, err_msg) end if end if - YMMSL_Settings_is_a_real8 = ret_val .ne. 0 + YMMSL_Settings_is_a_real8 = ret_val end function YMMSL_Settings_is_a_real8 - function YMMSL_Settings_is_a_logical(self, key, err_code, err_msg) + function YMMSL_Settings_is_a_logical( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -618,7 +733,7 @@ function YMMSL_Settings_is_a_logical(self, key, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: YMMSL_Settings_is_a_logical - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -659,10 +774,14 @@ function YMMSL_Settings_is_a_logical(self, key, err_code, err_msg) end if end if - YMMSL_Settings_is_a_logical = ret_val .ne. 0 + YMMSL_Settings_is_a_logical = ret_val end function YMMSL_Settings_is_a_logical - function YMMSL_Settings_is_a_real8array(self, key, err_code, err_msg) + function YMMSL_Settings_is_a_real8array( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -670,7 +789,7 @@ function YMMSL_Settings_is_a_real8array(self, key, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: YMMSL_Settings_is_a_real8array - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -711,10 +830,14 @@ function YMMSL_Settings_is_a_real8array(self, key, err_code, err_msg) end if end if - YMMSL_Settings_is_a_real8array = ret_val .ne. 0 + YMMSL_Settings_is_a_real8array = ret_val end function YMMSL_Settings_is_a_real8array - function YMMSL_Settings_is_a_real8array2(self, key, err_code, err_msg) + function YMMSL_Settings_is_a_real8array2( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -722,7 +845,7 @@ function YMMSL_Settings_is_a_real8array2(self, key, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: YMMSL_Settings_is_a_real8array2 - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -763,10 +886,13 @@ function YMMSL_Settings_is_a_real8array2(self, key, err_code, err_msg) end if end if - YMMSL_Settings_is_a_real8array2 = ret_val .ne. 0 + YMMSL_Settings_is_a_real8array2 = ret_val end function YMMSL_Settings_is_a_real8array2 - subroutine YMMSL_Settings_set_character(self, key, value) + subroutine YMMSL_Settings_set_character( & + self, & + key, & + value) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -778,7 +904,10 @@ subroutine YMMSL_Settings_set_character(self, key, value) value, int(len(value), c_size_t)) end subroutine YMMSL_Settings_set_character - subroutine YMMSL_Settings_set_int8(self, key, value) + subroutine YMMSL_Settings_set_int8( & + self, & + key, & + value) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -790,7 +919,10 @@ subroutine YMMSL_Settings_set_int8(self, key, value) value) end subroutine YMMSL_Settings_set_int8 - subroutine YMMSL_Settings_set_real8(self, key, value) + subroutine YMMSL_Settings_set_real8( & + self, & + key, & + value) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -802,7 +934,10 @@ subroutine YMMSL_Settings_set_real8(self, key, value) value) end subroutine YMMSL_Settings_set_real8 - subroutine YMMSL_Settings_set_logical(self, key, value) + subroutine YMMSL_Settings_set_logical( & + self, & + key, & + value) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -811,10 +946,13 @@ subroutine YMMSL_Settings_set_logical(self, key, value) call YMMSL_Settings_set_logical_( & self%ptr, & key, int(len(key), c_size_t), & - merge(1, 0, value)) + logical(value, c_bool)) end subroutine YMMSL_Settings_set_logical - subroutine YMMSL_Settings_set_real8array(self, key, value) + subroutine YMMSL_Settings_set_real8array( & + self, & + key, & + value) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -826,7 +964,10 @@ subroutine YMMSL_Settings_set_real8array(self, key, value) value, int(size(value), c_size_t)) end subroutine YMMSL_Settings_set_real8array - subroutine YMMSL_Settings_set_real8array2(self, key, value) + subroutine YMMSL_Settings_set_real8array2( & + self, & + key, & + value) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -838,7 +979,11 @@ subroutine YMMSL_Settings_set_real8array2(self, key, value) value, int(shape(value), c_size_t)) end subroutine YMMSL_Settings_set_real8array2 - function YMMSL_Settings_get_as_character(self, key, err_code, err_msg) + function YMMSL_Settings_get_as_character( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -899,7 +1044,11 @@ function YMMSL_Settings_get_as_character(self, key, err_code, err_msg) end do end function YMMSL_Settings_get_as_character - function YMMSL_Settings_get_as_int8(self, key, err_code, err_msg) + function YMMSL_Settings_get_as_int8( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -950,7 +1099,11 @@ function YMMSL_Settings_get_as_int8(self, key, err_code, err_msg) YMMSL_Settings_get_as_int8 = ret_val end function YMMSL_Settings_get_as_int8 - function YMMSL_Settings_get_as_real8(self, key, err_code, err_msg) + function YMMSL_Settings_get_as_real8( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -1001,7 +1154,11 @@ function YMMSL_Settings_get_as_real8(self, key, err_code, err_msg) YMMSL_Settings_get_as_real8 = ret_val end function YMMSL_Settings_get_as_real8 - function YMMSL_Settings_get_as_logical(self, key, err_code, err_msg) + function YMMSL_Settings_get_as_logical( & + self, & + key, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -1009,7 +1166,7 @@ function YMMSL_Settings_get_as_logical(self, key, err_code, err_msg) character(:), allocatable, optional, intent(out) :: err_msg logical :: YMMSL_Settings_get_as_logical - integer (c_int) :: ret_val + logical (c_bool) :: ret_val integer (c_int) :: err_code_v type (c_ptr) :: err_msg_v integer (c_size_t) :: err_msg_len_v @@ -1050,10 +1207,15 @@ function YMMSL_Settings_get_as_logical(self, key, err_code, err_msg) end if end if - YMMSL_Settings_get_as_logical = ret_val .ne. 0 + YMMSL_Settings_get_as_logical = ret_val end function YMMSL_Settings_get_as_logical - subroutine YMMSL_Settings_get_as_real8array(self, key, value, err_code, err_msg) + subroutine YMMSL_Settings_get_as_real8array( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -1110,7 +1272,12 @@ subroutine YMMSL_Settings_get_as_real8array(self, key, value, err_code, err_msg) value = f_ret_ptr end subroutine YMMSL_Settings_get_as_real8array - subroutine YMMSL_Settings_get_as_real8array2(self, key, value, err_code, err_msg) + subroutine YMMSL_Settings_get_as_real8array2( & + self, & + key, & + value, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -1167,22 +1334,26 @@ subroutine YMMSL_Settings_get_as_real8array2(self, key, value, err_code, err_msg value = f_ret_ptr end subroutine YMMSL_Settings_get_as_real8array2 - function YMMSL_Settings_contains(self, key) + function YMMSL_Settings_contains( & + self, & + key) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key logical :: YMMSL_Settings_contains - integer (c_int) :: ret_val + logical (c_bool) :: ret_val ret_val = YMMSL_Settings_contains_( & self%ptr, & key, int(len(key), c_size_t)) - YMMSL_Settings_contains = ret_val .ne. 0 + YMMSL_Settings_contains = ret_val end function YMMSL_Settings_contains - function YMMSL_Settings_erase(self, key) + function YMMSL_Settings_erase( & + self, & + key) implicit none type(YMMSL_Settings), intent(in) :: self character (len=*), intent(in) :: key @@ -1196,7 +1367,8 @@ function YMMSL_Settings_erase(self, key) YMMSL_Settings_erase = ret_val end function YMMSL_Settings_erase - subroutine YMMSL_Settings_clear(self) + subroutine YMMSL_Settings_clear( & + self) implicit none type(YMMSL_Settings), intent(in) :: self @@ -1204,7 +1376,11 @@ subroutine YMMSL_Settings_clear(self) self%ptr) end subroutine YMMSL_Settings_clear - function YMMSL_Settings_key(self, i, err_code, err_msg) + function YMMSL_Settings_key( & + self, & + i, & + err_code, & + err_msg) implicit none type(YMMSL_Settings), intent(in) :: self integer (YMMSL_size), intent(in) :: i diff --git a/libmuscle/python/libmuscle/__init__.py b/libmuscle/python/libmuscle/__init__.py index ca91289e..4b5407ce 100644 --- a/libmuscle/python/libmuscle/__init__.py +++ b/libmuscle/python/libmuscle/__init__.py @@ -2,6 +2,7 @@ import pathlib from libmuscle.communicator import Message +from libmuscle.grid import Grid from libmuscle.instance import Instance from libmuscle.version import __version__ from libmuscle import runner @@ -10,4 +11,4 @@ # Note that libmuscle.version above is created by the build system; it's okay # that it's not present. -__all__ = ['__version__', 'Instance', 'Message', 'runner'] +__all__ = ['__version__', 'Grid', 'Instance', 'Message', 'runner'] diff --git a/libmuscle/python/libmuscle/communicator.py b/libmuscle/python/libmuscle/communicator.py index 75227d8b..5614a6cc 100644 --- a/libmuscle/python/libmuscle/communicator.py +++ b/libmuscle/python/libmuscle/communicator.py @@ -353,7 +353,7 @@ def __ports_from_declared(self) -> Dict[str, Port]: is_connected = self._peer_manager.is_connected(port_id) if is_connected: peer_port = self._peer_manager.get_peer_port(port_id) - peer_ce = peer_port[:-1] + peer_ce = cast(Reference, peer_port[:-1]) port_peer_dims = self._peer_manager.get_peer_dims(peer_ce) else: port_peer_dims = [] diff --git a/libmuscle/python/libmuscle/grid.py b/libmuscle/python/libmuscle/grid.py new file mode 100644 index 00000000..34efc806 --- /dev/null +++ b/libmuscle/python/libmuscle/grid.py @@ -0,0 +1,51 @@ +from typing import List, Optional + +import numpy as np + + +class Grid: + """Represents a grid of data to send or receive. + + Note that for received grids, the array of data is a read-only + NumPy array. If you have another array that you want to put the + received data into, use ``np.copyto(dest, source)`` to copy the + contents of the received array across into your destination array. + If you don't have an array yet and want a writable version of the + received array, use ``array.copy()`` to create a writable copy. + See the tutorial for examples. + + Attributes: + array (np.ndarray): An array of data + indexes (Optional[List[str]]): The names of the array's indexes. + """ + def __init__( + self, array: np.ndarray, indexes: Optional[List[str]] = None + ) -> None: + """Creates a Grid object. + + A Grid object represents an multi-dimensional array of data. It + has a type, a shape, and optionally a list of index names. + + Supported data types are 4- and 8-byte integers (numpy.int32, + numpy.int64), 4- and 8-byte floats (numpy.float32, + numpy.float64), and booleans (np.bool_, np.bool8). The ``data`` + argument must be a NumPy array of one of those types. + + If ``indexes`` is given, then it must be a list of strings of + the same length as the number of dimensions of ``data``, and + contain the names of the indexes of the array. For a 2D + Cartesian grid, these may be ``'x'`` and ``'y'`` for example, + or for a polar grid, ``'phi'`` and ``'rho'``. + + Args: + array: An array of data, of a supported type (see above). + indexes: Names of the indexes (see above). + """ + if indexes is not None: + if len(indexes) != array.ndim: + raise ValueError( + 'Number of indexes must match number of array' + ' dimensions') + + self.array = array + self.indexes = indexes diff --git a/libmuscle/python/libmuscle/instance.py b/libmuscle/python/libmuscle/instance.py index bc786bb8..517ab936 100644 --- a/libmuscle/python/libmuscle/instance.py +++ b/libmuscle/python/libmuscle/instance.py @@ -2,7 +2,8 @@ import logging from pathlib import Path import sys -from typing import cast, Dict, List, Optional, Tuple, Type, Union +from typing import cast, Dict, List, Optional, Tuple, Union +from typing_extensions import Type import grpc from ymmsl import (Conduit, Identifier, Operator, SettingValue, Port, @@ -483,7 +484,7 @@ def split_reference(ref: Reference) -> Tuple[Reference, List[int]]: i = 0 while i < len(ref) and isinstance(ref[i], Identifier): i += 1 - name = ref[:i] + name = cast(Reference, ref[:i]) while i < len(ref) and isinstance(ref[i], int): index.append(cast(int, ref[i])) diff --git a/libmuscle/python/libmuscle/logging.py b/libmuscle/python/libmuscle/logging.py index 31e8c11c..917b0347 100644 --- a/libmuscle/python/libmuscle/logging.py +++ b/libmuscle/python/libmuscle/logging.py @@ -1,7 +1,8 @@ import datetime from enum import Enum import logging -from typing import Dict, NewType +from typing import Dict +from typing_extensions import NewType from ymmsl import Operator import muscle_manager_protocol.muscle_manager_protocol_pb2 as mmp diff --git a/libmuscle/python/libmuscle/mcp/ext_types.py b/libmuscle/python/libmuscle/mcp/ext_types.py deleted file mode 100644 index e69de29b..00000000 diff --git a/libmuscle/python/libmuscle/mcp/message.py b/libmuscle/python/libmuscle/mcp/message.py index 74c099d4..bdd25723 100644 --- a/libmuscle/python/libmuscle/mcp/message.py +++ b/libmuscle/python/libmuscle/mcp/message.py @@ -1,10 +1,14 @@ from enum import IntEnum +import struct from typing import Any, cast, Optional import msgpack +import numpy as np from ymmsl import Reference, Settings +from libmuscle.grid import Grid + class ExtTypeId(IntEnum): """MessagePack extension type ids. @@ -15,6 +19,19 @@ class ExtTypeId(IntEnum): """ CLOSE_PORT = 0 SETTINGS = 1 + GRID_INT32 = 2 + GRID_INT64 = 3 + GRID_FLOAT32 = 4 + GRID_FLOAT64 = 5 + GRID_BOOL = 6 + + +_grid_types = { + ExtTypeId.GRID_INT32, + ExtTypeId.GRID_INT64, + ExtTypeId.GRID_FLOAT32, + ExtTypeId.GRID_FLOAT64, + ExtTypeId.GRID_BOOL} class ClosePort: @@ -29,6 +46,119 @@ class ClosePort: pass +def _encode_grid(grid: Grid) -> msgpack.ExtType: + """Encodes a Grid object into the wire format. + """ + item_size_map = { + 'int32': 4, + 'int64': 8, + 'float32': 4, + 'float64': 8, + 'bool': 1} + + format_map = { + 'int32': ' Grid: + """Creates a Grid from serialised data. + """ + type_map = { + ExtTypeId.GRID_INT32: np.int32, + ExtTypeId.GRID_INT64: np.int64, + ExtTypeId.GRID_FLOAT32: np.float32, + ExtTypeId.GRID_FLOAT64: np.float64, + ExtTypeId.GRID_BOOL: np.bool8} + + order_map = { + 'fa': 'F', + 'la': 'C'} + + grid_dict = msgpack.unpackb(data, raw=False) + order = order_map[grid_dict['order']] + shape = tuple(grid_dict['shape']) + dtype = type_map[ExtTypeId(code)] + array = np.ndarray(shape, dtype, grid_dict['data'], order=order) + indexes = grid_dict['indexes'] + if indexes == []: + indexes = None + return Grid(array, indexes) + + +def _data_encoder(obj: Any) -> Any: + """Encodes custom objects for MessagePack. + + In particular, this takes care of any Settings, Grid and + numpy.ndarray objects the user may want to send. + """ + if isinstance(obj, ClosePort): + return msgpack.ExtType(ExtTypeId.CLOSE_PORT, bytes()) + elif isinstance(obj, Settings): + packed_data = msgpack.packb(obj.as_ordered_dict(), + use_bin_type=True) + return msgpack.ExtType(ExtTypeId.SETTINGS, packed_data) + elif isinstance(obj, np.ndarray): + return _encode_grid(Grid(obj)) + elif isinstance(obj, Grid): + return _encode_grid(obj) + return obj + + +def _ext_decoder(code: int, data: bytes) -> msgpack.ExtType: + if code == ExtTypeId.CLOSE_PORT: + return ClosePort() + elif code == ExtTypeId.SETTINGS: + plain_dict = msgpack.unpackb(data, raw=False) + return Settings(plain_dict) + elif code in _grid_types: + return _decode_grid(code, data) + return msgpack.ExtType(code, data) + + class Message: """A MUSCLE Communication Protocol message. @@ -65,7 +195,10 @@ def __init__(self, sender: Reference, receiver: Reference, self.timestamp = timestamp self.next_timestamp = next_timestamp self.settings_overlay = settings_overlay - self.data = data + if isinstance(data, np.ndarray): + self.data = Grid(data) + else: + self.data = data @staticmethod def from_bytes(message: bytes) -> 'Message': @@ -74,55 +207,31 @@ def from_bytes(message: bytes) -> 'Message': Args: message: MessagePack encoded message data. """ - message_dict = msgpack.unpackb(message, raw=False) + message_dict = msgpack.unpackb( + message, ext_hook=_ext_decoder, raw=False) sender = Reference(message_dict["sender"]) receiver = Reference(message_dict["receiver"]) port_length = message_dict["port_length"] timestamp = message_dict["timestamp"] next_timestamp = message_dict["next_timestamp"] - - settings_dict = msgpack.unpackb(message_dict["settings_overlay"].data, - raw=False) - settings_overlay = Settings(settings_dict) + settings_overlay = message_dict["settings_overlay"] data = message_dict["data"] - if isinstance(data, msgpack.ExtType): - if data.code == ExtTypeId.CLOSE_PORT: - data = ClosePort() - elif data.code == ExtTypeId.SETTINGS: - plain_dict = msgpack.unpackb(data.data, raw=False) - data = Settings(plain_dict) - return Message(sender, receiver, port_length, timestamp, next_timestamp, settings_overlay, data) def encoded(self) -> bytes: """Encode the message and return as a bytes buffer. """ - # pack overlay - packed_overlay = msgpack.packb(self.settings_overlay.as_ordered_dict(), - use_bin_type=True) - overlay = msgpack.ExtType(ExtTypeId.SETTINGS, packed_overlay) - - # pack data - if isinstance(self.data, ClosePort): - data = msgpack.ExtType(ExtTypeId.CLOSE_PORT, bytes()) - elif isinstance(self.data, Settings): - packed_data = msgpack.packb(self.data.as_ordered_dict(), - use_bin_type=True) - data = msgpack.ExtType(ExtTypeId.SETTINGS, packed_data) - else: - data = self.data - - # pack message message_dict = { 'sender': str(self.sender), 'receiver': str(self.receiver), 'port_length': self.port_length, 'timestamp': self.timestamp, 'next_timestamp': self.next_timestamp, - 'settings_overlay': overlay, - 'data': data + 'settings_overlay': self.settings_overlay, + 'data': self.data } - return cast(bytes, msgpack.packb(message_dict, use_bin_type=True)) + return cast(bytes, msgpack.packb( + message_dict, default=_data_encoder, use_bin_type=True)) diff --git a/libmuscle/python/libmuscle/mcp/tcp_server.py b/libmuscle/python/libmuscle/mcp/tcp_server.py index 126ce772..6e8aeae2 100644 --- a/libmuscle/python/libmuscle/mcp/tcp_server.py +++ b/libmuscle/python/libmuscle/mcp/tcp_server.py @@ -1,6 +1,7 @@ import socketserver as ss import threading -from typing import cast, List, Optional, Tuple, Type +from typing import cast, List, Optional, Tuple +from typing_extensions import Type import msgpack import netifaces diff --git a/libmuscle/python/libmuscle/mcp/test/test_message.py b/libmuscle/python/libmuscle/mcp/test/test_message.py index 3f96cd4c..1a968068 100644 --- a/libmuscle/python/libmuscle/mcp/test/test_message.py +++ b/libmuscle/python/libmuscle/mcp/test/test_message.py @@ -1,5 +1,11 @@ -from ymmsl import Reference +import struct +import msgpack +import numpy as np + +from ymmsl import Reference, Settings + +from libmuscle.grid import Grid from libmuscle.mcp.message import Message @@ -19,3 +25,123 @@ def test_create() -> None: assert msg.next_timestamp == 11.0 assert msg.settings_overlay == settings_overlay assert msg.data == data + + +def test_grid_encode() -> None: + sender = Reference('sender.port') + receiver = Reference('receiver.port') + timestamp = 10.0 + next_timestamp = 11.0 + + array = np.array( + [[[1.0, 2.0, 3.0], + [4.0, 5.0, 6.0]], + [[7.0, 8.0, 9.0], + [10.0, 11.0, 12.0]]], np.float32) + + grid = Grid(array, ['x', 'y', 'z']) + msg = Message(sender, receiver, None, timestamp, next_timestamp, + Settings(), grid) + + wire_data = msg.encoded() + mcp_decoded = msgpack.unpackb(wire_data, raw=False) + grid_decoded = msgpack.unpackb(mcp_decoded['data'].data, raw=False) + + assert grid_decoded['type'] == 'float32' + assert grid_decoded['shape'] == [2, 2, 3] + assert grid_decoded['order'] == 'la' + next_value = 1.0 + for value in struct.iter_unpack(' None: + settings_data = msgpack.packb({}, use_bin_type=True) + + grid_buf = bytes( + [1, 0, 0, 0, + 2, 0, 0, 0, + 3, 0, 0, 0, + 0, 0, 4, 0, + 0, 0, 5, 0, + 0, 0, 6, 0]) + + grid_dict = { + 'type': 'int32', + 'shape': [2, 3], + 'order': 'la', + 'data': grid_buf, + 'indexes': []} + grid_data = msgpack.packb(grid_dict, use_bin_type=True) + + msg_dict = { + 'sender': 'elem1.port1', + 'receiver': 'elem2.port2', + 'port_length': 0, + 'timestamp': 0.0, + 'next_timestamp': None, + 'settings_overlay': msgpack.ExtType(1, settings_data), + 'data': msgpack.ExtType(2, grid_data)} + + wire_data = msgpack.packb(msg_dict, use_bin_type=True) + + msg = Message.from_bytes(wire_data) + + assert isinstance(msg.data, Grid) + assert msg.data.array.dtype == np.int32 + assert msg.data.array.shape == (2, 3) + assert msg.data.array.flags.c_contiguous + assert msg.data.array[0, 0] == 1 + assert msg.data.array[0, 1] == 2 + assert msg.data.array[1, 1] == 5 * 65536 + assert msg.data.indexes is None + + grid_dict['order'] = 'fa' + grid_data = msgpack.packb(grid_dict, use_bin_type=True) + msg_dict['data'] = msgpack.ExtType(2, grid_data) + wire_data = msgpack.packb(msg_dict, use_bin_type=True) + msg = Message.from_bytes(wire_data) + + assert isinstance(msg.data, Grid) + assert msg.data.array.dtype == np.int32 + assert msg.data.array.shape == (2, 3) + assert msg.data.array.flags.f_contiguous + assert msg.data.array[0, 0] == 1 + assert msg.data.array[0, 1] == 3 + assert msg.data.array[0, 2] == 5 * 65536 + assert msg.data.indexes is None + + +def test_grid_roundtrip() -> None: + sender = Reference('sender.port') + receiver = Reference('receiver.port') + timestamp = 10.0 + next_timestamp = 11.0 + + array = np.array( + [[[1.0, 2.0, 3.0], + [4.0, 5.0, 6.0]], + [[7.0, 8.0, 9.0], + [10.0, 11.0, 12.0]]], np.float64) + + assert(array[0, 0, 0] == 1.0) + + grid = Grid(array, ['x', 'y', 'z']) + msg = Message(sender, receiver, None, timestamp, next_timestamp, + Settings(), grid) + + wire_data = msg.encoded() + msg_out = Message.from_bytes(wire_data) + + assert isinstance(msg_out.data, Grid) + grid_out = msg_out.data + assert grid_out.indexes == ['x', 'y', 'z'] + assert isinstance(grid_out.array, np.ndarray) + assert grid_out.array.dtype == np.float64 + assert grid_out.array.shape == (2, 2, 3) + assert grid_out.array.size == 12 + assert grid_out.array[1, 0, 1] == 8.0 + assert grid_out.array[0, 0, 2] == 3.0 diff --git a/libmuscle/python/libmuscle/peer_manager.py b/libmuscle/python/libmuscle/peer_manager.py index 53fcf3db..7066f244 100644 --- a/libmuscle/python/libmuscle/peer_manager.py +++ b/libmuscle/python/libmuscle/peer_manager.py @@ -95,7 +95,7 @@ def get_peer_endpoint(self, port: Identifier, slot: List[int] The peer endpoint. """ peer = self.__peers[self.__kernel + port] - peer_kernel = peer[:-1] + peer_kernel = cast(Reference, peer[:-1]) peer_port = cast(Identifier, peer[-1]) total_index = self.__index + slot diff --git a/libmuscle/python/libmuscle/runner.py b/libmuscle/python/libmuscle/runner.py index 59b5317b..3e422262 100644 --- a/libmuscle/python/libmuscle/runner.py +++ b/libmuscle/python/libmuscle/runner.py @@ -174,7 +174,7 @@ def _split_reference(ref: Reference) -> Tuple[Reference, List[int]]: i = 0 while i < len(ref) and isinstance(ref[i], Identifier): i += 1 - name = ref[:i] + name = cast(Reference, ref[:i]) while i < len(ref) and isinstance(ref[i], int): index.append(cast(int, ref[i])) diff --git a/libmuscle/python/libmuscle/settings_manager.py b/libmuscle/python/libmuscle/settings_manager.py index 7772237d..6e4beb18 100644 --- a/libmuscle/python/libmuscle/settings_manager.py +++ b/libmuscle/python/libmuscle/settings_manager.py @@ -1,4 +1,4 @@ -from typing import Optional +from typing import cast, Optional from ymmsl import SettingValue, Reference, Settings @@ -84,7 +84,7 @@ def get_setting(self, instance: Reference, setting_name: Reference, """ for i in range(len(instance), -1, -1): if i > 0: - name = instance[:i] + setting_name + name = cast(Reference, instance[:i]) + setting_name else: name = setting_name diff --git a/libmuscle/python/libmuscle/test/test_grid.py b/libmuscle/python/libmuscle/test/test_grid.py new file mode 100644 index 00000000..0db64741 --- /dev/null +++ b/libmuscle/python/libmuscle/test/test_grid.py @@ -0,0 +1,16 @@ +import numpy as np +import pytest + +from libmuscle.grid import Grid + + +def test_grid() -> None: + a = np.array([[1, 2, 3], [4, 5, 6]]) + grid = Grid(a) + grid = Grid(a, ['x', 'y']) + + with pytest.raises(ValueError): + grid = Grid(a, ['x']) + + with pytest.raises(ValueError): + grid = Grid(a, ['x', 'y', 'z']) diff --git a/libmuscle/python/libmuscle/util.py b/libmuscle/python/libmuscle/util.py index e7446fb0..bcf27239 100644 --- a/libmuscle/python/libmuscle/util.py +++ b/libmuscle/python/libmuscle/util.py @@ -32,7 +32,7 @@ def instance_to_kernel(instance: Reference) -> Reference: i = len(instance) while isinstance(instance[i-1], int): i -= 1 - return instance[:i] + return cast(Reference, instance[:i]) def instance_indices(instance: Reference) -> List[int]: diff --git a/muscle_manager_protocol/muscle_manager_protocol_pb2.py b/muscle_manager_protocol/muscle_manager_protocol_pb2.py index cae81dd6..48bc545e 100644 --- a/muscle_manager_protocol/muscle_manager_protocol_pb2.py +++ b/muscle_manager_protocol/muscle_manager_protocol_pb2.py @@ -1,3 +1,4 @@ +# -*- coding: utf-8 -*- # Generated by the protocol buffer compiler. DO NOT EDIT! # source: muscle_manager_protocol.proto @@ -1079,146 +1080,146 @@ DESCRIPTOR.enum_types_by_name['SettingValueType'] = _SETTINGVALUETYPE _sym_db.RegisterFileDescriptor(DESCRIPTOR) -LogMessage = _reflection.GeneratedProtocolMessageType('LogMessage', (_message.Message,), dict( - DESCRIPTOR = _LOGMESSAGE, - __module__ = 'muscle_manager_protocol_pb2' +LogMessage = _reflection.GeneratedProtocolMessageType('LogMessage', (_message.Message,), { + 'DESCRIPTOR' : _LOGMESSAGE, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.LogMessage) - )) + }) _sym_db.RegisterMessage(LogMessage) -LogResult = _reflection.GeneratedProtocolMessageType('LogResult', (_message.Message,), dict( - DESCRIPTOR = _LOGRESULT, - __module__ = 'muscle_manager_protocol_pb2' +LogResult = _reflection.GeneratedProtocolMessageType('LogResult', (_message.Message,), { + 'DESCRIPTOR' : _LOGRESULT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.LogResult) - )) + }) _sym_db.RegisterMessage(LogResult) -Port = _reflection.GeneratedProtocolMessageType('Port', (_message.Message,), dict( - DESCRIPTOR = _PORT, - __module__ = 'muscle_manager_protocol_pb2' +Port = _reflection.GeneratedProtocolMessageType('Port', (_message.Message,), { + 'DESCRIPTOR' : _PORT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.Port) - )) + }) _sym_db.RegisterMessage(Port) -ProfileEvent = _reflection.GeneratedProtocolMessageType('ProfileEvent', (_message.Message,), dict( - DESCRIPTOR = _PROFILEEVENT, - __module__ = 'muscle_manager_protocol_pb2' +ProfileEvent = _reflection.GeneratedProtocolMessageType('ProfileEvent', (_message.Message,), { + 'DESCRIPTOR' : _PROFILEEVENT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.ProfileEvent) - )) + }) _sym_db.RegisterMessage(ProfileEvent) -Profile = _reflection.GeneratedProtocolMessageType('Profile', (_message.Message,), dict( - DESCRIPTOR = _PROFILE, - __module__ = 'muscle_manager_protocol_pb2' +Profile = _reflection.GeneratedProtocolMessageType('Profile', (_message.Message,), { + 'DESCRIPTOR' : _PROFILE, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.Profile) - )) + }) _sym_db.RegisterMessage(Profile) -ProfileResult = _reflection.GeneratedProtocolMessageType('ProfileResult', (_message.Message,), dict( - DESCRIPTOR = _PROFILERESULT, - __module__ = 'muscle_manager_protocol_pb2' +ProfileResult = _reflection.GeneratedProtocolMessageType('ProfileResult', (_message.Message,), { + 'DESCRIPTOR' : _PROFILERESULT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.ProfileResult) - )) + }) _sym_db.RegisterMessage(ProfileResult) -RegistrationRequest = _reflection.GeneratedProtocolMessageType('RegistrationRequest', (_message.Message,), dict( - DESCRIPTOR = _REGISTRATIONREQUEST, - __module__ = 'muscle_manager_protocol_pb2' +RegistrationRequest = _reflection.GeneratedProtocolMessageType('RegistrationRequest', (_message.Message,), { + 'DESCRIPTOR' : _REGISTRATIONREQUEST, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.RegistrationRequest) - )) + }) _sym_db.RegisterMessage(RegistrationRequest) -RegistrationResult = _reflection.GeneratedProtocolMessageType('RegistrationResult', (_message.Message,), dict( - DESCRIPTOR = _REGISTRATIONRESULT, - __module__ = 'muscle_manager_protocol_pb2' +RegistrationResult = _reflection.GeneratedProtocolMessageType('RegistrationResult', (_message.Message,), { + 'DESCRIPTOR' : _REGISTRATIONRESULT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.RegistrationResult) - )) + }) _sym_db.RegisterMessage(RegistrationResult) -Conduit = _reflection.GeneratedProtocolMessageType('Conduit', (_message.Message,), dict( - DESCRIPTOR = _CONDUIT, - __module__ = 'muscle_manager_protocol_pb2' +Conduit = _reflection.GeneratedProtocolMessageType('Conduit', (_message.Message,), { + 'DESCRIPTOR' : _CONDUIT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.Conduit) - )) + }) _sym_db.RegisterMessage(Conduit) -PeerRequest = _reflection.GeneratedProtocolMessageType('PeerRequest', (_message.Message,), dict( - DESCRIPTOR = _PEERREQUEST, - __module__ = 'muscle_manager_protocol_pb2' +PeerRequest = _reflection.GeneratedProtocolMessageType('PeerRequest', (_message.Message,), { + 'DESCRIPTOR' : _PEERREQUEST, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerRequest) - )) + }) _sym_db.RegisterMessage(PeerRequest) -PeerResult = _reflection.GeneratedProtocolMessageType('PeerResult', (_message.Message,), dict( +PeerResult = _reflection.GeneratedProtocolMessageType('PeerResult', (_message.Message,), { - PeerDimensions = _reflection.GeneratedProtocolMessageType('PeerDimensions', (_message.Message,), dict( - DESCRIPTOR = _PEERRESULT_PEERDIMENSIONS, - __module__ = 'muscle_manager_protocol_pb2' + 'PeerDimensions' : _reflection.GeneratedProtocolMessageType('PeerDimensions', (_message.Message,), { + 'DESCRIPTOR' : _PEERRESULT_PEERDIMENSIONS, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerResult.PeerDimensions) - )) + }) , - PeerLocations = _reflection.GeneratedProtocolMessageType('PeerLocations', (_message.Message,), dict( - DESCRIPTOR = _PEERRESULT_PEERLOCATIONS, - __module__ = 'muscle_manager_protocol_pb2' + 'PeerLocations' : _reflection.GeneratedProtocolMessageType('PeerLocations', (_message.Message,), { + 'DESCRIPTOR' : _PEERRESULT_PEERLOCATIONS, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerResult.PeerLocations) - )) + }) , - DESCRIPTOR = _PEERRESULT, - __module__ = 'muscle_manager_protocol_pb2' + 'DESCRIPTOR' : _PEERRESULT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.PeerResult) - )) + }) _sym_db.RegisterMessage(PeerResult) _sym_db.RegisterMessage(PeerResult.PeerDimensions) _sym_db.RegisterMessage(PeerResult.PeerLocations) -ListOfDouble = _reflection.GeneratedProtocolMessageType('ListOfDouble', (_message.Message,), dict( - DESCRIPTOR = _LISTOFDOUBLE, - __module__ = 'muscle_manager_protocol_pb2' +ListOfDouble = _reflection.GeneratedProtocolMessageType('ListOfDouble', (_message.Message,), { + 'DESCRIPTOR' : _LISTOFDOUBLE, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.ListOfDouble) - )) + }) _sym_db.RegisterMessage(ListOfDouble) -ListOfListOfDouble = _reflection.GeneratedProtocolMessageType('ListOfListOfDouble', (_message.Message,), dict( - DESCRIPTOR = _LISTOFLISTOFDOUBLE, - __module__ = 'muscle_manager_protocol_pb2' +ListOfListOfDouble = _reflection.GeneratedProtocolMessageType('ListOfListOfDouble', (_message.Message,), { + 'DESCRIPTOR' : _LISTOFLISTOFDOUBLE, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.ListOfListOfDouble) - )) + }) _sym_db.RegisterMessage(ListOfListOfDouble) -Setting = _reflection.GeneratedProtocolMessageType('Setting', (_message.Message,), dict( - DESCRIPTOR = _SETTING, - __module__ = 'muscle_manager_protocol_pb2' +Setting = _reflection.GeneratedProtocolMessageType('Setting', (_message.Message,), { + 'DESCRIPTOR' : _SETTING, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.Setting) - )) + }) _sym_db.RegisterMessage(Setting) -SettingsRequest = _reflection.GeneratedProtocolMessageType('SettingsRequest', (_message.Message,), dict( - DESCRIPTOR = _SETTINGSREQUEST, - __module__ = 'muscle_manager_protocol_pb2' +SettingsRequest = _reflection.GeneratedProtocolMessageType('SettingsRequest', (_message.Message,), { + 'DESCRIPTOR' : _SETTINGSREQUEST, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.SettingsRequest) - )) + }) _sym_db.RegisterMessage(SettingsRequest) -SettingsResult = _reflection.GeneratedProtocolMessageType('SettingsResult', (_message.Message,), dict( - DESCRIPTOR = _SETTINGSRESULT, - __module__ = 'muscle_manager_protocol_pb2' +SettingsResult = _reflection.GeneratedProtocolMessageType('SettingsResult', (_message.Message,), { + 'DESCRIPTOR' : _SETTINGSRESULT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.SettingsResult) - )) + }) _sym_db.RegisterMessage(SettingsResult) -DeregistrationRequest = _reflection.GeneratedProtocolMessageType('DeregistrationRequest', (_message.Message,), dict( - DESCRIPTOR = _DEREGISTRATIONREQUEST, - __module__ = 'muscle_manager_protocol_pb2' +DeregistrationRequest = _reflection.GeneratedProtocolMessageType('DeregistrationRequest', (_message.Message,), { + 'DESCRIPTOR' : _DEREGISTRATIONREQUEST, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.DeregistrationRequest) - )) + }) _sym_db.RegisterMessage(DeregistrationRequest) -DeregistrationResult = _reflection.GeneratedProtocolMessageType('DeregistrationResult', (_message.Message,), dict( - DESCRIPTOR = _DEREGISTRATIONRESULT, - __module__ = 'muscle_manager_protocol_pb2' +DeregistrationResult = _reflection.GeneratedProtocolMessageType('DeregistrationResult', (_message.Message,), { + 'DESCRIPTOR' : _DEREGISTRATIONRESULT, + '__module__' : 'muscle_manager_protocol_pb2' # @@protoc_insertion_point(class_scope:muscle_manager_protocol.DeregistrationResult) - )) + }) _sym_db.RegisterMessage(DeregistrationResult) diff --git a/scripts/api_generator.py b/scripts/api_generator.py index 1f9623bb..8a7ffc11 100644 --- a/scripts/api_generator.py +++ b/scripts/api_generator.py @@ -77,7 +77,10 @@ def _regular_type(self, """Converts brief type description to more regular format. This is a helper function for derived classes. Output is a list - of tuples (type, name_prefix). + of tuples (type, name_postfix), with one tuple for each + variable. For simple types, this list will be of length 1, for + variable-sized things however, there may be additional + variables describing e.g. size or shape or format. Input is either @@ -348,6 +351,216 @@ def fc_return(self) -> str: return textwrap.indent(result.format(self.name), ' ') +class VecSizet(Par): + """Represents a vector of size_t parameter. + """ + def tname(self) -> str: + return 'sizearray' + + def fc_cpp_type(self) -> str: + return 'std::vector' + + def f_type(self) -> str: + return self._regular_type( + 'integer ({}_size), dimension(:)'.format(self.ns_prefix)) + + def f_ret_type(self) -> str: + return False, self._regular_type( + [('integer ({}_size), dimension(:)'.format(self.ns_prefix), + self.name)]) + + def f_aux_variables(self) -> List[Tuple[str, str]]: + return [( + 'integer ({}_size), pointer, dimension(:)'.format(self.ns_prefix), + 'f_ret_ptr')] + + def f_chain_arg(self) -> str: + return '{}, int(size({}), c_size_t)'.format(self.name, self.name) + + def f_call_c(self, result_name: str, call: str) -> str: + return ' call {}\n\n'.format(call) + + def f_return_result(self, return_name: str, result_name: str) -> str: + return (' call c_f_pointer(ret_val, f_ret_ptr, (/ret_val_size/))\n' + ' {} = f_ret_ptr\n').format(return_name) + + def fi_type(self) -> str: + return self._regular_type( + ['integer (c_size_t), dimension(*)'.format(self.ns_prefix), + ('integer (c_size_t), value', '_size')]) + + def fi_ret_type(self) -> str: + return self._regular_type( + ['type (c_ptr)', + ('integer (c_size_t)', '_size')]) + + def fc_type(self) -> str: + return self._regular_type(['std::size_t *', ('std::size_t', '_size')]) + + def fc_ret_type(self) -> str: + return self._regular_type(['std::size_t **', ('std::size_t *', '_size')]) + + def fc_convert_input(self) -> str: + return ' std::vector {}_v({}, {} + {}_size);\n'.format( + self.name, self.name, self.name, self.name) + + def fc_cpp_arg(self) -> str: + return self.name + '_v' + + def fc_get_result(self, cpp_chain_call: str) -> str: + return ('static std::vector result;\n' + ' result = {}').format(cpp_chain_call) + + def fc_return(self) -> str: + return (' *{0} = result.data();\n' + ' *{0}_size = result.size();\n' + ' return;\n').format(self.name) + + +class Array(Par): + def __init__( + self, ndims: int, elem_type: Par, name: Optional[str] = None + ) -> None: + """Create an array parameter description. + + Args: + ndims: Number of dimensions of the array. + elem_type: Type of the array's elements. + name: Name of the parameter. + """ + if name is None: + name = self.elem_type.name + self.elem_type = elem_type + else: + self.elem_type = copy(elem_type) + self.elem_type.name = name + + super().__init__(name) + self.ndims = ndims + + def set_ns_prefix(self, ns_for_name: Dict[str, str], ns: str) -> None: + """Sets the namespace prefix correctly for all members. + + Args: + ns_for_name: A map from type names to namespace names. + ns: Name of the namespace that this parameter's member function's + class is in. + """ + self.ns_prefix = ns + self.elem_type.set_ns_prefix(ns_for_name, ns) + + def tname(self) -> str: + return '{}array{}'.format(self.elem_type.tname(), ndims) + + def fc_cpp_type(self) -> str: + return '{} const *'.format(self.elem_type.fc_cpp_type()) + + def f_type(self) -> str: + return self._regular_type( + '{}, dimension({})'.format( + self.elem_type.f_type()[0][0], self._f_dims())) + + def f_ret_type(self) -> str: + return False, self._regular_type( + [('{}, dimension({})'.format(self.elem_type.f_type()[0][0], + self._f_dims()), + self.name)]) + + def f_aux_variables(self) -> List[Tuple[str, str]]: + return [('{}, pointer, dimension({})'.format( + self.elem_type.fi_ret_type()[0][0], self._f_dims()), 'f_ret_ptr'), + ('{}, pointer, dimension(:)'.format( + self.elem_type.fi_ret_type()[0][0]), 'f_ret_ptr_linear')] + + def f_chain_arg(self) -> str: + return '{0}, int(shape({0}), c_size_t), {1}_{2}_size'.format( + self.elem_type.f_chain_arg(), self.ndims, self.ns_prefix) + + def f_call_c(self, result_name: str, call: str) -> str: + return ' call {}\n\n'.format(call) + + def f_return_result(self, return_name: str, result_name: str) -> str: + c_order = '(/{}/)'.format(', '.join( + map(str, reversed(range(1, self.ndims+1))))) + return ( + ' if (ret_val_format .eq. 0) then\n' + ' call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape)\n' + ' {0} = f_ret_ptr\n' + ' else\n' + ' call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/))\n' + ' {0} = reshape(f_ret_ptr_linear, ret_val_shape, (/ {2}:: /), {1})\n' + ' end if\n' + ).format( + return_name, c_order, + self.elem_type.fi_ret_type()[0][0]) + + def fi_type(self) -> str: + base_type = self.elem_type.fi_type()[0][0].split(',')[0] + return self._regular_type( + ['{}, dimension(*)'.format(base_type), + ('integer (c_size_t), dimension({})'.format(self.ndims), + '_shape'), + ('integer (c_size_t), value', '_ndims')]) + + def fi_ret_type(self) -> str: + return self._regular_type( + ['type (c_ptr)', + ('integer (c_size_t), dimension({})'.format(self.ndims), + '_shape'), + ('integer (c_int)', '_format')]) + + def fc_type(self) -> str: + elem_fc_type = self.elem_type.fc_type()[0][0] + return self._regular_type( + ['{} *'.format(elem_fc_type), + ('std::size_t *', '_shape'), + ('std::size_t', '_ndims')]) + + def fc_ret_type(self) -> str: + # TODO: add ndims + return self._regular_type( + ['{} **'.format(self.elem_type.fc_cpp_type()), + ('std::size_t *', '_shape'), + ('int *', '_format')]) + + def fc_convert_input(self) -> str: + result = ( + 'std::vector {0}_shape_v(\n' + ' {0}_shape, {0}_shape + {0}_ndims);\n' + 'auto {0}_p = const_cast<{1} const * const>({0});\n' + ).format( + self.name, self.elem_type.fc_cpp_type()) + + return textwrap.indent(result, ' ') + + def fc_cpp_arg(self) -> str: + return '{0}_p, {0}_shape_v'.format(self.name) + + def fc_get_result(self, cpp_chain_call: str) -> str: + return '{} result = {}'.format( + self.fc_cpp_type(), cpp_chain_call) + + def fc_return(self) -> str: + result = ( + 'if (self_p->shape().size() != {2}u)\n' + ' throw std::runtime_error("Grid does not have the expected {2} dimensions");\n' + '*{0} = const_cast<{1} *>(result);\n' + 'for (std::size_t i = 0u; i < {2}u; ++i)\n' + ' {0}_shape[i] = self_p->shape()[i];\n' + '\n' + '*{0}_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent);\n' + 'return;\n' + ) + + return textwrap.indent( + result.format(self.name, self.elem_type.fc_cpp_type(), + self.ndims), + ' ') + + def _f_dims(self) -> str: + return ', '.join([':'] * self.ndims) + + class Bytes(Par): """Represents a vector of bytes. """ @@ -490,34 +703,34 @@ def f_ret_type(self) -> str: return True, self._regular_type('logical') def fi_type(self) -> str: - return self._regular_type('integer (c_int), value') + return self._regular_type('logical (c_bool), value') def fi_ret_type(self) -> str: - return self._regular_type('integer (c_int)') + return self._regular_type('logical (c_bool)') def fc_type(self) -> str: - return self._regular_type('int') + return self._regular_type('bool') def fc_ret_type(self) -> str: - return self._regular_type('int') + return self._regular_type('bool') def fc_cpp_arg(self) -> str: - return '{} != 0'.format(self.name) + return self.name def fc_get_result(self, cpp_chain_call: str) -> str: return 'bool result = {}'.format(cpp_chain_call) def fc_return(self) -> str: - return ' return result ? 1 : 0;\n' + return ' return result;\n' def f_chain_arg(self) -> str: - return 'merge(1, 0, {})'.format(self.name) + return 'logical({}, c_bool)'.format(self.name) def f_call_c(self, result_name: str, call: str) -> str: return ' {} = {}\n\n'.format(result_name, call) def f_return_result(self, return_name: str, result_name: str) -> str: - return ' {} = {} .ne. 0\n'.format(return_name, result_name) + return ' {} = {}\n'.format(return_name, result_name) class EnumVal(Par): @@ -903,7 +1116,7 @@ def __init__(self, will be passed ``cpp_func_name`` and ``cpp_args`` parameters of type ``str``, containing the name of the C++ function to call and a comma-separated list of arguments to use. Note that - ``cpp_func_name`` can be overridden using the argument of the + ``cpp_func_name`` can be overridden using an argument of the same name. If ``cpp_chain_call`` is not specified, a plain member function call will be generated, so this is an override. @@ -915,6 +1128,7 @@ def __init__(self, cpp_func_name: Name of C++ member function to call. cpp_chain_call: Function that produces the C++ chain call. fc_override: Custom Fortran-C wrapper function. + fc_chain_call: Function that produces the C ABI call. f_override: Custom Fortran function. """ self.ns_prefix = None # type: Optional[str] @@ -927,6 +1141,8 @@ def __init__(self, self.cpp_chain_call = args.get( 'cpp_chain_call', self._default_cpp_chain_call) self.fc_override = args.get('fc_override') + self.fc_chain_call = args.get( + 'fc_chain_call', self._default_fc_chain_call) self.f_override = args.get('f_override') self.cpp_func_name = args.get('cpp_func_name', name) @@ -938,6 +1154,7 @@ def __copy__(self) -> 'MemFun': result.class_name = self.class_name result.cpp_chain_call = self.cpp_chain_call result.fc_override = self.fc_override + result.fc_chain_call = self.fc_chain_call result.f_override = self.f_override result.cpp_func_name = self.cpp_func_name return result @@ -970,7 +1187,7 @@ def fortran_c_wrapper(self) -> str: """Create a C wrapper for calling by Fortran. """ if self.fc_override is not None: - return self.fc_override + return self.fc_override.replace('$CLASSNAME$', self.class_name) result = '' @@ -1020,6 +1237,9 @@ def fortran_interface(self) -> str: """Create a Fortran interface declaration for the C wrapper. """ result = '' + if self.fc_override == '': + return result + func_name = '{}_{}_{}_'.format( self.ns_prefix, self.class_name, self.name) @@ -1032,12 +1252,16 @@ def fortran_interface(self) -> str: out_parameters.append(('integer (c_size_t)', 'err_msg_len')) arg_list = [par_name for _, par_name in in_parameters + out_parameters] + if len(arg_list) > 1: + arg_vlist = ' &\n' + textwrap.indent(', &\n'.join(arg_list), 8*' ') + else: + arg_vlist = ', '.join(arg_list) + if return_type != '': - result += '{} function {}( &\n {}) &\n'.format( - return_type, func_name, ', '.join(arg_list)) + result += '{} function {}({}) &\n'.format( + return_type, func_name, arg_vlist) else: - result += 'subroutine {}( &\n {}) &\n'.format( - func_name, ', '.join(arg_list)) + result += 'subroutine {}({}) &\n'.format(func_name, arg_vlist) result += ' bind(C, name="{}")\n'.format(func_name) result += '\n' result += ' use iso_c_binding\n' @@ -1059,8 +1283,10 @@ def fortran_interface(self) -> str: def fortran_function(self) -> str: """Create the Fortran function definition for this member. """ - if self.f_override: - return textwrap.indent(self.f_override, 4*' ') + if self.f_override is not None: + return textwrap.indent( + self.f_override.replace('$CLASSNAME$', self.class_name), + 4*' ') result = '' @@ -1075,11 +1301,12 @@ def fortran_function(self) -> str: 'err_msg')) all_parameters = in_parameters + out_parameters - arg_list = ', '.join([par_name for _, par_name in all_parameters]) + arg_list = ', &\n'.join([par_name for _, par_name in all_parameters]) + arg_ilist = textwrap.indent(arg_list, 8*' ') if return_type != '': - result += 'function {}({})\n'.format(func_name, arg_list) + result += 'function {}( &\n{})\n'.format(func_name, arg_ilist) else: - result += 'subroutine {}({})\n'.format(func_name, arg_list) + result += 'subroutine {}( &\n{})\n'.format(func_name, arg_ilist) # parameter declarations result += ' implicit none\n' @@ -1118,7 +1345,9 @@ def fortran_function(self) -> str: arg_str = ', &\n'.join([8*' ' + arg for arg in args]) # call C function - chain_call = '{}_( &\n{})'.format(func_name, arg_str) + chain_call = self.fc_chain_call( + ns_prefix=self.ns_prefix, class_name=self.class_name, + fc_func_name=(func_name + '_'), fc_args=arg_str) result_name = '' if return_type != '': result_name = func_name @@ -1170,6 +1399,9 @@ def fortran_function(self) -> str: def fortran_public_declaration(self) -> str: """Create a Fortran statement declaring us public. """ + if self.f_override == '': + return '' + func_name = '{}_{}_{}'.format( self.ns_prefix, self.class_name, self.name) return ' public :: {}\n'.format(func_name) @@ -1177,8 +1409,15 @@ def fortran_public_declaration(self) -> str: def fortran_exports(self) -> List[str]: """Generates a list of linker exports for the Fortran symbols. """ - return ['{}_{}_{}_;'.format( - self.ns_prefix, self.class_name, self.name)] + if self.fc_override == '': + return [] + else: + return ['{}_{}_{}_;'.format( + self.ns_prefix, self.class_name, self.name)] + + @staticmethod + def _default_fc_chain_call(**kwargs): + return '{fc_func_name}( &\n{fc_args})'.format(**kwargs) @staticmethod def _default_cpp_chain_call(**kwargs): @@ -1455,6 +1694,8 @@ def __init__(self, params: List[Par], name: str, **args if 'cpp_func_name' not in args: args['cpp_func_name'] = name super().__init__(params, 'create_' + name, **args) + self.cpp_chain_call = args.get( + 'cpp_chain_call', self._default_cpp_chain_call) def __copy__(self) -> 'NamedConstructor': result = NamedConstructor(copy(self.params), self.name) @@ -1465,16 +1706,29 @@ def __copy__(self) -> 'NamedConstructor': result.ret_type = self.ret_type result.may_throw = self.may_throw result.cpp_chain_call = self.cpp_chain_call + result.fc_chain_call = self.fc_chain_call result.fc_override = self.fc_override result.f_override = self.f_override result.cpp_func_name = self.cpp_func_name return result + @staticmethod + def _default_cpp_chain_call(**kwargs): + return '{0}::{1}({2})'.format( + kwargs['class_name'], kwargs['cpp_func_name'], + kwargs['cpp_args']) + def _fc_cpp_call(self) -> str: # Create object instead of calling something - cpp_args = [par.fc_cpp_arg() for par in self.params] - return ' {0} * result = new {0}({0}::{1}({2}));\n'.format( - self.class_name, self.cpp_func_name, ', '.join(cpp_args)) + cpp_args = ', '.join([par.fc_cpp_arg() for par in self.params]) + chain_args = { + 'class_name': self.class_name, + 'cpp_func_name': self.cpp_func_name, + 'cpp_args': cpp_args + } + cpp_chain_call = self.cpp_chain_call(**chain_args) + result = self.ret_type.fc_get_result(cpp_chain_call) + return ' {};\n'.format(result) def _fc_return(self) -> str: return ' return reinterpret_cast(result);\n' @@ -1504,6 +1758,74 @@ def _fc_cpp_call(self) -> str: return ' delete self_p;\n' +class MultiMemFun(Member): + """A base class for classes that generate many functions. + + This class represents a set of member functions, for example + a set of template instantiations or functions taking array + arguments of different number of dimensions. It forwards all + functions to the individual instances contained in it. + + Attributes: + instances: A list of the instances in this MultiMemFun. + """ + def __init__(self) -> None: + """Create a MultiMemFun.""" + self.instances = list() # type: List[Member] + + def __copy__(self) -> 'MemFunTmpl': + result = MultiMemFun() + result.instances = [copy(instance) for instance in self.instances] + return result + + def set_class_name(self, class_name: str) -> None: + for instance in self.instances: + instance.set_class_name(class_name) + + def reset_class_name(self, class_name: str) -> None: + for instance in self.instances: + instance.reset_class_name(class_name) + + def set_public(self, public: bool) -> None: + for instance in self.instances: + instance.set_public(public) + + def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None: + """Sets the namespace prefix correctly for all members. + + Args: + ns_for_name: A map from type names to namespace names. + """ + for instance in self.instances: + instance.set_ns_prefix(ns_for_name) + + def fortran_c_wrapper(self) -> str: + """Create a C wrapper for calling by Fortran. + """ + return ''.join([i.fortran_c_wrapper() for i in self.instances]) + + def fortran_interface(self) -> str: + """Create a Fortran interface declaration for the C wrapper. + """ + return ''.join([i.fortran_interface() for i in self.instances]) + + def fortran_function(self) -> str: + """Create the Fortran function definition for this member. + """ + return ''.join([i.fortran_function() for i in self.instances]) + + def fortran_public_declaration(self) -> str: + """Create a Fortran statement declaring us public. + """ + return ''.join( + [i.fortran_public_declaration() for i in self.instances]) + + def fortran_exports(self) -> List[str]: + """Generates a list of linker exports for the Fortran symbols. + """ + return [e for i in self.instances for e in i.fortran_exports()] + + class MemFunTmplInstance(MemFun): def __init__(self, ret_type: Par, @@ -1575,7 +1897,7 @@ def _fc_cpp_call(self) -> str: return ' {};\n'.format(result) -class MemFunTmpl(Member): +class MemFunTmpl(MultiMemFun): def __init__(self, types: List[Par], ret_type: Par, @@ -1607,6 +1929,7 @@ def __init__(self, cpp_func_name: Name of C++ member function to call. cpp_chain_call: Function that produces the C++ chain call. """ + super().__init__() self.ns_prefix = None # type: Optional[str] self.public = None # type: Optional[bool] self.class_name = None # type: Optional[str] @@ -1615,13 +1938,16 @@ def __init__(self, self.name = name self.params = params if params else list() # type: List[Par] self.may_throw = may_throw - self.instances = list() # type: List[MemFun] # generate instances for typ in self.types: instance_ret_type = self.ret_type if isinstance(instance_ret_type, T): instance_ret_type = typ + if isinstance(instance_ret_type, Array): + if isinstance(instance_ret_type.elem_type, T): + instance_ret_type = copy(self.ret_type) + instance_ret_type.elem_type = typ instance_params = list() # type: List[Par] for param in self.params: @@ -1649,77 +1975,6 @@ def __copy__(self) -> 'MemFunTmpl': result.instances = [copy(instance) for instance in self.instances] return result - def set_class_name(self, class_name: str) -> None: - self.class_name = class_name - self.params.insert(0, Obj(class_name, 'self')) - for instance in self.instances: - instance.set_class_name(class_name) - - def reset_class_name(self, class_name: str) -> None: - self.class_name = class_name - self.params[0] = Obj(class_name, 'self') - for instance in self.instances: - instance.reset_class_name(class_name) - - def set_public(self, public: bool) -> None: - self.public = public - for instance in self.instances: - instance.set_public(public) - - def set_ns_prefix(self, ns_for_name: Dict[str, str]) -> None: - """Sets the namespace prefix correctly for all members. - - Args: - ns_for_name: A map from type names to namespace names. - """ - self.ns_prefix = ns_for_name[self.class_name] - self.ret_type.set_ns_prefix(ns_for_name, self.ns_prefix) - for param in self.params: - param.set_ns_prefix(ns_for_name, self.ns_prefix) - - for instance in self.instances: - instance.set_ns_prefix(ns_for_name) - - def fortran_c_wrapper(self) -> str: - """Create a C wrapper for calling by Fortran. - """ - result = '' - for instance in self.instances: - result += instance.fortran_c_wrapper() - return result - - def fortran_interface(self) -> str: - """Create a Fortran interface declaration for the C wrapper. - """ - result = '' - for instance in self.instances: - result += instance.fortran_interface() - return result - - def fortran_function(self) -> str: - """Create the Fortran function definition for this member. - """ - result = '' - for instance in self.instances: - result += instance.fortran_function() - return result - - def fortran_public_declaration(self) -> str: - """Create a Fortran statement declaring us public. - """ - result = '' - for instance in self.instances: - result += instance.fortran_public_declaration() - return result - - def fortran_exports(self) -> List[str]: - """Generates a list of linker exports for the Fortran symbols. - """ - result = list() # type: List[str] - for instance in self.instances: - result += instance.fortran_exports() - return result - class OverloadSet(Member): """Represents a set of overloaded functions. diff --git a/scripts/gmake/check_override.make b/scripts/gmake/check_override.make new file mode 100644 index 00000000..aabdc4c0 --- /dev/null +++ b/scripts/gmake/check_override.make @@ -0,0 +1,8 @@ +# Checks whether a particular tool is overridden and prints useful output. + +ifeq ($(origin $(tool_var)), environment) + $(info - $(tool_var) set to $($(tool_var))) +else + $(info - Set $(tool_var) to override the detected value below.) +endif + diff --git a/scripts/gmake/dep_build.make b/scripts/gmake/dep_build.make new file mode 100644 index 00000000..acb9da6b --- /dev/null +++ b/scripts/gmake/dep_build.make @@ -0,0 +1,37 @@ +# Make module for building a dependency locally + +# This will set $(dep_name)_ROOT to the local installation root dir, and +# $(dep_name)_VERSION to the version we'll build. It also defines a target for +# the dependency that will build it. + +ifneq ($(MAKECMDGOALS),clean) + +$(info - Will build $(dep_name) automatically.) +export $(dep_name)_ROOT := $(CURDIR)/$(dep_name)/$(dep_name) +export $(dep_name)_VERSION := $(dep_version) + +.PHONY: $(dep_name) +$(dep_name): + @echo + @echo Building local $@... + $(MAKE) -C $@ + +ifeq ($(dep_install), 1) + +$(info - Installing, dep_install = $(dep_install)) + +.PHONY: $(dep_name)_install +$(dep_name)_install: $(dep_name) + @echo + @echo Installing local $<... + $(MAKE) -C $< install + +else + +.PHONY: $(dep_name)_install +$(dep_name)_install: + +endif + +endif + diff --git a/scripts/gmake/dep_detect.make b/scripts/gmake/dep_detect.make new file mode 100644 index 00000000..b731ff76 --- /dev/null +++ b/scripts/gmake/dep_detect.make @@ -0,0 +1,38 @@ +# Make module for detecting dependencies + +# Define $(dep_name), $(dep_version_constraint) and $(dep_pkgconfig_name) and +# include this file. It will try to find the dependency in the system +# directories and in the directory set by $(dep_name)_ROOT, and it will set +# $(dep_name)_AVAILABLE to 1, $(dep_name)_ROOT to the prefix and +# $(dep_name)_VERSION to the version if the dependency is found on the system + +ifneq ($(MAKECMDGOALS),clean) + +$(info ) +$(info Checking for $(dep_name) $(dep_version_constraint)...) +$(info - $(dep_name)_ROOT set to $($(dep_name)_ROOT)) + +_pkg_config := export PKG_CONFIG_PATH=$($(dep_name)_ROOT)/lib/pkgconfig:$(PKG_CONFIG_PATH) && pkg-config +_pkg = '$(dep_pkgconfig_name) $(dep_version_constraint)' + +_exists_new_enough := $(shell $(_pkg_config) --exists $(_pkg) || echo NOTFOUND) + +ifneq ($(_exists_new_enough), NOTFOUND) + _modversion = $(shell $(_pkg_config) --modversion $(dep_pkgconfig_name)) + _prefix = $(shell $(_pkg_config) --variable=prefix $(_pkg)) + $(info - $(dep_name) $(_modversion) found at $(_prefix)) + export $(dep_name)_AVAILABLE := 1 + export $(dep_name)_VERSION := $(_modversion) + export $(dep_name)_ROOT := $(shell $(_pkg_config) --variable=prefix $(_pkg)) +else + _exists := $(shell $(_pkg_config) --exists $(dep_pkgconfig_name) || echo NOTFOUND) + ifneq ($(_exists), NOTFOUND) + _modversion = $(shell $(_pkg_config) --modversion $(dep_pkgconfig_name)) + $(info - $(dep_name) $(_modversion) found, but that is too old.) + else + $(info - $(dep_name) not found on the system.) + endif +endif + +endif + diff --git a/scripts/gmake/dep_use.make b/scripts/gmake/dep_use.make new file mode 100644 index 00000000..f168294e --- /dev/null +++ b/scripts/gmake/dep_use.make @@ -0,0 +1,15 @@ +# Make module that defines dummy targets for a dependency already on the +# system. + +ifneq ($(MAKECMDGOALS),clean) + +.PHONY: $(dep_name) +$(dep_name): + @echo + @echo Not building $@, it was already available. + +.PHONY: $(dep_name)_install +$(dep_name)_install: + +endif + diff --git a/scripts/gmake/detect_tool.make b/scripts/gmake/detect_tool.make new file mode 100644 index 00000000..fee41cdc --- /dev/null +++ b/scripts/gmake/detect_tool.make @@ -0,0 +1,13 @@ +# Make module that tries to detect a particular tool. + +# Set tool_var to the variable containing the tool command, and +# tool_command to the command to try, then include this file. + +ifndef $(tool_var) + _version := $(shell $(tool_command) --version 2>/dev/null || echo NOTFOUND) + ifneq ($(_version), NOTFOUND) + export $(tool_var) := $(tool_command) + $(info - Found version $(shell $(tool_command) --version | head -n 1)) + endif +endif + diff --git a/scripts/gmake/detect_tool_implicit.make b/scripts/gmake/detect_tool_implicit.make new file mode 100644 index 00000000..d39e6087 --- /dev/null +++ b/scripts/gmake/detect_tool_implicit.make @@ -0,0 +1,14 @@ +# Make module that tries to detect a particular tool. + +# Set tool_var to the variable containing the tool command, and +# tool_command to the command to try, then include this file. +# This version is for tool_vars that are special implicit variables. + +ifeq ($(origin $(tool_var)), default) + _version := $(shell $(tool_command) --version 2>/dev/null || echo NOTFOUND) + ifneq ($(_version), NOTFOUND) + export $(tool_var) := $(tool_command) + $(info - Found version $(shell $(tool_command) --version | head -n 1)) + endif +endif + diff --git a/libmuscle/cpp/build/make_available.make b/scripts/gmake/make_available.make similarity index 52% rename from libmuscle/cpp/build/make_available.make rename to scripts/gmake/make_available.make index a73b7f42..f601957e 100644 --- a/libmuscle/cpp/build/make_available.make +++ b/scripts/gmake/make_available.make @@ -16,32 +16,12 @@ ifneq ($(MAKECMDGOALS),clean) -$(info ) -$(info Checking for $(dep_name) >= $(dep_min_version)...) - -_pkg_config := export PKG_CONFIG_PATH=$($(dep_name)_ROOT) && pkg-config -_pkg = '$(dep_pkgconfig_name) >= $(dep_min_version)' - -_exists := $(shell $(_pkg_config) --exists $(_pkg) || echo NOTFOUND) - -ifneq ($(_exists), NOTFOUND) - $(info - $(dep_name) found at $(shell $(_pkg_config) --variable=prefix $(_pkg))) - $(dep_name)_ROOT := $(shell $(_pkg_config) --variable=prefix $(_pkg)) - -.PHONY: $(dep_name) -$(dep_name): - @echo Not building $@, it was already available. +include $(TOOLDIR)/dep_detect.make +ifeq ($($(dep_name)_AVAILABLE), 1) + include $(TOOLDIR)/dep_use.make else - $(info - $(dep_name) not found, will build it.) - $(dep_name)_ROOT := $(CURDIR)/$(dep_name)/$(dep_name) - export $(dep_name)_VERSION := $(dep_version) - -.PHONY: $(dep_name) -$(dep_name): - @echo - @echo Building local $@... - $(MAKE) -C $@ + include $(TOOLDIR)/dep_build.make endif endif diff --git a/scripts/make_libmuscle_api.py b/scripts/make_libmuscle_api.py index 9420d366..cd7fd427 100755 --- a/scripts/make_libmuscle_api.py +++ b/scripts/make_libmuscle_api.py @@ -3,15 +3,365 @@ import argparse from copy import copy from textwrap import indent +from typing import Dict, List, Optional import api_generator from api_generator import ( - API, AssignmentOperator, Bool, Bytes, Char, Class, Constructor, + API, Array, AssignmentOperator, Bool, Bytes, Char, Class, Constructor, Destructor, Double, Enum, EnumVal, Float, IndexAssignmentOperator, Int, - Int16t, Int32t, Int64t, MemFun, MemFunTmpl, NamedConstructor, Namespace, - Obj, OverloadSet, ShiftedIndexAssignmentOperator, Sizet, String, T, - VecDbl, Vec2Dbl, Void) + Int16t, Int32t, Int64t, Member, MemFun, MemFunTmpl, MultiMemFun, + NamedConstructor, Namespace, Obj, OverloadSet, + ShiftedIndexAssignmentOperator, Sizet, String, T, VecDbl, Vec2Dbl, + VecSizet, Void) + + +class GridConstructor(MultiMemFun): + """Creates a constructor for grids. + + Grid constructors are a bit weird, with multidimensional array + arguments, and a number of arguments that depends on the number of + dimensions of that array. I don't have the time to implement that + generically, so we're using this custom class. It's a hack, and + nobody likes hacks, but it's what we can do. Also, this only runs + once, and the output is verified by the test suite, so it's not + very dangerous, just ugly. + """ + + def __init__(self, with_names: bool) -> None: + """Create a grid constructor. + + This creates a set of named constructors, one for each + combination of five element types and seven dimensions. If + with_types is True, every instance has n additional string + arguments for index names, where n is the number of dimensions + of the array it accepts. + + Args: + with_names: Whether to add index name arguments. + """ + self.ns_prefix = None # type: Optional[str] + self.public = None # type: Optional[bool] + self.class_name = None # type: Optional[str] + self.with_names = with_names + self.types = [Bool(), Int32t(), Int64t(), Float(), Double()] + self.name = 'grid' + self.instances = list() # type: List[NamedConstructor] + + # generate flexible C functions + for typ in self.types: + # This is not set yet here, but f_type() needs it. + # The dict is only used by Obj, which we don't have. + typ.name = 'data_array' + typ.set_ns_prefix({}, 'LIBMUSCLE') + + instance_ret_type = Obj('') + instance_params = [Array(1, copy(typ), 'data_array')] + if not with_names: + instance_name = 'grid_{}_a'.format(typ.tname()) + chain_call = lambda **kwargs: ('{}::grid(data_array_p,' + ' data_array_shape_v, {{}},' + ' libmuscle::StorageOrder::first_adjacent' + ')').format(kwargs['class_name']) + self.instances.append(NamedConstructor( + instance_params, instance_name, cpp_func_name='grid', + cpp_chain_call=chain_call, f_override='')) + else: + for i in range(1, 8): + arg_name = 'index_name_{}'.format(i) + instance_params.append(String(arg_name)) + instance_name = 'grid_{}_n'.format(typ.tname()) + fc_override=( + 'std::intptr_t LIBMUSCLE_$CLASSNAME$_create_grid_{0}_n_(\n' + ' {1} * data_array,\n' + ' std::size_t * data_array_shape,\n' + ' std::size_t data_array_ndims,\n' + ' char * index_name_1, std::size_t index_name_1_size,\n' + ' char * index_name_2, std::size_t index_name_2_size,\n' + ' char * index_name_3, std::size_t index_name_3_size,\n' + ' char * index_name_4, std::size_t index_name_4_size,\n' + ' char * index_name_5, std::size_t index_name_5_size,\n' + ' char * index_name_6, std::size_t index_name_6_size,\n' + ' char * index_name_7, std::size_t index_name_7_size\n' + ') {{\n' + ' std::vector data_array_shape_v(\n' + ' data_array_shape, data_array_shape + data_array_ndims);\n' + ' auto data_array_p = const_cast<{1} const * const>(data_array);\n' + '\n' + ' std::vector names_v;\n' + ' names_v.push_back(std::string(index_name_1, index_name_1_size));\n' + ' if (data_array_ndims >= 2u)\n' + ' names_v.push_back(std::string(index_name_2, index_name_2_size));\n' + ' if (data_array_ndims >= 3u)\n' + ' names_v.push_back(std::string(index_name_3, index_name_3_size));\n' + ' if (data_array_ndims >= 4u)\n' + ' names_v.push_back(std::string(index_name_4, index_name_4_size));\n' + ' if (data_array_ndims >= 5u)\n' + ' names_v.push_back(std::string(index_name_5, index_name_5_size));\n' + ' if (data_array_ndims >= 6u)\n' + ' names_v.push_back(std::string(index_name_6, index_name_6_size));\n' + ' if (data_array_ndims >= 7u)\n' + ' names_v.push_back(std::string(index_name_7, index_name_7_size));\n' + '\n' + ' Data * result = new Data(Data::grid(\n' + ' data_array_p, data_array_shape_v,\n' + ' names_v, libmuscle::StorageOrder::first_adjacent));\n' + ' return reinterpret_cast(result);\n' + '}}\n\n').format(typ.tname(), typ.fc_cpp_type()) + self.instances.append(NamedConstructor( + instance_params, instance_name, fc_override=fc_override, + f_override='')) + + # generate instances + for typ in self.types: + for ndims in range(1, 8): + instance_ret_type = Obj('') + instance_params = [Array(ndims, copy(typ), 'data_array')] + if with_names: + for i in range(1, ndims+1): + arg_name = 'index_name_{}'.format(i) + instance_params.append(String(arg_name)) + + instance_name = 'grid_{}_{}_{}'.format( + ndims, typ.tname(), 'n' if with_names else 'a') + + if with_names: + arg_list = [ + 'index_name_{}'.format(i) + for i in range(1, ndims+1)] + name_args = ', &\n '.join(arg_list) + name_types = ''.join([ + ' character (len=*), intent(in) :: {}\n'.format(arg) + for arg in arg_list]) + name_params = ', &\n'.join([( + ' index_name_{0},' + ' int(len(index_name_{0}), c_size_t)').format(dim) + for dim in range(1, ndims+1)]) + if ndims < 7: + name_params += ', &\n' + filler_params = ', &\n'.join([( + ' index_name_1,' + ' int(len(index_name_1), c_size_t)') + for dim in range(ndims+1, 8)]) + + dim_list = ', '.join([':'] * ndims) + + f_override=( + 'function LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n( &\n' + ' data_array, &\n' + ' {2})\n' + '\n' + ' implicit none\n' + ' {6}, dimension({8}), intent(in) :: data_array\n' + '{3}' + ' type(LIBMUSCLE_$CLASSNAME$) :: LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n\n' + '\n' + ' integer (c_intptr_t) :: ret_val\n' + '\n' + ' ret_val = LIBMUSCLE_$CLASSNAME$_create_grid_{1}_n_( &\n' + ' {7}, &\n' + ' int(shape(data_array), c_size_t), &\n' + ' {0}_LIBMUSCLE_size, &\n' + '{4}' + '{5} &\n' + ' )\n' + '\n' + ' LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n%ptr = ret_val\n' + 'end function LIBMUSCLE_$CLASSNAME$_create_grid_{0}_{1}_n\n' + '\n').format( + ndims, typ.tname(), name_args, name_types, + name_params, filler_params, + typ.f_type()[0][0], typ.f_chain_arg(), + dim_list) + + self.instances.append(NamedConstructor( + instance_params, instance_name, + f_override=f_override, fc_override='')) + else: + chain_call = lambda tname=typ.tname(), **a: ( + '{}_{}_create_grid_{}_a_( &\n{})'.format( + a['ns_prefix'], a['class_name'], tname, + a['fc_args'])) + + self.instances.append(NamedConstructor( + instance_params, instance_name, cpp_func_name='grid', + fc_chain_call=chain_call, fc_override='')) + + def __copy__(self) -> 'GridConstructor': + result = GridConstructor(self.with_names) + result.ns_prefix = self.ns_prefix + result.public = self.public + if self.class_name is None: + result.class_name = None + else: + result.set_class_name(self.class_name) + result.instances = [copy(instance) for instance in self.instances] + return result + + +class Elements(MultiMemFun): + """Creates the elements() function. + + There are a lot of these, just like with the grid constructor, for + different dimensions and types. So we do some extra work here too + to reduce the size of the ABI. + """ + + def __init__(self) -> None: + self.ns_prefix = None # type: Optional[str] + self.public = None # type: Optional[bool] + self.class_name = None # type: Optional[str] + self.types = [Bool(), Int32t(), Int64t(), Float(), Double()] + self.name = 'elements' + self.instances = list() # type: List[Member] + + # Generate ABI + for typ in self.types: + # This is not set yet here, but f_type() needs it. + # The dict is only used by Obj, which we don't have. + typ.name = 'elements' + typ.set_ns_prefix({}, 'LIBMUSCLE') + func_name = 'elements_{}'.format(typ.tname()) + fc_override = ( + 'void LIBMUSCLE_$CLASSNAME$_elements_{0}_(\n' + ' std::intptr_t self,\n' + ' std::size_t ndims,\n' + ' {1} ** elements,\n' + ' std::size_t * elements_shape,\n' + ' int * elements_format,\n' + ' int * err_code, char ** err_msg, std::size_t * err_msg_len\n' + ') {{\n' + ' $CLASSNAME$ * self_p = reinterpret_cast<$CLASSNAME$ *>(self);\n' + ' try {{\n' + ' *err_code = 0;\n' + ' if (self_p->shape().size() != ndims)\n' + ' throw std::runtime_error("Grid does not have a matching number of dimensions.");\n' + ' {1} const * result = self_p->elements<{1}>();\n' + ' *elements = const_cast<{1} *>(result);\n' + '\n' + ' for (std::size_t i = 0u; i < ndims; ++i)\n' + ' elements_shape[i] = self_p->shape()[i];\n' + '\n' + ' *elements_format = (self_p->storage_order() == libmuscle::StorageOrder::last_adjacent);\n' + ' return;\n' + ' }}\n' + ' catch (std::runtime_error const & e) {{\n' + ' *err_code = 4;\n' + ' static std::string msg;\n' + ' msg = e.what();\n' + ' *err_msg = const_cast(msg.data());\n' + ' *err_msg_len = msg.size();\n' + ' }}\n' + '}}\n\n' + ).format(typ.tname(), typ.fc_cpp_type()) + + self.instances.append( + MemFun( + Array(1, copy(typ), 'elements'), func_name, [Sizet('ndims')], True, + f_override='', fc_override=fc_override)) + + # Generate API + for typ in self.types: + for ndims in range(1, 8): + func_name = 'elements_{}_{}'.format(ndims, typ.tname()) + dims_list = ', '.join([':']*ndims) + rev_dims = ', '.join(map(str, reversed(range(1, ndims+1)))) + f_override = ( + 'subroutine LIBMUSCLE_$CLASSNAME$_elements_{0}_{1}( &\n' + ' self, &\n' + ' elements, &\n' + ' err_code, &\n' + ' err_msg)\n' + '\n' + ' implicit none\n' + ' type(LIBMUSCLE_$CLASSNAME$), intent(in) :: self\n' + ' {2}, dimension({3}), intent(out) :: elements\n' + ' integer, optional, intent(out) :: err_code\n' + ' character(:), allocatable, optional, intent(out) :: err_msg\n' + '\n' + ' type (c_ptr) :: ret_val\n' + ' integer (c_size_t), dimension({0}) :: ret_val_shape\n' + ' integer (c_int) :: ret_val_format\n' + ' {4}, pointer, dimension({3}) :: f_ret_ptr\n' + ' {4}, pointer, dimension(:) :: f_ret_ptr_linear\n' + ' integer (c_int) :: err_code_v\n' + ' type (c_ptr) :: err_msg_v\n' + ' integer (c_size_t) :: err_msg_len_v\n' + ' character (c_char), dimension(:), pointer :: err_msg_f\n' + ' character(:), allocatable :: err_msg_p\n' + ' integer (c_size_t) :: err_msg_i\n' + '\n' + ' call LIBMUSCLE_$CLASSNAME$_elements_{1}_( &\n' + ' self%ptr, &\n' + ' {0}_LIBMUSCLE_size, &\n' + ' ret_val, &\n' + ' ret_val_shape, &\n' + ' ret_val_format, &\n' + ' err_code_v, &\n' + ' err_msg_v, &\n' + ' err_msg_len_v)\n' + '\n' + ' if (err_code_v .ne. 0) then\n' + ' if (present(err_code)) then\n' + ' err_code = err_code_v\n' + ' if (present(err_msg)) then\n' + ' call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/))\n' + ' allocate (character(err_msg_len_v) :: err_msg)\n' + ' do err_msg_i = 1, err_msg_len_v\n' + ' err_msg(err_msg_i:err_msg_i) = err_msg_f(err_msg_i)\n' + ' end do\n' + ' end if\n' + ' return\n' + ' else\n' + ' call c_f_pointer(err_msg_v, err_msg_f, (/err_msg_len_v/))\n' + ' allocate (character(err_msg_len_v) :: err_msg_p)\n' + ' do err_msg_i = 1, err_msg_len_v\n' + ' err_msg_p(err_msg_i:err_msg_i) = err_msg_f(err_msg_i)\n' + ' end do\n' + ' print *, err_msg_p\n' + ' stop\n' + ' end if\n' + ' else\n' + ' if (present(err_code)) then\n' + ' err_code = 0\n' + ' end if\n' + ' end if\n' + '\n' + ' if (ret_val_format .eq. 0) then\n' + ' call c_f_pointer(ret_val, f_ret_ptr, ret_val_shape)\n' + ' elements = f_ret_ptr\n' + ' else\n' + ' call c_f_pointer(ret_val, f_ret_ptr_linear, (/product(ret_val_shape)/))\n' + ' elements = reshape(f_ret_ptr_linear, ret_val_shape, (/ {4}:: /), (/{5}/))\n' + ' end if\n' + 'end subroutine LIBMUSCLE_$CLASSNAME$_elements_{0}_{1}\n\n' + ).format( + ndims, typ.tname(), typ.f_ret_type()[1][0][0], + dims_list, typ.fi_ret_type()[0][0], rev_dims) + + self.instances.append( + MemFun( + Array(ndims, copy(typ), 'elements'), + func_name, [], True, + f_override=f_override, fc_override='')) + + def __copy__(self) -> 'Elements': + result = Elements() + result.ns_prefix = self.ns_prefix + result.public = self.public + if self.class_name is None: + result.class_name = None + else: + result.set_class_name(self.class_name) + result.instances = [copy(instance) for instance in self.instances] + return result + + +create_grid_overloads = [ + 'create_grid_{}_{}_{}'.format(ndims, typ, with_names_tag) + for ndims in range(1, 8) + for typ in ['logical', 'int4', 'int8', 'real4', 'real8'] + for with_names_tag in ['n', 'a']] dataconstref_desc = Class('DataConstRef', None, [ @@ -30,6 +380,9 @@ 'create_nil', 'create_logical', 'create_character', 'create_int1', 'create_int2', 'create_int4', 'create_int8', 'create_real4', 'create_real8', 'create_settings', 'create_copy']), + GridConstructor(False), + GridConstructor(True), + OverloadSet('create_grid', create_grid_overloads), Destructor(), MemFunTmpl( [Bool(), String(), Int(), Char(), Int16t(), Int32t(), Int64t(), @@ -37,6 +390,9 @@ Bool(), 'is_a', [], False), MemFun(Bool(), 'is_a_dict'), MemFun(Bool(), 'is_a_list'), + MemFunTmpl( + [Bool(), Float(), Double(), Int32t(), Int64t()], + Bool(), 'is_a_grid_of', [], False), MemFun(Bool(), 'is_a_byte_array'), MemFun(Bool(), 'is_nil'), MemFun(Bool(), 'is_a_settings', [], False, @@ -73,16 +429,16 @@ ), MemFun(Obj('DataConstRef', 'value'), 'get_item_by_key', [String('key')], True, fc_override=( - 'std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_key_(\n' + 'std::intptr_t LIBMUSCLE_$CLASSNAME$_get_item_by_key_(\n' ' std::intptr_t self,\n' ' char * key, std::size_t key_size,\n' ' int * err_code, char ** err_msg, std::size_t * err_msg_len\n' ') {\n' - ' DataConstRef * self_p = reinterpret_cast(self);\n' + ' $CLASSNAME$ * self_p = reinterpret_cast<$CLASSNAME$ *>(self);\n' ' std::string key_s(key, key_size);\n' ' try {\n' ' *err_code = 0;\n' - ' DataConstRef * result = new DataConstRef((*self_p)[key_s]);\n' + ' $CLASSNAME$ * result = new $CLASSNAME$((*self_p)[key_s]);\n' ' return reinterpret_cast(result);\n' ' }\n' ' catch (std::runtime_error const & e) {\n' @@ -103,15 +459,15 @@ ), MemFun(Obj('DataConstRef', 'value'), 'get_item_by_index', [Sizet('i')], True, fc_override=( - 'std::intptr_t LIBMUSCLE_DataConstRef_get_item_by_index_(\n' + 'std::intptr_t LIBMUSCLE_$CLASSNAME$_get_item_by_index_(\n' ' std::intptr_t self,\n' ' std::size_t i,\n' ' int * err_code, char ** err_msg, std::size_t * err_msg_len\n' ') {\n' - ' DataConstRef * self_p = reinterpret_cast(self);\n' + ' $CLASSNAME$ * self_p = reinterpret_cast<$CLASSNAME$ *>(self);\n' ' try {\n' ' *err_code = 0;\n' - ' DataConstRef * result = new DataConstRef((*self_p)[i-1u]);\n' + ' $CLASSNAME$ * result = new $CLASSNAME$((*self_p)[i-1u]);\n' ' return reinterpret_cast(result);\n' ' }\n' ' catch (std::runtime_error const & e) {\n' @@ -133,6 +489,47 @@ OverloadSet('get_item', [ 'get_item_by_key', 'get_item_by_index' ]), + MemFun(Sizet(), 'num_dims', [], True, + fc_override=( + 'std::size_t LIBMUSCLE_$CLASSNAME$_num_dims_(\n' + ' std::intptr_t self,\n' + ' int * err_code, char ** err_msg, std::size_t * err_msg_len\n' + ') {\n' + ' $CLASSNAME$ * self_p = reinterpret_cast<$CLASSNAME$ *>(self);\n' + ' try {\n' + ' *err_code = 0;\n' + ' return self_p->shape().size();\n' + ' }\n' + ' catch (std::runtime_error const & e) {\n' + ' *err_code = 1;\n' + ' static std::string msg;\n' + ' msg = e.what();\n' + ' *err_msg = const_cast(msg.data());\n' + ' *err_msg_len = msg.size();\n' + ' }\n' + '}\n\n') + ), + MemFun(VecSizet('shp'), 'shape', [], True), + Elements(), + OverloadSet('elements', [ + 'elements_1_logical', 'elements_1_real4', 'elements_1_real8', + 'elements_1_int4', 'elements_1_int8', + 'elements_2_logical', 'elements_2_real4', 'elements_2_real8', + 'elements_2_int4', 'elements_2_int8', + 'elements_3_logical', 'elements_3_real4', 'elements_3_real8', + 'elements_3_int4', 'elements_3_int8', + 'elements_4_logical', 'elements_4_real4', 'elements_4_real8', + 'elements_4_int4', 'elements_4_int8', + 'elements_5_logical', 'elements_5_real4', 'elements_5_real8', + 'elements_5_int4', 'elements_5_int8', + 'elements_6_logical', 'elements_6_real4', 'elements_6_real8', + 'elements_6_int4', 'elements_6_int8', + 'elements_7_logical', 'elements_7_real4', 'elements_7_real8', + 'elements_7_int4', 'elements_7_int8', + ]), + MemFun(Bool(), 'has_indexes', [], True), + MemFun(String(), 'index', [Sizet('i')], True, + cpp_chain_call=lambda **kwargs: 'self_p->indexes().at(i - 1)'), ]) @@ -180,65 +577,6 @@ '}\n' ) ), - MemFun(Obj('Data', 'value'), 'get_item_by_key', [String('key')], True, - fc_override=( - 'std::intptr_t LIBMUSCLE_Data_get_item_by_key_(\n' - ' std::intptr_t self,\n' - ' char * key, std::size_t key_size,\n' - ' int * err_code, char ** err_msg, std::size_t * err_msg_len\n' - ') {\n' - ' Data * self_p = reinterpret_cast(self);\n' - ' std::string key_s(key, key_size);\n' - ' try {\n' - ' *err_code = 0;\n' - ' Data * result = new Data((*self_p)[key_s]);\n' - ' return reinterpret_cast(result);\n' - ' }\n' - ' catch (std::runtime_error const & e) {\n' - ' *err_code = 1;\n' - ' static std::string msg;\n' - ' msg = e.what();\n' - ' *err_msg = const_cast(msg.data());\n' - ' *err_msg_len = msg.size();\n' - ' }\n' - ' catch (std::out_of_range const & e) {\n' - ' *err_code = 3;\n' - ' static std::string msg;\n' - ' msg = e.what();\n' - ' *err_msg = const_cast(msg.data());\n' - ' *err_msg_len = msg.size();\n' - ' }\n' - '}\n\n') - ), - MemFun(Obj('Data', 'value'), 'get_item_by_index', [Sizet('i')], True, - fc_override=( - 'std::intptr_t LIBMUSCLE_Data_get_item_by_index_(\n' - ' std::intptr_t self,\n' - ' std::size_t i,\n' - ' int * err_code, char ** err_msg, std::size_t * err_msg_len\n' - ') {\n' - ' Data * self_p = reinterpret_cast(self);\n' - ' try {\n' - ' *err_code = 0;\n' - ' Data * result = new Data((*self_p)[i-1u]);\n' - ' return reinterpret_cast(result);\n' - ' }\n' - ' catch (std::runtime_error const & e) {\n' - ' *err_code = 1;\n' - ' static std::string msg;\n' - ' msg = e.what();\n' - ' *err_msg = const_cast(msg.data());\n' - ' *err_msg_len = msg.size();\n' - ' }\n' - ' catch (std::out_of_range const & e) {\n' - ' *err_code = 3;\n' - ' static std::string msg;\n' - ' msg = e.what();\n' - ' *err_msg = const_cast(msg.data());\n' - ' *err_msg_len = msg.size();\n' - ' }\n' - '}\n\n') - ), AssignmentOperator('set_logical', Bool('value')), AssignmentOperator('set_character', String('value')), diff --git a/setup.cfg b/setup.cfg index c0ad55c4..637e67b4 100644 --- a/setup.cfg +++ b/setup.cfg @@ -64,6 +64,9 @@ ignore_missing_imports = True [mypy-ruamel.*] ignore_missing_imports = True +[mypy-numpy.*] +ignore_missing_imports = True + #[mypy-ymmsl.*] # This should be fixed later #ignore_missing_imports = True diff --git a/setup.py b/setup.py index a086ccd2..156f2d13 100644 --- a/setup.py +++ b/setup.py @@ -12,6 +12,10 @@ with _libmuscle_version_file.open('w') as f: f.write('__version__ = \'{}\'\n'.format(_version)) +_muscle3_packages = [ + p for p in find_packages() + find_packages('libmuscle/python') + if p != 'integration_test'] + setup( name='muscle3', version=_version, @@ -29,7 +33,7 @@ 'Programming Language :: Python :: 3.6'], # packages=['muscle_manager', 'muscle_manager_protocol', 'libmuscle', 'libmuscle.mcp'], - packages=find_packages() + find_packages('libmuscle/python'), + packages=_muscle3_packages, package_dir={ 'muscle_manager': 'muscle_manager', 'libmuscle': 'libmuscle/python/libmuscle' @@ -40,12 +44,13 @@ python_requires='>=3.5, <4', install_requires=[ 'click', - 'grpcio>=1.17.1, <2', + 'grpcio>=1.24.3, <2', 'msgpack', 'netifaces', - 'protobuf', - 'ruamel.yaml<=0.15.64', - 'ymmsl==0.10.0' # Also in .travisrc, update there as well + 'numpy>=1.12', + 'protobuf>=3.10.0', + 'typing_extensions', + 'ymmsl==0.10.1' # Also in CI, update there as well ], setup_requires=[ 'pytest-runner',