.. SPDX-FileCopyrightText: 2026 Jan Kleinert .. .. SPDX-License-Identifier: MPL-2.0 .. `toctree` .. _grunk: ************* C++ API ************* This section contains a documentation of the C++ classes and functions. All classes and functions in the documentation reside in the namespace ``grunk``. To use grunk's C++ API, you have to include the header `grunk.h`. grunk supplies two modes of operation, that will be denoted as :ref:`static mode ` and :ref:`dynamic mode `. Use the static mode of grunk, if you know all the types you want to use at compile time. Use the dynamic mode of grunk, if you want to use types and functions provided by plugins which are loaded at run time. In this case, grunk falls back to its -dynamic type system, see also the :ref:`design principles ` -section of this documentation. The static mode is the basis of grunk, implemented in ``grunk::core``. .. _grunk-core: ``grunk::core`` =============== The core of grunk consists of the ``action`` function together with ``Feature`` class. A ``Feature`` represents any kind of feature in the feature tree. Given any kind of *referentially transparent* function and some input features from the feature tree, the function ``action`` registeres the evaluation of the given function for the given features as input in the feature tree. .. code-block:: cpp grunk::Feature l(3.3).with_id("l"); grunk::Feature r(2.2).with_id("r"); auto res = grunk::action(std::add, l, r); std::cout<()<` of this documentation or the :ref:`corresponding section` under Usage. .. doxygengroup:: dynamic :content-only: :members: .. _grunk-recipe: ``grunk::recipe`` ================= This section documents all functions and classes of ``grunk::recipe``. This library allows to write parametric recipes as a mix of yaml and LUA code. .. doxygengroup:: recipe :content-only: :members: .. _grunk-plugin: ``grunk::plugin`` ================= To Do: Not implemented yet .. This section documents all functions and classes of grunk's plugin system. This .. includes the ``PluginRegistry`` that manages all registered plugins, the plugin .. interface ``IPlugin``, that plugin authors must use as base class when writing plugins, .. and the ``StdPlugin``, that registers standard C++ types and functions. .. .. doxygengroup:: plugin .. :content-only: .. :members: .. _advanced: Advanced ======== This section contains documentation for the most important internal classes and functions. This section of the documentation is targeted for developers who want to modify grunk. As a user of grunk, you should not need to worry about any of these. .. doxygengroup:: advanced_core :content-only: :members: .. doxygengroup:: advanced_dynamic :content-only: :members: .. doxygengroup:: advanced_recipe :content-only: :members: .. .. doxygengroup:: advanced_plugin .. :content-only: .. :members: