# SAMSON Developer Guide > In this developer guide for SAMSON, the software platform for computational nanoscience, you will learn how to develop in C++ SAMSON Extensions, i.e. modules for SAMSON. # Home # SAMSON 11.0.1 Developer Guide This guide is for developers who build, debug, and distribute SAMSON Extensions with the SAMSON SDK. Use it when you need to understand how the SDK is organized, how extensions fit into SAMSON, and how to implement common extension workflows such as building UI, working with the data graph, exposing functionality, and packaging your work. If you are new to SAMSON extension development, follow this order: 1. Read [Getting started](https://documentation.samson-connect.net/developers/latest/getting-started/index.md) to understand what SAMSON, the SDK, and extensions are. 1. Install the SDK with [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md). 1. Create your first project with [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). 1. Build it with [Building extensions](https://documentation.samson-connect.net/developers/latest/building/index.md). 1. Learn the core runtime concepts: [Extensions](https://documentation.samson-connect.net/developers/latest/extensions/index.md), [Data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), [Getting nodes](https://documentation.samson-connect.net/developers/latest/getting-nodes/index.md), [Modeling and simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md), [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md), [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md), [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md). 1. Use [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md) when you want a worked example instead of a concept page. ## Reading paths Choose the path that matches your immediate task. ### I want to create my first extension - [Getting started](https://documentation.samson-connect.net/developers/latest/getting-started/index.md) - [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) - [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) - [Building extensions](https://documentation.samson-connect.net/developers/latest/building/index.md) - [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md) ### I want to understand the SDK model - [SAMSON Extensions](https://documentation.samson-connect.net/developers/latest/extensions/index.md) - [SDK Organization](https://documentation.samson-connect.net/developers/latest/sdk-organization/index.md) - [Data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) - [Modeling and simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md) - [Node specification language](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md) ### I want to implement common extension features - [Getting nodes](https://documentation.samson-connect.net/developers/latest/getting-nodes/index.md) - [Selectors](https://documentation.samson-connect.net/developers/latest/selectors/index.md) - [Rendering](https://documentation.samson-connect.net/developers/latest/rendering/index.md) - [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) - [Undo and redo](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md) - [Versioning](https://documentation.samson-connect.net/developers/latest/versioning/index.md) - [Scripting with Python](https://documentation.samson-connect.net/developers/latest/scripting/index.md) ### I want reference material and worked examples - [Fundamentals](https://documentation.samson-connect.net/developers/latest/fundamentals/index.md) - [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md) - [Changelog](https://documentation.samson-connect.net/developers/latest/changelog/index.md) - [All versions](https://documentation.samson-connect.net/developers/latest/all-versions/index.md) ## Main sections - [Getting started](https://documentation.samson-connect.net/developers/latest/getting-started/index.md): what SAMSON and the SAMSON SDK are, and what you need before writing code. - [SAMSON Extensions](https://documentation.samson-connect.net/developers/latest/extensions/index.md): the extension types, roles, and categories you will work with. - [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md): how to install the SDK and run the developer build of SAMSON. - [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md): how to scaffold a new extension correctly. - [Building extensions](https://documentation.samson-connect.net/developers/latest/building/index.md): how to configure, generate, and compile extensions on each platform. - [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md): where GUI code lives and how it connects to apps, editors, and models. - [Data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md): the core object model used throughout SAMSON. - [Getting nodes](https://documentation.samson-connect.net/developers/latest/getting-nodes/index.md): practical recipes for finding the nodes you want to work with. - [Modeling and simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md): the different model families and how simulators interact with them. - [Scripting with Python](https://documentation.samson-connect.net/developers/latest/scripting/index.md): how SAMSON integrates Python for runtime scripting and automation. - [SDK Organization](https://documentation.samson-connect.net/developers/latest/sdk-organization/index.md): how the SDK libraries are grouped and where to look for classes. - [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md): hands-on guides for common extension patterns. - [Cite your research](https://documentation.samson-connect.net/developers/latest/cite-your-research/index.md): how to attach citations and documentation metadata to your extension. - [Publishing a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/distributing/index.md): how to package and distribute your extension on [SAMSON Connect](https://www.samson-connect.net/). - [Fundamentals](https://documentation.samson-connect.net/developers/latest/fundamentals/index.md): focused concept pages such as [introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md), [undo and redo](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md), [signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md), and [units](https://documentation.samson-connect.net/developers/latest/units/index.md). - [Changelog](https://documentation.samson-connect.net/developers/latest/changelog/index.md): SDK changes across releases. - [All versions](https://documentation.samson-connect.net/developers/latest/all-versions/index.md): links to other versions of this guide. SAMSON Extension samples are available on GitHub: [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Links - [SAMSON Connect](https://www.samson-connect.net/) - [Marketplace](https://www.samson-connect.net/extensions) - [Documentation Center](https://documentation.samson-connect.net/) - [The SAMSON User Guide](https://documentation.samson-connect.net/users/latest/) - [The SAMSON Scripting Guide](https://documentation.samson-connect.net/scripting/latest/index.html) - [SAMSON Extensions Tutorials](https://documentation.samson-connect.net/tutorials/) - [Forum](https://forum.samson-connect.net/) - [Blog](https://blog.samson-connect.net/) - [YouTube channel](https://www.youtube.com/@samsonconnect) ## Site files - [llms-full.txt](https://documentation.samson-connect.net/developers/latest/llms-full.txt) - an LLM-oriented text representation of the Developer Guide, including the main parts of the SAMSON SDK (excluding pages for template classes and macros). - [llms.txt](https://documentation.samson-connect.net/developers/latest/llms.txt) - an LLM-oriented map with links to Markdown files corresponding to each page of the Developers Guide. # Developer Guide # Getting Started This page gives the minimum mental model you need before creating a SAMSON Extension. Read this page when you are new to the SDK, when you need to explain SAMSON's architecture to another developer, or when you are deciding where your own code should live. For end-user onboarding, see the [User Guide: Getting Started](https://documentation.samson-connect.net/users/latest/getting-started/). This developer page focuses on extension development. ## What SAMSON is **SAMSON** is a software platform for computational nanoscience with an **open architecture**. Most user-visible functionality is provided by installable modules called **SAMSON Extensions**. Extensions can add new tools, editors, importers, exporters, models, simulators, renderers, and other domain-specific features. In practice, that means you extend SAMSON by shipping code that integrates with the platform rather than by modifying the SAMSON executable itself. Common extension families include: - [Apps](https://documentation.samson-connect.net/developers/latest/apps/index.md) for commands, workflows, connectors, and general tools - [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md) for interactive viewport tools - [Controllers](https://documentation.samson-connect.net/developers/latest/controllers/index.md) for control surfaces attached to data graph objects - [Importers](https://documentation.samson-connect.net/developers/latest/importers/index.md) and [exporters](https://documentation.samson-connect.net/developers/latest/exporters/index.md) for file formats - [Models and simulators](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md) for scientific computation and visualization ## What is SAMSON SDK? The **SAMSON SDK** is the developer toolkit used to build those extensions. It includes: - the SAMSON C++ API, exposed through headers and libraries - a developer build of SAMSON used to run and debug extensions - helper extensions and tools that speed up common tasks - this documentation and the accompanying tutorials The SDK also ships helper extensions that are useful during development: - [Extension Generator](https://www.samson-connect.net/extensions/b0d9900c-b058-e7fa-4c31-d85f18b9c4e2) that automatically generates compilable source code for new SAMSON Extensions. - [UUID Generator](https://www.samson-connect.net/extensions/adfd5395-cf7a-23eb-4fb4-f1f7da85d9c3) that generates random UUIDs. - [Extension packager](https://www.samson-connect.net/extensions/0808a8ef-125f-1382-18d4-65b7997bb794) that wraps your SAMSON Extensions into containers that are easy to upload and share on [SAMSON Connect](https://www.samson-connect.net/). - [Exposed functionality viewer](https://www.samson-connect.net/extensions/92c88bef-d33d-3eab-2380-1d4b1788ac1b) that shows classes and functions exposed from SAMSON Extensions via the [introspection mechanism](https://documentation.samson-connect.net/developers/latest/introspection/index.md). Use the [SDK Organization](https://documentation.samson-connect.net/developers/latest/sdk-organization/index.md) page when you want a library-level map of the API. ## SAMSON software platform At a high level, SAMSON is organized into three layers: - **SAMSON Base** is the platform core. It contains the main executable and seven library groups: [Core](https://documentation.samson-connect.net/developers/latest/sdk/Core/index.md), [DataModel](https://documentation.samson-connect.net/developers/latest/sdk/DataModel/index.md), [Modeling](https://documentation.samson-connect.net/developers/latest/sdk/Modeling/index.md), [Simulation](https://documentation.samson-connect.net/developers/latest/sdk/Simulation/index.md), [IO](https://documentation.samson-connect.net/developers/latest/sdk/IO/index.md), [GUI](https://documentation.samson-connect.net/developers/latest/sdk/GUI/index.md), and [Facade](https://documentation.samson-connect.net/developers/latest/sdk/Facade/index.md). - **SAMSON SDK** is the developer-facing layer. It gives you headers, libraries, helper tools, and documentation. - **SAMSON Extensions** are the modules you build with the SDK and load into SAMSON. SAMSON can start without extensions, but it becomes intentionally minimal. Extensions are what make the platform useful in practice. ## What you do as an extension developer Most extension work follows the same loop: 1. Generate a new extension project with the [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). 1. Build and run it against the developer build of SAMSON. 1. Add one or more extension classes such as an app, editor, importer, exporter, or model. 1. Interact with the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), expose functionality through [introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md), and persist state through [serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md). 1. Package and distribute the result when it is ready. That is why the rest of this guide is organized around extension types and core runtime concepts. ## Current version of SAMSON The current version of SAMSON and its SDK is 11.0.1. See [Versioning](https://documentation.samson-connect.net/developers/latest/versioning/index.md) if you need to understand SDK compatibility and version numbers. ## Supported platforms See the [User Guide: Supported platforms](https://documentation.samson-connect.net/users/latest/getting-started/#supported-platforms) for the platform matrix used by current SAMSON releases. For extension development, the practical takeaway is that you should align your compiler, Qt installation, and build tooling with the SDK version you are targeting. The [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) page lists the current developer requirements. ## Requirements See the [User Guide: Requirements](https://documentation.samson-connect.net/users/latest/getting-started/#requirements) for the end-user installation prerequisites. For developing SAMSON Extensions with SAMSON 11.0.1, you also need: - CMake 4.0 or newer - Qt 6.10.2 - a supported compiler and IDE for your platform Next steps: - Go to [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) to install the SDK and verify your environment. - Go to [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) when you are ready to create your first project. # SAMSON Extensions A **SAMSON Extension** is a loadable module built with the SAMSON SDK and distributed through [SAMSON Connect](https://www.samson-connect.net/) or internally inside your team. This page explains how to think about extensions as a developer: - an extension is a package - that package can expose one or more classes - each exposed class plays a specific role inside SAMSON Without extensions, SAMSON is intentionally minimal. Extensions are what add file formats, editors, scientific models, simulation tools, visualization features, and many domain-specific workflows. ## How extensions integrate with SAMSON Extensions expose functionality through the [introspection mechanism](https://documentation.samson-connect.net/developers/latest/introspection/index.md). That is what lets SAMSON and other extensions discover classes, call exposed functions, serialize objects, reuse functionality across package boundaries, and surface features in scripting or UI workflows. In practice, a single extension may contain: - one or more extension classes such as apps, editors, importers, exporters, or models - support code that is not directly exposed - resources such as icons, forms, documentation, and data files The [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) creates the expected project layout and is the standard place to start. ## Choosing the right extension type The easiest way to choose an extension type is to ask how the user will reach your feature. ### Use an app for command-style tools [Apps](https://documentation.samson-connect.net/developers/latest/apps/index.md) are the most general extension type. Use an app when your feature is launched from the UI, performs a calculation or workflow, calls an external tool or web service, or opens its own control window. Typical examples: - a geometry analysis tool - a connector to an external solver - a data-processing workflow - a utility that batches operations on selected nodes Apps appear in **Home > Apps**. ### Use an editor for interactive viewport tools [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md) receive mouse, keyboard, and viewport interaction events. Use an editor when the user manipulates objects directly in the 3D view. Typical examples: - a creation tool - a transform or deformation tool - a selection tool - an interactive modeling instrument Only one editor is active at a time. ### Use an importer or exporter for file formats [Importers](https://documentation.samson-connect.net/developers/latest/importers/index.md) read external files and turn them into SAMSON data graph content. [Exporters](https://documentation.samson-connect.net/developers/latest/exporters/index.md) do the opposite and write SAMSON content to external files. Use them when your main job is format translation rather than interactive behavior. Typical examples: - PDB, XYZ, or CIF readers and writers - density map importers - project exchange formats for external tools ### Use models and simulators for scientific behavior Many scientific extensions are model- or simulation-centric rather than purely UI-centric. The [modeling and simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md) page describes the full taxonomy, but the most common cases are: - **interaction models** for energies and forces - **visual models** for viewport representation - **state updaters** for state changes such as position updates - **simulators** for driving time evolution or iterative computations Use these types when your feature becomes part of the scientific state or runtime behavior of a system rather than just a command wrapper. ### Use custom nodes when you need new data graph objects If the built-in node types are not enough, an extension can define new data graph node classes. This is the right choice when your extension owns new persistent data or introduces a new structural concept in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). ## A practical mental model Most real extensions combine several roles. Example: - an **importer** reads a custom file format - it creates one or more custom **nodes** - a **visual model** renders them - an **app** exposes high-level commands - an **editor** lets the user manipulate them interactively Thinking in these roles makes it easier to decide where code belongs and which base classes you should derive from. ## Extension categories Each extension can belong to one or more [categories](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-category): - Assembly - Biology - Chemistry - Developer - Education - Electronics - General - Materials - Medicine - Metrology - Modeling - Optics - Particles - Pharmacy - Photonics - Physics - Simulation - Toxicology - Visualization Categories are assigned at the extension level, not per class. They are used to organize extensions in the SAMSON UI and on [SAMSON Connect](https://www.samson-connect.net/). ## What to read next - Read [Apps](https://documentation.samson-connect.net/developers/latest/apps/index.md), [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md), [Importers](https://documentation.samson-connect.net/developers/latest/importers/index.md), and [Exporters](https://documentation.samson-connect.net/developers/latest/exporters/index.md) for role-specific details. - Read [Modeling and simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md) if your extension computes, updates, or visualizes scientific state. - Read [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) once you need to expose classes and functions across extension boundaries. # Installation of SDK This page is the practical setup guide for developers. Use it when you need to: - install the SDK for the first time - prepare a machine for extension development - verify the compiler, CMake, and Qt requirements for the current SDK - launch the developer build of SAMSON after installation If SAMSON itself is not installed yet, start with the end-user instructions in the [User Guide: Getting Started](https://documentation.samson-connect.net/users/latest/getting-started/), then return here. ## Download SAMSON SDK Sign in to [SAMSON Connect](https://www.samson-connect.net/), open the **Download** page, and click **Download the SAMSON SDK**. During installation, you will be asked for your **SAMSON SDK key**. The key is shown on the download page and is also available from your account on [SAMSON Connect](https://www.samson-connect.net/). ## Requirements The SDK targets 64-bit operating systems on supported desktop platforms: - Windows 11, Windows 10. - Linux: Ubuntu 22.04 and newer, CentOS, and other similar Linux OS. - Mac OS (64-bit Intel and ARM): Tahoe (macOS 26), Sequoia (macOS 15), Sonoma (macOS 14), Ventura (macOS 13), Monterey (macOS 12). Older operating system versions are not part of the tested matrix. If installation fails on your setup, check the [SAMSON Connect Forum](https://forum.samson-connect.net/). Before installing the SDK, make sure the regular SAMSON application is already installed. If you need requirements for another SDK release, see [All versions](https://documentation.samson-connect.net/developers/latest/all-versions/index.md). ### Requirements on Windows - A compatible compiler and IDE: [Visual Studio 2026 Community or Professional](https://visualstudio.microsoft.com/downloads/) or an older supported version such as VS 2022. - For marketplace compatibility, note that SAMSON and extensions distributed on [SAMSON Connect](https://www.samson-connect.net/) are built with Visual Studio 2022. - CMake 4.0 or newer. Make sure `cmake.exe` is on `PATH`, or be ready to provide the full path manually. - Qt 6.10.2 for 64-bit architecture. Install it from [qt.io](https://www.qt.io/get-started). You can add a path to your Qt6 dir in your environment variables (e.g.: `QT6_DIR=C:/Qt/6.10.2/msvc2022_64`), or provide it when generating a project for Visual Studio. ### Requirements on Linux - A compatible compiler: gcc/g++ 5.4 or newer - CMake 4.0 or newer - Qt 6.10.2 for 64-bit architecture, available from [qt.io](https://www.qt.io/get-started) - IDE: Qt Creator or any editor and debugger you prefer ### Requirements on macOS - A compatible compiler: Clang, installed with Xcode - CMake 4.0 or newer - Qt 6.10.2 for 64-bit architecture, available from [qt.io](https://www.qt.io/get-started) Add the path to the **macos/lib** folder in your Qt installation to the `DYLD_FRAMEWORK_PATH` environment variable. Define an environment variable called `QT6_DIR` and set it to the path to your **Qt/6.10.2/macos** folder in your Qt installation. To do this, open the *.zprofile* file or the *.bash_profile* file (depending on your macOS version) in your user directory and add the following lines: ```shell export QT6_DIR=/home/Users//Qt/6.10.2/macos export DYLD_FRAMEWORK_PATH=/home/Users//Qt/6.10.2/macos/lib:$DYLD_FRAMEWORK_PATH ``` If the *Debug* version of the Qt framework is used in the Debug mode, then you might also need to add the following line (see: [Debugging Techniques: With Frameworks](https://doc.qt.io/qt-6/debug.html#with-frameworks)): ```shell export DYLD_IMAGE_SUFFIX=_debug ``` - IDE: Qt Creator (should be available when you install Qt) or XCode. ## Installation steps The SAMSON SDK installation procedure consists of the following steps described below. ### Step 1: Downloading SAMSON SDK Sign in to the [SAMSON Connect](https://www.samson-connect.net/), go to the **Download** page, and click on **Download the SAMSON SDK**. #### Developer key During the installation of the SDK, you will be asked to provide your **personal developer key** - you should see it next to the download button and you can always check it on your account page. Note The developer key is your personal key and should not be shared with others. ### Step 2: Installing SAMSON SDK Once you have downloaded the SDK and prepared the environment from the [Requirements](#requirements) section, launch the installer. If you want to choose a custom location, use the installer's advanced mode. #### Installing on Windows Double-click on the executable file and follow the installation steps. By default, the SDK is installed into `C:\Users\%USERNAME%\OneAngstrom` folder. You can change this location during installation by choosing "Advanced mode". Inside this folder, you will find a subfolder corresponding to the version of the SDK (e.g., 11.0.1). #### Installing on Linux 1. Open the terminal and go to the folder where SAMSON SDK installer was saved: ```shell cd ~/Downloads/ ``` 1. Make the installer executable: ```shell chmod +x SAMSON-Developer-Setup.run ``` 1. Run the installer (do not use `sudo` here): ```shell ./SAMSON-Developer-Setup.run ``` 1. Follow the installation steps. #### Installing on macOS 1. Double-click the downloaded *SAMSON-Developer-Setup.dmg* file to make its contents available. A new window opens and shows the contents of the *.dmg* file, which should include *SAMSON-Developer-Setup.app*. Double-click *SAMSON-Developer-Setup.app*. When the security notification appears, press *Open*. 1. Follow the installation steps. 1. After the installation is done you may eject the *.dmg* by clicking the eject button in the Finder's sidebar. The SAMSON SDK is installed by default in the *$HOME/OneAngstrom/SAMSON-Sdks/* folder. ### Step 3: Running SAMSON Debug After installation, verify the developer runtime by launching **SAMSON Debug**. This is the build you use to load and debug extensions during development. If anything fails at this stage, the problem is usually one of these: - Qt is installed but not discoverable - the wrong compiler toolchain is active - a required runtime path is missing from the environment If needed, check the [SAMSON Connect Forum](https://forum.samson-connect.net/). #### Running on Windows By default, SAMSON and its SDK are installed in the `C:\Users\%USERNAME%\OneAngstrom` folder (referred to below as `SDK_PATH`). - Go to `SDK_PATH\SAMSON-Sdks\11.0.1\SAMSON-Debug\Binaries`. - Double-click `SAMSON-Core.exe` or `SAMSON-Core-Console.exe`; this should launch the developer version of SAMSON. #### Running on Linux By default, SAMSON and its SDK are installed in the `$HOME/OneAngstrom` folder (referred to below as `SDK_PATH`). - Go to `SDK_PATH/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries`. - Open and edit the `SAMSON-Core.sh` file. You need to provide the path to Qt installed on your system; modify the following line: ```shell export LD_LIBRARY_PATH=YourQtPath/Qt/6.10.2/gcc_64/lib:$script_dir:$LD_LIBRARY_PATH ``` Save the file. - To launch the developer version of SAMSON, open a terminal in this folder and execute ```shell ./SAMSON-Core.sh ``` You may also need to make executable the following files placed in `SDK_PATH/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries`: `SAMSON-Core.sh` and `SAMSON-Core`: ```shell cd SDK_PATH/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries ls -la | grep "SAMSON-Core" chmod +x SAMSON-Core* ``` For an easy launch (in terminal, from any folder), you may create an alias in your `.bashrc` file: ```shell alias samson-debug='SDK_PATH/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries/SAMSON-Core.sh' ``` #### Running on macOS To launch the developer version of SAMSON, open a terminal and go to the `~/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries` folder ```shell cd ~/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries ./SAMSON-Core ``` You may also need to make executable the following files placed in `~/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries`: `SAMSON-Core-Console` and `SAMSON-Core`: ```shell cd ~/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries ls -la | grep "SAMSON-Core" chmod +x SAMSON-Core* ``` ## What's next? After the SDK is installed and SAMSON Debug starts correctly, the usual next step is to generate a fresh extension project and build it. - [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) - [Building a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) - [Getting started](https://documentation.samson-connect.net/developers/latest/getting-started/index.md) - [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) - [Building a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) # Generating a SAMSON Extension The **SAMSON SDK Extension Generator** is the standard way to start a new extension project. Use it when you want a project that already matches SAMSON's expected layout, naming rules, and build configuration. The generated code compiles immediately and contains comments that point you to the places you will usually customize first. Before you start: - install the SDK as described in [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) - add the [SAMSON SDK Extension Generator](https://www.samson-connect.net/extensions/b0d9900c-b058-e7fa-4c31-d85f18b9c4e2) - restart SAMSON if needed so the generator is downloaded and loaded ## Running the Extension Generator In the SAMSON menu, go to **Home > Apps > Developer > Generate a new extension**. The generator walks you through a small wizard. The important thing is not just what to click, but what each choice means for the project you are about to create. Once you open the app, click **Generate a new SAMSON Extension**. ## Step 1: Choose the development folder The first page asks for the folder where you keep your extension sources. For your first extension, choose or create an empty development folder. It does not need to be inside the SDK installation. This folder becomes your working area for extension projects. You can reuse it for later extensions, and the generator remembers it for future runs. ## Step 2: Name the extension The second page asks for the extension name and description. The name matters because it is reused throughout the generated code. If your extension is named `MyElement`, generated classes and files will use the `SEMyElement...` prefix. Choose a short, stable name you will be comfortable keeping in class names and file names. Both a name and a description are required before you can continue. ## Step 3: Choose the classes to generate The third page is where you decide what kind of extension you are building. You can add one or several classes, and each one generates its own source, header, and support files. The available roles are: - [App](https://documentation.samson-connect.net/developers/latest/apps/index.md): general commands, tools, workflows, and connectors - [Editor](https://documentation.samson-connect.net/developers/latest/editors/index.md): interactive viewport tools - [Exporter](https://documentation.samson-connect.net/developers/latest/exporters/index.md): data graph to file - [Importer](https://documentation.samson-connect.net/developers/latest/importers/index.md): file to data graph - [Interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models): energies and forces - [State updater](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#state-updaters): state changes such as position updates - [Visual model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models): viewport representation - [Node](https://documentation.samson-connect.net/developers/latest/data-graph/index.md): custom data graph objects Give each class a distinct name. Those names also become part of the generated type and file names. For example, a class named `VisualModel` inside an extension named `MyElement` produces names such as `SEMyElementVisualModel`. If you are unsure what to generate, start small: - choose only an **app** if you are building a command or utility - choose an **app** and an **editor** if you need both a window and interactive viewport behavior - add a **node** or **model** only when you already know you need custom persistent state or scientific behavior You can add more classes later, so avoid over-scaffolding the first iteration. ## Step 4: Generate the project The final page shows the target folder contents and provides the **Generate** button. Press **Generate**. The generator creates a compilable extension project with the selected classes, resources, and CMake files. ## Directory structure The generator creates a predictable project layout. In your development folder, you should see: - a `build` directory for generated build artifacts - one directory per generated extension, such as `MyElement` - a top-level `CMakeLists.txt` that includes all extension projects in that workspace When you generate more extensions into the same development folder, the top-level `CMakeLists.txt` is updated so they can be built together. Inside a generated extension folder, you will typically find: - `data`: files distributed with the extension, such as parameters or templates - `doc`: extension-specific documentation - `form`: Qt Designer `.ui` files - `include`: C++ headers - `resource`: icons, translations, and other assets - `source`: C++ implementation files - `CMakeLists.txt`: build rules for that extension ## Translations and icons Translations use Qt's [internationalization mechanism](http://doc.qt.io/qt-6/internationalization.html). Icons are regular image assets that you should replace early so your extension is distinguishable in the UI. Typical places where icons appear: - an app icon in **Home > Apps** - an editor icon in the editor tool area - a model or controller icon in property windows ## Generated code The generated source contains comments that explain the intended customization points. Search for `SAMSON Extension generator pro tip` to find the places that usually need developer action. For a first pass, focus on: - window title, tooltip, and icon metadata - the main action or interaction entry points - serialization or settings persistence if your class stores state - the GUI form and the signals connected to it Tip See the [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md) section for examples of various extensions. Next step: [build the generated extension](https://documentation.samson-connect.net/developers/latest/building/index.md). # Developing GUI GUIs for SAMSON and SAMSON Extensions are built with [Qt 6.10.2](https://www.qt.io/get-started). This page is not a Qt tutorial. Its purpose is to explain how GUI code should be structured inside a SAMSON extension so the result remains maintainable, distributable, and easy to integrate with the rest of the SDK. ## The core design rule Keep GUI code focused on interaction with the user. Use GUI classes to: - collect input - trigger actions - display state and results - manage widgets, forms, and interaction flow Do not put core scientific logic, file parsing, or non-visual processing in GUI classes when it can live in data-side classes such as [apps](https://documentation.samson-connect.net/developers/latest/apps/index.md), [models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md), or helper objects. That separation is important for three reasons: - your functionality becomes easier to reuse outside the GUI - scripting and introspection stay cleaner - testing and maintenance become simpler ## Typical GUI pairings in SAMSON Several extension types have a natural GUI counterpart: - an [app](https://documentation.samson-connect.net/developers/latest/apps/index.md) often uses [`SBGApp`](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) - a data graph node may have an [`SBGDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBGDataGraphNode/index.md) GUI class - property windows and specialized widgets are used to expose object state to the user The common pattern is: 1. put the logic in the data-side class 1. let the GUI call into that logic 1. keep widget code thin and explicit ## Qt in a distributable extension Qt offers many modules, but not every Qt module is appropriate for a SAMSON extension that will be distributed through [SAMSON Connect](https://www.samson-connect.net/). In particular, module licensing matters. Avoid Qt modules whose licensing would make the extension unsuitable for distribution in the SAMSON ecosystem. When in doubt, check the license terms for the exact Qt module you plan to use before you build a dependency on it. ## Working with forms The [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) creates Qt forms where they are needed. Those `.ui` files are a good starting point for standard windows and property panels. For day-to-day form editing, Qt Creator is a practical choice: - [Qt Creator manual](https://doc.qt.io/qtcreator/index.html) - [Qt documentation](https://doc.qt.io/qt-6/index.html) ## A practical example Suppose you are building an optimization tool: - the app class owns parameters, execution logic, and result handling - the GUI contains text fields, checkboxes, progress feedback, and action buttons - button clicks call app methods rather than implementing the optimization directly in widget slots That structure keeps the extension usable from both the GUI and from programmatic entry points. ## Good practices - Keep long-running or scientific logic out of widget classes. - Make UI state reflect real application state rather than duplicating it unnecessarily. - Treat generated forms as a starting point, not as the place to hide business logic. - Prefer clear, direct signal-slot wiring over overly implicit UI behavior. ## What to read next - [Apps](https://documentation.samson-connect.net/developers/latest/apps/index.md) and [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md) for the extension types most commonly paired with GUI code - [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md) for complete GUI examples # Data Graph The **data graph** is the central object model of SAMSON. If your extension creates objects, modifies them, renders them, serializes them, or reacts to their changes, you are working with the data graph. Most of the rest of the SDK makes more sense once this model is clear. Everything directly or indirectly added by the user, SAMSON, or a SAMSON Extension lives in the data graph as a **node**. All data graph nodes derive from [`SBDDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md). That includes atoms ([`SBAtom`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md)), bonds ([`SBBond`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeBond/index.md)), models, simulators, controllers, folders, and many other runtime objects. The figure below shows the document view, which is one way to see the graph structure. ## Topology The data graph is a directed hierarchy: - each node has at most one parent - a node may have children - [documents](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) are roots and have no parent The parent of a node is retrieved with [`SBDDataGraphNode::getParent`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getparent). Child relationships are managed through functions such as [`SBDDataGraphNode::addChild`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) and [`SBDDataGraphNode::removeChild`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removechild), usually reimplemented by derived classes. In practice, documents organize many node families: - A document may contain all the [node](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) types, e.g.: [folders](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentFolder/index.md), [models](https://documentation.samson-connect.net/developers/latest/api/classSBMModel/index.md), [simulators](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulator/index.md), [controllers](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md), [cameras](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentCamera/index.md), [groups](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md), [paths](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelPath/index.md), [conformations](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelConformation/index.md), [labels](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentLabel/index.md). - A document folder may be used to arrange nodes and may contain different nodes such as other [folders](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentFolder/index.md), [models](https://documentation.samson-connect.net/developers/latest/api/classSBMModel/index.md), [simulators](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulator/index.md), [controllers](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md), [labels](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentLabel/index.md), [paths](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelPath/index.md), [conformations](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelConformation/index.md), etc. Multiple documents may be opened simultaneously in SAMSON. See [User guide: Documents](https://documentation.samson-connect.net/users/latest/documents/) for more information. ## Node lifecycle A data graph node typically goes through four lifecycle stages: - C++ object creation (e.g. with a `new` operator) - Node creation (using the [create](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create) function) - Node destruction (using the [erase](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) function) - C++ object destruction (usually automatically, or forced with a call to `deleteReferenceTarget`) This distinction matters because data graph nodes are also [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). In other words, lifetime is tied to the SAMSON referencing system, not to raw pointer ownership. As a result, nodes should not be destroyed with `delete`. When a node really needs to be deleted at the C++ level, use a [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/referencing/index.md): ```cpp SBPointer nodePointer = new SBAtom(); // ... // Remove all references to the atom, and delete it nodePointer.deleteReferenceTarget(); ``` See also [Referencing](https://documentation.samson-connect.net/developers/latest/referencing/index.md) and [Memory management](https://documentation.samson-connect.net/developers/latest/memory-management/index.md) ## Node identity Each node has a *type*, retrievable with api/classSBDDataGraphNode.md#function-gettype. For example: - [`SBAtom`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) returns `SBNode::Atom` - [`SBMStructuralModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) returns `SBNode::StructuralModel` `SBNode::getTypeString` is a convenience helper when you need a textual representation. Types are often the fastest first filter when searching the graph: ```cpp // Find all atoms SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::Atom); ``` Each node also has a unique internal index managed by SAMSON. These indices are contiguous and unstable: when nodes are removed, indices may be reused. They are useful for internal tasks such as viewport picking, but they are not a persistent identity you should serialize or store as a long-term external reference. The index is available through api/classSBDDataGraphNode.md#function-getnodeindex. See also [`SBDDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) ## Flags Each data graph node has four commonly used flags: - The [created flag](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated) indicates whether the node is created or not (see [Node lifecycle](#node-lifecycle)) - The [visibility flag](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag) indicates whether the renderer should display the node in the viewport - The [highlighting](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) indicates whether the renderer should highlight the node in the viewport - The [selection flag](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) indicates whether the node is [selected](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) or not These flags are accessed through [`SBDDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md). Except for the highlighting flag, which is typically temporary, changing them is generally [undoable](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md). api/classSBDDataGraphNode.md#function-getflags returns a combined `unsigned int` representation of the highlighting and selection flags. See also [`SBDDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) ## Materials and color schemes Each data graph node may have a [material](https://documentation.samson-connect.net/developers/latest/materials/index.md), which influences its rendering in the viewport. Each material is associated with a [color scheme](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md), which determines how colors are assigned to nodes or positions. When a material is attached to a node, it affects that node and its descendants unless a descendant defines its own material. See also [`SBDDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) ## Node predicates [`SBDDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) defines node predicates, which are functors used to collect nodes based on conditions. Common examples: - `SBNode::IsType(...)` to filter by node type - `SBNode::IsSelected()` to filter by selection state Predicates can be combined through logical operators. For example, collecting selected atoms can be written as: ```cpp // Find all selected nodes SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom) && SBNode::IsSelected()); ``` See also Please refer to [Getting Nodes: Node predicates](https://documentation.samson-connect.net/developers/latest/getting-nodes/#node-predicates) for more information. ## Node getters The same class also defines node getters, which are functors that retrieve properties and can be combined into predicates. For example, [SBNode::GetType](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) retrieves the type of a node: ```cpp // Get the type of a node SBPointer nodePointer = new SBAtom(); SBNode::GetType()(nodePointer()); // returns SBNode::Atom ``` Because getters can participate in comparisons, they can build [node predicates](#node-predicates). Collecting all atoms can therefore also be written as: ```cpp // Find all atoms SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::GetType() == SBNode::Atom); ``` The expression `SBNode::GetType() == SBNode::Atom` creates a predicate that is then passed to `getNodes`. In general, node getters mirror ordinary getter functions but use an initial capital letter because they are classes. For example: - `SBNode::GetType` corresponds to [`SBNode::getType`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) - `SBAtom::GetTemperatureFactor` corresponds to api/classSBMStructuralModelNodeAtom.md#function-gettemperaturefactor See also Please refer to [Getting Nodes: Node getters](https://documentation.samson-connect.net/developers/latest/getting-nodes/#node-getters) for more information. ## Serialization Data graph nodes support *serialization* through api/classSBDDataGraphNode.md#function-serialize and api/classSBDDataGraphNode.md#function-unserialize. Serialization is what allows SAMSON to copy, paste, save, load, and otherwise persist node state. See also Please refer to [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) for more information. # Getting Nodes Collecting the right nodes is one of the most common tasks in SAMSON extension development. You will do it when you: - read the current selection - find atoms, residues, or models of a specific kind - apply a command to a subset of the data graph - convert a query string into a concrete node set The main low-level entry point is `SBNode::getNodes`, which collects descendants of a node such as a document, molecule, or residue. At the facade level, `SAMSON::getNodes` offers convenience functions based on [NSL](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md) or viewport position. ## Node predicates Node predicates are the most direct programmatic way to describe which nodes you want. [`SBDDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) defines a family of predicates that can be passed to `getNodes`. For example, `SBNode::IsType(...)` filters by node type: ```cpp // Find all atoms in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom)); ``` ```cpp // Find all residues in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Residue)); ``` Because filtering by type is very common, there is also a convenience overload that takes only [`SBNode::Type`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type): ```cpp // Find all atoms in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::Atom); ``` ```cpp // Find all residues in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::Residue); ``` `SBNode::IsSelected()` filters by selection state: ```cpp // Find all selected nodes in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsSelected()); ``` Predicates can be combined through logical operators. For example, selected atoms can be collected with: ```cpp // Find all selected atoms in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom) && SBNode::IsSelected()); ``` You can also collect from more than one source node or refine an existing node indexer. For example, if you already have a `nodeIndexer` and want all atoms it contains transitively: ```cpp SBNodeIndexer atomIndexer; SB_FOR(SBNode* node, nodeIndexer) node->getNodes(atomIndexer, SBNode::IsType(SBNode::Atom)); ``` ## Node getters Node getters are functors that retrieve properties and can be compared to build predicates. For example, collecting all atoms can also be written as: ```cpp // Find all atoms SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::GetType() == SBNode::Atom); ``` The expression `SBNode::GetType() == SBNode::Atom` builds a predicate that is then passed to `getNodes`. In general, getters mirror ordinary getter functions but use an initial capital letter because they are classes. For example: - `SBNode::GetType` corresponds to [`SBNode::getType`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) - `SBAtom::GetTemperatureFactor` corresponds to [`SBAtom::getTemperatureFactor`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/#function-gettemperaturefactor) Predicates and getters can be combined to express fairly rich rules: ```cpp // Find all selected atoms with a large enough temperature factor SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsSelected() && SBNode::IsType(SBNode::Atom) && (SBAtom::GetTemperatureFactor() > 2.0)); ``` ```cpp // Find all atoms which have a partial charge larger than 0.4f SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom) && SBAtom::HasPartialCharge() && (SBAtom::GetPartialCharge() >= 0.4f)); ``` These predicate and getter patterns are the programmatic foundation of the [Node Specification Language](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md). ## Selection strings SAMSON also supports [Node Specification Language (NSL)](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md) queries, which are useful when the selection should be expressed as text. See also [User guide: Node Specification Language](https://documentation.samson-connect.net/users/latest/nsl/) [`SAMSON::makeNodePredicate`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-makenodepredicate) builds a node predicate from an NSL query string. Examples: ```cpp // A predicate that is true if and only if // the node is an atom: // "n.t a" is short of "node.type atom" SBNodePredicate* nodePredicate = SAMSON::makeNodePredicate("n.t a"); SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, *nodePredicate); ``` ```cpp // A predicate that is true if and only if // the node a residue in alpha helix: // "r.ss h" is short of "residue.secondaryStructure helix" SBNodePredicate* nodePredicate = SAMSON::makeNodePredicate("r.ss h"); ``` ```cpp // A predicate that is true if and only if // the node is a sidechain that has at least one Sulfur atom: // "n.t sc h S" is short of "node.type sidechain having S" SBNodePredicate* nodePredicate = SAMSON::makeNodePredicate("n.t sc h S"); ``` ```cpp // A predicate that is true if and only if // the node is a hydrogen atom bonded to an oxygen atom: // "H l O" is short of "H linking O" SBNodePredicate* nodePredicate = SAMSON::makeNodePredicate("H l O"); ``` Or you can use an NSL string directly to get the nodes from the active document: ```cpp // Select from the active document // all hydrogen atoms bonded to oxygen atoms SBNodeIndexer nodeIndexer; SAMSON::getNodes(nodeIndexer, "H linking O"); ``` ## Choosing the right approach Use: - a **type filter** when the query is simple and static - **predicates and getters** when the logic is code-driven and composable - **NSL** when the query should be expressed, stored, or edited as text # Modeling and Simulation Modeling and simulation are at the heart of SAMSON, and the SDK reflects that by separating scientific responsibilities into a few explicit abstractions. This page answers a practical developer question: **what kind of model or simulator should my feature be?** The two main library groups involved are the [Modeling Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Modeling/index.md) and the [Simulation Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Simulation/index.md). SAMSON represents nanosystems using **five categories of models**: - [Structural models](#structural-models) describe geometry and topology - [Visual models](#visual-models) provide graphical representations - [Dynamical models](#dynamical-models) describe dynamical degrees of freedom - [Interaction models](#interaction-models) describe energies and forces - [Property models](#property-models) describe properties that do not fit the first four categories [Simulators](#simulators) and [state updaters](#state-updaters) then operate on those models to advance a system through time or iterations. Models and simulators are nodes in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). All models derive from [`SBMModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMModel/index.md), model nodes derive from [`SBMModelNode`](https://documentation.samson-connect.net/developers/latest/api/classSBMModelNode/index.md), and simulators derive from [`SBSSimulator`](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulator/index.md). ## A quick mental model If you are choosing where your code belongs: - use a **structural model** for what the system is - use a **visual model** for how it looks - use a **dynamical model** for what can move - use an **interaction model** for what exerts forces or contributes energy - use a **property model** for extra scientific data - use a **state updater** for the numerical rule that advances state - use a **simulator** for the runtime object that coordinates a dynamical model, interaction model, and state updater ## Models ### Structural models **Structural models** describe the geometry and topology of nanosystems. Typical contents include atoms ([`SBAtom`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md)), bonds ([`SBBond`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeBond/index.md)), and higher-level structural organization such as molecules ([`SBMolecule`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeMolecule/index.md)) and residues ([`SBResidue`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeResidue/index.md)). Use a structural model when your extension defines what exists in the system and how those parts are connected. Structural models may send [structural events](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelEvent/index.md). ### Visual models **Visual models** provide graphical representations. Examples include secondary-structure representations, isosurfaces, field visualizations, and custom rendering styles. Use a visual model when the main responsibility is *how something is shown*, not what it physically is. SAMSON Extensions provide visual models by deriving from [`SBMVisualModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModel/index.md) and implementing display functions called by the [renderer](https://documentation.samson-connect.net/developers/latest/rendering/index.md). Visual models may send [visual events](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModelEvent/index.md). ### Dynamical models **Dynamical models** describe where the degrees of freedom are and what the dynamic state is. For example, a [particle system](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelParticleSystem/index.md) applied to structural particles assigns translational degrees of freedom and stores dynamic quantities such as positions, momenta, and masses. Use a dynamical model when your extension needs a formal state that can evolve during simulation. Dynamical models support passive signaling mechanisms through [buffers](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) (i.e. they provide a list of updated positions and updated momenta at each time step), and may send [dynamical events](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelEvent/index.md). ### Interaction models **Interaction models** represent energies and forces. Examples include Lennard-Jones interactions, spring models, elastic network models, and force fields. An interaction model provides force and energy information corresponding to the degrees of freedom of a dynamical model. For example, applied to a [particle system](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelParticleSystem/index.md), it provides both total energy and particle forces. Use an interaction model when the feature computes physical interactions rather than only representing state or appearance. SAMSON Extensions provide interaction models by deriving from [`SBMInteractionModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModel/index.md) and implementing functions such as [`SBMInteractionModel::updateInteractions`](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModel/#function-updateinteractions). Interaction models support passive signaling mechanisms through [buffers](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) (i.e. they provide a list of updated forces at each time step), and may send [interaction events](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelEvent/index.md). ### Property models **Property models** represent scientific properties that are not already covered by the other four model categories. Examples include a scalar such as gyration radius, a scalar or vector field, or a function object with evaluable values. Use a property model when you need to attach computed or derived scientific information to a system without forcing it into structural, visual, dynamical, or interaction semantics. SAMSON Extensions provide property models by deriving from [`SBMPropertyModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMPropertyModel/index.md). Specific subfamilies may expose additional functions, such as [`SBMPropertyModelFunction::getValue`](https://documentation.samson-connect.net/developers/latest/api/classSBMPropertyModelFunction/#function-getvalue) for function-valued models. Property models may send [property events](https://documentation.samson-connect.net/developers/latest/api/classSBMPropertyModelEvent/index.md). ## State updaters **State updaters** implement the numerical rule used to advance state during [simulation](#simulators). Examples include minimization algorithms, Monte Carlo updates, and molecular dynamics integration steps. SAMSON Extensions provide state updaters by deriving from [`SBSStateUpdater`](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdater/index.md) and implementing functions such as [`SBSStateUpdater::updateState`](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdater/#function-updatestate). ## Simulators **Simulators** derive from [`SBSSimulator`](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulator/index.md) and coordinate runtime evolution. A simulator typically connects: - a [dynamical model](#dynamical-models) - an [interaction model](#interaction-models) - a [state updater](#state-updaters) When interactive simulation starts, SAMSON steps through simulators in the data graph and lets them update the attached dynamical state. Use a simulator when your extension needs a runtime object that orchestrates the simulation process, not just one scientific ingredient of it. Simulators may send [simulator events](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulatorEvent/index.md), while state updaters may send [state updater events](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdaterEvent/index.md). Tip See [User guide: Modeling and Simulation](https://documentation.samson-connect.net/users/latest/modeling-and-simulation/) for more information on how simulators are used in SAMSON. # Scripting This page is for C++ extension developers. It explains how to: - execute Python code and Python files from SAMSON; - install and remove Python packages in the embedded Python environment; - install dependencies from a `requirements.txt` file or from a local package. For writing Python scripts themselves, see: - [User guide: Scripting](https://documentation.samson-connect.net/users/latest/scripting/) - [Python Scripting Guide](https://documentation.samson-connect.net/scripting/latest/) ## Overview SAMSON exposes Python Scripting in two different ways: - Use [`SAMSON::runPythonCode`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-runpythoncode) and [`SAMSON::runPythonFile`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-runpythonfile) when you want to execute Python from C++. - Use the `SEPythonScriptApp` proxy when you want to manage the embedded Python environment, for example to query, install, or uninstall Python packages. Note Python code runs in the same embedded interpreter as the Python Console. If Python Scripting has not been initialized yet, SAMSON initializes it before executing the request. Tip If your extension already depends directly on Python Scripting, the same operations are also available as static functions on `SEPythonScriptApp`. The proxy-based approach shown below is usually preferable because it avoids introducing a compile-time dependency on that extension. ## Running Python from C++ If your goal is simply to execute Python, use the high-level SAMSON facade. You do not need to fetch the Python Scripting proxy yourself. ### Run an inline Python snippet `SAMSON::runPythonCode` is the simplest entry point for short scripts generated from C++: ```cpp const std::string code = R"( from samson import * SAMSON.runCommand("Ligands") SAMSON.runCommand("Licorice") print("Applied Licorice to the current ligand selection") )"; if (!SAMSON::runPythonCode(code, true)) { SB_ERROR("Could not execute Python code"); } ``` Use the `raisePythonConsole` argument when you want the Python Console to be brought to the front and the output to be visible immediately: - `true`: useful while developing or debugging; - `false`: useful for background execution triggered from your extension. ### Run a Python file For reusable workflows, keep the Python logic in a `.py` file and execute it with `SAMSON::runPythonFile`: ```cpp const QString scriptPath = QDir::cleanPath(QString::fromStdString(SB_ELEMENT_PATH) + "/Resource/scripts/my_workflow.py"); if (!QFileInfo::exists(scriptPath)) { SB_ERROR("Missing Python script: " + scriptPath.toStdString()); return; } if (!SAMSON::runPythonFile(scriptPath.toStdString(), true)) { SB_ERROR("Could not execute Python file"); } ``` This is usually the better choice when: - the script is more than a few lines long; - you want to ship Python workflows with your extension; - you want users to be able to inspect or modify the script. Note Internally, `runPythonFile` executes the file in the embedded IPython namespace. In practice, this means the file runs in the same interpreter state as the Python Console, with the SAMSON Python bindings already available. ## Managing the embedded Python environment Package management is exposed by the Python Scripting extension through the `SEPythonScriptApp` app interface. This is the API you should use when your extension needs to prepare Python dependencies before running a script. Tip You can see all the exposed functionality per extension and per class in the [Exposed Functionality Viewer](https://www.samson-connect.net/extensions/92c88bef-d33d-3eab-2380-1d4b1788ac1b) directly in SAMSON. The examples below assume the usual SAMSON and Qt headers are already included, such as `SAMSON.hpp`, `SBProxy.hpp`, `SBFunction.hpp`, `QDir`, and `QFileInfo`. ### Resolve the Python Scripting proxy ```cpp SBProxy* getPythonScriptingProxy() { const SBUUID pythonScriptingUUID("7B654CE6-E38C-B97F-6746-4FD6934487C2"); static SBProxy* proxy = SAMSON::getProxy( "SEPythonScriptApp", pythonScriptingUUID); if (!proxy || !proxy->getInterface()) { SB_ERROR("Python Scripting is not available"); return nullptr; } return proxy; } ``` Once you have the proxy, retrieve the functions you need from its interface. Note When a function is overloaded, pass typed `SB_VALUE(...)` placeholders to `getFunction(...)` so SAMSON can resolve the correct signature. ### Check whether a package is installed The code below demonstrates how you can check whether a specific Python package is installed and its version. ```cpp SBProxy* proxy = getPythonScriptingProxy(); if (!proxy) return; SBFunction* hasPackageFunction = proxy->getInterface()->getFunction( "hasPackage", SB_VALUE("")); SBFunction* getPackageVersionFunction = proxy->getInterface()->getFunction( "getPackageVersion", SB_VALUE("")); const std::string packageName = "numpy"; if (hasPackageFunction && getPackageVersionFunction) { SBValue hasPackageValue = hasPackageFunction->call( 0, SB_VALUE(packageName)); SBValue versionValue = getPackageVersionFunction->call( 0, SB_VALUE(packageName)); const bool hasPackage = SB_CAN_CAST(hasPackageValue) && SB_CAST(hasPackageValue); const std::string version = SB_CAN_CAST(versionValue) ? SB_CAST(versionValue) : ""; if (hasPackage) { SB_INFORMATION("numpy " + version + " is installed"); } } ``` This is the typical first step before launching a Python-based workflow from your extension. ### Install or uninstall a package To install the latest version of a package, call the one-argument overload of `addPackage`. To install a specific version, resolve the two-argument overload and pass an exact version string. For the latest version, resolve the overload like this: ```cpp SBProxy* proxy = getPythonScriptingProxy(); if (!proxy) return; SBFunction* addLatestPackageFunction = proxy->getInterface()->getFunction( "addPackage", SB_VALUE("")); ``` ```cpp SBProxy* proxy = getPythonScriptingProxy(); if (!proxy) return; SBFunction* addPackageFunction = proxy->getInterface()->getFunction( "addPackage", SB_VALUE(""), SB_VALUE("")); SBFunction* removePackageFunction = proxy->getInterface()->getFunction( "removePackage", SB_VALUE("")); const std::string packageName = "scipy"; const std::string exactVersion = "1.14.1"; if (addPackageFunction) { SBValue ret = addPackageFunction->call( 0, SB_VALUE(packageName), SB_VALUE(exactVersion)); const bool installed = SB_CAN_CAST(ret) && SB_CAST(ret); if (!installed) { SB_ERROR("Could not install scipy"); } } if (removePackageFunction) { SBValue ret = removePackageFunction->call( 0, SB_VALUE(packageName)); const bool removed = SB_CAN_CAST(ret) && SB_CAST(ret); if (!removed) { SB_ERROR("Could not uninstall scipy"); } } ``` Note The exposed `addPackage(name, version)` function is intentionally simple: - if `version` is empty, it installs the latest available version; - if `version` is set, it installs `name==version`. If you need a more complex `pip install` command, prefer `installPythonRequirementsFromFile(...)` or let the user use the [Package Manager UI in the Python Scripting App](https://documentation.samson-connect.net/users/latest/scripting/#installing-python-packages). ### Install dependencies from a `requirements.txt` This is the most convenient option when your extension relies on several Python packages: ```cpp SBProxy* proxy = getPythonScriptingProxy(); if (!proxy) return; SBFunction* installRequirementsFunction = proxy->getInterface()->getFunction( "installPythonRequirementsFromFile", SB_VALUE("")); const QString requirementsPath = QDir::cleanPath(QString::fromStdString(SB_ELEMENT_PATH) + "/Resource/python/requirements.txt"); if (!QFileInfo::exists(requirementsPath)) { SB_ERROR("Missing requirements file: " + requirementsPath.toStdString()); return; } if (installRequirementsFunction) { SBValue ret = installRequirementsFunction->call( 0, SB_VALUE(requirementsPath.toStdString())); const bool installed = SB_CAN_CAST(ret) && SB_CAST(ret); if (!installed) { SB_ERROR("Could not install Python requirements"); } } ``` This is equivalent to running `python -m pip install -r requirements.txt` in SAMSON's embedded Python environment. ### Install a local package If your workflow depends on a local Python package, use `installLocalPackage`: ```cpp SBProxy* proxy = getPythonScriptingProxy(); if (!proxy) return; SBFunction* installLocalPackageFunction = proxy->getInterface()->getFunction( "installLocalPackage", SB_VALUE(""), SB_VALUE(false)); const QString packagePath = "C:/work/my_python_package"; const bool editableMode = true; if (!QFileInfo::exists(packagePath)) { SB_ERROR("Missing local package: " + packagePath.toStdString()); return; } if (installLocalPackageFunction) { SBValue ret = installLocalPackageFunction->call( 0, SB_VALUE(packagePath.toStdString()), SB_VALUE(editableMode)); const bool installed = SB_CAN_CAST(ret) && SB_CAST(ret); if (!installed) { SB_ERROR("Could not install local Python package"); } } ``` Set `editableMode` to `true` when you want behavior equivalent to `pip install -e`. ### Optional: get the path to SAMSON's Python executable If you need to launch the bundled Python interpreter explicitly, query it through the same proxy: ```cpp SBProxy* proxy = getPythonScriptingProxy(); if (!proxy) return; SBFunction* getPythonPathFunction = proxy->getInterface()->getFunction("getPythonPath"); if (!getPythonPathFunction) return; SBValue ret = getPythonPathFunction->call(0); if (SB_CAN_CAST(ret)) { const std::string pythonPath = SB_CAST(ret); SB_INFORMATION("SAMSON Python: " + pythonPath); } ``` ## Typical developer workflow In practice, extensions that depend on Python usually follow this pattern: 1. Resolve the Python Scripting proxy. 1. Check whether the required package is already installed. 1. Install missing dependencies using `addPackage(...)`, `installPythonRequirementsFromFile(...)`, or `installLocalPackage(...)`. 1. Execute the Python workflow with `SAMSON::runPythonFile(...)` or `SAMSON::runPythonCode(...)`. This keeps Python environment setup separate from actual script execution, which usually makes the extension easier to debug and maintain. ## Best practices - Prefer `SAMSON::runPythonFile(...)` over `runPythonCode(...)` for non-trivial workflows. - Keep Python scripts in your extension resources so they can be versioned and tested separately from the C++ code. - Use `raisePythonConsole = true` while developing to see Python output and tracebacks immediately. - Install several dependencies from a `requirements.txt` instead of chaining many `addPackage(...)` calls. - Use the proxy interface only for Python-environment management. For execution, the `SAMSON::runPython...` facade is simpler. ## See also - [User guide: Scripting](https://documentation.samson-connect.net/users/latest/scripting/) - [Python Scripting Guide](https://documentation.samson-connect.net/scripting/latest/) - [Python bindings for extensions](https://documentation.samson-connect.net/developers/latest/tutorials/python-bindings-for-extensions/index.md) # SDK Organization The SAMSON SDK is large, but its structure is consistent. This page gives you a map you can keep in mind while reading headers, generated API pages, and sample code. The SDK is organized into seven library groups: - [Core Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Core/index.md) - [DataModel Library Group](https://documentation.samson-connect.net/developers/latest/sdk/DataModel/index.md) - [Facade Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Facade/index.md) - [GUI Library Group](https://documentation.samson-connect.net/developers/latest/sdk/GUI/index.md) - [IO Library Group](https://documentation.samson-connect.net/developers/latest/sdk/IO/index.md) - [Modeling Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Modeling/index.md) - [Simulation Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Simulation/index.md) ## How to use this map When you are looking for an API entry point: - start in **Facade** if you want top-level convenience functions such as `SAMSON::...` - go to **DataModel** for persistent objects, documents, nodes, references, and containers - go to **GUI** for windows, widgets, editors, controllers, and rendering-side tools - go to **IO** for file import/export infrastructure - go to **Modeling** and **Simulation** for scientific model and simulator abstractions - go to **Core** for lower-level utilities and cross-cutting infrastructure This rough map saves a lot of time when navigating the codebase. ## Naming conventions Most files contain one main class declaration or definition, and the file name usually matches the class name. Because the SDK is large, SAMSON follows a strict naming convention. For SDK classes: - The *first two* letters are `SB` (stands for *SAMSON Base*) - The *third* letter indicates the library group (e.g., `SBD` for `DataModel`) - The next *n* letters indicate the library name (e.g., `SBDDataGraph` for the `DataGraph` library in `DataModel`) - The (optional) next *m* letters are used to differentiate class names in the library (e.g., `SBDDataGraphEvent` and `SBDDataGraphNode`) This is why class names are long but descriptive. ## Short names Frequently used classes often have a short name. For example, `SBMStructuralModelNodeAtom` has the short name `SBAtom`. Short names are convenient in day-to-day code, but the long names are useful when you are exploring the SDK structure because they reveal where the class comes from. ## Extension naming conventions Classes generated by the [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) follow a parallel convention: - The *first two* letters are `SE` (stands for *SAMSON Extension*) - The next *n* letters indicate the Extension name (e.g., `ProteinProteinDocker`) - The next *m* letters indicate a class name (e.g., `MainApp`) That convention is worth preserving when you add new classes manually because it keeps extension code readable and consistent with generated code. Finally, SDK macros begin with `SB_`, for example `SB_REGISTER_TYPE`. ## Practical navigation advice - If you know a short name, use the generated API pages to jump to the full class. - If you only know the domain, start from the library group index and narrow down by subsystem. - When a class name looks long, read it as a path: prefix, library group, library, then class role. # Cite your research Extension documentation is not only about marketing a release. It is also where you give users the scientific and technical context they need to trust and cite your work. In practice, developers usually want to expose four kinds of information: - papers that should be cited when the extension is used - third-party libraries or datasets the extension depends on - brief usage or scientific context - version-specific notes and release changes SAMSON gives you two complementary places to provide that information: - inside the extension UI, through a citable window - on the extension page on [SAMSON Connect](https://www.samson-connect.net/) ## Cite in a SAMSON Extension Note Citation in a SAMSON Extension can be visible to users only if the SAMSON Extension has some GUI. Use this approach when you want citation information to be available directly from an app window or a model property window. First, add the `SBGWindow::Citable` flag in the `getFormat` implementation (see [`SBGWindowWidget::getFormat`](https://documentation.samson-connect.net/developers/latest/api/classSBGWindowWidget/#function-getformat)) of your GUI widget: ```cpp int SEEMyModelProperties::getFormat() const { // SAMSON Extension generator pro tip: modify these default settings to configure the window // // SBGWindow::Savable : let users save and load interface settings (implement loadSettings and saveSettings) // SBGWindow::Lockable : let users lock the window on top // SBGWindow::Resizable : let users resize the window // SBGWindow::Citable : let users obtain citation information (implement getCitation) return (SBGWindow::Savable | SBGWindow::Lockable | SBGWindow::Citable); } ``` This adds a question-mark button to the window chrome: Then implement [`SBGWindowWidget::getCitation`](https://documentation.samson-connect.net/developers/latest/api/classSBGWindowWidget/#function-getcitation): ```cpp QString SEEMyModelProperties::getCitation() const { return "If you use this interaction model in your work, please cite:
" "
" "[1] S. Artemova, L. Jaillet and S. Redon.
" " Automatic molecular structure perception for the universal force field.
" " J. Comput. Chem. 2016, 37, 1191-1205. DOI: 10.1002/jcc.24309.
" "
" "[2] https://www.samson-connect.net
" } ``` The returned string can use the [HTML subset supported by Qt](https://doc.qt.io/qt-6/richtext-html-subset.html), which is useful for links, line breaks, and simple formatting. When the user clicks the citation button, SAMSON shows a modal dialog that displays the citation text and lets the user copy it to the clipboard: This is the right place for: - citation-ready paper references - a short explanation of what should be cited and when - links to project or documentation pages - explicit acknowledgment of external libraries when appropriate ## Cite on SAMSON Connect Use the SAMSON Connect page for everything that should be visible before installation: screenshots, overview text, links, public release notes, and longer descriptions. First upload the extension as described in [Publishing a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/distributing/index.md). The description field on [SAMSON Connect](https://www.samson-connect.net/) supports Markdown based on the [CommonMark](https://commonmark.org/) specification, so you can add: - links to papers, repositories, and documentation - formatted lists of references - release notes and change summaries - images that explain the workflow or results If needed, review a Markdown refresher at [Learn X in Y Minutes](https://learnxinyminutes.com/docs/markdown/). ## A good default documentation split For many extensions, the clearest split is: - put the short, copyable citation text in the extension UI - put the richer overview, links, screenshots, and release notes on [SAMSON Connect](https://www.samson-connect.net/) That gives users both a quick in-product citation path and a fuller public documentation page. # Publishing a SAMSON Extension This page covers the publication workflow for a finished extension. The process has two distinct parts: 1. package the built extension into the format expected by [SAMSON Connect](https://www.samson-connect.net/) 1. upload that package and complete the extension metadata online Use this page when your extension already builds and runs locally and you are preparing a release. ## Step 1: Packaging a SAMSON Extension SAMSON SDK provides the [SAMSON SDK Extension packager](https://www.samson-connect.net/extensions/0808a8ef-125f-1382-18d4-65b7997bb794), which prepares an uploadable package for [SAMSON Connect](https://www.samson-connect.net/). Before you start: - install the packager extension - restart SAMSON if needed so the packager is available - make sure the extension version you want to ship is already built and installed locally In the SAMSON menu, go to **Home > Apps > Developer > Package my extension**. Click **Find my developed extensions**. The packager scans your local development environment and lists the extensions it can package. The scan results are split into two tabs: - **Valid**: extensions that can be packaged immediately - **Error**: extensions with missing or inconsistent metadata or build artifacts Select the extension you want to package. The right-hand pane shows a summary so you can confirm you picked the correct one. You can also package several extensions in one pass. In the **Settings** tab, choose the destination folder where packaged output should be written. Click **Pack**. The selected extensions are written to the destination folder and listed in the **Selection** tab. The information box shows the output path. The generated folder contains the packaged extension and some helpful template assets for publication, such as example image sizes. The file you upload to [SAMSON Connect](https://www.samson-connect.net/) is stored in a path like `SAMSON_11.0.1/YourOS/11.0.1/` and is named with the extension UUID. ## Step 2: Uploading a SAMSON Extension Once you have the packaged file, switch to [SAMSON Connect](https://www.samson-connect.net/). Sign in, open **Account > Developed extension**, then click **Upload new extension** and choose the packaged file. If the package is valid, SAMSON Connect shows the extension information it extracted from the file. Verify it before continuing. You can then upload images, add collaborators, and continue through the release form. These steps can also be completed later. After the upload, the extension appears in **Developed extension** as a **draft**. Open the extension entry and complete the public metadata: - public name - description, written in Markdown - images and supporting material - collaborators, if any - access policy Available access policies are: - **public**: visible to everybody - **hidden**: visible to people who know the URL - **shared**: visible only to users you specify - **private**: visible only to you You can also restrict the extension to academic users only. If you are uploading an update or a platform-specific build, use **Add new version**. To make existing users receive the update automatically, increase the extension version number in the descriptor header (`SB_ELEMENT_VERSION_NUMBER`) before packaging. Click **Submit** to send the extension for review. Once approved, the status changes from **draft** to **published**, and users can access it according to the access policy and platform compatibility you specified. ## Practical release checklist Before you submit a release, verify: - the extension version number was increased if this is an update - the packaged file corresponds to the intended SDK version and platform - icons, screenshots, and description are up to date - citations and references are present if the extension depends on published work See [Cite your research](https://documentation.samson-connect.net/developers/latest/cite-your-research/index.md) for the citation and documentation side of the release. # Building Extensions # Building a SAMSON Extension This section is for developers who already installed the SAMSON SDK and generated at least one extension project. Use it when you need to: - configure the generated CMake project in your IDE - build the extension in `Debug` or `Release` - install the built extension into SAMSON - launch the correct SAMSON executable for testing or debugging ## Start here Before you open one of the platform guides, make sure you already completed these steps: 1. Install the SDK and verify that SAMSON Debug starts. 1. Generate an extension project with the [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). 1. Install the required compiler, CMake, and Qt version for your platform. If any of those are still missing, go back to [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) first. ## Choose your platform - [Building a SAMSON Extension on Windows](https://documentation.samson-connect.net/developers/latest/building/windows/index.md) - [Building a SAMSON Extension on macOS](https://documentation.samson-connect.net/developers/latest/building/mac/index.md) - [Building a SAMSON Extension on Linux](https://documentation.samson-connect.net/developers/latest/building/linux/index.md) ## What success looks like At the end of the platform-specific guide, you should be able to: - open the root `CMakeLists.txt` for your extension workspace - build the `install` target for both `Debug` and `Release` - launch the matching SAMSON executable from the IDE - iterate on the code and regenerate the project after adding files or new extensions ## Next steps - Use [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md) when your extension needs widgets or property windows. - Use [Publishing a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/distributing/index.md) when the built extension is ready to package and upload. # Building on Linux This guide shows how to build a SAMSON Extension on Linux with Qt Creator and CMake. Use it after you have already installed the SDK and generated an extension workspace. The goal is to configure the root CMake project, build the `install` target, and run the matching SAMSON executable from the IDE. ## Requirements If you have not installed the SAMSON SDK yet, complete [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) first. - gcc/g++ 5.4 or newer - CMake 4.0 or newer - Qt 6.10.2 - Qt Creator or another IDE you prefer Qt Creator is the workflow described below because it matches the generated project layout and the Qt-based extension workflow well. ## Configuration of a project in Qt Creator Open Qt Creator and choose **Open Project...** or **File > Open File or Project...** (`Ctrl`+`O`). Select the root `CMakeLists.txt` file in the extension workspace. Use the root workspace file, not the `CMakeLists.txt` inside one specific extension folder. ### Configure Project 1. Choose the default kit, for example *Desktop Qt 6.10.2 GCC 64 bit*. 1. Expand **Details**. 1. Configure both build directories: - `Debug`: `PathToExtensions/build/Debug` - `Release`: `PathToExtensions/build/Release` 1. Click **Configure Project**. You may see errors initially because CMake variables still need to be added. Switch to **Projects** mode (`Ctrl`+`5`) to finish the configuration. ### Build Settings #### CMake configuration Add the variables that the generated extension workspace expects: 1. Add a string variable named `SAMSON_SDK_PATH` and set it to: `$HOME/OneAngstrom/SAMSON-Sdks/11.0.1` 1. Add a boolean variable named `DEBUG`. - Set it to `ON` for the `Debug` configuration - Leave it `OFF` for the `Release` configuration 1. Click **Re-configure with Initial Parameters** and confirm the reconfiguration. #### Build Steps To ensure the built extension is installed automatically: 1. Scroll to **Build Steps** 1. Expand the step details 1. Enable the `install` option ## Build Open the **Edit** view to inspect the project tree, then build the project with `Ctrl`+`B` or **Build > Build Project "SAMSON-Elements"**. Checkpoint: - the build finishes successfully - the `install` step runs - the extension is copied into the correct SAMSON location Note Building the `install` target automatically builds the project if needed. Note If the extension does not compile, you may need the 64-bit development and static packages for `libstdc++`. ## Run Settings `Debug` and `Release` extensions must be run against different SAMSON executables: - `Debug`: the SAMSON Debug executable from the SDK - `Release`: the normal SAMSON application executable In **Projects** mode (`Ctrl`+`5`), create one run configuration for each build configuration and set the executable: `$HOME/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries/SAMSON-Core-Console` `$HOME/Applications/SAMSON.app/11.0.1/Binaries/SAMSON-Core-Console` Important Replace `$HOME` with the actual path to your user directory. Then set the environment variables needed to locate Qt and SAMSON runtime libraries: ```shell LC_ALL=en_US.UTF-8 LD_LIBRARY_PATH=$HOME/Qt/6.10.2/gcc_64/lib:$HOME/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries ``` ```shell LC_ALL=en_US.UTF-8 LD_LIBRARY_PATH=$HOME/Qt/6.10.2/gcc_64/lib:$HOME/OneAngstrom/SAMSON/11.0.1/Binaries ``` ## Run Once the run settings are configured: 1. build with `Ctrl`+`B` 1. run with `Ctrl`+`R` 1. verify that SAMSON starts and your extension is loaded Tip If you use `Debug` for both build and run, you can set breakpoints and debug the extension directly from Qt Creator. ## Adding files to a SAMSON Extension When you add or remove source files, classes, or resources, regenerate the project by: - rerunning CMake, or - making a small change to the relevant `CMakeLists.txt` file and letting Qt Creator trigger reconfiguration automatically on the next build ## Adding new SAMSON Extensions to the project If you generate new extensions in the same workspace, the [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) updates the root `CMakeLists.txt` through `ADD_SUBDIRECTORY`. The next CMake reconfiguration should add the new extension targets automatically. ## Compatibility with older Linux distributions SAMSON supports Linux distributions with GLIBC 2.17 or newer. Check your local GLIBC version with: ```shell ldd --version ``` If you want your extension to run on older supported Linux distributions even when you build it on a newer system, SAMSON SDK provides `SBCSystemDefinitions.hpp`. This header forces linking against compatibility symbols not newer than GLIBC 2.17 for selected cases. In many extensions it is already included indirectly. If you use external code or external libraries that require it, include it explicitly: ```cpp #include "SBCSystemDefinitions.hpp" ``` To inspect which GLIBC symbols your extension currently depends on, run: ```shell objdump -T UUID.so | grep GLIBC ``` where `UUID.so` is the built extension library. When it is useful This matters when you build on a recent distribution but want the extension to remain loadable on older distributions with supported GLIBC versions. ## Troubleshooting - If configuration fails, verify `SAMSON_SDK_PATH` and the selected Qt kit. - If the extension builds but does not load, check that the run configuration matches the build configuration. - If Qt Creator shows stale targets, force a CMake reconfiguration. If you have questions or issues, use the [SAMSON Connect Forum](https://forum.samson-connect.net/) or [contact us](mailto:contact@samson-connect.net). ## Next steps - Continue with [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md) for widget-based extensions. - Continue with [Publishing a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/distributing/index.md) once the Linux build is stable. # Building on macOS This guide shows how to build a SAMSON Extension on macOS with Qt Creator and CMake. Use it after you have already installed the SDK and generated an extension workspace. The goal is to configure the root CMake project, build the `install` target, and run the correct SAMSON executable for `Debug` or `Release`. ## Requirements If you have not installed the SAMSON SDK yet, complete [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) first. - Clang, available with Xcode - CMake 4.0 or newer - Qt 6.10.2 - Qt Creator or another supported IDE such as Xcode This page uses Qt Creator as the primary workflow because it aligns well with the generated CMake project. ## Configuration of a project in Qt Creator Open Qt Creator and choose **Open Project...** or **File > Open File or Project...** (`Cmd`+`O`). Select the root `CMakeLists.txt` in the extension workspace, not the `CMakeLists.txt` inside one extension folder. ### Building for x86_64 on ARM64 Important The shipped SAMSON SDK is currently provided for `x86_64`. On Apple Silicon machines you therefore need to build the extension for `x86_64` compatibility. #### Change CMakeLists.txt If you are on an ARM64 Mac, add the following line near the top of the root `CMakeLists.txt`, immediately after `CMAKE_MINIMUM_REQUIRED`: ```cmake SET(M1_X86_64 1) ``` #### Create a kit for x86_64 on ARM64 Create or reuse a Qt Creator kit that targets `x86_64`: 1. Open **Manage Kits...** 1. Clone the auto-detected Qt 6.10.2 macOS kit 1. Rename it clearly, for example by adding `x86_64` 1. Set both the C and C++ compilers to *Apple Clang (x86_64)* ### Configure Project 1. Choose the correct kit 1. Expand **Details** 1. Configure both build directories: - `Debug`: `PathToExtensions/build/Debug` - `Release`: `PathToExtensions/build/Release` 1. Click **Configure Project** If Qt Creator reports errors after the first configure step, continue with the CMake variables below. ### Build Settings #### CMake configuration Add the variables expected by the generated workspace: 1. Add a string variable named `SAMSON_SDK_PATH` and set it to: `$HOME/OneAngstrom/SAMSON-Sdks/11.0.1` 1. Add a boolean variable named `DEBUG`. - Set it to `ON` for the `Debug` configuration - Leave it `OFF` for the `Release` configuration 1. Click **Re-configure with Initial Parameters** #### Build Steps To ensure the extension is installed into SAMSON automatically: 1. Scroll to **Build Steps** 1. Expand the details 1. Enable the `install` option ## Build Open the **Edit** view to inspect the project tree, then build with `Cmd`+`B` or **Build > Build Project "SAMSON-Elements"**. Checkpoint: - the project configures successfully - the build succeeds - the `install` step copies the extension into the expected SAMSON location Note Building the `install` target automatically builds the project if needed. ## Run Settings As on other platforms, the SAMSON executable must match the build configuration: - `Debug` extension builds run against the SAMSON Debug executable from the SDK - `Release` extension builds run against the normal SAMSON application installation In **Projects** mode (`Cmd`+`5`), create one run configuration for each build configuration and set the executable: `$HOME/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries/SAMSON-Core-Console` `$HOME/Applications/SAMSON.app/11.0.1/Binaries/SAMSON-Core-Console` Important Replace `$HOME` with the actual path to your user directory. Then add the environment variables needed for Qt frameworks and SAMSON libraries: - `DYLD_LIBRARY_PATH=$HOME/OneAngstrom/SAMSON-Sdks/11.0.1/SAMSON-Debug/Binaries` - `DYLD_FRAMEWORK_PATH=$HOME/Qt/6.10.2/macos/lib:$HOME/Applications/SAMSON.app/11.0.1/Binaries` - `DYLD_LIBRARY_PATH=$HOME/OneAngstrom/SAMSON/11.0.1/SAMSON/Binaries` - `DYLD_FRAMEWORK_PATH=$HOME/Qt/6.10.2/macos/lib:$HOME/Applications/SAMSON.app/11.0.1/Binaries` ## Run Once the run settings are configured: 1. build with `Cmd`+`B` 1. run with `Cmd`+`R` 1. verify that SAMSON starts and the extension is loaded Tip If you pair a `Debug` build with a `Debug` run configuration, you can debug the extension directly from Qt Creator. ## Adding files to a SAMSON Extension When you add or remove source files, classes, or resources, regenerate the project by: - rerunning CMake, or - making a small change to the relevant `CMakeLists.txt` file and letting Qt Creator reconfigure automatically on the next build ## Adding new SAMSON Extensions to the project If you generate new extensions in the same workspace, the [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) updates the root `CMakeLists.txt` through `ADD_SUBDIRECTORY`. The next CMake reconfiguration should add the new extension targets automatically. ## Troubleshooting - On Apple Silicon, confirm that you are using an `x86_64` kit when targeting the shipped SDK. - If SAMSON starts but the extension does not load, verify that the run configuration matches the build configuration. - If Qt Creator reports stale targets, trigger a fresh CMake reconfiguration. If you have questions or issues, use the [SAMSON Connect Forum](https://forum.samson-connect.net/) or [contact us](mailto:contact@samson-connect.net). ## Next steps - Continue with [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md) if the extension includes Qt forms or windows. - Continue with [Publishing a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/distributing/index.md) when the macOS build workflow is stable. # Building on Windows This guide shows how to build a SAMSON Extension on Windows with Microsoft Visual Studio and CMake. Read it after you have already: - installed SAMSON and the SAMSON SDK - generated a new extension workspace with the [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) - installed the required compiler, CMake, and Qt version The goal is to open the generated workspace, build the extension, install it into SAMSON, and launch the correct SAMSON executable for either `Debug` or `Release`. ## Requirements If you have not installed the SAMSON SDK yet, complete [Installation](https://documentation.samson-connect.net/developers/latest/installation/index.md) first. - CMake 4.0 or newer - [Visual Studio 2026 Community or Professional](https://visualstudio.microsoft.com/downloads/), or an older supported version such as VS 2022 - Qt 6.10.2 for 64-bit Windows - Qt Creator if you want to edit `.ui` forms Environment assumptions used in the commands below: - your extension workspace contains the root `CMakeLists.txt` - `SAMSON_SDK_PATH` points to your installed SDK - `QT6_DIR` points to the matching Qt installation, unless it is already defined in your environment ## Configuration of a project in Microsoft Visual Studio Once CMake is installed, generating a Visual Studio solution is straightforward. Open your extension workspace, create or reuse a `build` folder, then open PowerShell in that folder. Run the CMake generator command that matches your Visual Studio version: ```shell cmake -G"Visual Studio 18" ` -DSAMSON_SDK_PATH="YourSDKPath/SAMSON-Sdks/11.0.1/" ` -DQT6_DIR="C:/Qt/6.10.2/msvc2022_64" .. ``` ```shell cmake -G"Visual Studio 17" ` -DSAMSON_SDK_PATH="YourSDKPath/SAMSON-Sdks/11.0.1/" ` -DQT6_DIR="C:/Qt/6.10.2/msvc2022_64" .. ``` Note The `-G` option selects the CMake generator. Run `cmake -h` to list the generators available on your machine. Note `YourSDKPath` is the path to your installed SAMSON SDK. By default, SAMSON and its SDK are installed in `C:\Users\%USERNAME%\OneAngstrom\`. Note If `QT6_DIR` is already defined in your environment, you may not need to pass it explicitly. If configuration succeeds, you should see a generated `.sln` file in the `build` folder. Open that solution in Visual Studio and confirm that the workspace structure looks correct. ## Building step The generated solution contains one target per extension plus CMake helper targets. For normal development: 1. choose `Debug` when writing and debugging code 1. choose `Release` when validating performance or preparing a distribution build 1. enable the `INSTALL` target so Visual Studio copies the built extension into SAMSON automatically To enable installation, open the solution properties and, for both `Debug` and `Release`, enable the build checkbox for the `INSTALL` target in **Configuration Properties > Configuration**. Now build either: - the extension target itself, if you only want to compile - `INSTALL`, if you want to compile and install in one step - `ALL_BUILD`, if your solution contains multiple extensions and you want to build everything Checkpoint: - the build succeeds - the install step copies the extension into the correct SAMSON directory ## Running SAMSON The SAMSON executable must match the build configuration of your extension: - `Release` builds are loaded by the `Release` SAMSON application installation - `Debug` builds are loaded by the `Debug` SAMSON executable that comes with the SDK Set the extension target, for example `SEMyElement`, as the **Startup Project**. Then open the target properties and set **Configuration Properties > Debugging > Command** to the correct `SAMSON-Core.exe` path for each configuration: - `Release` example: `C:\Users\%USERNAME%\OneAngstrom\SAMSON-Application\11.0.1\Binaries\SAMSON-Core.exe` - `Debug` example: `C:\Users\%USERNAME%\OneAngstrom\SAMSON-Sdks\11.0.1\SAMSON-Debug\Binaries\SAMSON-Core.exe` Once this is set, the normal loop becomes: 1. build the solution or the `INSTALL` target 1. press `F5` to launch SAMSON under the debugger 1. verify that the extension is loaded and visible in SAMSON ## Adding files to a SAMSON Extension When you add or remove source files, classes, or resources, you need to regenerate the CMake project. You can do that by: - running CMake again from the `build` folder, or - making a small change to the extension `CMakeLists.txt` and letting Visual Studio/CMake reconfigure automatically on the next build ## Adding new SAMSON Extensions to the project If you generate new extensions in the same workspace, the [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) updates the root `CMakeLists.txt` with `ADD_SUBDIRECTORY`. The next CMake reconfiguration should pull the new targets into the solution automatically. ## Troubleshooting - If CMake cannot find Qt, verify `QT6_DIR`. - If the extension builds but does not load, check that you launched the SAMSON executable matching the build configuration. - If the project structure looks incomplete, regenerate the solution from the root `CMakeLists.txt`. If you have questions or run into issues, use the [SAMSON Connect Forum](https://forum.samson-connect.net/) or [contact us](mailto:contact@samson-connect.net). ## Next steps - Continue with [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md) if the extension exposes widgets. - Continue with [Publishing a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/distributing/index.md) once the build workflow is stable. # Tutorials # Tutorials This section is the hands-on path through the SAMSON Developer Guide. Use it when you already know the basics of the SDK and want to build a concrete extension from start to finish. The tutorials are organized by extension type and by the developer task they teach. Most pages assume that you already know how to generate an extension with the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and how to [build it on your platform](https://documentation.samson-connect.net/developers/latest/building/index.md). SAMSON Extension samples referenced in these tutorials can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Start here If this is your first extension, this sequence gives the smoothest ramp: 1. [Programming new apps: Atom Shaker](https://documentation.samson-connect.net/developers/latest/tutorials/atom-shaker/index.md) 1. [Programming new editors: Atom Pusher](https://documentation.samson-connect.net/developers/latest/tutorials/atom-pusher/index.md) 1. [Importing files](https://documentation.samson-connect.net/developers/latest/tutorials/importing/index.md) or [Exporting files](https://documentation.samson-connect.net/developers/latest/tutorials/exporting/index.md) 1. [Creating visualizations: Van der Waals visual model](https://documentation.samson-connect.net/developers/latest/tutorials/vdw-visual-model/index.md) 1. [Programming new force fields: Springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md) 1. [Programming new state updaters: Steepest descent](https://documentation.samson-connect.net/developers/latest/tutorials/steepest-descent/index.md) ## Core concepts and small starter projects - [Handling units: Units Converter](https://documentation.samson-connect.net/developers/latest/tutorials/units-converter/index.md) - [Incremental computation of the center of mass](https://documentation.samson-connect.net/developers/latest/tutorials/center-of-mass/index.md) - [How to cite your research in SAMSON Extensions](https://documentation.samson-connect.net/developers/latest/cite-your-research/index.md) ## Apps and external integrations - [Programming new apps: Atom Shaker](https://documentation.samson-connect.net/developers/latest/tutorials/atom-shaker/index.md) - [Integrating external programs](https://documentation.samson-connect.net/developers/latest/tutorials/integrating-external-programs/index.md) These tutorials are a good fit if you want to add commands, small tools, or integrations without introducing a new simulation engine. ## Editors and interactive tools - [Programming new editors: Atom Pusher](https://documentation.samson-connect.net/developers/latest/tutorials/atom-pusher/index.md) - [Programming a path generator](https://documentation.samson-connect.net/developers/latest/tutorials/path-generator/index.md) Read these pages when your extension needs direct viewport interaction, mouse events, or custom node creation. ## File import and export - [Importing files](https://documentation.samson-connect.net/developers/latest/tutorials/importing/index.md) - [Exporting files](https://documentation.samson-connect.net/developers/latest/tutorials/exporting/index.md) These tutorials focus on implementing `SBIFileImporter` and `SBIFileExporter` workflows and on wiring user-facing file options. ## Visual models and rendering - [Creating visualizations: Van der Waals visual model](https://documentation.samson-connect.net/developers/latest/tutorials/vdw-visual-model/index.md) This is the longest rendering tutorial in the guide. It is the right place to learn how a visual model stores references, renders geometry, exposes properties, and serializes itself. ## Modeling and simulation - [Programming new force fields: Springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md) - [Programming new state updaters: Steepest descent](https://documentation.samson-connect.net/developers/latest/tutorials/steepest-descent/index.md) - [Programming new state updaters: Monte Carlo](https://documentation.samson-connect.net/developers/latest/tutorials/monte-carlo/index.md) Read this group once you are comfortable with structural and dynamical models and want to implement force fields, optimizers, or simulation moves. ## Python bindings - [Creation of Python bindings for SAMSON Extensions](https://documentation.samson-connect.net/developers/latest/tutorials/python-bindings-for-extensions/index.md) This tutorial is specialized and assumes that you already build C++ extensions comfortably. Read it after you understand the C++ side of your extension and want to expose it to Python. # Programming new editors: Atom Pusher This tutorial walks through a small but complete [editor](https://documentation.samson-connect.net/developers/latest/editors/index.md). You will create a viewport tool that displays as a sphere, follows the mouse, and displaces nearby atoms when the editor is active. Read this page when you want to understand the practical structure of an interactive editor: descriptor setup, viewport rendering, mouse and wheel handling, and direct interaction with structural nodes. ## What you will build By the end of the tutorial, you will have: - an editor class that can be activated from the SAMSON editor list; - a visible spherical tool rendered directly in the viewport; - mouse and wheel handlers that move the tool and change its radius; - logic that pushes atoms away from the sphere while the editor is active. ## Prerequisites - You know how to [generate an extension](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). - You can [build and install the extension](https://documentation.samson-connect.net/developers/latest/building/index.md) on your platform. - You are comfortable opening the generated C++ files and editing descriptor, editor, and GUI classes. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *AtomPusher* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *AtomPusher* and add some description; - add an **Editor** class (called `SEAtomPusherEditor`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates an editor class (derived from the [`SBGEditor`](https://documentation.samson-connect.net/developers/latest/api/classSBGEditor/index.md) class) and a property widget class for the editor. ## Setting the description of the Extension Open the header file of the editor descriptor (file: `SEAtomPusherEditorDescriptor.hpp`) and modify the class description: ```cpp SB_CLASS_DESCRIPTION("DevTutorial: Atom pusher"); ``` Modify the `getName()` function for both the editor class (file: `SEAtomPusherEditor.cpp`) and the editor GUI class (file: `SEAtomPusherEditorGUI.cpp`) to have a user-friendly description of the editor inside SAMSON: ```cpp return "DevTutorial: Atom pusher"; ``` Add the `getDescription()` function in the editor class (file: `SEAtomPusherEditor.hpp`) ```cpp virtual QString getDescription() const; ///< Returns the menu item text ``` And implement it as follows to have a user-friendly description of the editor in the menu: ```cpp QString SEAtomPusherEditor::getDescription() const { return QObject::tr("DevTutorial: Atom pusher"); } ``` Modify the `getToolTip()` function in the editor class (file: `SEAtomPusherEditor.cpp`) to have a user-friendly description of what the editor does: ```cpp QString SEAtomPusherEditor::getToolTip() const { return QObject::tr("Pushes atoms when pressed"); } ``` Now, try [building the SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and when you launch SAMSON you should be able to find in the Editors menu on the left side of the viewport (click on "..."). For now, it does nothing, but we will now add functionality to it. ## Interface of an editor The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) provides a GUI class (a property widget) for an editor which is invoked when the editor is activated. If your editor does not require GUI, you can disable it by simply commenting the creation and destruction of the property widget in the constructor and in the destructor of the editor class, respectively. ## Displaying an editor Since our editor is a sphere which can be in two states (active or not), we add the following variables in the editor class (file: `SEAtomPusherEditor.hpp`): ```cpp class SEAtomPusherEditor : public SBGEditor { // ... public: SBPosition3 spherePosition; // position of the sphere SBQuantity::length sphereRadius; // radius of the sphere bool sphereIsActive; // true of sphere is active }; ``` And we initialize them in the constructor of the editor class: ```cpp SEAtomPusherEditor::SEAtomPusherEditor() { // ... spherePosition = SBPosition3(); sphereRadius = SBQuantity::angstrom(1.0); sphereIsActive = false; SAMSON::requestViewportUpdate(); } ``` Let's now create a visual representation of our editor, the sphere. For that we implement the `display` function in the editor class (file: `SEAtomPusherEditor.cpp`): ```cpp void SEAtomPusherEditor::display(SBNode::RenderingPass renderingPass) { if (renderingPass == SBNode::RenderingPass::OpaqueGeometry || renderingPass == SBNode::RenderingPass::ShadowingGeometry) { float positionData[3]; float radiusData[1]; positionData[0] = static_cast(spherePosition[0].getValue()); positionData[1] = static_cast(spherePosition[1].getValue()); positionData[2] = static_cast(spherePosition[2].getValue()); radiusData[0] = static_cast(sphereRadius.getValue()); if (renderingPass == SBNode::RenderingPass::OpaqueGeometry) { float colorData[4]; unsigned int flagData[1]; if (sphereIsActive){ // a white sphere colorData[0] = 1.0f; colorData[1] = 1.0f; colorData[2] = 1.0f; colorData[3] = 1.0f; } else { // a green sphere colorData[0] = 0.0f; colorData[1] = 1.0f; colorData[2] = 0.0f; colorData[3] = 1.0f; } flagData[0] = 0; SAMSON::displaySpheres(1, positionData, radiusData, colorData, flagData); } else if (renderingPass == SBNode::RenderingPass::ShadowingGeometry) { // display for shadows SAMSON::displaySpheres(1, positionData, radiusData, nullptr, nullptr, true); } } } ``` Here, we fill in arrays for position of the sphere, its radius, and color, which we send to the [`SAMSON::displaySpheres`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-displayspheres) function that will render the sphere in SAMSON's viewport. We also implement the shadow casting in the `display` function (see [Van der Waals visual model tutorial](https://documentation.samson-connect.net/developers/latest/tutorials/vdw-visual-model/#casting-shadows) for more information). In the `display` function we used the sphere's position, to know this position we need to implement the `mouseMoveEvent` function in the editor class (file: `SEAtomPusherEditorGUI.cpp`): ```cpp void SEAtomPusherEditor::mouseMoveEvent(QMouseEvent* event) { spherePosition = SAMSON::getWorldPositionFromViewportPosition(event->pos()); SAMSON::requestViewportUpdate(); } ``` Here, we set the sphere's position from the cursor position in the viewport. Now, try [building the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and when you launch SAMSON you should be able to find it in the editor's menu on the left side of the Viewport or find it using **Find everything...** search box at the top of SAMSON. For now, it has no editing functionality, but you should be able to see the editor's sphere in the SAMSON's viewport once select the editor and move the mouse in the viewport. ## Pushing atoms SAMSON redirects Qt events to the active editor (see the [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md) section for more information). The editor class provides a number of possibilities to handle the GUI interactions: - `mousePressEvent` - handles mouse press event; - `mouseReleaseEvent` - handles mouse release event; - `mouseMoveEvent` - handles mouse move event; - `mouseDoubleClickEvent` - handles mouse double click event; - `wheelEvent` - handles wheel event; - `keyPressEvent` - handles key press event; - `keyReleaseEvent` - handles key release event. Since our sphere will be pushing atoms only when it is active. We assume that our editor is active when the mouse button is pressed. For that, we implement `mousePressEvent` and `mouseReleaseEvent` functions as follows: ```cpp void SEAtomPusherEditor::mousePressEvent(QMouseEvent* event) { if (event->button() == Qt::MouseButton::LeftButton) { sphereIsActive = true; SAMSON::requestViewportUpdate(); } } void SEAtomPusherEditor::mouseReleaseEvent(QMouseEvent* event) { if (event->button() == Qt::MouseButton::LeftButton) { sphereIsActive = false; SAMSON::requestViewportUpdate(); } } ``` Add a function in the editor class (file: `SEAtomPusherEditor.hpp`) to push atoms ```cpp void pushAtoms(); ``` And implement it as follows: ```cpp void SEAtomPusherEditor::pushAtoms() { // check if the sphere is in active state if (!sphereIsActive) return; // get an indexer of all atoms in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::Atom); SB_FOR(SBNode * node, nodeIndexer){ SBPointer atom = static_cast(node); if (!atom.isValid()) continue; // get the atom's position SBPosition3 atomPosition = atom->getPosition(); // compute the vector from the sphere's centers to the atom's center SBPosition3 vectorFromSphereCenter = atomPosition - spherePosition; // set the min distance between centers // of the sphere and the atom by summing their radii SBQuantity::length minDistance = sphereRadius + SAMSON::getAtomRadius(); // check if the sphere touches the atom if (vectorFromSphereCenter.norm() < minDistance){ // push the atom in the direction from the sphere vectorFromSphereCenter = vectorFromSphereCenter * (minDistance / vectorFromSphereCenter.norm()); atom->setPosition(spherePosition + vectorFromSphereCenter); } } } ``` First, we check whether the sphere is active (the sphere pushes atoms only in the active state). We get a [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) of all [atoms](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) in the active [documents](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md). Then we get the position of an atom and check whether it is touched by the sphere, if so we push it in the direction from the sphere. Before, we implemented the `mouseMoveEvent` function in the editor class to update the sphere's position when the cursor moves. Let's now re-implement this function to handle the mouse movement for pushing atoms: ```cpp void SEAtomPusherEditor::mouseMoveEvent(QMouseEvent* event) { SBPosition3 nodePosition; SBNode* pickedNode = SAMSON::getNode(event->pos(), nodePosition); if (pickedNode == nullptr) spherePosition = SAMSON::getWorldPositionFromViewportPosition(event->pos()); else spherePosition = SAMSON::getWorldPositionFromViewportPosition(event->pos(), nodePosition); SAMSON::requestViewportUpdate(); pushAtoms(); } ``` First, we update the sphere's position and then me invoke the `pushAtoms` function. We also make it possible to change the sphere's radius through the wheel event by implementing the according function in the editor class: ```cpp void SEAtomPusherEditor::wheelEvent(QWheelEvent* event) { int angle = event->angleDelta().y(); sphereRadius = sphereRadius * pow(1.002, angle); // check for the minimal size of the sphere if (sphereRadius < SBQuantity::angstrom(0.1)) sphereRadius = SBQuantity::angstrom(0.1); SAMSON::requestViewportUpdate(); pushAtoms(); } ``` Note, that by invoking the `pushAtoms` function in the end we also take into account that the sphere might be at the same time in the active state pushing atoms. Now, you have a working editor for pushing atoms. [Build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md), launch SAMSON, load or create any molecule, and choose the developed editor from the editor's menu on the left side of the viewport or find it using **Find everything...** at the top of SAMSON. Try moving the editor around, activating it, pushing atoms, and changing the sphere's radius. ## Validate the result Your implementation is working if all of the following are true: - the editor appears in the SAMSON editor list with the name you set; - moving the mouse repositions the sphere in the viewport; - using the mouse wheel changes the tool radius without collapsing it to zero; - atoms near the sphere move away when the editor is active. ## Common pitfalls - Forgetting to request a viewport update after moving or resizing the sphere leaves the editor visually stale. - Forgetting to call `pushAtoms()` from all relevant interaction paths makes the tool behave inconsistently. - Using too small a minimum radius makes the tool hard to control, especially in dense scenes. ## Next steps Good follow-up pages are [Undo and redo](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md), [Rendering](https://documentation.samson-connect.net/developers/latest/rendering/index.md), and [Programming a path generator](https://documentation.samson-connect.net/developers/latest/tutorials/path-generator/index.md). # Programming new Apps This tutorial is a good first app-level walkthrough for the SAMSON SDK. You will create an [app](https://documentation.samson-connect.net/developers/latest/apps/index.md) that shakes atoms in a [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) when the user presses a button. The example is intentionally small, but it covers several patterns that show up again in real extensions: generated app structure, GUI wiring, selections, units, random numbers, and undo/redo through SAMSON's holding mechanism. ## What you will build By the end of the tutorial, you will have: - a `SEAtomShakerApp` class that changes atom positions; - a `SEAtomShakerAppGUI` interface with controls exposed to the user; - selection-aware behavior so that only chosen atoms are modified; - undoable edits grouped through SAMSON's holding API. ## Prerequisites - You already know how to use the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). - You can [build an extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and run the matching SAMSON binary. - You have a molecule loaded in SAMSON for testing the final app. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension First, use the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to create a new SAMSON Extension containing one app class. We refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to generate a new SAMSON Extension. Launch SAMSON and invoke the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). Select a folder where you want to generate a SAMSON Extension. Call the extension *AtomShaker*: Leave the name of the App class be *App*, so that the class name will be `SEAtomShakerApp`: Click the **Generate** button: Your SAMSON Extension has been generated, click **Finish**: If everything went well, you should now have a workable project with two main classes: - `SEAtomShakerApp` - the main class, which implements the functionality of the app; - `SEAtomShakerAppGUI` - the main GUI, which implements the user interface of the app. Each class has its own pair of hpp (header) and cpp (code) files. The `SEAtomShakerAppGUI` class also goes with the *ui* file for GUI. Now, try [building the SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md). Once the SAMSON Extension is build and if you start SAMSON (e.g. the debug version provided with the SDK), you should see your app appear in **Home > Apps**: Let's now program the App. ## What's in a name? The first thing we're going to do is change the name of the app from *"SEAtomShakerApp"* to *"Atom Shaker"*. To achieve this, modify the `getName()` function in the `SEAtomShakerGUI` class, in the `SEAtomShakerGUI.cpp` file: ```cpp QString SEAtomShakerAppGUI::getName() const { // SAMSON Extension generator pro tip: this string will be the GUI title. // Modify this function to have a user-friendly description of your app inside SAMSON return "Atom shaker"; } ``` Notice the comment in the function which was suggesting you do just that. In general, you can search for such comments in the code written by the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to get development hints. Once you compile and run again, the new app name is visible: Note how the apps are sorted alphabetically. If you would like to modify the icon, you should modify the file `SEAtomShakerAppIcon.png` in the `resources/icons` folder. ## Adding GUI elements Let's now add a button to our user interface. Open the `form/SEAtomShakerAppGUI.ui` file. Depending on your environment, opening this file should start Qt Designer or Qt Creator. The default user interface created by the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) is this: The default interface contains a label with a developer tip. Delete the label and add a `QPushButton`. It is also a good habit to give meaningful names to widgets, especially later when you create more complex interfaces, so let's get into this habit right now: ## Signals and slots We need to make our app react when the user releases the push button. To do this, we are going to add a slot called `onShakeAtoms` to our interface (a slot is a function called when a widget emits a signal): Finally, we connect the `released` signal of the push button to this new slot (`onShakeAtoms`): We're done with this interface for now. We can save it and quit the interface editor. ## Shaking atoms Even for simple apps, it is preferable to separate the user interface from the core functionality of the app. We are thus going to add to the GUI class the slot we promised to the interface editor. First, we declare the new slot in the `SEAtomShakerAppGUI.hpp` file: ```cpp class SEAtomShakerAppGUI : public SBGApp { // ... public slots: // SAMSON Extension generator pro tip: add slots here to interact with your app void onShakeAtoms(); private: Ui::SEAtomShakerAppGUIClass ui; }; ``` Then, we add the definition of this function in the `SEAtomShakerAppGUI.cpp` file (for example at the end of the file): ```cpp void SEAtomShakerAppGUI::onShakeAtoms() { getApp()->shakeAtoms(); } ``` Note how this function simply calls the `shakeAtoms` function of the app class, to delegate the actual work to the app. Again, this may seem superfluous for such a simple app, but it's a useful habit to get into. Now, in the `SEAtomShakerApp.hpp`, we add the declaration of this `shakeAtoms` function: ```cpp class SEAtomShakerApp : public SBDApp { SB_CLASS public: //... void shakeAtoms(); }; ``` and we are now ready to add the function definition. Our app is going to use several functionalities of the SAMSON SDK. Thus, we include the SAMSON header towards the beginning of the `SEAtomShakerApp.cpp` file: ```cpp #include "SAMSON.hpp" ``` We can now add the function definition at the end of the `SEAtomShakerApp.cpp` file: ```cpp void SEAtomShakerApp::shakeAtoms() { SBNodeIndexer nodeIndexer; // collect all atoms in the active document SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom)); SAMSON::setStatusMessage( QString("We found " + QString::number(nodeIndexer.size()) + QString(" atom(s).")), 0); SB_FOR(SBNode* node, nodeIndexer) { SBAtom* currentAtom = static_cast(node); SBPosition3 position = currentAtom->getPosition(); position.v[0] += SBQuantity::angstrom(1.0); currentAtom->setPosition(position); } } ``` Here, first, we collect all atoms in the active document, and store pointers to them in a [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) `nodeIndexer`. The `SBNode::IsType(SBNode::Atom)` is a node predicate (i.e. an object that contains a function returning `true` or `false` when it is applied to a node). When passed to the `SBNode::getNodes` function, it ensures that only atoms are added to the node indexer. We set the status message in SAMSON saying how many atoms were found. Then, the for loop (with the `SB_FOR` macro) goes over all indexed atoms to translate them by one angstrom in the x direction. Two things should be emphasized: - All [nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) in the [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) derive (directly or indirectly) from the SBNode class. The [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) stores pointers to nodes, and the type of the node variable is thus `SBNode*`. In order to use functionalities of atoms (such as the [SBAtom::getPosition](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/#function-getposition) and `SBAtom::setPosition` function), we need to cast node to a pointer to a [`SBAtom`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) object. - All [physical quantities](https://documentation.samson-connect.net/developers/latest/units/index.md) (lengths, energies, etc.) are **strongly typed** in SAMSON: they are not mere floating-point values, but have associated [units](https://documentation.samson-connect.net/developers/latest/units/index.md). We thus need to specify the unit of the displacement, for that we use `SBQuantity::angstrom`. The [units mechanism](https://documentation.samson-connect.net/developers/latest/units/index.md) integrated in SAMSON ensures that developers from different backgrounds may work with units relevant to them, while ensuring physical correctness and preserving integration between SAMSON Extensions of various origins. For a test, try to replace `angstrom(1.0)` by e.g. `electronVolt(1.0)`, and the code will not compile, whereas `picometer(100.0)` will compile and give the same result as `angstrom(1.0)`. Please, refer to the [Units](https://documentation.samson-connect.net/developers/latest/units/index.md) for more information. We may now compile and run SAMSON, and the app translates atoms: Finally, in order to shake atoms in random directions, we include the `SBRandom.hpp` header that provides random number generators in the beginning of the `SEAtomShakerApp.cpp` file: ```cpp #include "SBRandom.hpp" ``` and we modify the `shakeAtoms` function to use a random generator to perturb atoms positions: ```cpp void SEAtomShakerApp::shakeAtoms() { SBNodeIndexer nodeIndexer; // collect all atoms in the active document SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom)); SAMSON::setStatusMessage( QString("We found " + QString::number(nodeIndexer.size()) + QString(" atom(s).")), 0); // create a random generator with fixed seed static SBRandom randomGenerator; SB_FOR(SBNode* node, nodeIndexer) { SBAtom* currentAtom = static_cast(node); SBPosition3 position = currentAtom->getPosition(); position.v[0] += SBQuantity::angstrom(randomGenerator.randDouble1() - 0.5); position.v[1] += SBQuantity::angstrom(randomGenerator.randDouble1() - 0.5); position.v[2] += SBQuantity::angstrom(randomGenerator.randDouble1() - 0.5); currentAtom->setPosition(position); } } ``` Note the use of `static` for the `randomGenerator`, to force the random generator to be initialized only once (else, the same random perturbation would be applied each time we shake atoms). To create a random generator with custom seed you can change it to: ```cpp // create a random generator with custom seed based on the time SBRandom randomGenerator(SAMSON::getTime()); ``` After recompiling, the app now randomly shakes atoms: ## Making it safe: undo & redo What if users want to undo the perturbation? In SAMSON, many functions are [undoable](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md), and we just need to turn on and off the [holding mechanism](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md) which stores incremental modifications to the document: ```cpp void SEAtomShakerApp::shakeAtoms() { SBNodeIndexer nodeIndexer; // collect all atoms in the active document SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom)); SAMSON::setStatusMessage( QString("We found " + QString::number(nodeIndexer.size()) + QString(" atom(s).")), 0); // create a random generator with fixed seed static SBRandom randomGenerator; // turn the holding mechanism on SAMSON::beginHolding("Shake atoms"); SB_FOR(SBNode* node, nodeIndexer) { SBAtom* currentAtom = static_cast(node); SBPosition3 position = currentAtom->getPosition(); position.v[0] += SBQuantity::angstrom(randomGenerator.randDouble1() - 0.5); position.v[1] += SBQuantity::angstrom(randomGenerator.randDouble1() - 0.5); position.v[2] += SBQuantity::angstrom(randomGenerator.randDouble1() - 0.5); currentAtom->setPosition(position); } // turn the holding mechanism off SAMSON::endHolding(); } ``` The [`SAMSON::beginHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-beginholding) function turns the holding mechanism on. In the history window, the user will see a "Shake atoms" command that can be [undone](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md). The [`SAMSON::endHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-endholding) function turns the holding mechanism off. If the user undoes the command, all [undoable](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md) functions called between [beginHolding](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-beginholding) and [endHolding](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-endholding) (in this case, the `setPosition` calls) will be undone: ## A select few The user might want to perturb the positions of selected atoms only. To achieve this, we simply form a more complex node predicate when we collect atoms in the `shakeAtoms` function: ```cpp // collect all selected atoms in the active document SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom) && SBNode::IsSelected()); ``` This gives more control to the user: ## Shaking magnitude The user might want to setup the maximal shaking distance. To achieve this, we add a `QDoubleSpinBox` to the `form/SEAtomShakerAppGUI.ui`, rename the added `QDoubleSpinBox` as `doubleSpinBoxMaximumDistance`, and set the `QDoubleSpinBox` parameters as shown below: This spin box will define the maximum shaking distance in angstrom for each atom. We modify the `onShakeAtoms` function in the `SEAtomShakerAppGUI.cpp` file: ```cpp void SEAtomShakerAppGUI::onShakeAtoms() { getApp()->shakeAtoms( SBQuantity::angstrom(ui.doubleSpinBoxMaximumDistance->value()) ); } ``` Here, we send the maximum distance from the GUI to the `shakeAtoms` function of the app class. Open the `SEAtomShakerApp.hpp` file and include the following header: ```cpp #include "SBQuantity.hpp" ``` We need to modify the `shakeAtoms` function declaration in the `SEAtomShakerApp.hpp` file as follows: ```cpp void shakeAtoms(const SBQuantity::length& distance); ``` Note that here we are using `SBQuantity::length` and in the GUI class we are sending `SBQuantity::angstrom`. This is possible thanks to SAMSON's [units](https://documentation.samson-connect.net/developers/latest/units/index.md). Now, we modify the `shakeAtoms` function in the `SEAtomShakerApp.cpp` file: ```cpp void SEAtomShakerApp::shakeAtoms(const SBQuantity::length& distance) { SBNodeIndexer nodeIndexer; // collect all selected atoms in the active document SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom) && SBNode::IsSelected()); SAMSON::setStatusMessage( QString("We found " + QString::number(nodeIndexer.size()) + QString(" atom(s).")), 0); // create a random generator with fixed seed static SBRandom randomGenerator; // turn the holding mechanism on SAMSON::beginHolding("Shake atoms"); SB_FOR(SBNode* node, nodeIndexer) { SBAtom* currentAtom = static_cast(node); SBPosition3 position = currentAtom->getPosition(); position.v[0] += distance * (randomGenerator.randDouble1() - 0.5); position.v[1] += distance * (randomGenerator.randDouble1() - 0.5); position.v[2] += distance * (randomGenerator.randDouble1() - 0.5); currentAtom->setPosition(position); } // turn the holding mechanism off SAMSON::endHolding(); } ``` Here, we change atoms' positions by a user defined maximum distance multiplied by a random number in the interval (-0.5, 0.5). Now, users can specify the maximum shaking distance. ## Validate the result Your app is ready if: - it appears in the expected SAMSON app menu; - pressing the button changes only the intended atoms; - the shaking magnitude follows the UI control; - undo and redo restore the previous conformation correctly. ## Common pitfalls - Forgetting to wrap structural edits with `SAMSON::beginHolding` and `SAMSON::endHolding` breaks undo/redo behavior. - Operating on all nodes instead of a filtered atom selection makes the app harder to test and easier to misuse. - Mixing UI logic and atom-update logic too early makes later maintenance more difficult. ## Next steps Continue with [Incremental computation of the center of mass](https://documentation.samson-connect.net/developers/latest/tutorials/center-of-mass/index.md) for signals and slots, or [Programming new editors: Atom Pusher](https://documentation.samson-connect.net/developers/latest/tutorials/atom-pusher/index.md) for direct viewport interaction. # Incremental computation of the center of mass This tutorial is about event-driven extension code. You will build an [app](https://documentation.samson-connect.net/developers/latest/apps/index.md) that listens to structural changes and keeps the center of mass up to date as atoms move. The example shows why SAMSON's [signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md) mechanism matters in practice: instead of recomputing the center of mass for the full system after every edit, you react to `SBStructuralEvent::AtomPositionChanged` and update only the contribution that changed. ## What you will build By the end of the tutorial, you will have: - an app that computes the center of mass for the current selection; - an internal index of tracked atoms and their previous positions; - a slot connected to structural events emitted by those atoms; - an incremental update path that avoids unnecessary full recomputation. ## Prerequisites - You are comfortable with the basic app workflow from [Programming new Apps](https://documentation.samson-connect.net/developers/latest/tutorials/atom-shaker/index.md). - You know the role of [signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md) in SAMSON. - You can [build and run the extension](https://documentation.samson-connect.net/developers/latest/building/index.md). ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *CenterOfMass* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *CenterOfMass* and add some description; - add an **App** class (called `SECenterOfMassApp`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates an app class that implements the functionality of the app and is derived from the [`SBDApp`](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) class, and a GUI class that implements the user interface of the app and is derived from the [`SBGApp`](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) class. ## Setting the description of the Extension Open the header file of the app descriptor (file: `SECenterOfMassAppDescriptor.hpp`) and modify the class description: ```cpp SB_CLASS_DESCRIPTION("DevTutorial: Center of mass"); ``` Open the source file of the app GUI (file: `SECenterOfMassAppGUI.cpp`) and modify the `getName()` function to have a user-friendly description of the app inside SAMSON: ```cpp QString SECenterOfMassAppGUI::getName() const { return "DevTutorial: Center of mass"; } ``` Now, try [building the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and when you launch SAMSON you should be able to find it in **Home > Apps**. For now, it has no interface and does nothing, let's now add functionality to it. ## Setting up the interface Let's start by adding the interface. Open the `form/SEAtomShakerAppGUI.ui` file. Clear the text in the label and add a button to the user interface named `pushButtonComputeCenterOfMass`. Add the following slot: `onComputeCenterOfMass()` and connect the `clicked()` signal from the button to the added slot: ## Computing the center of mass Let's first implement a simple computation of the center of mass of the selected atoms. Open the header file of the GUI class (class: `SECenterOfMassAppGUI`, file: `SECenterOfMassAppGUI.hpp`) and include the `SBVector3.hpp` header file (necessary for `SBPosition3`): ```cpp #include "SBVector3.hpp" ``` Add to the GUI class the `onComputeCenterOfMass()` public slot and a function to update the label with the new center of mass: ```cpp class SECenterOfMassAppGUI : public SBGApp { // ... void updateCenterOfMass(const SBPosition3& centerOfMass); public slots: void onComputeCenterOfMass(); // ... }; ``` Implement the slot function `onComputeCenterOfMass()` as follows: ```cpp void SECenterOfMassAppGUI::onComputeCenterOfMass() { getApp()->computeCenterOfMass(); } ``` Here, we invoke the app's function for computing the center of mass (we will implement this function later in the section). Even for simple apps, it is preferable to separate the user interface from the core functionality of the app. Implement the `updateCenterOfMass()` function to show the center of mass in the interface: ```cpp void SECenterOfMassAppGUI::updateCenterOfMass(const SBPosition3& centerOfMass) { // convert to angstrom // (else it will be in SBQuantity::length, which is picometers) SBQuantity::angstrom x = centerOfMass.v[0]; SBQuantity::angstrom y = centerOfMass.v[1]; SBQuantity::angstrom z = centerOfMass.v[2]; // setup the label ui.label->setText( QString::fromStdString(x.toStdString()) + ", " + QString::fromStdString(y.toStdString()) + ", " + QString::fromStdString(z.toStdString()) ); } ``` Let's now implement the computation of the center of mass in the app class. Open the header file of the app class (`SECenterOfMassApp.hpp`) and include `SBAtom.hpp` and `SAMSON.hpp` headers: ```cpp #include "SBAtom.hpp" #include "SAMSON.hpp" ``` And add the following function and variable in the app class: ```cpp class SECenterOfMassApp : public SBDApp { // ... public: void computeCenterOfMass(); SBPosition3 centerOfMass; }; ``` For now, we implement the `computeCenterOfMass` function without taking into account moving atoms: ```cpp void SECenterOfMassApp::computeCenterOfMass() { // get selected nodes SBPointerIndexer const* selectedNodes = SAMSON::getActiveDocument()->getSelectedNodes(); // find atoms SBNodeIndexer temporaryIndexer; SB_FOR(SBNode* node, *selectedNodes) node->getNodes(temporaryIndexer, SBNode::Atom); // compute the center of mass if (!temporaryIndexer.size()) return; centerOfMass.setZero(); unsigned int nAtoms = 0; SB_FOR(SBNode* node, temporaryIndexer) { SBPointer atom = static_cast(node); if (!atom.isValid()) continue; centerOfMass += atom->getPosition(); nAtoms++; } centerOfMass /= (double)nAtoms; temporaryIndexer.clear(); // display the center of mass getGUI()->updateCenterOfMass(centerOfMass); } ``` Now, try [building the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and when you launch SAMSON you should be able to find it in **Home > Apps**. Load or create a molecule, select it, and compute the center of mass. ## Processing signals Let's now implement the computation of the center of mass in the incremental way thanks to the [signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md) mechanism. For that, we connect structural signal of each atom in the selected system to a slot, in which we will be listening to the `SBStructuralEvent::AtomPositionChanged` event emitted by an atom when its position has changed. And add the following function and variables in the app class (`SECenterOfMassApp.hpp`): ```cpp class SECenterOfMassApp : public SBDApp { // ... public: // ... void onStructuralEvent(SBStructuralEvent* event); SBPointerIndexer atomIndexer; SBPosition3* positionArray; }; ``` The `atomIndexer` will be used for storing indices of atoms for which the center of mass should be computed and the `positionArray` will be used for keeping the previous positions of atoms. Modify the constructor and destructor of the app class (`SECenterOfMassApp.cpp`) as follows: ```cpp SECenterOfMassApp::SECenterOfMassApp() { // ... positionArray = 0; } SECenterOfMassApp::~SECenterOfMassApp() { // clear the position Array if (positionArray) delete[] positionArray; // disconnect from atoms SB_FOR(SBAtom* atom, atomIndexer) atom->disconnectStructuralSignalFromSlot(this, SB_SLOT(&SECenterOfMassApp::onStructuralEvent)); // ... } ``` Implement the function for processing the structural event as follows: ```cpp void SECenterOfMassApp::onStructuralEvent(SBStructuralEvent* event) { if (event->getType() == SBStructuralEvent::AtomPositionChanged) { SBAtom* atom = static_cast(event->getSender()); // get the index of the atom in the atom indexer unsigned int atomIndex = atomIndexer.getIndex(atom); // subtract the old position centerOfMass -= (positionArray[atomIndex] / atomIndexer.size()); // add the new position centerOfMass += (atom->getPosition() / atomIndexer.size()); // store the new position positionArray[atomIndex] = atom->getPosition(); // display the center of mass getGUI()->updateCenterOfMass(centerOfMass); } } ``` Here, we update the center of mass based on an event emitted when the particle position has changed. **Note** that for performace reasons this event is not emitted if the particle position was changed during the simulation or through some of the editors. First, we get an index in the `atomIndexer` of an atom that emitted the event, we substruct this atom's old position from the center of mass and add its new position. Then we remember the current position of the atom and we request the app's interface to update the label. We want the following behavoir from the app: once the button in the interface is clicked, the center of mass should be computed for the currently selected system and later it is updated if any atom from the selected system changes its position. For that, we modify the implementation of the computation of the center of mass as follows: ```cpp void SECenterOfMassApp::computeCenterOfMass() { // clear the position Array if (positionArray) delete[] positionArray; // disconnect from atoms SB_FOR(SBAtom* atom, atomIndexer) atom->disconnectStructuralSignalFromSlot(this, SB_SLOT(&SECenterOfMassApp::onStructuralEvent)); // get selected nodes and find atoms SBPointerIndexer const* selectedNodes = SAMSON::getActiveDocument()->getSelectedNodes(); SBNodeIndexer temporaryIndexer; SB_FOR(SBNode* node, *selectedNodes) node->getNodes(temporaryIndexer, SBNode::Atom); // store pointers to atoms atomIndexer.clear(); SB_FOR(SBNode* node, temporaryIndexer) atomIndexer.addReferenceTarget(node); temporaryIndexer.clear(); // connect to atoms positionArray = new SBPosition3[atomIndexer.size()]; SB_FOR(SBAtom* atom, atomIndexer) positionArray[atomIndexer.getIndex(atom)] = atom->getPosition(); SB_FOR(SBAtom* atom, atomIndexer) atom->connectStructuralSignalToSlot(this, SB_SLOT(&SECenterOfMassApp::onStructuralEvent)); // compute the center of mass if (!atomIndexer.size()) return; centerOfMass.setZero(); SB_FOR(SBAtom* atom, atomIndexer) centerOfMass += atom->getPosition(); centerOfMass /= (double)atomIndexer.size(); // display the center of mass getGUI()->updateCenterOfMass(centerOfMass); } ``` Here, we first clean the array with old positions of atoms, and disconnect previously added atoms from the slot. Then we find atoms in the selected system, add them into the `atomIndexer`, and connect them to the slot. Finally, we compute the center of mass and update it in the interface of the app. Now, you have a simple implementation of an incremental computation of the center of mass. [Build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and launch SAMSON. Load or create any molecule, select it, click on the "Compute center of mass" button in the app, and try moving an atom. You should see that the center of mass is updated in the app interface. ## Validate the result Your app behaves correctly if: - the initial computation reports the center of mass for the current selection; - moving one tracked atom updates the displayed value immediately; - changing the tracked selection rebuilds the internal atom list cleanly; - repeated edits do not accumulate stale atom references. ## Common pitfalls - Forgetting to disconnect old atoms before rebuilding the tracked list leads to duplicated updates. - Forgetting to cache previous positions makes incremental updates impossible. - Treating all moved nodes as atoms without filtering can break the app on mixed selections. ## Next steps Read [Signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md) for the full event model and [References](https://documentation.samson-connect.net/developers/latest/referencing/index.md) for the pointer containers used to keep node references safe. # Exporting files This tutorial shows the exporter side of SAMSON file IO. You will build an [exporter](https://documentation.samson-connect.net/developers/latest/exporters/index.md) for a small XYZ-like format and use it to understand how to traverse structures, extract atom data, and write a user-facing export path. Read it alongside [Importing files](https://documentation.samson-connect.net/developers/latest/tutorials/importing/index.md) if you want the complete import/export picture. ## What you will build By the end of the tutorial, you will have: - a custom exporter class that writes files with an `exyz` extension; - logic that walks atoms, extracts positions, and writes them in text form; - a starting point for adding exporter options later. ## Prerequisites - You know how to [generate an extension](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and [build it](https://documentation.samson-connect.net/developers/latest/building/index.md). - You already understand basic atom traversal in the SAMSON data graph. - You have a structure in SAMSON that you can export for testing. ## File format used in the tutorial We will create an exporter for the following XYZ format: - The 1st line: the number of atoms in the file. - The 2nd line: arbitrary header line. - Next lines contain information on atoms in the following format (coordinates are in angstroms): `element_symbol x-coordinate y-coordinate z-coordinate`. Example of the format: ```text 10 SAMSON Export C -6.644 9.967 5.557 C -7.934 9.831 4.773 C -7.934 10.816 3.617 C -8.098 8.407 4.266 N -7.404 9.603 7.84 C -6.46 9.161 6.834 C -5.09 9.488 7.383 O -5.008 10.375 8.245 H -8.382 9.481 7.521 H -7.182 10.599 8.021 ``` Note SAMSON already has an XYZ Exporter which is installed by default, that's why we are actually going to read files with a *exyz* extension, even though the contents will still correspond to the xyz format. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *EXYZ* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *EXYZ* and add some description; - add an **Exporter** class (called `SEEXYZExporter`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates an exporter class (derived from the [`SBIFileExporter`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileExporter/index.md) class) and a GUI class that implements the user interface of the exporter and is derived from the [`SBGFileExporter`](https://documentation.samson-connect.net/developers/latest/api/classSBGFileExporter/index.md) class. ## Exporting into a file In SAMSON, an [exporter](https://documentation.samson-connect.net/developers/latest/exporters/index.md) is created by programming three functions in the exporter class: - [`getExtension`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileExporter/#function-getextension) - specifies the extension of a file; - [`getFilter`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileExporter/#function-getfilter) - specifies a filter in Qt format; - [`exportToFile`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-exporttofile) - a function invoked by SAMSON to export into a file with a suitable extension. Let's open the `SEEXYZExporter.cpp` file and implement these functions. Modify the `getExtension` function to return the extension of the exporter (*exyz*) as follows: ```cpp std::string SEEXYZExporter::getExtension() const { return std::string("exyz"); } ``` Modify the `getFilter` function to return the filter of the exporter as follows (it should be in the Qt format): ```cpp std::string SEEXYZExporter::getFilter() const { return std::string("EXYZ format (*.exyz)"); } ``` We now have to code the `exportToFile` function to export atoms into a *exyz* file. To achieve this, we are going to use `fstream` to create and write into a file, the SAMSON class to get atoms from the active document, and several structural classes. For that, include the following headers in the file: ```cpp #include #include "SAMSON.hpp" #include "SBStructuralModel.hpp" #include "SBAtom.hpp" ``` Let's now code inside the `exportToFile` function: ```cpp bool SEEXYZExporter::exportToFile( const SBNodeIndexer& nodeIndexer, const std::string& fileName, const SBValueMap& parameterMap) ``` First, we find all atoms in the [nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) that were passed to the `exportToFile` function: ```cpp // retrieve all atoms SBNodeIndexer atomIndexer; SB_FOR(SBNode* node, nodeIndexer) node->getNodes(atomIndexer, SBNode::IsType(SBNode::Atom)); ``` Recall that `SBNode::IsType(SBNode::Atom)` is a [predicate](https://documentation.samson-connect.net/developers/latest/functors/index.md), passed to the `getNodes` function, that returns `true` for [nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) that are atoms. If the user saves data via **Home > File > Save** or **Home > File > Save as...** it will export all atoms from the active [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md), if the user saves data via **Home > File > Save selection as...** it will export all atoms from the selection in the active [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md). Then, we create the file and write its header: ```cpp // create file ofstream file; file.open(fileName.c_str()); // write the header file << atomIndexer.size() << std::endl; // number of atoms file << "SAMSON Export" << std::endl; ``` In this tutorial, for simplicity we do not check for errors during the creation and writing of the file. And we then write the description of each atom to the file: ```cpp // write atoms for (unsigned int i = 0; i < atomIndexer.size(); i++) { SBAtom* currentAtom = static_cast(atomIndexer[i]); SBPosition3 const& currentAtomPosition = currentAtom->getPosition(); file << SAMSON::getElementSymbol(currentAtom->getElementType()) << " " << SBQuantity::angstrom(currentAtomPosition.v[0]).getValue() << " " << SBQuantity::angstrom(currentAtomPosition.v[1]).getValue() << " " << SBQuantity::angstrom(currentAtomPosition.v[2]).getValue() << "\n"; } ``` Finally, we close the file and we signal that everything went fine (at least we believe so, since we did not test for errors in this tutorial): ```cpp file.close(); return true; ``` That is it. You can now export into *exyz* format. If you want for your exporter to get some parameters/options from the user, please check out to the [Importer tutorial: Getting parameters](https://documentation.samson-connect.net/developers/latest/tutorials/importing/#getting-parameters), if not then you can simply disable the options window by replacing the constructor and destructor of `SEEXYZExporter` as follows: ```cpp SEEXYZExporter::SEEXYZExporter() { // remove the options window propertyDialog = nullptr; } SEEXYZExporter::~SEEXYZExporter() { } ``` ## Validate the result Check that: - SAMSON offers your exporter for the `exyz` extension; - the written file contains the expected atom count and coordinates; - exported coordinates are in the intended unit system; - disabling the options window works cleanly if you do not need exporter parameters. ## Common pitfalls - Writing coordinates without making the unit conversion explicit leads to ambiguous output. - Iterating the wrong node set can silently miss atoms or include unsupported nodes. - Forgetting to close the file or return a success status makes exporter failures harder to diagnose. ## Next steps Pair this tutorial with [Importing files](https://documentation.samson-connect.net/developers/latest/tutorials/importing/index.md) and [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) if you also need to save extension-specific state. # Importing files This tutorial shows the full workflow for writing an [importer](https://documentation.samson-connect.net/developers/latest/importers/index.md) in SAMSON. You will implement an importer for a small XYZ-like format and use it to understand parsing, node creation, optional post-processing, and user-supplied parameters. Read it when you need a concrete `SBIFileImporter` example that goes beyond the generated skeleton. ## What you will build By the end of the tutorial, you will have: - a custom importer class that recognizes an `exyz` extension; - parsing code that creates atoms and optional covalent bonds; - a parameter path that lets the importer read user choices from its options UI. ## Prerequisites - You know how to [generate an extension](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and [build it](https://documentation.samson-connect.net/developers/latest/building/index.md). - You are comfortable editing C++ source files generated by SAMSON. - You have a small XYZ file or an exported SAMSON structure that you can rename to `.exyz` for testing. ## File format used in the tutorial We will create an importer for the following XYZ format: - The 1st line: the number of atoms in the file. - The 2nd line: arbitrary header line. - Next lines contain information on atoms in the following format (coordinates are in angstroms): `element_symbol x-coordinate y-coordinate z-coordinate`. Example of the format: ```text 10 Model name C -6.644 9.967 5.557 C -7.934 9.831 4.773 C -7.934 10.816 3.617 C -8.098 8.407 4.266 N -7.404 9.603 7.84 C -6.46 9.161 6.834 C -5.09 9.488 7.383 O -5.008 10.375 8.245 H -8.382 9.481 7.521 H -7.182 10.599 8.021 ``` Note SAMSON already has an XYZ Importer which is installed by default, that's why we are actually going to read files with a *exyz* extension, even though the contents will still correspond to the xyz format. Therefore, to test this importer, you can export (**Home > File > Save as**) any system from SAMSON in the XYZ format and change the extension from *.xyz* to *.exyz*. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *EXYZ* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *EXYZ* and add some description; - add an **Importer** class (called `SEEXYZImporter`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates an importer class (derived from the [`SBIFileImporter`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileImporter/index.md) class) and a GUI class that implements the user interface of the importer and is derived from the [`SBGFileImporter`](https://documentation.samson-connect.net/developers/latest/api/classSBGFileImporter/index.md) class. ## Parsing a file In SAMSON, an [importer](https://documentation.samson-connect.net/developers/latest/importers/index.md) is created by programming three functions in the importer class: - `getExtension` - specifies the extension of a file; - `getFilter` - specifies a filter in Qt format; - `importFromFile` - a function invoked by SAMSON to import a file with a suitable extension. Let's open the `SEEXYZImporter.cpp` file and implement these functions. Modify the `getExtension` function to return the extension of the importer (*exyz*) as follows: ```cpp std::string SEEXYZImporter::getExtension() const { return std::string("exyz"); } ``` Modify the `getFilter` function to return the filter of the importer as follows (it should be in the Qt format): ```cpp std::string SEEXYZImporter::getFilter() const { return std::string("EXYZ format (*.exyz)"); } ``` We now have to code the `importFromFile` function to read a molecule from a *exyz* file and create a structural model. To achieve this, we are going to use the [`SBIFileReader`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileReader/index.md) class to read a file, the SAMSON class to manage the undo mechanism and access the active document, and several structural classes. For that, include the following headers in the file: ```cpp #include "SAMSON.hpp" #include "SBIFileReader.hpp" #include "SBStructuralModel.hpp" #include "SBAtom.hpp" ``` Let's now code inside the `importFromFile` function: ```cpp bool SEEXYZImporter::importFromFile( const std::string& fileName, const SBValueMap& parameterMap, SBDDocumentFolder* preferredFolder) ``` We first begin by checking if the file exists and if it is readable: ```cpp // check if file exists and valid QString qfileName = QString::fromStdString(fileName); QFileInfo checkFile(qfileName); // check the file if (!QFileInfo::exists(qfileName) || !checkFile.isFile() || !checkFile.isReadable() || checkFile.size() == 0) { std::string msg = "EXYZImporter: Could not open EXYZ file " + fileName; if (!QFileInfo::exists(qfileName)) msg += " - file does not exist"; else if (!checkFile.isFile()) msg += " - not a file"; else if (!checkFile.isReadable()) msg += " - not readable"; else if (checkFile.size() == 0) msg += " - zero size"; std::cerr << msg << "\n"; SAMSON::setStatusMessage(QString::fromStdString(msg)); return false; } ``` Now we open the file and store all its lines in a vector of strings: ```cpp // get file lines std::vector fileLineVector; SBIFileReader::getFileLines(fileName, fileLineVector); ``` Then, we read the number of atoms in the file: ```cpp // read the number of atoms from the first line unsigned int numberOfAtoms = 0; std::stringstream numberOfAtomsParser(fileLineVector[0]); numberOfAtomsParser >> numberOfAtoms; ``` We create a new [structural model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#structural-models): ```cpp // create a new structural model std::string name = fileLineVector[1]; SBMStructuralModel* structuralModel = new SBMStructuralModel(); structuralModel->setName(name); ``` And we read and create atoms that we add to the [structural model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#structural-models): ```cpp // read atoms int currentSerialNumber = 0; for (unsigned int i = 2; i < fileLineVector.size(); i++) { // parse the current line double x, y, z; std::string atomType; std::stringstream atomParser(fileLineVector[i]); atomParser >> atomType >> x >> y >> z; // add a new atom to the model SBElement::Type element = SAMSON::getElementTypeBySymbol(atomType); SBAtom* newAtom = new SBAtom(element, SBQuantity::angstrom(x), SBQuantity::angstrom(y), SBQuantity::angstrom(z)); newAtom->setSerialNumber(currentSerialNumber++); structuralModel->getStructuralRoot()->addChild(newAtom); } ``` After adding atoms in the [structural model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#structural-models) we can create covalent bonds between these atoms: ```cpp // create covalent bonds structuralModel->createCovalentBonds(); ``` Now we can add the [structural model](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) to the [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md): ```cpp // start the undoable operation SAMSON::beginHolding("Import EXYZ model"); SAMSON::hold(structuralModel); // the undoable operation // Create the structural model before adding it into the data graph. // This will also create all its children (e.g., atoms). structuralModel->create(); if (preferredFolder) { // add to the preferred folder preferredFolder->addChild(structuralModel); } else { // if there is no preferred folder, add to the active document SAMSON::getActiveDocument()->addChild(structuralModel); } // end the undoable operation SAMSON::endHolding(); ``` [`SAMSON::beginHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-beginholding) and [`SAMSON::endHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-endholding) functions turn the undo system on and off, respectively. The `SAMSON::hold` function tells SAMSON to acquire ownership of the [structural model](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) and its contents. Line `structuralModel->create();` sets the [structural model](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) to a created state (i.e. not erased). Then we implement the expected behavior of an importer, which is to import to the active [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) by default, unless a [folder](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentFolder/index.md) (`preferredFolder`) has been specified. Finally, we signal that we had no issue with the file (in this version of the importer, we do not deal with potential reading errors): ```cpp return true; ``` That's it, we have parsed the file, filled in a [structural model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#structural-models), and added it into a [SAMSON document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md). If you want for the importer to get some parameters/options from the user, please follow to the [Getting parameters](#getting-parameters) section, if not then you can simply disable the options window by replacing the constructor and destructor of `SEEXYZImporter` as follows: ```cpp SEEXYZImporter::SEEXYZImporter() { // remove the options window propertyDialog = nullptr; } SEEXYZImporter::~SEEXYZImporter() { } ``` ## Getting parameters For some file formats it might be necessary for user to specify some parameters/options for an importer. Parameters can be received either from the GUI of an importer or through the `importFromFile` function itself if it was invoked from the code. In this section we will show how to implement this. Let's consider the possibility for the EXYZ importer to import with or without creation of covalent bonds. Open the `form/SEEXYZImporterGUI.ui` file in Qt Creator. Remove the label with a tip and add a `QCheckBox` with a text as follows: Give a meaningful name to the check box: `checkBoxCreateCovalentBonds` We want to save the GUI state (the state of the check box) from one session to the next. For that, we need to implement [saveSettings](https://documentation.samson-connect.net/developers/latest/api/classSBGWindowDialog/#function-savesettings) and [loadSettings](https://documentation.samson-connect.net/developers/latest/api/classSBGWindowDialog/#function-loadsettings) functions. The [saveSettings](https://documentation.samson-connect.net/developers/latest/api/classSBGWindowDialog/#function-savesettings) function is invoked when a SAMSON Extension is being destructed. The [loadSettings](https://documentation.samson-connect.net/developers/latest/api/classSBGWindowDialog/#function-loadsettings) function is invoked in the constructor of a SAMSON Extension. ```cpp void SEEXYZImporterGUI::saveSettings( SBGSettings *settings ) { if (settings == nullptr) return; settings->saveValue("checkBoxCreateCovalentBonds", ui.checkBoxCreateCovalentBonds->isChecked()); } ``` Here we save the current state of the check box in the variable `checkBoxCreateCovalentBonds` which will be stored thanks to the `QSettings` functionality. ```cpp void SEEXYZImporterGUI::loadSettings( SBGSettings *settings ) { if (settings == nullptr) return; ui.checkBoxCreateCovalentBonds->setChecked( settings->loadBoolValue("checkBoxCreateCovalentBonds", true)); } ``` Here we set the state of the check box to the saved one. It is a good practice to separate GUI and non-GUI functionalities, e.g. do not access directly GUI elements from another class. That is why we add the following function in the `SEEXYZImporterGUI` class (`SEEXYZImporterGUI.hpp` file): ```cpp void getParameters(bool& createCovalentBonds); ``` This function will be used in the `SEEXYZImporter` to get parameters from the GUI class. Implement it as follows. ```cpp void SEEXYZImporterGUI::getParameters(bool& createCovalentBonds) { createCovalentBonds = ui.checkBoxCreateCovalentBonds->isChecked(); } ``` Add the following private variable in the `SEEXYZImporter` class (`SEEXYZImporter.hpp` file): ```cpp private: bool createCovalentBonds; ``` Add the following functions in the `SEEXYZImporter` class (`SEEXYZImporter.hpp` file): ```cpp private: void initializeParameters(const SBValueMap& parameterMap); ///< Initializes import parameters void parseParameters(const SBValueMap& parameterMap); ///< Parse the parameters map ``` Implement the `initializeParameters` function that initializes parameters for the parser. ```cpp void SEEXYZImporter::initializeParameters(const SBValueMap& parameterMap) { // no parameters or only one parameter "default" => take from the form if (parameterMap.size() == 0 || (parameterMap.size() == 1 && parameterMap.contains("default"))) { // get parameters of the parser from the window static_cast(propertyDialog)->getParameters(createCovalentBonds); } else { // parse parameters parseParameters(parameterMap); } } ``` In this code, if no parameters has been specified (`parameterMap` is empty or has the wrong size) we take them from the GUI form, else we parse `parameterMap` for which we implement the `parseParameters` function as follows: ```cpp void SEEXYZImporter::parseParameters(const SBValueMap& parameters) { // initialize with default values createCovalentBonds = true; if (parameterMap.contains("createCovalentBonds")) { const SBValue& v = parameterMap.at("createCovalentBonds"); if (SB_CAN_CAST(v)) createCovalentBonds = SB_CAST(v); } } ``` Here we go through `parameterMap` and read the parameters. Now, invoke `initializeParameters` function in the beginning of the `importFromFile` function: ```cpp bool SEEXYZImporter::importFromFile( const std::string& fileName, const SBValueMap& parameterMap, SBDDocumentFolder* preferredFolder) { initializeParameters(parameterMap); // ... } ``` This allows both taking care of parameters specified through GUI or through direct invocation of the `SAMSON::importFromFile` function in the code. ## Validate the result Your importer is ready if: - SAMSON offers it for files with the `exyz` extension; - importing creates the expected atoms and positions; - the optional bond-creation parameter changes the result as intended; - both GUI-triggered imports and programmatic imports pass parameters correctly. ## Common pitfalls - Mixing file parsing with node-creation policy too early makes the importer harder to extend. - Forgetting to initialize parameters at the start of `importFromFile` leads to inconsistent behavior between GUI and programmatic imports. - Not handling extension conflicts makes testing harder when a built-in importer already targets the same format. ## Next steps Continue with [Exporting files](https://documentation.samson-connect.net/developers/latest/tutorials/exporting/index.md) to implement the reverse workflow, or read [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) if you need to persist custom node state beyond simple file IO. # Integrating external programs This tutorial shows how to integrate a third-party command-line tool into a SAMSON extension. You will build an app that exports selected-atom data, launches an external executable, reads the computed result back, and displays it inside SAMSON. Use this pattern when your extension depends on software that already exists outside the SDK, such as a simulation engine, a numerical solver, or a legacy scientific tool. ## What you will build By the end of the tutorial, you will have: - a SAMSON app that gathers data from the current selection; - a small external executable that reads input and writes output; - a file-based exchange contract between SAMSON and that executable; - a Qt `QProcess` launch path that runs the external program from your extension. ## Prerequisites - You know how to [generate an app extension](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). - You can [build, install, and run](https://documentation.samson-connect.net/developers/latest/building/index.md) the extension on your platform. - You are comfortable compiling a small helper executable alongside your extension. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generate the SAMSON Extension Use the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to create a new SAMSON Extension called *Barycenter*, containing an app called `SEBarycenterApp`. ## Setting up the external executable Implement the following simple demo program and save it as `barycenter.cpp` into the `external` subfolder of the generated extension: ```cpp #include #include #include #include int main(int argc, char* argv[]) { // we expect the program name plus two arguments: // input file path and output file path if (argc != 3) { std::cerr << "Usage: " << argv[0] << " \n"; return 1; } // retrieve the paths from the command-line arguments std::string inputFilePath = argv[1]; std::string outputFilePath = argv[2]; unsigned int numberOfAtoms; // open the input file std::ifstream inputFile(inputFilePath); if (!inputFile.is_open()) { std::cerr << "Error: could not open input file: " << inputFilePath << "\n"; return 1; } // open the output file std::ofstream outputFile(outputFilePath); if (!outputFile.is_open()) { std::cerr << "Error: could not open output file: " << outputFilePath << "\n"; return 1; } // read the number of atoms std::string line; std::getline(inputFile, line); std::stringstream firstLineParser(line); firstLineParser >> numberOfAtoms; if (!numberOfAtoms) { outputFile << "No atoms" << std::endl; return 0; } // read the coordinates of the atoms and update the barycenter double x_c = 0.0, y_c = 0.0, z_c = 0.0; while (std::getline(inputFile, line)) { std::stringstream lineParser(line); double x = 0.0, y = 0.0, z = 0.0; lineParser >> x >> y >> z; x_c += x; y_c += y; z_c += z; } x_c /= (double)numberOfAtoms; y_c /= (double)numberOfAtoms; z_c /= (double)numberOfAtoms; outputFile << x_c << "A " << y_c << "A " << z_c << "A" << std::endl; return 0; } ``` This is a simple program for demo purposes, it opens an input text file containing atom coordinates and writes into an output file coordinates of the barycenter of the atoms (or the string *"No atoms"* if the input file did not contain any atom). Compile it to produce an executable called `barycenter`: - Open the **Developer Command Prompt** for Visual Studio (or any command prompt where the Visual C++ compiler cl.exe is available). - Navigate to the directory containing `barycenter.cpp`. - Compile using the Visual C++ compiler: ```shell cl /EHsc barycenter.cpp /Fe:barycenter.exe ``` - Navigate to the directory containing `barycenter.cpp`. - Compile using `g++`: ```shell g++ barycenter.cpp -o barycenter ``` ## Shipping the external executable To ship the external executable with your SAMSON Extension: - in the Extension's folder, create the `external` subfolder with the following subfolders: `win`, `mac`, `lin` (each to place an executable for the corresponding platform); - place the executable into the corresponding folder, e.g. on Windows into `external/win`. Modify the `CMakeLists.txt` file of the extension by adding the following lines that will copy the executable into the `Resource` folder shipped with the Extension: ```cmake if (WIN32) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/external/win/barycenter.exe DESTINATION ${CMAKE_SAMSON_DEVELOPER_DATA_PATH}/Elements/${OUTPUT_UUID}/Resource/barycenter) endif (WIN32) if (UNIX AND NOT APPLE) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/external/lin/barycenter DESTINATION ${CMAKE_SAMSON_DEVELOPER_DATA_PATH}/Elements/${OUTPUT_UUID}/Resource/barycenter FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) endif (UNIX AND NOT APPLE) if (APPLE) file(COPY ${CMAKE_CURRENT_SOURCE_DIR}/external/mac/barycenter DESTINATION ${CMAKE_SAMSON_DEVELOPER_DATA_PATH}/Elements/${OUTPUT_UUID}/Resource/barycenter FILE_PERMISSIONS OWNER_EXECUTE OWNER_WRITE OWNER_READ) endif (APPLE) ``` Note You can place executables in different subfolders and modify the `CMakeLists.txt` file accordingly. ## Setting up the interface Open the UI file `form/SEBarycenterAppGUI.ui` in Qt Creator and add: - a `QPushButton` named `pushButtonCompute` - a `QLabel` named `labelResult` Add the slot declaration to the `SEBarycenterGUI.hpp` file: ```cpp public slots: void onCompute(); ``` In the `SEBarycenterGUI` constructor, connect the push button's `clicked()` signal to this slot: ```cpp QObject::connect(ui.pushButtonCompute, &QPushButton::clicked, this, &SEBarycenterAppGUI::onCompute); ``` Modify the `getName()` function of the `SEBarycenterGUI.cpp` file in order to show a user-friendly name (e.g. "Barycenter") in **Home > Apps**. ## Executing the external executable Since the actual barycenter calculations are going to be performed by an external executable, we could assume that it's OK to implement the main functionality of the app in the interface class, i.e. in the file `SEBarycenterGUI.cpp`. However, if later we wanted to expose the functionality of our SAMSON Extension to other SAMSON Extensions (thanks to the SAMSON's [introspection mechanism](https://documentation.samson-connect.net/developers/latest/introspection/index.md), explored in another tutorial), we would only be able to expose the app itself, and not its interface. As a result, even in this case, we still want to implement the core functionality in the app itself, and not in its interface. Now, add the slot definition to the `SEBarycenterGUI.cpp` file. This just calls the app, and update the label to show the result: ```cpp void SEBarycenterAppGUI::onCompute() { ui.labelResult->setText(QString("Result: ") + QString::fromStdString(getApp()->compute())); } ``` Note that to separate functionality from interface, the app is going to return a `std::string` instead of a `QString`. Add the function declaration inside the `SEBarycenterApp` in the `SEBarycenterApp.hpp` header: ```cpp std::string compute(); ``` We are going to use `QProcess` to execute an external process, [SAMSON facade class](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/index.md) to find atoms in the document, and `fstream` to manipulate files, so we add the following headers at the beginning of the `SEBarycenterApp.cpp` file: ```cpp #include "SAMSON.hpp" #include #include ``` Now, add the function definition at the end of the the `SEBarycenterApp.cpp` file: ```cpp std::string SEBarycenterApp::compute() { // find all selected atoms in the active document SBNodeIndexer atomIndexer; SAMSON::getActiveDocument()->getNodes(atomIndexer, SBNode::IsType(SBNode::Atom) && SBNode::IsSelected()); // set the temporary files in the SAMSON's scratch folder const std::string scratchPath = SAMSON::getScratchPath(); const std::string inputFilePath = scratchPath + "/tmp-barycenter-input.txt"; const std::string outputFilePath = scratchPath + "/tmp-barycenter-output.txt"; // generate the input file for the executable std::ofstream input(inputFilePath); input << atomIndexer.size() << std::endl; SB_FOR(SBNode * node, atomIndexer) { SBAtom* atom = static_cast(node); SBPosition3 position = atom->getPosition(); input << SBQuantity::angstrom(position.v[0]).getValue() << " " << SBQuantity::angstrom(position.v[1]).getValue() << " " << SBQuantity::angstrom(position.v[2]).getValue() << std::endl; } // execute the program and wait until it finishes // Note: the path to the executable corresponds to // the path where it was copied in CMakeLists.txt QString program = QString::fromStdString(SB_ELEMENT_PATH + "/Resource/barycenter/barycenter"); #if SB_WINDOWS program += ".exe"; #endif QStringList arguments{ QString::fromStdString(inputFilePath), QString::fromStdString(outputFilePath) }; QProcess* process = new QProcess(); process->setWorkingDirectory(QString::fromStdString(scratchPath)); process->start(program, arguments); // wait until the process is finished or until time out at 60 seconds process->waitForFinished(60000); delete process; // read the output generated by the external executable std::ifstream output(outputFilePath); std::string result; std::getline(output, result); // delete the temporary files QFile(QString::fromStdString(inputFilePath)).remove(); QFile(QString::fromStdString(outputFilePath)).remove(); return result; } ``` After compiling and installing (do not forget to build the `INSTALL` target), you may now use the app. Note In this tutorial, the external executable is expected to be pretty efficient so that we wait for it to finish before continuing. In the general case, you would connect the finished signal of the process to a Qt slot. Please refer to the documentation of `QProcess` for more information. If you have any questions or feedback, please use the [SAMSON Connect Forum](https://forum.samson-connect.net/). ## Validate the result Your integration is working if: - the app can generate temporary input for the external program; - the external executable runs from the installed extension location; - SAMSON reads the output and shows the expected result; - temporary files are removed after execution. ## Common pitfalls - Hardcoding development-only paths makes the extension fail after installation. - Blocking on `waitForFinished` is acceptable for a tiny demo, but not for long-running real tools. - Forgetting to ship the external executable with the extension breaks the workflow on clean machines. ## Next steps For more advanced integrations, move to asynchronous `QProcess` handling, richer parameter passing, and explicit error reporting. Related pages are [Apps](https://documentation.samson-connect.net/developers/latest/apps/index.md), [Importing files](https://documentation.samson-connect.net/developers/latest/tutorials/importing/index.md), and [Exporting files](https://documentation.samson-connect.net/developers/latest/tutorials/exporting/index.md). # Programming new state updaters: Monte Carlo This tutorial walks through a simplified Metropolis Monte Carlo implementation in SAMSON. You will create a custom state updater, expose its parameters to users, and plug it into a simulator together with an interaction model. Read it after you are comfortable with the general simulation concepts in [Modeling and Simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md), especially if you want a move-based state updater rather than a deterministic integrator. ## What you will build By the end of the tutorial, you will have: - a custom `StateUpdater` class derived from the particle-system state-updater base; - a Monte Carlo move proposal and acceptance path; - a property window that exposes temperature and move-count parameters; - a simulator-ready extension that can be tested against an interaction model. ## Prerequisites - You understand the roles of [interaction models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models), [state updaters](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#state-updaters), and [simulators](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators). - You can [generate](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and [build](https://documentation.samson-connect.net/developers/latest/building/index.md) an extension. - You are comfortable with the related deterministic example in [Programming new state updaters: Steepest descent](https://documentation.samson-connect.net/developers/latest/tutorials/steepest-descent/index.md), or you are ready to read both tutorials together. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *MonteCarlo* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *MonteCarlo* and add some description; - add a **StateUpdater** class (called `SEMonteCarloStateUpdater`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates a [state updater](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#state-updaters) class (derived from the [`SBSStateUpdaterParticleSystem`](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdaterParticleSystem/index.md) class) and a property widget class for the state updater. ## Setting the description of the Extension Open the header file of your state updater descriptor (file: `SEMonteCarloStateUpdaterDescriptor.hpp`) and modify the class description: ```cpp SB_CLASS_DESCRIPTION("DevTutorial: Monte Carlo"); ``` Do the same for the property window descriptor (file: `SEMonteCarloStateUpdaterPropertiesDescriptor.hpp`). Modify the `getName` function of the property window (file: `SEMonteCarloStateUpdaterProperties.cpp`) to have a user-friendly description of your [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) inside SAMSON: ```cpp QString SEMonteCarloStateUpdaterProperties::getName() const { return "DevTutorial: Monte Carlo"; } ``` And modify the constructor for the state updater class (class: `SEMonteCarloStateUpdater`, file: `SEMonteCarloStateUpdater.cpp`) by modifying an argument for the `setName` function as follows: ```cpp setName("DevTutorial: Monte Carlo"); ``` Now, try [building the SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md). Start SAMSON and open any file containing atoms or add atoms in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), then create a new simulator (**Edit > Add simulator** or `Ctrl`/`Cmd` + `Shift`+`M`): your new Extension should be in the list of the available state updaters. ## Implementation Open the state updater header file (`SEMonteCarloStateUpdaterProperties.hpp`) and include the `SBRandom.hpp` header: ```cpp #include "SBRandom.hpp" #include "SAMSON.hpp" ``` Add the following private variables to the state updater class definition (class: `SEMonteCarloStateUpdater`, file: `SEMonteCarloStateUpdaterProperties.hpp`): ```cpp class SEMonteCarloStateUpdater : public SBSStateUpdaterParticleSystem { // ... private: // Monte Carlo variables unsigned int numberOfRejects; unsigned int numberOfTrials; SBRandom randomNumberGenerator; // Metropolis variables unsigned int numberOfMovingParticles; SBQuantity::angstrom maximumDisplacement; SBQuantity::temperature temperature; }; ``` We initialize some of these variables in the constructor of the state updater class (class: `SEMonteCarloStateUpdater`, file: `SEMonteCarloStateUpdaterProperties.cpp`): ```cpp numberOfRejects = numberOfTrials = 0; randomNumberGenerator.seed(SAMSON::getTime()); numberOfMovingParticles = 5; maximumDisplacement = SBQuantity::angstrom(0.1); temperature = SBQuantity::kelvin(50); ``` Note We set the seed for the random number generator based on the current SAMSON time. If you want to get reproductive results (e.g., for debugging purposes) you can set the seed to 0 or any other constant. Now, let's implement the `updateState` function of the state updater class (class: `SEMonteCarloStateUpdater`, file: `SEMonteCarloStateUpdaterProperties.cpp`). First, we get the number of particles in the particle system: ```cpp SBPointerIndexer const* particleIndexer = (*dynamicalModel)->getAtomIndexer(); // number of particles in the particle system const unsigned int nParticles = particleIndexer->size(); // check the maximum number of particles numberOfMovingParticles = (numberOfMovingParticles > nParticles) ? nParticles : numberOfMovingParticles; ``` We request the [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) to update the interactions and get the energy of the particle system, which then will be used in the algorithm. Since we do not require forces we ask the interaction model to flush the force buffer. ```cpp // compute the current energy (*interactionModel)->updateInteractions(); SBQuantity::energy currentEnergy = (*interactionModel)->getEnergy(); // notify the interaction model that we have used // the list of updated forces since we do not need it (*interactionModel)->flushForceBuffer(); ``` We randomly determine the list of particles that will be moved by the algorithm: ```cpp // randomly generate the list of moving particles std::vector movingParticleIndexer; while (movingParticleIndexer.size() != numberOfMovingParticles) { // generate an index of a particle and add it in the indexer of moving particles unsigned int idx = (unsigned int)(randomNumberGenerator.randUnsignedLong() % nParticles); movingParticleIndexer.push_back(idx); } ``` We remember the current positions of these particles and compute the new ones based on a random displacement normalized by the maximum possible displacement: ```cpp // move particles incrementally std::vector currentPositionVector; for (unsigned int i = 0; i < numberOfMovingParticles; i++) { unsigned int currentMovingParticleIndex = movingParticleIndexer[i]; // store the current position SBPosition3 currentPosition = (*dynamicalModel)->getPosition(currentMovingParticleIndex); currentPositionVector.push_back(currentPosition); // create the random displacement normalized by the maximumDisplacement SBPosition3 displacement((randomNumberGenerator.randDouble1() - 0.5) * maximumDisplacement, (randomNumberGenerator.randDouble1() - 0.5) * maximumDisplacement, (randomNumberGenerator.randDouble1() - 0.5) * maximumDisplacement); SBPosition3 newPosition = currentPosition + displacement; // set the new position of particle i (*dynamicalModel)->setPosition(currentMovingParticleIndex, newPosition); } ``` We request the [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) to update the interactions and get the new energy of the particle system. If the new energy is less then the current one, we accept all the displacements, else we reject the move for each displaced particle based on the probability. ```cpp // compute the new energy (*interactionModel)->updateInteractions(); SBQuantity::energy newEnergy = (*interactionModel)->getEnergy(); // accept or reject if (newEnergy > currentEnergy) { double p = randomNumberGenerator.randDouble1(); double b = exp( ( (currentEnergy - newEnergy) / ((*SBConstant::boltzmannConstant) * temperature) ).getValue() ); // check the probability if (p > b) { // reject the move for (unsigned int i = 0; i < numberOfMovingParticles; i++) { unsigned int currentMovingParticleIndex = movingParticleIndexer[i]; (*dynamicalModel)->setPosition(currentMovingParticleIndex, currentPositionVector[i]); } numberOfRejects++; } } numberOfTrials++; // update the structural model based on the new positions in the dynamical model (*dynamicalModel)->updateStructuralNodes(); ``` After the certain number of trials (e.g. 100), we decide whether to increase or to decrease the maximum possible displacement for a particle based on the ratio of the number of rejects to the number of trials; and we reset the number of trials and rejects. ```cpp // check for the rejects ratio after a certain number of trials // and modify the maximum displacement if (numberOfTrials == 100) { // check the rejects ratio if ( (double)numberOfRejects / (double)numberOfTrials > 0.5 ) { // rejects constitute to more than a half of trials // decrease the maximum displacement maximumDisplacement *= 0.95; // but not less than 0.01 Å maximumDisplacement = (maximumDisplacement > SBQuantity::angstrom(0.01)) ? SBQuantity::angstrom(0.01) : maximumDisplacement; } else { // rejects constitute to less (or equal) than a half of trials // increase the maximum displacement by 5% maximumDisplacement *= 1.05; } // reset the number of trials and rejects numberOfRejects = 0; numberOfTrials = 0; } ``` Now, you should have the basic implementation of a simple exploration method based on a Metropolis Monte Carlo approach. You can [build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md), launch SAMSON, load or create any molecule, and add a new [simulator](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators) with this state updater and with, for example, the [springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md). Run the simulation (**Edit > Start simulation**) and try slightly pulling an atom. But for now, we have not exposed the possibility for the user to modify parameters of the method (e.g. temperature and number of moving particles). Let's do this in the next section. ## Exposing parameters We want to make it possible for the user to modify temperature and the number of moving particles. For that we will need to modify both state updater and state updater property window classes (`SEMonteCarloStateUpdater` and `SEMonteCarloStateUpdaterProperties` classes). First, let's create setter functions in the state updater class (class: `SEMonteCarloStateUpdater`, file: `SEMonteCarloStateUpdater.hpp`) ```cpp class SEMonteCarloStateUpdater : public SBSStateUpdaterParticleSystem { // ... /// \name Setters //@{ void setNumberOfMovingParticles(int n); void setTemperature(SBQuantity::temperature T); //@} }; ``` We implement these functions as follows (with checks for negative values): ```cpp void SEMonteCarloStateUpdater::setNumberOfMovingParticles(int n) { numberOfMovingParticles = n < 0 ? numberOfMovingParticles : n; } void SEMonteCarloStateUpdater::setTemperature(SBQuantity::temperature T){ temperature = T < SBQuantity::temperature(0.0) ? temperature : T; } ``` We check for the maximum number of particles in the `updateState` function of the state updater. Let's now modify the property window class. In the current GUI of the Extension we have the step size and the number of steps which we do not actually use in our state updater, we will modify these to allow the user to change the temperature and the number of moving particles. You might need to modify the maximum size of the widget and lables. Modify the double spin box: change its name to `doubleSpinBoxTemperature`, modify the default and maximum value, and the single step size as follows Modify the spin box: change its name tp `spinBoxNumberOfMovingParticles` modify the default and maximum value, and the single step size as follows Add two slots: `onTemperatureChanged(double)` and `onNumberOfMovingParticlesChanged(int)`: And connect signal from two spin boxes to these slots: Add these public slots to the state updater property window class declaration (class: `SEMonteCarloStateUpdaterProperties`, file: `SEMonteCarloStateUpdaterProperties.hpp`): ```cpp class SEMonteCarloStateUpdaterProperties : public SBGDataGraphNodeProperties { // ... public slots: void onNumberOfMovingParticlesChanged(int); void onTemperatureChanged(double); }; ``` And implement these functions as follows (file: `SEMonteCarloStateUpdaterProperties.cpp`): ```cpp void SEMonteCarloStateUpdaterProperties::onNumberOfMovingParticlesChanged(int i) { stateUpdater->setNumberOfMovingParticles(i); } void SEMonteCarloStateUpdaterProperties::onTemperatureChanged(double d) { stateUpdater->setTemperature(SBQuantity::kelvin(d)); } ``` Modify the `loadSettings` and `loadSettings` functions to save the GUI state from one session to another: ```cpp void SEMonteCarloStateUpdaterProperties::loadSettings(SBGSettings *settings) { if (settings == nullptr) return; ui.spinBoxNumberOfMovingParticles->setValue( settings->loadIntValue("spinBoxNumberOfMovingParticles", 1)); ui.doubleSpinBoxTemperature->setValue( settings->loadDoubleValue("doubleSpinBoxTemperature", 1.0)); } void SEMonteCarloStateUpdaterProperties::saveSettings(SBGSettings *settings) { if (settings == nullptr) return; settings->saveValue("doubleSpinBoxTemperature", ui.doubleSpinBoxTemperature->value()); settings->saveValue("spinBoxNumberOfMovingParticles", ui.spinBoxNumberOfMovingParticles->value()); } ``` In both `setup` functions of the state updater property window class (class: `SEMonteCarloStateUpdaterProperties`) modify the setting of steps size and number of steps to set temperature and number of moving particles as follows: ```cpp stateUpdater->setTemperature( SBQuantity::kelvin(ui.doubleSpinBoxTemperature->value())); stateUpdater->setNumberOfMovingParticles( ui.spinBoxNumberOfMovingParticles->value()); ``` Now, when the user changes temperature or the number of moving particles in the property window it will automatically use the new parameters in the `updateState` function of the state updater. [Build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md), launch SAMSON, load or create any molecule and add a new [simulator](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators) with this state updater and with, for example, the [springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md). Run the simulation (**Edit > Start simulation**) and try slightly pulling an atom. ## Validate the result Your implementation is behaving as expected if: - the state updater appears in the simulator setup flow; - changing temperature or the number of moving particles affects the simulation behavior; - the simulation runs without invalidating the shared dynamical model; - the property window restores saved settings correctly. ## Common pitfalls - Forgetting that the interaction model and the state updater must agree on the same dynamical model leads to inconsistent simulations. - Updating UI settings without propagating them back to the state updater makes the property window look correct while doing nothing. - Treating this simplified tutorial as production-grade Monte Carlo logic will leave out important acceptance, sampling, and performance details. ## Next steps Compare this tutorial with [Programming new state updaters: Steepest descent](https://documentation.samson-connect.net/developers/latest/tutorials/steepest-descent/index.md) and pair it with [Programming new force fields: Springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md) for a complete simulation stack. # Programming a path generator This tutorial is a multi-class walkthrough that combines an editor, a visual model, and a custom node type into one extension. The result is an interactive path generator that lets users create and edit paths directly in the viewport. Read it when you want an example that goes beyond a single generated class and shows how several extension roles work together. ## What you will build By the end of the tutorial, you will have: - an editor that creates and moves path nodes in the viewport; - a custom node class used to store path control points; - a visual model that renders the path in the document; - a descriptor configuration that exposes only the classes users need to interact with. ## Prerequisites - You already know the basics of [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md) and [Visual models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models). - You can [generate](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and [build](https://documentation.samson-connect.net/developers/latest/building/index.md) an extension. - You are comfortable editing several generated files in one extension. First, use the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to create a new SAMSON Extension called *PathGenerator* containing: - An **Editor** class called *Editor* (full name: `SEPathGeneratorEditor`) - this class will make it possible for the user to add new nodes to the path. - A **Visual Model** class called *VisualModel* (full name: `SEPathGeneratorVisualModel`) - this will be the main class used to represent a path in the viewport and the document. - A **Node** class called *Node* (full name: `SEPathGeneratorNode`) - this class will be used to represent path nodes and the corresponding [GUI class](https://documentation.samson-connect.net/developers/latest/api/classSBGDataGraphNode/index.md) will be used to interact with the node. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Preliminaries Let's do a few things to set up our SAMSON Extension. First, since we want the user to create paths through the editor contained in our SAMSON Extension, we are going to hide from SAMSON most other classes (e.g., this won't allow the use to add this visual model). Precisely, we need to remove from the descriptor of the SAMSON Extension all the classes that we do not want to expose, and only keep the ones that will be directly useful to the user, i.e. the editor itself and the node GUI. Thus, comment lines in `SEPathGeneratorDescriptor.cpp` such that you obtain: ```cpp SB_ELEMENT_CLASSES_BEGIN; SB_ELEMENT_CLASS(SEPathGeneratorEditor); //SB_ELEMENT_CLASS(SEPathGeneratorVisualModel); //SB_ELEMENT_CLASS(SEPathGeneratorVisualModelProperties); //SB_ELEMENT_CLASS(SEPathGeneratorNode); SB_ELEMENT_CLASS(SEPathGeneratorNodeGUI); //SB_ELEMENT_CLASS(SEPathGeneratorNodeProperties); SB_ELEMENT_CLASSES_END; ``` Then, modify the `getName()`, `getDescription()` functions of `SEPathGeneratorEditor` to provide a user-friendly name for the editor: ```cpp QString SEPathGeneratorEditor::getDescription() const { // SAMSON Extension generator pro tip: modify this function to return a user-friendly string that will be displayed in menus return QObject::tr("Path creator"); } ``` And don't forget the tooltip: ```cpp QString SEPathGeneratorEditor::getToolTip() const { // SAMSON Extension generator pro tip: modify this function to have your editor display a tool tip in the SAMSON GUI when the mouse hovers the editor's icon return QObject::tr("Click in the viewport to create a path and add nodes to it.
Press Escape to end the path."); } ``` Since we do not need a GUI for the editor itself, we remove it from the constructor and the destructor of the editor in `SEPathGeneratorEditor.cpp`: ```cpp SEPathGeneratorEditor::SEPathGeneratorEditor() { propertyWidget = nullptr; } SEPathGeneratorEditor::~SEPathGeneratorEditor() {} ``` ## Path nodes In this tutorial, a path will be composed of path nodes connected by straight lines. We need each path node to store its position so, at the beginning of `SEPathGeneratorNode.hpp`, we include `SBVector3.hpp` which contains the declarations of all [physical vectors](https://documentation.samson-connect.net/developers/latest/units/index.md): ```cpp #include "SBVector3.hpp" ``` and in the end of the class declaration, we add this position and its accessors: ```cpp SBPosition3 getPosition() const; void setPosition(const SBPosition3& position); private: SBPosition3 position; ``` and we define these accessors in `SEPathGeneratorNode.cpp`: ```cpp SBPosition3 SEPathGeneratorNode::getPosition() const { return position; } void SEPathGeneratorNode::setPosition(const SBPosition3& position) { this->position = position; } ``` Finally, we modify the declaration of the path node constructor of `SEPathGeneratorNode` to accept a position: ```cpp SEPathGeneratorNode(const SBPosition3& position); ``` and we modify the constructor accordingly in `SEPathGeneratorNode.cpp`: ```cpp SEPathGeneratorNode::SEPathGeneratorNode(const SBPosition3& position) { this->position = position; } ``` Finally, we modify the constructor descriptor in `SEPathGeneratorNodeDescriptor.hpp`: ```cpp SB_FACTORY_BEGIN; SB_CONSTRUCTOR_1(const SBPosition3&); SB_FACTORY_END; ``` ## Paths We need paths to hold a list of path nodes, so we include `SEPathGeneratorNode.hpp` at the beginning of `SEPathGeneratorVisualModel.hpp`: ```cpp #include "SEPathGeneratorNode.hpp" ``` and we add such a list at the end of the class declaration, as well as functions to manage it: ```cpp void addNode(SEPathGeneratorNode* pathNode); void removeNode(SEPathGeneratorNode* pathNode); private: SBPointerList pathNodeList; ``` and we define these functions in `SEPathGeneratorVisualModel.cpp`: ```cpp void SEPathGeneratorVisualModel::addNode(SEPathGeneratorNode* pathNode) { if (pathNode) pathNodeList.addReferenceTarget(pathNode); } void SEPathGeneratorVisualModel::removeNode(SEPathGeneratorNode* pathNode) { if (pathNode) pathNodeList.removeReferenceTarget(pathNode); } ``` Note that we use [SAMSON pointers](https://documentation.samson-connect.net/developers/latest/referencing/index.md) to manage this list, as we should whenever we want to hold references to persistent SAMSON objects. Finally, we need to display the path based on the list of path nodes, so we modify the `display` function: ```cpp void SEPathGeneratorVisualModel::display(SBNode::RenderingPass renderingPass) { // SAMSON Extension generator pro tip: this function is called by SAMSON during the main rendering loop. This is the main function of your visual model. // Implement this function to display things in SAMSON, for example thanks to the utility functions provided by SAMSON (e.g. displaySpheres, displayTriangles, etc.) if (pathNodeList.empty()) return; const unsigned int numberOfPathNodes = pathNodeList.size(); const unsigned int numberOfPathLines = numberOfPathNodes - 1; const unsigned int inheritedFlags = getInheritedFlags(); const float nodeRadius = SBQuantity::length(SBQuantity::angstrom(0.1)).getValue(); const float lineRadius = 0.5 * nodeRadius; // allocate arrays and initialize them to zeros float* positionData = new float[3 * numberOfPathNodes](); float* pathNodeRadiusData = new float[numberOfPathNodes](); float* pathLineRadiusData = new float[numberOfPathNodes](); float* colorData = new float[4 * numberOfPathNodes](); unsigned int* capData = new unsigned int[numberOfPathNodes](); unsigned int* flagData = new unsigned int[numberOfPathNodes](); unsigned int* indexData = new unsigned int[2 * numberOfPathLines](); unsigned int* nodeIndexData = new unsigned int[numberOfPathNodes](); // fill in the arrays unsigned int i = 0; SB_FOR(SEPathGeneratorNode * currentPathNode, pathNodeList) { const SBPosition3& position = currentPathNode->getPosition(); positionData[3 * i + 0] = (float)position.v[0].getValue(); positionData[3 * i + 1] = (float)position.v[1].getValue(); positionData[3 * i + 2] = (float)position.v[2].getValue(); nodeIndexData[i] = currentPathNode->getNodeIndex(); if (i < numberOfPathLines) { indexData[2 * i + 0] = i; indexData[2 * i + 1] = i + 1; } pathNodeRadiusData[i] = nodeRadius; pathLineRadiusData[i] = lineRadius; colorData[4 * i + 0] = 1.0f; colorData[4 * i + 1] = 1.0f; colorData[4 * i + 2] = 0.0f; colorData[4 * i + 3] = 1.0f; capData[i] = 0; flagData[i] = currentPathNode->getInheritedFlags() | inheritedFlags; i++; } // display if (renderingPass == SBNode::RenderingPass::OpaqueGeometry) { SAMSON::displaySpheres(numberOfPathNodes, positionData, pathNodeRadiusData, colorData, flagData); SAMSON::displayCylinders(numberOfPathLines, numberOfPathNodes, indexData, positionData, pathLineRadiusData, capData, colorData, flagData); } else if (renderingPass == SBNode::RenderingPass::ShadowingGeometry) { // display for shadows SAMSON::displaySpheres(numberOfPathNodes, positionData, pathNodeRadiusData, colorData, flagData, true); SAMSON::displayCylinders(numberOfPathLines, numberOfPathNodes, indexData, positionData, pathLineRadiusData, capData, colorData, flagData, true); } else if (renderingPass == SBNode::RenderingPass::SelectableGeometry) { // display in the selectable mode in order to make path nodes movable SAMSON::displaySpheresSelection(numberOfPathNodes, positionData, pathNodeRadiusData, nodeIndexData); } // clean delete[] positionData; delete[] indexData; delete[] nodeIndexData; delete[] pathNodeRadiusData; delete[] pathLineRadiusData; delete[] capData; delete[] colorData; delete[] flagData; } ``` Note In order to make path nodes movable, we need to make them selectable in the viewport. To achieve this, we implement the `SBNode::RenderingPass::SelectableGeometry` pass in the `display` function of `SEPathGeneratorVisualModel` in which we supply node indices to the `displaySpheresSelection` function. ## Editor The editor needs to hold a pointer to the path that is currently being created, so we include `SEPathGeneratorVisualModel.hpp` at the beginning of `SEPathGeneratorEditor.hpp`: ```cpp #include "SEPathGeneratorVisualModel.hpp" ``` In the `SEPathGeneratorEditor` class declaration, add a [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/referencing/index.md) to the path and a pointer to the selected node in order to be able to move the path nodes: ```cpp private: SBPointer path; SBPointer selectedPathNode; ``` This path pointer will be non-zero whenever we are creating or editing a path, and will be zero otherwise. So we need to make sure that we reset this pointer to zero whenever we begin and end editing in `SEPathGeneratorEditor.cpp` (i.e. when the user changes the active editor): ```cpp void SEPathGeneratorEditor::beginEditing() { path = nullptr; selectedPathNode = nullptr; } void SEPathGeneratorEditor::endEditing() { path = nullptr; selectedPathNode = nullptr; } ``` and we also make it possible for a user to stop the current path by pressing the `Esc` key: ```cpp void SEPathGeneratorEditor::keyPressEvent(QKeyEvent* event) { if (event->key() == Qt::Key_Escape) { path = nullptr; selectedPathNode = nullptr; event->accept(); } } ``` We now want to create path nodes when we release the mouse button in the viewport. To achieve this, we modify the `mouseReleaseEvent` function in `SEPathGeneratorEditor.cpp`: ```cpp void SEPathGeneratorEditor::mouseReleaseEvent(QMouseEvent* event) { // create the path if necessary, i.e. if we don't have a valid pointer or // if our pointer points to an erased path if (path == nullptr || (path != nullptr && path->isErased())) { path = new SEPathGeneratorVisualModel(); path->create(); SAMSON::getActiveDocument()->addChild(path()); } // get a world position from the mouse position when the user clicked SBPosition3 position = SAMSON::getWorldPositionFromViewportPosition(event->pos()); // add a path node SEPathGeneratorNode* pathNode = new SEPathGeneratorNode(position); path->addNode(pathNode); SAMSON::requestViewportUpdate(); // refresh the viewport } ``` To make the nodes movable, we determine whether the user clicks on a path node during a mouse press event in `SEPathGeneratorEditor.cpp`: ```cpp void SEPathGeneratorEditor::mousePressEvent(QMouseEvent* event) { // find whether the user clicked on a node path SBNode* node = SAMSON::getNode(event->pos(), (SBNode::GetClass() == std::string("SEPathGeneratorNode")) && (SBNode::GetElementUUID() == SBUUID(SB_ELEMENT_UUID))); if (node) selectedPathNode = static_cast(node); else selectedPathNode = nullptr; } ``` Note that we only get nodes which have the same class name and the same extension UUID, so we're sure that we can cast to `SEPathGeneratorNode*`. Finally, if a path node is selected, we move it when the user moves the mouse: ```cpp void SEPathGeneratorEditor::mouseMoveEvent(QMouseEvent* event) { if (selectedPathNode != nullptr) { // get a world position from the mouse position when the user clicked SBPosition3 position = SAMSON::getWorldPositionFromViewportPosition(event->pos()); // move the path node selectedPathNode->setPosition(position); // refresh the viewport SAMSON::requestViewportUpdate(); } } ``` and we unselect the node when the user releases the mouse button by modifying the `mouseReleaseEvent` function: ```cpp void SEPathGeneratorEditor::mouseReleaseEvent(QMouseEvent* event) { if (selectedPathNode != nullptr) { selectedPathNode = nullptr; return; } // ... } ``` ## Conclusion We would need a few more things to make this SAMSON Extension more user-friendly: make actions [undoable](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md), being able to erase nodes, provide feedback when we click in the viewport to show the user where a node is about to be created, etc. If you have any questions or feedback, please use the [SAMSON Connect Forum](https://forum.samson-connect.net/). ## Validate the result Your extension is ready if: - the editor can create new path nodes in the viewport; - selecting and dragging an existing node updates the rendered path; - the visual model stays in sync with the custom node data; - only the intended user-facing classes are exposed by the descriptor. ## Common pitfalls - Exposing too many generated classes in the descriptor clutters the user experience and makes the tutorial harder to follow. - Forgetting to refresh the viewport after node edits makes the path appear stale. - Letting editor logic, node storage, and visual rendering leak into each other makes later changes harder. ## Next steps Good follow-up topics are [Rendering](https://documentation.samson-connect.net/developers/latest/rendering/index.md), [Undo and redo](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md), and [Programming new editors: Atom Pusher](https://documentation.samson-connect.net/developers/latest/tutorials/atom-pusher/index.md). # Creation of Python bindings for SAMSON Extensions This tutorial explains how to expose a C++ SAMSON extension to Python with `pybind11`. It focuses on binding your own extension classes and functions, not on running standalone Python scripts inside SAMSON. We will use the **PyBindTutorial** sample from [SAMSON-Developers-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials/) as the concrete reference implementation. If you have any questions or experience any problems with creating Python bindings for your SAMSON Extension, please, check the [SAMSON Connect Forum](https://forum.samson-connect.net/). ## What you will build By the end of the tutorial, you will understand how to: - configure a SAMSON extension build so that Python headers and libraries are found correctly; - add `pybind11` to the extension and expose C++ classes and functions; - bind functions that exchange SAMSON physical quantities and physical types; - run SAMSON from your IDE with the embedded Python environment available. ## Sample project and dependencies - You already know how to [build extensions on your platform](https://documentation.samson-connect.net/developers/latest/building/index.md). - You are comfortable editing `CMakeLists.txt` and C++ headers and sources. - You understand the extension you want to expose from the C++ side first. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Prerequisites Download or clone [SAMSON-Developers-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials/) samples. We will be using the **PyBindTutorial** sample in this tutorial. ### Used packages Python bindings are done thanks to [pybind11](https://github.com/pybind/pybind11), *"a lightweight header-only library that exposes C++ types in Python"*. You can find an extraction of the necessary files in the `PyBindTutorial/external` folder or you can clone the [pybind11](https://github.com/pybind/pybind11) repository (we advice using pybind11 v.2.13.6+). Only the header files (`pybind11/include/pybind11/...`) are necessary from the [pybind11](https://github.com/pybind/pybind11) repository. ## Building a SAMSON Extension with Python Open the root `CMakeLists.txt` from the [SAMSON-Developers-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials/) and check if the *PyBindTutorial* directory is added: ```cmake ADD_SUBDIRECTORY( PyBindTutorial ) ``` When generating a project with `cmake`, you need to specify the `Python_ROOT_DIR`: ```shell cmake -G"Visual Studio 17" ` -DQT5_CMAKE_INCLUDE_DIR="C:\Qt\6.10.2\msvc2022_64\lib\cmake" ` -DSAMSON_SDK_PATH="YourSDKPath/SAMSON-Sdks/11.0.1" ` -DPython_ROOT_DIR="YourSAMSONPath/11.0.1/Binaries" .. ``` - `YourSDKPath` - is the path to your SAMSON SDK installation. - `YourSAMSONPath` - is the path to your SAMSON installation (the *Binaries* subfolder contains the shipped Python). See also [Building a SAMSON Extension on Windows](https://documentation.samson-connect.net/developers/latest/building/windows/index.md). In the Qt Creator project, add the `Python_ROOT_DIR` and set it to the path to Python shipped with SAMSON, e.g.: `$HOME/OneAngstrom/SAMSON/11.0.1/Binaries/`, replace `$HOME` with your user's folder. See also [Building a SAMSON Extension on Linux](https://documentation.samson-connect.net/developers/latest/building/linux/index.md). In the Qt Creator project, add the `Python_ROOT_DIR` and set it to the path to the Python framework shipped with SAMSON, e.g.: `$HOME/Applications/SAMSON.app/11.0.1/Binaries/Python.framework/Versions/3.11`, replace `$HOME` with your user's folder. See also [Building a SAMSON Extension on macOS](https://documentation.samson-connect.net/developers/latest/building/mac/index.md). On Linux and Mac, to build a SAMSON Extension with Python, you might need to provide a path to your Python installation in build environment variables of your project. The path to your Python executable should be the first in the PATH build environment variable of your project. See an image below (Linux, Qt Creator): Now, we need to provide paths to Python header files and link against the Python library. For that, open the `CMakeLists.txt` from the **PyBindTutorial** sample and add the following lines just before `TARGET_LINK_LIBRARIES`: ```cmake #################################################### # Python bindings thanks to pybind11 #################################################### IF( DEBUG ) # Disable the creation of Python bindings in the Debug mode # since Python is not supported in the Debug mode SET (Python_LIBRARIES "") ELSE( DEBUG ) INCLUDE ( PythonVersion ) MESSAGE("================================ PYTHON VERSION ====================================") MESSAGE("PYTHON_MAJOR_VERSION_NUMBER = " ${PYTHON_MAJOR_VERSION_NUMBER}) MESSAGE("PYTHON_MINOR_VERSION_NUMBER = " ${PYTHON_MINOR_VERSION_NUMBER}) MESSAGE("PYTHON_PATCH_VERSION_NUMBER = " ${PYTHON_PATCH_VERSION_NUMBER}) MESSAGE("======================================================================================") SET( PYTHON_VERSION ${PYTHON_MAJOR_VERSION_NUMBER}.${PYTHON_MINOR_VERSION_NUMBER} ) MESSAGE(" Searching for Python " ${PYTHON_VERSION}) MESSAGE("--------------------------------------------------------------------------------------") IF( UNIX ) FIND_PACKAGE(Python3 ${PYTHON_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED) SET( Python_FOUND ${Python3_FOUND} ) SET( Python_Interpreter_FOUND ${Python3_Interpreter_FOUND} ) SET( Python_VERSION ${Python3_VERSION} ) SET( Python_EXECUTABLE ${Python3_EXECUTABLE} ) SET( Python_LIBRARIES ${Python3_LIBRARIES} ) SET( Python_INCLUDE_DIRS ${Python3_INCLUDE_DIRS} ) SET( Python_LIBRARY_DIRS ${Python3_LIBRARY_DIRS} ) SET( Python_INTERPRETER_ID ${Python3_INTERPRETER_ID} ) SET( Python_VERSION ${Python3_VERSION} ) SET( Python_VERSION_MAJOR ${Python3_VERSION_MAJOR} ) SET( Python_VERSION_MINOR ${Python3_VERSION_MINOR} ) SET( Python_VERSION_PATCH ${Python3_VERSION_PATCH} ) ELSE( UNIX ) FIND_PACKAGE(Python ${PYTHON_VERSION} EXACT COMPONENTS Interpreter Development REQUIRED) ENDIF( UNIX ) MESSAGE("Python_FOUND: " ${Python_FOUND} ) MESSAGE("Python Interpreter found: " ${Python_Interpreter_FOUND}) MESSAGE("Python version: " ${Python_VERSION}) MESSAGE("Python executable: " ${Python_EXECUTABLE}) MESSAGE("Python libraries: " ${Python_LIBRARIES} ) MESSAGE("Python include dirs: " ${Python_INCLUDE_DIRS} ) MESSAGE("Python libraries dirs: " ${Python_LIBRARY_DIRS} ) MESSAGE("Python_INTERPRETER_ID: " ${Python_INTERPRETER_ID} ) MESSAGE("Python_VERSION: " ${Python_VERSION} ) MESSAGE("Python_VERSION_MAJOR: " ${Python_VERSION_MAJOR} ) MESSAGE("Python_VERSION_MINOR: " ${Python_VERSION_MINOR} ) MESSAGE("Python_VERSION_PATCH: " ${Python_VERSION_PATCH} ) MESSAGE("======================================================================================") MESSAGE("") IF ( ${Python_Interpreter_FOUND} ) # This define is used in the code to determine # whether Python bindings should be created or not add_definitions(-DCREATE_PYTHON_BINDINGS) # Set path to pybind11 headers SET(Pybind11_INCLUDE_DIRS "./external/pybind11/include/") # include paths to python and pybind11 headers INCLUDE_DIRECTORIES(${Python_INCLUDE_DIRS} ${Pybind11_INCLUDE_DIRS}) # Set path to headers for SAMSON SDK SBQuantity and SBType* wrappers SET(SAMSONSDKWRAPPERS_INCLUDE_DIRS "./external/SAMSON-SDK-wrappers/") INCLUDE_DIRECTORIES(${SAMSONSDKWRAPPERS_INCLUDE_DIRS}) ENDIF ( ${Python_Interpreter_FOUND} ) ENDIF( DEBUG ) ``` Note Python bindings are available only in the release mode. We disable the creation of Python bindings in the debug mode since Python is not shipped with debug libraries. In this CMake code, we add a definition of `CREATE_PYTHON_BINDINGS` which later is used in the C++ code to determine whether Python bindings should be created or not. And we include the `Python_LIBRARIES` in the `TARGET_LINK_LIBRARIES`: ```cmake TARGET_LINK_LIBRARIES( ${OUTPUT_NAME} ${QT_LIBRARIES} ${Python_LIBRARIES} ${OPENGL_LIBRARY} ${SAMSON_SDK_LIBRARIES} ) ``` ## Creating Python bindings In this tutorial we will show you how to expose some basic functionality of a SAMSON Extension. For more information on how to create Python bindings with *pybind11*, we refer you to the [pybind11 documentation](https://pybind11.readthedocs.io/en/stable/). In particular, we suggest you to check the following: - [pybind11: First steps](https://pybind11.readthedocs.io/en/stable/basics.html) - [pybind11: Object-oriented code](https://pybind11.readthedocs.io/en/stable/classes.html) - [pybind11: Classes](https://pybind11.readthedocs.io/en/stable/advanced/classes.html) - [pybind11: Functions](https://pybind11.readthedocs.io/en/stable/advanced/functions.html) - [pybind11: Return value policies](https://pybind11.readthedocs.io/en/stable/advanced/functions.html#return-value-policies) - [pybind11: FAQ](https://pybind11.readthedocs.io/en/stable/faq.html) First, let us create an embedded Python module using *pybind11*. We use an embedded module since we have the Jupyter QtConsole embedded in the Python Scripting Extension. Please, open the `PythonBindings.hpp` file. An embedded module can be added using the `PYBIND11_EMBEDDED_MODULE` macro. Note that the definition must be placed at global scope. An embedded module can be imported in the Python Scripting Extension like any other module. These modules are added to Python’s list of builtins, so they can also be imported in pure Python files loaded by the interpreter (the Jupyter QtConsole embedded into Python Scripting Extension). See [pybind11: Adding embedded modules](https://pybind11.readthedocs.io/en/stable/advanced/embedding.html#adding-embedded-modules) for more information. You can add an unlimited number of embedded modules. But we recommend having a single embedded module for a SAMSON Extension named based on the UUID of the SAMSON Extension so that there will be no clashes between modules from different SAMSON Extensions named the same. For example, if a SAMSON Extension A has an embedded Python module named "mymodule" and a SAMSON Extension B has an embedded Python module named "mymodule", then there will be a clash and it will not be possible to use one of the modules. The UUID of a SAMSON Extension can be found in the CMakeLists.txt of your SAMSON Extension, check the line: `SET(OUTPUT_UUID F2078F9E-F2CB-BA72-EE86-1E01A10B63D4)`. The UUID of the PyBindTutorial SAMSON Extension is `F2078F9E-F2CB-BA72-EE86-1E01A10B63D4`. The name of the module will be: "SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4". ```cpp #pragma once #ifdef CREATE_PYTHON_BINDINGS #include "pybind11/pybind11.h" #include "pybind11/embed.h" namespace py = pybind11; // Must be defined in the global scope. // The first parameter is the name of the module (without quotes) // The second parameter is the variable that will be used // as the interface to add functions and classes to the module. PYBIND11_EMBEDDED_MODULE(SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4, m) { // module docstring m.doc() = "SEPyBindTutorial from SAMSON Developers tutorial"; // the module name - preferably the SAMSON Extension name m.def("moduleName", [](){ return "pybindtutorial"; }); } #endif //CREATE_PYTHON_BINDINGS ``` In the code above, we define an embedded module named `SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4`, set its docstring, and expose a function named `moduleName` which returns the module's name. You can call it in Python as follows: ```python import SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4 as pybindtutorial pybindtutorial.moduleName() ``` Let us create Python bindings for some functionality of the **PyBindTutorial** App. Particularly, we would like to expose to Python a function from the `SEPyBindTutorialApp` class called addCustomStructuralModel which adds a custom structural model with custom structural groups into the SAMSON data graph. We create the Python bindings for it in a separate file `SEPyBindTutorialAppPythonBindings.cpp`. We have two options described below. **1.** Expose a function which implements the functionality of the `addCustomStructuralModel` function without creating Python bindings for the `SEPyBindTutorialApp` class. ```cpp void exposeSEPyBindTutorialApp(py::module& m) { m.def("addCustomStructuralModel", [](){ SEPyBindTutorialApp* app = new SEPyBindTutorialApp(); app->addCustomStructuralModel(); }, "Add a custom structural model with a custom group"); } ``` Here, we expose a function in which an instance of the `SEPyBindTutorialApp` is created and the `addCustomStructuralModel` function is called. In this case, you can call it in Python as follows: ```python import SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4 as pybindtutorial pybindtutorial.addCustomStructuralModel() ``` **2.** Create Python bindings for a class, its constructor, and the `addCustomStructuralModel` function. ```cpp void exposeSEPyBindTutorialApp(py::module& m) { py::class_ c(m, "SEPyBindTutorialApp", "The SEPyBindTutorialApp class"); // constructor c.def(py::init<>(), "Constructs a custom structural group"); // functions c.def("addCustomStructuralModel", &SEPyBindTutorialApp::addCustomStructuralModel, "Add a custom structural model with a custom group"); } ``` Here, we expose the `SEPyBindTutorialApp` class, its constructor, and the `addCustomStructuralModel` function itself. In this case, you can call it in Python as follows: ```python import SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4 as pybindtutorial # create a class instance tutorialApp = pybindtutorial.SEPyBindTutorialApp() # call a function on this instance tutorialApp.addCustomStructuralModel() ``` Now we can invoke the `exposeSEPyBindTutorialApp` function inside the `PYBIND11_EMBEDDED_MODULE` macro: ```cpp PYBIND11_EMBEDDED_MODULE(SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4, m) { // ... // call functions that expose functionality of the SAMSON Extension exposeSEPyBindTutorialApp(m); } ``` Let us now expose the `CustomStructuralModel` class which is based on the [`SBStructuralModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) class from the SAMSON SDK. Note The functionality of SAMSON classes already exposed by the Python Scripting Extension itself does not need to be re-exposed again. For example, in this case you do not need to create any bindings for the functionality from the [`SBStructuralModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) class, since it is already exposed in the Python Scripting Extension. We create Python bindings for the `CustomStructuralModel` class in the file `CustomStructuralModelPythonBindings.cpp` as follows (see [pybind11: Object-oriented code](https://pybind11.readthedocs.io/en/stable/classes.html) and [pybind11: Classes](https://pybind11.readthedocs.io/en/stable/advanced/classes.html) for more information): ```cpp void exposeCustomStructuralModel(py::module& m) { py::class_< CustomStructuralModel, /* the class */ std::unique_ptr, /* the class type */ SBStructuralModel /* the base class */ > c(m, /* pybind11::module */ "CustomStructuralModel", /* the class name in python*/ /* the docstring */ R"(This class describes a custom structural model from SEPyBindTutorial Extension)" ); // constructors c.def(py::init<>(), "Constructs a custom structural model"); // attributes // read-only attributes c.def_property_readonly("hasCustomComment", &CustomStructuralModel::hasCustomComment, "Returns true when the custom model's custom comment is set"); // read-and-write attributes c.def_property("customComment", &CustomStructuralModel::getCustomComment, &CustomStructuralModel::setCustomComment, "A custom comment"); // functions c.def("clearCustomComment", &CustomStructuralModel::clearCustomComment, "Clears the custom comment"); } ``` As you can see, we can expose some functions in a more pythonic way - as attributes, read-only or with a read and write access. In the last case, we need to provide getter and setter functions. Now we can invoke the `exposeCustomStructuralModel` function inside the [PYBIND11_EMBEDDED_MODULE](https://pybind11.readthedocs.io/en/stable/advanced/embedding.html#adding-embedded-modules) macro: ```cpp PYBIND11_EMBEDDED_MODULE(SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4, m) { // ... // call functions that expose the functionality of the SAMSON Extension // ... exposeCustomStructuralModel(m); } ``` ## Special case: Python bindings for functions that return/receive SAMSON physical quantities and types SAMSON [physical quantities and types](https://documentation.samson-connect.net/developers/latest/units/index.md) (i.e., `SBQuantity` class and `SBPhysicalVector3, SBPhysicalVector6, SBPhysicalInterval, SBDTypePhysicalIAVector3, SBPhysicalMatrix33, SBPhysicalMatrix66, SBSpatialTransform` classes) are not directly exposed to Python since they are template-based. Instead, special wrappers for these classes were created and exposed to be used in Python. These wrappers allow one to fully utilize the functionality of SAMSON physical quantities and types and significantly reduce the size of the Python Scripting Extension. List of wrapped SAMSON physical quantities and types: - `SBDQuantityWrapper` - wraps `SBDQuantity`, parameterized by `SBUnitSystem` - `SBDTypePhysicalVector3Wrapper` - wraps `SBDTypePhysicalVector3`, parameterized by `SBDQuantityWrapper` - `SBDTypePhysicalVector6Wrapper` - wraps `SBDTypePhysicalVector6`, parameterized by `SBDQuantityWrapper` - `SBDTypePhysicalIntervalWrapper` - wraps `SBDTypePhysicalInterval`, parameterized by `SBDQuantityWrapper` - `SBDTypePhysicalIAVector3Wrapper` - wraps `SBDTypePhysicalIAVector3`, parameterized by `SBDQuantityWrapper` - `SBDTypePhysicalMatrix33Wrapper` - wraps `SBDTypePhysicalMatrix33`, parameterized by `SBDQuantityWrapper` - `SBDTypePhysicalMatrix66Wrapper` - wraps `SBDTypePhysicalMatrix66`, parameterized by `SBDQuantityWrapper` - `SBDTypeSpatialTransformWrapper` - wraps `SBDTypeSpatialTransform` These wrapped SAMSON physical quantities and types are exposed by Python Scripting Extension together with commonly used short names (see the [tutorial on Python Scripting Units](https://documentation.samson-connect.net/scripting/latest/docs/Units.html)), so you do not need to create bindings for them. Header files for these wrapper classes are provided together with the **PyBindTutorial** sample from [SAMSON-Developers-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials/). You can find them in the folder `PyBindTutorial/external/SAMSON-SDK-wrappers`. The wrapper classes are named the same as the classes that they wrap with an addition of a word Wrapper at the end. For simplicity, this path is included in the CMakeLists.txt of the **PyBindTutorial** sample: ```cmake # Set path to headers for wrappers for SAMSON physical quantities and types SET(SAMSONSDKWRAPPERS_INCLUDE_DIRS "./external/SAMSON-SDK-wrappers/") INCLUDE_DIRECTORIES(${SAMSONSDKWRAPPERS_INCLUDE_DIRS}) ``` You can copy these wrapper files to your SAMSON Extension project if you want to create bindings for functions that return/receive SAMSON physical quantities and types. To create Python bindings for functions which return or receive SAMSON physical quantities and types, it is necessary to create wrappers for such functions. The provided wrapper classes are simple to use: they have template constructors for the creation of a wrapped object (e.g., a `SBQuantityWrapper` object from a `SBQuantityWrapper` object) and template getter functions that return a SAMSON physical quantity or type from a wrapped object (e.g., a `SBQuantity` object from a `SBQuantityWrapper` object). In the **PyBindTutorial** sample, you will find a special class with functions that return or receive different SAMSON physical quantities and types: `UnitsExample.hpp`, `UnitsExample.cpp`. These are just simple getter and setter functions to describe a technique of creating Python bindings for such functions. The Python bindings for the `UnitsExample` class can be found in the `UnitsExamplePythonBindings.cpp` file. The Python bindings for the `UnitsExample` class are created as follows: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ /* ... */ void exposeUnitsExample(py::module& m) { // The py::class_ creates bindings for a C++ class py::class_ c(m, "UnitsExample", R"(An example of a class which has functions that return/receive SAMSON Units and Types)"); // constructors c.def(py::init<>(), "Constructor"); /* ... */ } ``` ### Python bindings for functions that return a SAMSON physical quantity The `SBDQuantityWrapper` class is a class template with a type of the `SBUnitSystem` (i.e., `SBUnitSystemSI, SBUnitSystemAU, SBUnitSystemDalton, SBUnitSystemElectronvolt, SBUnitSystemKilocaloriePerMole`) as the template argument. This argument should coincide with `SBUnitSystem` type of the `SBQuantity` object that is being wrapped: ```cpp /* SI units */ SBQuantity::dimensionless dimensionless; // SBQuantityWrapperSI is a shortname for SBDQuantityWrapper SBDQuantityWrapper dimensionlessWrapped = SBQuantityWrapperSI(dimensionless); SBQuantity::length length; SBDQuantityWrapper lengthWrapped = SBQuantityWrapperSI(length); /* AU units */ SBQuantity::auMass auMass; // SBQuantityWrapperAU is a shortname for SBDQuantityWrapper SBDQuantityWrapper auMassWrapped = SBQuantityWrapperAU(auMass); /* Dalton units */ SBQuantity::dalton dalton; // SBQuantityWrapperDalton is a shortname for SBDQuantityWrapper SBDQuantityWrapper daltonWrapped = SBQuantityWrapperDalton(dalton); /* electronvolt units */ SBQuantity::electronvolt energyEv; // SBQuantityWrapperElectronvolt is a shortname for SBDQuantityWrapper SBDQuantityWrapper energyEvWrapped = SBQuantityWrapperElectronvolt(energyEv); /* kilocaloriePerMole units */ SBQuantity::kilocaloriePerMole kcalPerMol; // SBQuantityWrapperKilocaloriePerMole is a shortname for SBDQuantityWrapper SBDQuantityWrapper energyEvWrapped = SBQuantityWrapperKilocaloriePerMole(kcalPerMol); ``` Let's see how to create Python bindings for some functions from the `UnitsExample` class that return `SBQuantity` objects. ```cpp /* File: include/UnitsExample.hpp */ /* Class: UnitsExample */ /* ... */ class UnitsExample { public: /* ... */ SBQuantity::dimensionless const& getDimensionless(); SBQuantity::length const& getLength(); SBQuantity::auMass const& getAuMass(); /* ... */ }; ``` In the source/UnitsExamplePythonBindings.cpp file you will find wrappers for these functions in which `SBQuantity` objects are transformed to `SBQuantityWrapper` objects. The getter functions can be wrapped as follows: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ // include headers with the wrapper for SAMSON physical quantities for use in Python #include "SBDQuantityWrapper.hpp" SBDQuantityWrapper getDimensionlessWrapper(UnitsExample& obj) { // create a SBDQuantityWrapper object from SBQuantity and return it return SBDQuantityWrapper(obj.getDimensionless()); } SBQuantityWrapperSI getLengthWrapper(UnitsExample& obj) { // create a SBDQuantityWrapper object from SBQuantity and return it return SBQuantityWrapperSI(obj.getLength()); } SBDQuantityWrapper getAuMassWrapper(UnitsExample& obj) { // create a SBDQuantityWrapper object from SBQuantity and return it return SBDQuantityWrapper(obj.getAuMass()); } ``` Now we can create Python bindings for these wrapper functions: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ /* ... */ void exposeUnitsExample(py::module& m) { // The py::class_ creates bindings for a C++ class py::class_ c(m, "UnitsExample", R"(An example of a class which has functions that return/receive SAMSON Units and Types)"); // constructors c.def(py::init<>(), "Constructor"); /* ... */ c.def("getDimensionless", &getDimensionlessWrapper); c.def("getLength", &getLengthWrapper); c.def("getAuMass", &getAuMassWrapper); /* ... */ } ``` You can use these functions in Python Scripting as follows: ```python import SE_F2078F9E_F2CB_BA72_EE86_1E01A10B63D4 as pybindtutorial ex = pybindtutorial.UnitsExample() ex.getDimensionless() ex.getAuMass() ``` Note Since there is no connection between a `SBQuantityWrapper` object and a `SBQuantity` object that it wraps (the same for `SBPhysicalVector3Wrapper`, etc), getter and setter functions that return `SBQuantityWrapper`, `SBPhysicalVector3Wrapper`, etc, should not be exposed to Python as attributes via `def_property()`, but as functions via `def()`. You may also expose getter functions as read-only attributes via `def_property_readonly()`. ### Python bindings for functions that receive a SAMSON physical quantity The header file for the `SBDQuantityWrapper` class provides a function template that returns a `SBQuantity` object from a `SBDQuantityWrapper` object: ```python getSBQuantity(...) ``` where the template argument is a `SBQuantity` type (e.g., `SBQuantity::length`). Let's see some examples: ```cpp /* SI units */ SBDQuantityWrapper dimensionlessWrapped; SBQuantity::dimensionless dimensionless = getSBQuantity(dimensionlessWrapped); SBQuantityWrapperSI lengthWrapped; SBQuantity::length length = getSBQuantity(lengthWrapped); /* AU units */ SBDQuantityWrapper auMassWrapped; SBQuantity::auMass auMass = getSBQuantity(auMassWrapped); /* Dalton units */ SBDQuantityWrapper daltonWrapped; SBQuantity::dalton dalton = getSBQuantity(daltonWrapped); /* electronvolt units */ SBDQuantityWrapper energyEvWrapped; SBQuantity::electronvolt energyEv = getSBQuantity(energyEvWrapped); /* kilocaloriePerMole units */ SBDQuantityWrapper energyEvWrapped; SBQuantity::kilocaloriePerMole kcalPerMol = getSBQuantity(energyEvWrapped); ``` Let's see how to create Python bindings for some functions from the `UnitsExample` class that receive `SBQuantity` objects. ```cpp /* File: include/UnitsExample.hpp */ /* Class: UnitsExample */ /* ... */ class UnitsExample { public: /* ... */ void setDimensionless(const SBQuantity::dimensionless& v); void setLength(const SBQuantity::length& v); void setAuMass(const SBQuantity::auMass& v); /* ... */ }; ``` In the `UnitsExamplePythonBindings.cpp` file you will find wrappers for these functions in which `SBQuantityWrapper` objects are transformed to `SBQuantity` objects. The setter functions can be wrapped as follows: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ void setDimensionlessWrapper(UnitsExample& obj, SBDQuantityWrapper& u) { // create a SBQuantity object from SBDQuantityWrapper and pass it into a specific function obj.setDimensionless( getSBQuantity(u) ); } void setLengthWrapper(UnitsExample& obj, SBQuantityWrapperSI& u) { // create a SBQuantity object from SBDQuantityWrapper and pass it into a specific function obj.setLength( getSBQuantity(u) ); } void setAuMassWrapper(UnitsExample& obj, SBDQuantityWrapper& u) { // create a SBQuantity object from SBDQuantityWrapper and pass it into a specific function obj.setAuMass( getSBQuantity(u) ); } ``` Now we can create Python bindings for these wrapper functions: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ /* ... */ void exposeUnitsExample(py::module& m) { // The py::class_ creates bindings for a C++ class py::class_ c(m, "UnitsExample", R"(An example of a class which has functions that return/receive SAMSON Units and Types)"); // constructors c.def(py::init<>(), "Constructor"); /* ... */ c.def("setDimensionless", &setDimensionlessWrapper); c.def("setLength", &setLengthWrapper); c.def("setAuMass", &setAuMassWrapper); /* ... */ } ``` ### Python bindings for functions that return a SAMSON physical type Wrapper classes for [SAMSON physical types](https://documentation.samson-connect.net/developers/latest/units/index.md) (except for `SBDTypeSpatialTransformWrapper`) are template classes parametrized by a type of the `SBQuantityWrapper` (i.e., `SBQuantityWrapper, SBQuantityWrapper, SBQuantityWrapper, SBQuantityWrapper, SBQuantityWrapper`). This template argument should coincide with the `SBQuantity` unit type of the SAMSON physical type that is being wrapped. Let's see some examples: ```cpp /* Example objects for SBVector3 */ SBVector3 dimensionlessVec3; // SBPhysicalVector3WrapperSI is a shortname for SBDTypePhysicalVector3Wrapper SBTypePhysicalVector3Wrapper> dimensionlessVec3Wrapped = SBPhysicalVector3WrapperSI(dimensionlessVec3); SBPosition3 position3; SBTypePhysicalVector3Wrapper position3Wrapped = SBPhysicalVector3WrapperSI(position3); /* Example objects for SBVector6 */ SBVelocity6 velocity6; // SBPhysicalVector6WrapperSI is a shortname for SBTypePhysicalVector6Wrapper SBTypePhysicalVector6Wrapper velocity6Wrapped = SBPhysicalVector6WrapperSI(velocity6); /* Example objects for SBPhysicalMatrix33 */ SBInverseMass33 inverseMass33; // SBPhysicalMatrix33WrapperSI is a shortname for SBTypePhysicalMatrix33Wrapper SBTypePhysicalMatrix33Wrapper inverseMass33Wrapped = SBPhysicalMatrix33WrapperSI(inverseMass33); /* Example objects for SBPhysicalMatrix66 */ SBInertia66 inertia66; // SBPhysicalMatrix66WrapperSI is a shortname for SBTypePhysicalMatrix66Wrapper SBTypePhysicalMatrix66Wrapper inertia66Wrapped = SBPhysicalMatrix66WrapperSI(inertia66); /* Example objects for SBSpatialTransform */ SBSpatialTransform spatialTransform; SBSpatialTransformWrapper spatialTransformWrapped = SBSpatialTransformWrapper(spatialTransform); ``` Let's see how to create Python bindings for some functions from the `UnitsExample` class that return SAMSON physical types. ```cpp /* File: include/UnitsExample.hpp */ /* Class: UnitsExample */ /* ... */ class UnitsExample { public: /* ... */ SBVector3 const& getVector3(); SBPosition3 const& getPosition3(); SBVelocity6 const& getVelocity6(); SBInverseMass33 const& getInverseMass33(); SBInertia66 const& getInertia66(); SBSpatialTransform const& getSpatialTransform(); /* ... */ }; ``` In the `UnitsExamplePythonBindings.cpp` file you will find wrappers for these functions in which SAMSON physical types are transformed to their wrapped versions objects. The getter functions can be wrapped as follows: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ // include headers with wrappers for SAMSON physical types (SBDType*) for use in Python #include "SBDTypePhysicalVector3Wrapper.hpp" #include "SBDTypePhysicalVector6Wrapper.hpp" #include "SBDTypePhysicalIntervalWrapper.hpp" #include "SBDTypePhysicalIAVector3Wrapper.hpp" #include "SBDTypePhysicalMatrix33Wrapper.hpp" #include "SBDTypePhysicalMatrix66Wrapper.hpp" #include "SBDTypeSpatialTransformWrapper.hpp" SBPhysicalVector3WrapperSI getVector3Wrapper(UnitsExample& obj) { // create a SBDTypePhysicalVector3Wrapper object from SBDTypePhysicalVector3 and return it return SBPhysicalVector3WrapperSI(obj.getVector3()); } SBPhysicalVector3WrapperSI getPosition3Wrapper(UnitsExample& obj) { // create a SBDTypePhysicalVector3Wrapper object from SBDTypePhysicalVector3 and return it return SBPhysicalVector3WrapperSI(obj.getPosition3()); } SBPhysicalVector6WrapperSI getVelocity6Wrapper(UnitsExample& obj) { // create a SBPhysicalVector6WrapperSI object from SBDTypePhysicalVector6 and return it return SBPhysicalVector6WrapperSI(obj.getVelocity6()); } SBPhysicalMatrix33WrapperSI getInverseMass33Wrapper(UnitsExample& obj) { return SBPhysicalMatrix33WrapperSI(obj.getInverseMass33()); } SBPhysicalMatrix66WrapperSI getInertia66Wrapper(UnitsExample& obj) { return SBPhysicalMatrix66WrapperSI(obj.getInertia66()); } SBSpatialTransformWrapper getSpatialTransformWrapper(UnitsExample& obj) { return SBSpatialTransformWrapper(obj.getSpatialTransform()); } ``` Now we can create Python bindings for these wrapper functions: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ /* ... */ void exposeUnitsExample(py::module& m) { // The py::class_ creates bindings for a C++ class py::class_ c(m, "UnitsExample", R"(An example of a class which has functions that return/receive SAMSON Units and Types)"); // constructors c.def(py::init<>(), "Constructor"); /* ... */ c.def("getVector3", &getVector3Wrapper); c.def("getPosition3", &getPosition3Wrapper); c.def("getVelocity6", &getVelocity6Wrapper); c.def("getInverseMass33", &getInverseMass33Wrapper); c.def("getInertia66", &getInertia66Wrapper); c.def("getSpatialTransform", &getSpatialTransformWrapper); /* ... */ } ``` ### How to create Python bindings for functions that receive a SAMSON physical type Header files for wrapper classes for SAMSON physical types each, except for the `SBDTypeSpatialTransformWrapper` class, provide a function template that returns a SAMSON physical type from its wrapped version: - `getSBPhysicalVector3(...)` - `getSBPhysicalVector6(...)` - `getSBPhysicalInterval(...)` - `getSBPhysicalIAVector3(...)` - `getSBPhysicalMatrix33(...)` - `getSBPhysicalMatrix66(...)` where the template arguments are of `SBQuantity` type. Let's see some examples: ```cpp /* Example objects for SBVector3 */ SBTypePhysicalVector3Wrapper dimensionlessVec3Wrapped; SBVector3 dimensionlessVec3 = getSBPhysicalVector3(dimensionlessVec3Wrapped); SBPhysicalVector3WrapperSI position3Wrapped; SBPosition3 position3 = getSBPhysicalVector3(position3Wrapped); /* Example objects for SBVector6 */ SBPhysicalVector6WrapperSI velocity6Wrapped; SBVelocity6 velocity6 = getSBPhysicalVector6(velocity6Wrapped); /* Example objects for SBPhysicalMatrix33 */ SBPhysicalMatrix33WrapperSI inverseMass33Wrapped; SBInverseMass33 inverseMass33 = getSBPhysicalMatrix33(inverseMass33Wrapped); /* Example objects for SBPhysicalMatrix66 */ SBPhysicalMatrix66WrapperSI inertia66Wrapped; SBInertia66 inertia66 = getSBPhysicalMatrix66(inertia66Wrapped); /* Example objects for SBSpatialTransform */ SBSpatialTransformWrapper spatialTransformWrapped; SBSpatialTransform spatialTransform = spatialTransformWrapped.toSBSpatialTransform(); ``` Let's see how to create Python bindings for some functions from the `UnitsExample` class that receive SAMSON physical types. ```cpp /* File: include/UnitsExample.hpp */ /* Class: UnitsExample */ /* ... */ class UnitsExample { public: /* ... */ void setVector3(const SBVector3& v); void setPosition3(const SBPosition3& v); void setVelocity6(const SBVelocity6& v); void setInverseMass33(const SBInverseMass33& v); void setInertia66(const SBInertia66& v); void setSpatialTransform(const SBSpatialTransform& v); /* ... */ }; ``` In the `UnitsExamplePythonBindings.cpp` file you will find wrappers for these functions in which wrapped SAMSON physical types are transformed to SAMSON physical types. The setter functions can be wrapped as follows: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ void setVector3Wrapper(UnitsExample& obj, SBPhysicalVector3WrapperSI& u) { // create a SBDTypePhysicalVector3 object from SBDTypePhysicalVector3Wrapper and pass it into a specific function obj.setVector3( getSBPhysicalVector3(u) ); } void setPosition3Wrapper(UnitsExample& obj, SBPhysicalVector3WrapperSI& u) { // create a SBDTypePhysicalVector3 object from SBDTypePhysicalVector3Wrapper and pass it into a specific function obj.setPosition3( getSBPhysicalVector3(u) ); } void setVelocity6Wrapper(UnitsExample& obj, SBPhysicalVector6WrapperSI& u) { // create a SBDTypePhysicalVector6 object from SBPhysicalVector6WrapperSI and pass it into a specific function obj.setVelocity6( getSBPhysicalVector6(u) ); } void setInverseMass33Wrapper(UnitsExample& obj, SBPhysicalMatrix33WrapperSI& u) { obj.setInverseMass33( getSBPhysicalMatrix33(u) ); } void setInertia66Wrapper(UnitsExample& obj, SBPhysicalMatrix66WrapperSI& u) { obj.setInertia66( getSBPhysicalMatrix66(u) ); } void setSpatialTransformWrapper(UnitsExample& obj, SBSpatialTransformWrapper& u) { obj.setSpatialTransform( u.toSBSpatialTransform() ); } ``` Now we can create Python bindings for these wrapper functions: ```cpp /* File: source/UnitsExamplePythonBindings.cpp */ /* ... */ void exposeUnitsExample(py::module& m) { // The py::class_ creates bindings for a C++ class py::class_ c(m, "UnitsExample", R"(An example of a class which has functions that return/receive SAMSON Units and Types)"); // constructors c.def(py::init<>(), "Constructor"); /* ... */ c.def("setVector3", &setVector3Wrapper); c.def("setPosition3", &setPosition3Wrapper); c.def("setVelocity6", &setVelocity6Wrapper); c.def("setInverseMass33", &setInverseMass33Wrapper); c.def("setInertia66", &setInertia66Wrapper); c.def("setSpatialTransform", &setSpatialTransformWrapper); /* ... */ } ``` ## Running SAMSON with Python Please, check the following tutorials to learn how to run SAMSON from an IDE on your OS: - [Building a SAMSON Extension on Windows](https://documentation.samson-connect.net/developers/latest/building/windows/index.md) - [Building a SAMSON Extension on macOS](https://documentation.samson-connect.net/developers/latest/building/mac/index.md) - [Building a SAMSON Extension on Linux](https://documentation.samson-connect.net/developers/latest/building/linux/index.md) ## Validate the result You have a usable Python binding setup if: - the extension builds with Python support enabled on your platform; - the generated binding module can be imported from the SAMSON Python environment; - bound classes and functions behave correctly from Python; - wrapper code handles SAMSON quantities and types explicitly instead of degrading them to untyped numeric data. ## Common pitfalls - Mixing “run Python inside SAMSON” and “bind my extension to Python” as if they were the same task leads to the wrong build setup. - Using a mismatched Python installation instead of the one shipped with SAMSON breaks the build or runtime loading. - Forgetting dedicated wrappers for SAMSON quantities and physical types produces awkward or incomplete Python APIs. ## Next steps Pair this page with [Python scripting](https://documentation.samson-connect.net/developers/latest/scripting/index.md) for the runtime scripting side and with the platform-specific [building guides](https://documentation.samson-connect.net/developers/latest/building/index.md) when debugging environment issues. # Programming new force fields: Springs interaction model This tutorial shows how to implement a simple force field in SAMSON. You will create a spring-based [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) in which each covalent bond behaves like a virtual spring. Read it when you want to understand where force computation lives in the SDK and how interaction-model code connects to simulators, state updaters, and user-facing properties. ## What you will build By the end of the tutorial, you will have: - an interaction model class derived from the particle-system interaction-model base; - initialization logic that captures bond-based spring parameters; - an update path that recomputes forces and energy contributions; - a property window that exposes spring parameters and lets users reset the model. ## Prerequisites - You understand the roles of [interaction models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models), [state updaters](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#state-updaters), and [simulators](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators). - You can [generate](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and [build](https://documentation.samson-connect.net/developers/latest/building/index.md) an extension. - You are comfortable iterating over structural data such as atoms and bonds. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *Springs* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *Springs* and add some description; - add an **Interaction Model** class (called `SESpringsInteractionModel`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates an [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) class (derived from the [`SBMInteractionModelParticleSystem`](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelParticleSystem/index.md) class) and a property widget class for the interaction model. ## Setting the description of the Extension Open the header file of your interaction model descriptor (`SESpringsInteractionModelDescriptor.hpp`) and modify the class description: ```cpp SB_CLASS_DESCRIPTION("DevTutorial: Springs"); ``` Do the same for the property window descriptor (`SESpringsInteractionModelPropertiesDescriptor.hpp`). And modify the `getName` function of the property window (`SESpringsInteractionModelProperties.cpp`) to have a user-friendly description of your [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) inside SAMSON: ```cpp QString SESpringsInteractionModelProperties::getName() const { return "DevTutorial: Springs properties"; } ``` Now, try [building the SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md). Start SAMSON and open any file containing atoms or add atoms in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), then create a new simulator (**Edit > Add simulator** or `Ctrl`/`Cmd` + `Shift`+`M`): your new Extension should be in the list of the available interaction models. ## Initializing the interaction model Open the header file of your interaction model (`SESpringsInteractionModel.hpp`) and include `SBBond.hpp`. ```cpp #include "SBBond.hpp" ``` Add the following functions and variables in the `SESpringsInteractionModel` class that will be used in the force field. ```cpp class SESpringsInteractionModel : public SBMInteractionModelParticleSystem { public: // ... void initializeBondSpringsModel(); ///< set up the bond spring model private: void updateBondSpringsInteractions(); ///< update the bond spring interactions SBPointerIndexer const* particleIndexer; double bondSpringStiffness; ///< the stiffness of bond springs SBVector springLengthVector; ///< the equilibrium length SBVector springBondVector; ///< the vector of all bonds in the selected system }; ``` Here: - `initializeBondSpringsModel` is a function that initializes the bond spring interaction model; - `updateBondSpringsInteractions` is a function that updates the bond spring interactions; - `particleIndexer` is an indexer that will point to the atoms (structural particles) of your system; - `bondSpringStiffness` regulates the stiffness of bond springs; - `springLengthVector` stores the equilibrium length for the springs of your model; - `springBondVector` stores the bonds of the springs of your model. In both constructors of the interaction model (`SESpringsInteractionModel.cpp`) initialize the `bondSpringStiffness` variable to `1.0`: ```cpp bondSpringStiffness = 1.0; ``` Modify the `initializeInteractions` (`SESpringsInteractionModel.cpp`). This function is called to set your interaction model up and initialize the energy and forces. ```cpp void SESpringsInteractionModel::initializeInteractions() { // Initialize the bond springs model initializeBondSpringsModel(); // Signal that the energy and forces // of the interaction model have been changed changed(); } ``` Here, we invoke the initialization function for the bond spring interaction model and emit the `changed` signal to let SAMSON know that the energy and forces have been changed. Implement the `initializeBondSpringsModel` function as follows: ```cpp void SESpringsInteractionModel::initializeBondSpringsModel() { // Clear vectors springBondVector.clear(); springLengthVector.clear(); // Initialize the set of atoms: // the selected atoms are stored in particleIndexer particleIndexer = (*particleSystem)->getAtomIndexer(); // Get the all the bonds in the active document SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Bond)); // Initialize bond springs SB_FOR(SBNode* node, nodeIndexer) { SBPointer bond = static_cast(node); if (!bond.isValid()) continue; SBPointer atomI = bond->getLeftAtom(); SBPointer atomJ = bond->getRightAtom(); if (!atomI.isValid() || !atomJ.isValid()) continue; // The spring is considered only if the two bonded atoms are selected // Check if the selected atoms are connected through a bond if (!particleIndexer->hasIndex(atomI()) || !particleIndexer->hasIndex(atomJ())) continue; // Add the bond to the bond vector springBondVector.push_back(bond()); // Add the equilibrium length to the springLength vector springLengthVector.push_back(bond->getLength()); } // Set energy and forces to zero *energy = SBQuantity::energy(0.0); for (unsigned int i = 0; i < particleIndexer->size(); ++i) setForce(i, SBForce3(SBQuantity::force(0))); } ``` First, we clear the vectors used to store the bonds and their equilibrium lengths. Then we initialize the particle indexer (`particleIndexer`) based on the particle system (`particleSystem`) the interaction model is attached to. Then we get an indexer of all the nodes in the active [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) and loop through this indexer checking whether the atoms connected by the bond are present in the particle system and adding bonds and their equilibrium length to the according vectors. The equilibrium spring length is taken as the covalent bond distances in the initial conformation of the model. Then we initialize the energy and forces to zero. ## Updating the interaction model Now, we implement the update of the interaction model. Modify the `updateInteractions` function (`SESpringsInteractionModel.cpp`). This function is called to update the energy and forces. ```cpp void SESpringsInteractionModel::updateInteractions() { // Reset energy and forces of the system *energy = SBQuantity::energy(0.0); for (unsigned int i = 0; i < particleIndexer->size(); ++i) setForce(i, SBForce3(SBQuantity::force(0.0))); // Apply the bond spring interaction model updateBondSpringsInteractions(); // Signal that the energy and forces // of the interaction model has been changed changed(); } ``` Here, we reset the energy and forces, then apply the bond spring interaction model, and emit the `changed` signal to let SAMSON know that the energy and forces have been changed. Implement the `updateBondSpringsInteractions` function as follows: ```cpp void SESpringsInteractionModel::updateBondSpringsInteractions() { // Store the bond stretch energy SBQuantity::kJPerMol energyBondSprings = SBQuantity::energy(0.0); // Conversion for the bond spring stiffness coefficient SBQuantity::forcePerLength forceFactor = bondSpringStiffness * SBQuantity::zeptojoule(690.0) / SBQuantity::squareAngstrom(0.5); for (unsigned int i = 0; i < springBondVector.size(); ++i) { SBPointer bond = static_cast(springBondVector[i]); if (!bond.isValid()) continue; // Get atoms connected through the bond SBPointer atomI = springBondVector[i]->getLeftAtom(); SBPointer atomJ = springBondVector[i]->getRightAtom(); if (!atomI.isValid() || !atomJ.isValid()) continue; unsigned int indexI = particleIndexer->getIndex(atomI()); unsigned int indexJ = particleIndexer->getIndex(atomJ()); const SBPosition3& positionI = (*particleSystem)->getPosition(indexI); const SBPosition3& positionJ = (*particleSystem)->getPosition(indexJ); // The force intensity depends on the shift // with respect to the equilibrium length SBQuantity::length forceIntensity(0); forceIntensity = (positionJ - positionI).norm() - springLengthVector[i]; // Compute the forces acting on both atoms // connected through the bond SBForce3 force = forceFactor * forceIntensity * (positionJ - positionI).normalizedVersion(); SBForce3 forceI = getForce(indexI); SBForce3 forceJ = getForce(indexJ); setForce(indexI, forceI + force); setForce(indexJ, forceJ - force); // Compute the energy energyBondSprings += 0.5 * forceFactor * forceIntensity * forceIntensity; } // Update the energy of the system *energy += energyBondSprings; } ``` In the loop, for each spring: - get positions of atoms connected via a bond, - compute the force intencity as the difference of distance between the current and reference bond string (the equilibrium bond length), - compute the force acting on atoms connected via the bond, - sum up the energy. You have implemented a simple interaction model. [Build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and launch SAMSON. Create or load any system, and apply a simulator to it (**Edit > Add simulator** or `Ctrl`/`Cmd` + `Shift`+`M`) with the newly created interaction model and the **Interactive modeling** state updater: You will see property windows of the interaction model and the state updater: Run a simulator: press `X` or **Edit > Start simulation**. The simulator should now work properly, updating the energy and forces along the simulation. Try to slightly pull an atom connected via a bond to another atom. You should see how the bond spring tries to bring another atom along with the one being pulled. ## Customizing the interaction model interface ### Changing the spring stiffness parameter We want to allow the user to control the bond spring stiffness (`bondSpringStiffness`) through the property window of the interaction model. Open the `form/SESpringsInteractionModelProperties.ui`, add a `QLabel` and a `QDoubleSpinBox`, name the spin box as `doubleSpinBoxSpringStiffness`, set its value to `1.0`, and minimum to zero, as shown on an image below: Add a slot `onBondSpringStiffnessChanged(double)`: Connect the `valueChanged(double)` signal of the `doubleSpinBoxSpringStiffness` to the `onBondSpringStiffnessChanged(double)` slot: Add the `onBondSpringStiffnessChanged(double)` slot in the `SESpringsInteractionModelProperties` class (`SESpringsInteractionModelProperties.hpp`): ```cpp public slots: void onBondSpringStiffnessChanged(double); ///< Change the bond spring stiffness ``` and implement it as follows (`SESpringsInteractionModelProperties.cpp`): ```cpp void SESpringsInteractionModelProperties::onBondSpringStiffnessChanged( double stiffness) { interactionModel->setBondSpringStiffness(stiffness); } ``` Add the `setBondSpringStiffness` function to the `SESpringsInteractionModel` class (`SESpringsInteractionModel.hpp`): ```cpp /// Set the bond spring stiffness parameter void setBondSpringStiffness(double stiffness) { bondSpringStiffness = stiffness; } ``` Now, when you launch a simulator with this interaction model in SAMSON you will be able to modify the bond spring stiffness parameter through the property window. Try to pull an atom with different bond spring stiffness parameter: If we want to save the spring stiffness parameter value for the next launch, we need to implement the `saveSettings` and `loadSettings` functions for the `SESpringsInteractionModelProperties` class: ```cpp void SESpringsInteractionModelProperties::saveSettings( SBGSettings *settings ) { if (settings == nullptr) return; settings->saveValue("bondSpringStiffness", ui.doubleSpinBoxSpringStiffness->value()); } ``` ```cpp void SESpringsInteractionModelProperties::loadSettings( SBGSettings *settings ) { if (settings == nullptr) return; double bondSpringStiffness = settings->loadDoubleValue("bondSpringStiffness", 1.0); ui.doubleSpinBoxSpringStiffness->setValue(bondSpringStiffness); onBondSpringStiffnessChanged(bondSpringStiffness); } ``` ### Reinitializing the equilibrium bond distance Let's now provide the user the possibility to reinitialize the springs equilibrium length. For that, add a `QPushButton` to the `form/SESpringsInteractionModelProperties.ui`: Add a slot `onBondSpringStiffnessChanged(double)`: Connect the `valueChanged(double)` signal of the `doubleSpinBoxSpringStiffness` to the `onBondSpringStiffnessChanged(double)` slot: Add the `onResetSpringsClicked` slot in the `SESpringsInteractionModelProperties` class (`SESpringsInteractionModelProperties.hpp`): ```cpp public slots: void onResetSpringsClicked(); ///< Reset the spring model to the current conformation ``` and implement it as follows (`SESpringsInteractionModelProperties.cpp`): ```cpp void SESpringsInteractionModelProperties::onResetSpringsClicked() { // Reinitialize the spring model with the current bond lengths interactionModel->initializeBondSpringsModel(); } ``` Now, when you launch the simulator with this interaction model in SAMSON you will be able to reset the spring equilibrium distance through the property window. Try to pull an atom and reset the springs equilibrium distance: ## Validate the result Your interaction model is working if: - it can be selected when configuring a simulator; - moving atoms produces force behavior consistent with the spring model; - changing the stiffness parameter affects the response; - the reset action reinitializes spring equilibrium distances from the current structure. ## Common pitfalls - Forgetting to rebuild bond-derived spring data after structural changes leads to stale forces. - Updating UI controls without propagating the new value into the interaction model leaves the property window disconnected from the simulation. - Confusing structural-model storage with interaction-model state makes the implementation harder to reason about. ## Next steps Pair this tutorial with [Programming new state updaters: Steepest descent](https://documentation.samson-connect.net/developers/latest/tutorials/steepest-descent/index.md), [Programming new state updaters: Monte Carlo](https://documentation.samson-connect.net/developers/latest/tutorials/monte-carlo/index.md), and the overview page on [Modeling and Simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md). # Programming new state updaters: Steepest descent This tutorial introduces [state updaters](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#state-updaters) through a simple steepest-descent minimizer. You will create a state updater that reads forces from an interaction model and updates particle positions in a shared dynamical model. Use this page when you want a deterministic, force-driven example before moving to more advanced simulation components. ## What you will build By the end of the tutorial, you will have: - a custom state updater derived from the particle-system state-updater base; - a position-update rule driven by forces provided by an interaction model; - the minimal property and descriptor setup needed to expose the state updater in SAMSON. ## Prerequisites - You understand [dynamical models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#dynamical-models), [interaction models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models), and [simulators](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators). - You can [generate](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and [build](https://documentation.samson-connect.net/developers/latest/building/index.md) an extension. - You are comfortable reading the related [Springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md) tutorial alongside this one. Inside a [simulator](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators), the [state updater](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#state-updaters) and the [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) share the same [dynamical model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#dynamical-models). Each time the simulator requires an update through the `updateState` method, the state updater moves the atoms in the dynamical model according to the forces given by the interaction model. The state updater allows you to retrieve and modify position of particles (via [`SBParticleSystem::getPosition`](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelParticleSystem/#function-getposition) and [`SBParticleSystem::setPosition`](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelParticleSystem/#function-setposition) functions) and momentum of particles (via [`SBParticleSystem::getMomentum`](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelParticleSystem/#function-getmomentum) and [`SBParticleSystem::setMomentum`](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelParticleSystem/#function-setmomentum) functions); this is done via the associated [dynamical model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#dynamical-models). ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *SteepestDescent* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *SteepestDescent* and add some description; - add a **StateUpdater** class (called `SESteepestDescentStateUpdater`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates a state updater class (derived from the [`SBSStateUpdaterParticleSystem`](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdaterParticleSystem/index.md) class) and a property widget class for the state updater. ## Setting the description of the Extension SAMSON provides the *steepest descent state updater* with its [State Updater pack](https://www.samson-connect.net/extensions/f912f119-7cbb-b5bd-972a-0a02dfcf683d), to distinguish we add "DevTutorial" in the description of the Extension. Open the header file of your state updater descriptor (`SESteepestDescentStateUpdaterDescriptor.hpp`) and modify the class description: ```cpp SB_CLASS_DESCRIPTION("DevTutorial: Steepest descent"); ``` Do the same for the property window descriptor (`SESteepestDescentStateUpdaterPropertiesDescriptor.hpp`). Modify the `getName()` function of the property window (`SESteepestDescentStateUpdaterProperties.cpp`) to have a user-friendly description of your state updater inside SAMSON: ```cpp QString SESteepestDescentStateUpdaterProperties::getName() const { return "DevTutorial: Steepest Descent"; } ``` And modify the constructor for the state updater class (class: `SESteepestDescentStateUpdater`, file: `SESteepestDescentStateUpdater.cpp`) by modifying an argument for the `setName` function as follows: ```cpp setName("DevTutorial: Steepest Descent"); ``` Now, try [building the SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md). Start SAMSON and open any file containing atoms or add atoms in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), then create a new simulator (**Edit > Add simulator** or `Ctrl`/`Cmd` + `Shift`+`M`): your new Extension should be in the list of the available state updaters. ## Moving atoms with state updater Let's first try to move atoms using the state updater by displacing their position. Note In this example we will not be taking the forces obtained with an [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) into account, we will be changing positions of atoms by a constant value. Implement the method called [updateState](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdaterParticleSystem/#function-updatestate) in the state updater (file `SESteepestDescentStateUpdater.cpp`). [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) provides some commented code that allows you to implement a steepest descent if you uncomment it. Leave this code commented for the moment. In order to move atoms we need to modify their positions. For that, we first get the number of atoms that are inside of the [dynamical model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#dynamical-models) (associated with the state updater). ```cpp SBPointerIndexer const* particleIndexer = (*dynamicalModel)->getAtomIndexer(); // number of particles in the particle system const unsigned int nParticles = particleIndexer->size(); ``` We get the number of iterations per an interactive simulation step: ```cpp // the number of iterations per interactive simulation step const unsigned int nSteps = getNumberOfSteps(); ``` Note The State Updater Extension generated with the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) should already have a standard property window implemented that provides the user the possibility to modify the timestep and the number of interactive simulation steps. Now we can iterate over the steps and atoms in the [dynamical model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#dynamical-models). For each particle, we retrieve its position, add a displacement to it, and set the new position. ```cpp // A state updater that just displaces atoms in the x-direction for (unsigned int k = 0; k < nSteps; k++) { for (unsigned int i = 0; i < nParticles; i++) { // get the current position of particle i SBPosition3 currentPosition = (*dynamicalModel)->getPosition(i); SBPosition3 displacement = SBPosition3(SBQuantity::picometer(1.0), SBQuantity::picometer(0.0), SBQuantity::picometer(0.0)); // change the current position SBPosition3 newPosition = currentPosition + displacement; // set the new position of particle i (*dynamicalModel)->setPosition(i, newPosition); } } ``` Now, [build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and launch SAMSON. Load or create any molecule and add a new [simulator](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators) (**Edit > Add simulator** or `Ctrl`/`Cmd` + `Shift`+`M`) with any [interaction model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#interaction-models) and with this state updater. Run the simulation (**Edit > Start simulation** or `X`) and the atoms will be shifted on the x-axis. Try modifying the number of steps (iterations per an interactive simulation step). ## Steepest descent Let's now implement the steepest descent minimization algorithm. For that, in the `updateState` function of the state updater we change the loop from the [previous section](#moving-atoms-with-state-updater) to the following code: ```cpp // The basic implementation of the steepest descent minimization algorithm for (unsigned int k = 0; k < nSteps; k++) { // compute the new energy and forces based on the updated positions (*interactionModel)->updateInteractions(); // tell the dynamical model that we have used the list of updated positions (*dynamicalModel)->flushPositionBuffer(); for (unsigned int i = 0; i < nParticles; i++) { // get the current position of particle i SBPosition3 currentPosition = (*dynamicalModel)->getPosition(i); // get the force applied to particle i SBForce3 force = (*interactionModel)->getForce(i); // compute the displacement (take care of dimensions) SBPosition3 deltaPosition = 1.0 / SBQuantity::mass(1) * getStepSize() * getStepSize() * force; // change the current position SBPosition3 newPosition = currentPosition + deltaPosition; // set the new position of particle i (*dynamicalModel)->setPosition(i, newPosition); } // notify the interaction model that we have used the list of updated forces // (actually, we used all forces in this non-adaptive algorithm) (*interactionModel)->flushForceBuffer(); } // update the structural model based on the new positions in the dynamical model (*dynamicalModel)->updateStructuralNodes(); ``` Here, we first ask the interaction model to update the interactions (compute forces and energy), then we update positions of particles according to the computed forces. Now you should have the basic implementation of the steepest descent minimization algorithm. [Build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and launch SAMSON. Load or create any molecule and add a new [simulator](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#simulators) with this state updater and with, for example, the [springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md). Run the simulation (**Edit > Start simulation**) and try slightly pulling an atom. ## Validate the result Your implementation is ready if: - the state updater can be selected in a simulator; - atoms move in response to forces computed by the paired interaction model; - repeated updates keep the dynamical model and structural model in sync; - the simulation remains stable for the small test systems used in the tutorial. ## Common pitfalls - Forgetting to flush or consume the interaction-model force buffer at the right time leads to stale data. - Updating the dynamical model without synchronizing structural nodes leaves the visual result inconsistent. - Treating step size as dimensionless instead of a quantity makes the code harder to reason about. ## Next steps Continue with [Programming new state updaters: Monte Carlo](https://documentation.samson-connect.net/developers/latest/tutorials/monte-carlo/index.md) for a stochastic variant or return to [Programming new force fields: Springs interaction model](https://documentation.samson-connect.net/developers/latest/tutorials/spring-interaction-model/index.md) to tune the force side of the simulator. # Handling units This tutorial introduces SAMSON's [unit system](https://documentation.samson-connect.net/developers/latest/units/index.md) through a compact app-level example. You will build an energy converter and use it to see how physical quantities stay typed, explicit, and safe in extension code. Read this page when you need a practical example of `SBQuantity` usage rather than a full reference on every available unit. Note For the sake of the tutorial, we demonstrate here a simplified implementation of the units converter. ## What you will build By the end of the tutorial, you will have: - an app with a small UI for choosing source and destination units; - conversion logic implemented with SAMSON quantities rather than raw doubles; - a simple example of user input validation and formatted output. ## Prerequisites - You know how to [generate an app extension](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). - You can [build and run the extension](https://documentation.samson-connect.net/developers/latest/building/index.md). - You want a practical companion to the more detailed [Units](https://documentation.samson-connect.net/developers/latest/units/index.md) page. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *EnergyConverter* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *EnergyConverter* and add some description; - add an **App** class (called `SEEnergyConverterApp`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates an app class that implements the functionality of the app and is derived from the [`SBDApp`](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) class, and a GUI class that implements the user interface of the app and is derived from the [`SBGApp`](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) class. ## Setting the description of the Extension Open the header file of the app descriptor (file: `SEEnergyConverterAppDescriptor.hpp`) and modify the class description: ```cpp SB_CLASS_DESCRIPTION("DevTutorial: Energy converter"); ``` Open the source file of the app GUI (file: `SEEnergyConverterAppGUI.cpp`) and modify the `getName` function to have a user-friendly description of the app inside SAMSON: ```cpp QString SEEnergyConverterAppGUI::getName() const { return "DevTutorial: Energy converter"; } ``` Now, try [building the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md) and when you launch SAMSON you should be able to find it in **Home > Apps**. For now, it has no interface and does nothing, but we will now add functionality to it. ## Setting up the interface Let's start by adding the interface for the energy conversion. Modify the user interface `form/SEEnergyConverterAppGUI.ui` to include two line edits (`QLineEdit`), two combo boxes (`QComboBox`), and a label. Note how two vertical layouts and a horizontal one are used to align widgets in the interface. One good strategy is to create the first vertical layout and its contents and then copy it and rename widgets. You might also need to set the minimal width for the label to e.g. 10. Please, name the added widgets as on an image above, so that you can copy and paste code later in this tutorial. Now, enter the following entries (`eV, Eh, kcal/mol, zJ`) in each combo box (right-click on a combo box and click on **Edit items...**): These are the different units supported by our app to perform conversions. Add two slots called `onLeftChanged()` and `onRightChanged()` to the interface: We want to implement the following behavior for the interface: - when the user modifies the value in the left line edit or changes the current index in any of the combo boxes, the value in the right line edit should be updated; - when the user modifies the value in the right line edit, the value in the left line edit should be updated. For that, we connect the `textEdited` signal from the left line edit and the `currentIndexChanged` signal from both combo boxes to the `onLeftChanged()` slot, and the `textEdited` signal from the right line editto the `onRightChanged()` slot as shown on an image below: Note We use the `textEdited` signal for the line edits because it is emitted when the text was edited by the user; the `textChanged` signal, on the other hand, is also emitted when the text was changed programmatically. ## Converting energies Let's add these slots to the GUI class (class: `SEEnergyConverterAppGUI`, file: `SEEnergyConverterAppGUI.hpp`): ```cpp class SEEnergyConverterAppGUI : public SBGApp { // ... public slots: void onLeftChanged(); void onRightChanged(); // ... }; ``` For a clean organization, we separate the functionality of the app from its interface. As a result, the `SEEnergyConverterAppGUI` class is going to delegate the actual energy conversion work to the app (`SEEnergyConverterApp` class). Let's now implement a function for energy conversion in the app. Add in the app class (class: `SEEnergyConverterApp`, file: `SEEnergyConverterApp.hpp`) the following function declaration: ```cpp class SEEnergyConverterApp : public SBDApp { // ... /// \name Conversion //@{ double convert(double sourceEnergy, const unsigned int sourceUnit, const unsigned int destinationUnit); //@} }; ``` In the source file of the app (`SEEnergyConverterApp.cpp`) add the header `SBQuantity.hpp`: ```cpp #include "SBQuantity.hpp" ``` And implement the `convert` function as follows: ```cpp double SEEnergyConverterApp::convert( double sourceEnergy, const unsigned int sourceUnit, const unsigned int destinationUnit) { SBQuantity::energy source; if (sourceUnit == 0) source = SBQuantity::eV(sourceEnergy); if (sourceUnit == 1) source = SBQuantity::Eh(sourceEnergy); if (sourceUnit == 2) source = SBQuantity::kcalPerMol(sourceEnergy); if (sourceUnit == 3) source = SBQuantity::zJ(sourceEnergy); if (destinationUnit == 0) return (SBQuantity::eV(source)).getValue(); if (destinationUnit == 1) return (SBQuantity::Eh(source)).getValue(); if (destinationUnit == 2) return (SBQuantity::kcalPerMol(source)).getValue(); if (destinationUnit == 3) return (SBQuantity::zJ(source)).getValue(); return 0.0; } ``` Here, we first declare a physical quantity with [energy](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-energy) units ([zeptoJoules](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-zeptojoule) by default in SAMSON). Then we convert from the source energy to [zeptoJoules](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-zeptojoule) and then we convert from [zeptoJoules](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-zeptojoule) to the destination unit, and extract the value as a double from the result. Note, that all the conversions are done internaly by SAMSON. You can check the [units](https://documentation.samson-connect.net/developers/latest/units/index.md) page for more information. Now, we program the slots. Open the source file for the GUI of the app (`SEEnergyConverterAppGUI.cpp`) and implement the `onLeftChanged()` slot as follows: ```cpp void SEEnergyConverterAppGUI::onLeftChanged() { // convert the string from the line edit to a double // with checking for valid numerical characters // (including the scientific notation) bool ok; double source = ui.lineEditLeft->text().toDouble(&ok); if (ok) { // convert units unsigned int sourceUnit = ui.comboBoxLeft->currentIndex(); unsigned int destinationUnit = ui.comboBoxRight->currentIndex(); double destination = getApp()->convert(source, sourceUnit, destinationUnit); // set the destination value // QString::number will use float or scientific notation format, // whichever is the most concise ui.lineEditRight->setText(QString::number(destination)); } else { // in the case when the line edit contained invalid characters // clear another line edit ui.lineEditRight->setText(""); } } ``` Here, we first try to convert the string from the line edit into a number: the `toDouble` function from the `QString` class takes care of checking the validity of the numeric string, including the support for scientific notation (i.e. numbers in the format 1.5e+5 are supported). Then, if the string has a valid number we do a conversion, else we empty the other line edit. Implement the `onRightChanged()` slot in the same way by exchanging the source and destination widgets: ```cpp void SEEnergyConverterAppGUI::onRightChanged() { // convert the string from the line edit to a double // with checking for valid numerical characters // (including the scientific notation) bool ok; double source = ui.lineEditRight->text().toDouble(&ok); if (ok) { // convert units unsigned int sourceUnit = ui.comboBoxRight->currentIndex(); unsigned int destinationUnit = ui.comboBoxLeft->currentIndex(); double destination = getApp()->convert(source, sourceUnit, destinationUnit); // set the destination value // QString::number will use float or scientific notation format, // whichever is the most concise ui.lineEditLeft->setText(QString::number(destination)); } else { // in the case when the line edit contained invalid characters // clear another line edit ui.lineEditLeft->setText(""); } } ``` Now, you have a simple energy converter implementation. [Build the Extension](https://documentation.samson-connect.net/developers/latest/building/index.md), launch SAMSON, open the extension, and try converting values. ## Validate the result Check that: - both unit selectors are populated correctly; - entering a valid number updates the converted value immediately; - invalid text does not crash the app and clears the destination field; - the conversion logic stays in terms of SAMSON quantities instead of hand-written scale factors scattered through the UI layer. ## Common pitfalls - Converting with raw doubles too early defeats the purpose of the typed unit system. - Forgetting to validate line-edit input produces hard-to-debug UI behavior. - Keeping conversion logic in the GUI instead of the app class makes the example harder to extend later. ## Next steps Follow up with the full [Units](https://documentation.samson-connect.net/developers/latest/units/index.md) reference or move to [Programming new Apps](https://documentation.samson-connect.net/developers/latest/tutorials/atom-shaker/index.md) to see units combined with selections and structural edits. # Creating visualizations: Van der Waals visual model This tutorial is the main deep dive into custom [visual models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models) in the SAMSON Developer Guide. You will create a van der Waals representation for a group of atoms and follow the feature all the way from data ownership to rendering, property exposure, selection, and serialization. Use this page when you need a realistic rendering-oriented example rather than a minimal class skeleton. Note SAMSON already has a Van der Waals visual model which is installed by default. ## What you will build By the end of the tutorial, you will have: - a visual model class that stores references to the atoms it represents; - rendering code that draws sphere geometry with appropriate radii and materials; - property and inspector integration for user-facing controls; - serialization code that keeps the visual model valid across copy, save, and load operations. ## Prerequisites - You know how to [generate](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and [build](https://documentation.samson-connect.net/developers/latest/building/index.md) an extension. - You are comfortable with the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), [references](https://documentation.samson-connect.net/developers/latest/referencing/index.md), and [rendering](https://documentation.samson-connect.net/developers/latest/rendering/index.md). - You are willing to work through a longer tutorial that touches several SDK subsystems at once. ## Sample code The source code for an Extension created in this tutorial can be found at [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ## Generating an Extension We will start by creating a new SAMSON Extension called *VanDerWaals* thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (please, refer to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) tutorial for a reminder on how to use it): - launch SAMSON and run the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md); - specify the path to a folder where you want to develop your SAMSON Extensions; - name the SAMSON Extension as *VanDerWaals* and add some description; - add a **Visual Model** class (called `SEVanDerWaalsVisualModel`); - generate the SAMSON Extension. The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) generates a visual model class (derived from the [`SBMVisualModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModel/index.md) class) and a property widget class for the visual model. Now, try [building the SAMSON Extension](https://documentation.samson-connect.net/developers/latest/building/index.md). ## Setting up the visual model A [visual model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models) is applied to a group of nodes passed to the constructor of the [visual model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models). Since we want to apply a van der Waals visual model to a group of atoms, we add a member to the visual model to remember the list of atoms that we were passed. Open the `SEVanDerWaalsVisualModel.hpp` file and include the `SBAtom.hpp` header: ```cpp #include "SBAtom.hpp" ``` And add the following member inside the declaration of the `SEVanDerWaalsVisualModel` class in the `SEVanDerWaalsVisualModel.hpp` file: ```cpp class SEVanDerWaalsVisualModel : public SBMVisualModel { // ... private: SBPointerIndexer atomIndexer; }; ``` A [pointer indexer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) is similar to a [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md), thus assigns indices to pointed objects, but automatically removes [references](https://documentation.samson-connect.net/developers/latest/referencing/index.md) from the indexer when a pointed object is deleted (in the C++ sense) so that it can never point to deleted memory. Then, in the `SEVanDerWaalsVisualModel.cpp` file, modify the second constructor as follows: ```cpp SEVanDerWaalsVisualModel::SEVanDerWaalsVisualModel( const SBNodeIndexer& nodeIndexer) { SBNodeIndexer temporaryIndexer; SB_FOR(SBNode* node, nodeIndexer) node->getNodes(temporaryIndexer, SBNode::IsType(SBNode::Atom)); SB_FOR(SBNode* node, temporaryIndexer) atomIndexer.addReferenceTarget(node); temporaryIndexer.clear(); SAMSON::setStatusMessage(QString("Van der Waals visual model: added for ") + QString::number(atomIndexer.size()), 0); } ``` First, we collect atoms among the nodes passed to the constructor of the visual model (possibly among their descendants), then we add the atoms to the atom indexer `atomIndexer`. ## Disabling the property window The property window of a visual model is mainly used to display the possible parameters of the visual model to the user such that they can be modified. Note This is also can be done via the [introspection mechanism](https://documentation.samson-connect.net/developers/latest/introspection/index.md) by exposing visual model attributes. In this case they could be modified via the [Inspector](https://documentation.samson-connect.net/users/latest/inspecting/). If enabled, the property window appears when the visual model was created or can be invoced from the context menu of the visual model node in the data graph. For simplicity, in this tutorial we will not be using the property window. To disable the property window, please open the `SEVanDerWaalsDescriptor.cpp` file that describes the SAMSON Extension and comment the following string: ```cpp //SB_ELEMENT_CLASS(SEVanDerWaalsVisualModelProperties); ``` You can also change the SAMSON Extension category to `Visualization`: ```cpp SB_ELEMENT_CATEGORY(SBClass::Category::Visualization); ``` ## Displaying spheres To display something in the viewport, we overload the `display` function of the visual model. For convenience, SAMSON provides many functions to ease rendering objects (instead of having to use OpenGL functions). The `display` function of the visual model receives `SBNode::RenderingPass` according to which the geometry is to be rendered. In this tutorial we will consider three of them: - `SBNode::RenderingPass::OpaqueGeometry` - the pass where opaque geometry is rendered; - `SBNode::RenderingPass::ShadowingGeometry` - the pass where shadowing geometry is rendered; - `SBNode::RenderingPass::SelectableGeometry` - the pass where selectable geometry is rendered. In this tutorial, we are going to use the [displaySpheres](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-displayspheres) function, to draw one sphere per atom, with a radius equal to the van der Waals radius of the atom. Let's now code inside the `display` function of the visual model. Please note that the code demonstrated below is not optimized and is shown for the tutorial purposes. For the optimized code please see the source code for this Extension in [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). First, we allocate arrays needed to transfer data to SAMSON for rendering spheres and initialize them to zeros: ```cpp void SEVanDerWaalsVisualModel::display(RenderingPass renderingPass) { const unsigned int numberOfAtoms = atomIndexer.size(); // allocate arrays and initialize them to zeros float* positionData = new float[3 * numberOfAtoms](); float* radiusData = new float[numberOfAtoms](); float* colorData = new float[4 * numberOfAtoms](); unsigned int* flagData = new unsigned int[numberOfAtoms](); unsigned int* nodeIndexData = new unsigned int[numberOfAtoms](); ``` Observe the different array sizes above: we need 3 `float` per atom for the position, 1 `float` for the radius, 4 `float` for the color (red, green, blue, and opacity), and 2 `unsigned int` for flags used to alter the rendering colors (e.g. the selection flag and the highlighting flag) and for node indices used for selections (see the [Enabling selection](#enabling-selection) section). We also need to know whether a [color scheme](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) is applied to the visual model, so we retrieve the pointer to the [material](https://documentation.samson-connect.net/developers/latest/materials/index.md) applied to the visual model: ```cpp // retrieve the pointer to the material applied to the visual model SBNodeMaterial* material = getMaterial(); ``` We can now fill the arrays by traversing the list of atoms: ```cpp // fill in the arrays for (unsigned int i = 0; i < numberOfAtoms; i++) { SBPointer currentAtom = atomIndexer[i]; // check if the atom is not null if (!currentAtom.isValid()) continue; // check if the atom is not erased if (currentAtom->isErased()) continue; // fill the position array SBPosition3 position = currentAtom->getPosition(); positionData[3 * i + 0] = (float)position.v[0].getValue(); positionData[3 * i + 1] = (float)position.v[1].getValue(); positionData[3 * i + 2] = (float)position.v[2].getValue(); // fill the radius array radiusData[i] = (float)currentAtom->getVanDerWaalsRadius().getValue(); // fill the color array based on the material // applied to the visual model, if any if (material) { // if a material is applied to the visual model // use its color scheme material->getColorScheme()->getColor(colorData + 4 * i, currentAtom(), currentAtom()->getPosition()); } else if (currentAtom->getMaterial()) { // else if a material is applied to the current atom // use its color scheme currentAtom->getMaterial()->getColorScheme()->getColor( colorData + 4 * i, currentAtom(), currentAtom()->getPosition()); } else { // else set the default color colorData[4 * i + 0] = 1.0f; colorData[4 * i + 1] = 1.0f; colorData[4 * i + 2] = 1.0f; colorData[4 * i + 3] = 1.0f; } // fill the flag array based on the combination of the flags // for the visual model and the current atom flagData[i] = currentAtom->getInheritedFlags() | getInheritedFlags(); // fill the node index array nodeIndexData[i] = currentAtom->getNodeIndex(); } ``` Here, first we check whether the atom has been deleted or not. Thus, we will display spheres only for atoms, present in the data graph. Then, we fill the position array and the radius array based on atom's position and the van der Waals radius, respectively. Both physical quantities have length units (`SBQuantity::length`), so we extract their numerical value with the `getValue` function, and cast the resulting `double` as a `float`, which is expected by the renderer. Then, we fill the color array based on the material applied to the visual model, if any. Precisely, if a material is applied to the visual model, we charge it of filling the color array, based on the current atom we're examining. Else, we check whether the atom itself has a color scheme in order to use it. If it has no color scheme, we set the color to white (red, green, blue, and opacity are set to their maximum value: 1.0f). Finally, we fill the flag array based on an "or" combination of the flags of the visual model and the flags of the current atom, to help the user have visual feedback when nodes are highlighted or selected. We can now ask SAMSON to display these spheres when rendering opaque geometry: ```cpp if (renderingPass == SBNode::RenderingPass::OpaqueGeometry) { // display spheres for atoms SAMSON::displaySpheres( numberOfAtoms, positionData, radiusData, colorData, flagData); } ``` And we complete the display function by cleaning up memory: ```cpp delete[] positionData; delete[] radiusData; delete[] colorData; delete[] flagData; delete[] nodeIndexData; ``` Now, if you build and launch SAMSON, and apply this visual model (`Ctrl`/`Cmd` + `Shift`+`V`) to a molecule without any [material](https://documentation.samson-connect.net/developers/latest/materials/index.md) applied, it will show white spheres. Let's make it more appealing with default color set based on the [CPK color scheme](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPK/index.md). For that, add the `SBElementTable.hpp` header file in the `SEVanDerWaalsVisualModel.cpp` file: ```cpp #include "SBElementTable.hpp" ``` and change the setting of the default color to the following line: ```cpp // else set the default color based on CPK color memcpy(&colorData[4 * i], SBElementTable::getElement(currentAtom->getElementType()).getColorCPK(), 4 * sizeof(float)); ``` Here we get the CPK color for a current atom element type. Now, if you build and launch SAMSON, and apply this visual model to a molecule without any material applied: it will show spheres with CPK color: You can see that the visual model does not cast any shadows, and the only the shadows you see are casted by the molecule itself. Learn how to make you visual model to cast shadows in the next section. ## Casting shadows SAMSON uses a shadow map algorithm in order to render shadows. This algorithm performs a hidden rendering pass from the point of view of the light and uses this render to determine whether a point is shadowed during the main rendering pass. In order to cast shadows, we thus need to render spheres again, but in the `SBNode::RenderingPass::ShadowingGeometry` pass. Shadow pass only cares to render geometry and to determine the depth of objects and it doesn't need colors. In the `display` function of the visual model, add the following pass after the `SBNode::RenderingPass::OpaqueGeometry`: ```cpp if (renderingPass == SBNode::RenderingPass::ShadowingGeometry) { // display for shadows SAMSON::displaySpheres( numberOfAtoms, positionData, radiusData, colorData, flagData, true); } ``` The visual model then casts shadows: ## Enabling selection In SAMSON, picking objects in the viewport is also implemented with rendering functions. However, instead assigning colors to each pixel of the viewport, we assign the index of the node being rendered at this location (see `nodeIndexData`). [Visual models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models) can thus become selectable if they implement the `SBNode::RenderingPass::SelectableGeometry` pass in their `display` function. In the `display` function of the visual model, add the following pass after the `SBNode::RenderingPass::ShadowingGeometry`: ```cpp if (renderingPass == SBNode::RenderingPass::SelectableGeometry) { // display spheres for atoms SAMSON::displaySpheresSelection( numberOfAtoms, positionData, radiusData, nodeIndexData); } ``` Note that in the `SelectableGeometry` pass we don't need to deal with colors but we need to fill the index array with the unique node index that SAMSON has assigned to the atom. As a result, when the user attempts to pick a sphere in the visual model, the atom is selected: ## Modifying the properties Let's now make it possible for the user to change the size of the spheres. For that we introduce a dimensionless variable `radiusFactor` in the `SEVanDerWaalsVisualModel` class (file `SEVanDerWaalsVisualModel.hpp`) together with according getter and setter functions: ```cpp class SEVanDerWaalsVisualModel : public SBMVisualModel { SB_CLASS public: // ... /// \name Getter/setter functions //@{ const float& getRadiusFactor() const; void setRadiusFactor(const float& r); //@} private: SBPointerIndexer atomIndexer; float radiusFactor; ///< The radius factor }; ``` And implementation of these functions in the `SEVanDerWaalsVisualModel.cpp` file: ```cpp const float& SEVanDerWaalsVisualModel::getRadiusFactor() const { return radiusFactor; } void SEVanDerWaalsVisualModel::setRadiusFactor(const float& r) { if (r < 0.0f) return; radiusFactor = r; // request re-rendering of the viewport SAMSON::requestViewportUpdate(); } ``` In the second constructor of the `SEVanDerWaalsVisualModel` class (file `SEVanDerWaalsVisualModel.cpp`) we set the default value for the radius factor to 1.0: ```cpp SEVanDerWaalsVisualModel::SEVanDerWaalsVisualModel( const SBNodeIndexer& nodeIndexer) { radiusFactor = 1.0f; // set a default radius factor // ... } ``` And in both `display` and `displayForSelection` functions of the visual model modify the computation of the sphere radius by multiplying by the radius factor: ```cpp // fill the radius array radiusData[i] = radiusFactor * currentAtom->getVanDerWaalsRadius().getValue(); ``` There are two main ways to provide a possibility for the user to modify properties of the visual model: - [via the Inspector](#inspector); - [via the property window](#property-window) of the visual model. You can use either one of them or both. You can also specify the range of the `radiusFactor` in the [Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) and expose the visual model transparency in the [Inspector](https://documentation.samson-connect.net/users/latest/inspecting/). To see how to do that, please check the source code for this Extension in [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ### Inspector Now, we expose the radius factor as a read and write attribute thanks to the getter and setter functions and the [introspection mechanism](https://documentation.samson-connect.net/developers/latest/introspection/index.md). Note that the getter and setter function names should differ only in the `get` and `set` parts. Open the `SEVanDerWaalsVisualModelDescriptor.hpp` file and add the following attribute exposure: ```cpp SB_CLASS_BEGIN(SEVanDerWaalsVisualModel); // ... SB_INTERFACE_BEGIN; SB_ATTRIBUTE_READ_WRITE(const float&, RadiusFactor, "Radius factor", "Geometry"); SB_INTERFACE_END; SB_CLASS_END(SEVanDerWaalsVisualModel); ``` Here, we specify the type of the attribute (`const float&`), the class, the root name of the getter and setter functions, the description of the attribute, and an attribute's group (a group box in the [Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) window where this attribute will be placed). Now, the user can modify the radius factor in the [Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) when the visual model is selected: You can also limit the range of the `radiusFactor` in the [Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) using `SB_ATTRIBUTE_READ_WRITE_RANGE` and expose the visual model transparency as a slider using `SB_ATTRIBUTE_READ_WRITE_RESET_RANGE_SLIDER`. To see how to do that, please check the source code for this Extension in [SAMSON-Developer-Tutorials](https://github.com/1A-OneAngstrom/SAMSON-Developer-Tutorials). ### Property window First, if you disabled the property window of the visual model, enable it back by uncommenting the following string in the Extension's descriptor file (`SEVanDerWaalsDescriptor.cpp`): ```cpp SB_ELEMENT_CLASS(SEVanDerWaalsVisualModelProperties); ``` Open the `SEVanDerWaalsVisualModelProperties.ui` file, modify the default label, and add a `QDoubleSpinBox`. Rename this spin box to `doubleSpinBoxRadiusFactor` and set its parameters as on an image below (the default value to 1.0 and the minimum to 0.0): Add a slot `onRadiusFactorChanged(double)`: And connect the `valueChanged(double)` signal of the spin box to this slot: Now, add this slot in the `SEVanDerWaalsVisualModelProperties` class declaration (`SEVanDerWaalsVisualModelProperties.hpp` file): ```cpp class SEVanDerWaalsVisualModelProperties : public SBGDataGraphNodeProperties { SB_CLASS Q_OBJECT public: // ... public slots: /// \name Properties //@{ void onRadiusFactorChanged(double radiusFactor); //@} private: // ... }; ``` And its implementation in the `SEVanDerWaalsVisualModelProperties.cpp` file: ```cpp void SEVanDerWaalsVisualModelProperties::onRadiusFactorChanged( double radiusFactor) { if (!visualModel.isValid()) return; // set the radius factor for the visual model visualModel->setRadiusFactor(radiusFactor); // request re-rendering of the viewport SAMSON::requestViewportUpdate(); } ``` Here, we set the radius factor of the visual model from the property window and request to force the update of SAMSON's viewport which will render the viewport thus rendering the visual model with new parameters. Now, the user can modify the radius factor in the property window and it will automatically update the visual model representation: ## Serializing the visual model If you want for your visual model to be copyable and savable it is necessary to implement its [serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md). [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) is used in SAMSON to: - copy nodes in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), - save documents in SAMSON format files (*.sam*, *.samx*) and further load it from them. Please, see the [serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) section for more information. By default, the newly created visual model is not serialized. Open the `SEVanDerWaalsVisualModel.cpp` file and modify the `isSerializable` function to return `true`. ```cpp bool SEVanDerWaalsVisualModel::isSerializable() const { return true; } ``` This indicates to SAMSON that this class is serializable. Now, we need to re-implement both `serialize` and `unserialize` functions. When SAMSON serializes a group of nodes, it proceeds in two passes: - First, all nodes that are to be serialized are added to a `nodeIndexer`. This way, each node that's about to be serialized has an index. It's those indices that need to be used to indicate which nodes are referenced by other nodes if the referenced nodes are serialized as well, else we need to use addresses of the referenced nodes. - Then, the `serialize` function of each node is called. This function receives the `nodeIndexer`. During unserialization, SAMSON also proceeds in two steps: - First, it creates all required nodes and indexes them in a `nodeIndexer`, in the same order as during serialization. - Then, the `unserialize` function of each node is called. This function receives the `nodeIndexer`. The `serialize` function allows for serialization of your visual model. ```cpp void SEVanDerWaalsVisualModel::serialize( SBCSerializer* serializer, const SBNodeIndexer& nodeIndexer, const SBVersionNumber& sdkVersionNumber, const SBVersionNumber& classVersionNumber) const { // Serialization of the parent class SBMVisualModel::serialize( serializer, nodeIndexer, sdkVersionNumber, classVersionNumber); // Write the radius factor serializer->writeFloatElement("radiusFactor", radiusFactor); // Write the number of atoms to which this visual model is applied serializer->writeUnsignedIntElement("numberOfAtoms", atomIndexer.size()); unsigned int atomIndex = 0; // the index of the atom in the indexer // Write indices of the atoms to which this visual model is applied SB_FOR(SBPointer atom, atomIndexer) { if (nodeIndexer.getIndex(atom(), atomIndex)) { // the atom is indexed serializer->writeBoolElement("atomIsIndexed", true); serializer->writeUnsignedIntElement("atomIndex", atomIndex); } else { // the atom is not indexed, // the user must be copying just the visual model // so we serialize the atom address itself serializer->writeBoolElement("atomIsIndexed", false); serializer->writeUnsignedLongLongElement("atomIndex", (unsigned long long)atom()); } } } ``` First we invoke the serialization function of the parent class. The parent functions do many things (all the way up to [`SBNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) itself, i.e. `SBVisualModel::serialize` calls `SBModel::serialize` which calls `SBNode::serialize`) and are needed for correct saving and loading of node properties. This allows to save the node's name, visibility flag, a [material](https://documentation.samson-connect.net/developers/latest/materials/index.md), etc. Then we save information on our visual model itself: the radius factor, number of nodes to which the visual model is applied (nodes referenced by the visual model), and the indices of these nodes in the `nodeIndexer` or their addresses. For the last part, we check whether the atom itself was serialized or not. Basically, saving of the [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) leads to the serialization of every node that can be serialized, while copying leads to the serialization only of the copied nodes. If the atom was serialized we save its index in the `nodeIndexer`, else we save the atom's address. The `unserialize` function allows for unserialization of your visual model. ```cpp void SEVanDerWaalsVisualModel::unserialize( SBCSerializer* serializer, const SBNodeIndexer& nodeIndexer, const SBVersionNumber& sdkVersionNumber, const SBVersionNumber& classVersionNumber) { // Unserialization of the parent class SBMVisualModel::unserialize( serializer, nodeIndexer, sdkVersionNumber, classVersionNumber); // Read the radius factor radiusFactor = serializer->readFloatElement(); // Read the number of atoms to which this visual model is applied unsigned int numberOfAtoms = serializer->readUnsignedIntElement(); bool atomIsIndexed; unsigned int atomIndex = 0; // the index of the atom in the indexer // Read indices of the atoms to which this visual model is applied and // add these node into the atom indexer of the visual model for (unsigned int i = 0; i < numberOfAtoms; ++i) { atomIsIndexed = serializer->readBoolElement(); if (atomIsIndexed) { // the atom was serialized too atomIndex = serializer->readUnsignedIntElement(); atomIndexer.addReferenceTarget(nodeIndexer[atomIndex]); } else { // the atom was not serialized, // it must still exist in memory atomIndexer.addReferenceTarget( (SBAtom*)serializer->readUnsignedLongLongElement()); } } } ``` First, we invoke the unserialization function of the parent class. This will create the node in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). Then we read information on our visual model itself: the radius factor, number of nodes to which the visual model is applied (nodes referenced by the visual model), and the indices of these nodes in the `nodeIndexer` or their addresses. We check whether the atom itself was serialized or not. If the atom was serialized we read its index in the `nodeIndexer`, else we read the atom's address. This code allows us to both copy the visual model in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) and save it in SAMSON format files or load it from them. ## Validate the result Your visual model behaves correctly if: - it renders the expected van der Waals spheres for the target atoms; - selection and highlighting still work in the viewport; - property changes are reflected immediately in the rendered result; - copying the node, saving the document, and reopening it preserve the visual model and its referenced atoms. ## Common pitfalls - Storing raw atom addresses without the right reference strategy makes the visual model fragile across copy and serialization. - Forgetting to separate rendering data from user-facing properties makes later maintenance difficult. - Implementing rendering without considering selection and serialization leads to a visual model that looks correct only in the simplest case. ## Next steps Related pages are [Rendering](https://documentation.samson-connect.net/developers/latest/rendering/index.md), [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md), [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md), [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md), and [References](https://documentation.samson-connect.net/developers/latest/referencing/index.md). # Fundamentals # Fundamentals This page is the concept map for the SAMSON Developer Guide. Use it when you need to understand how the SDK is organized before choosing a tutorial or when a tutorial sends you here for background. If you are new to the SDK, start with the pages that define extension roles and the data graph. If you are already implementing an extension, jump directly to the runtime mechanisms that match the feature you are building. ## Extension roles - [Apps](https://documentation.samson-connect.net/developers/latest/apps/index.md): command-style extensions, tools, and panels exposed to users. - [Controllers](https://documentation.samson-connect.net/developers/latest/controllers/index.md): nodes that control or steer other nodes in the data graph. - [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md): viewport-driven tools that react to mouse and keyboard input. - [Exporters](https://documentation.samson-connect.net/developers/latest/exporters/index.md): classes that write SAMSON data to external formats. - [Importers](https://documentation.samson-connect.net/developers/latest/importers/index.md): classes that read external data into SAMSON. ## Data and visualization - [Animations](https://documentation.samson-connect.net/developers/latest/animations/index.md): timeline-driven changes inside documents and presentations. - [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md): reusable coloring logic for nodes and visual models. - [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md): visual appearance information applied to nodes and renderables. - [Node Specification Language](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md): concise ways to describe node sets. - [Rendering](https://documentation.samson-connect.net/developers/latest/rendering/index.md): how extensions submit geometry and rendering behavior. - [Selectors](https://documentation.samson-connect.net/developers/latest/selectors/index.md): reusable node selection logic that can be plugged into workflows. ## Runtime mechanics - [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md): how SAMSON exposes classes, functions, and descriptors. - [Memory management](https://documentation.samson-connect.net/developers/latest/memory-management/index.md): lifetime rules, ownership boundaries, and heap helpers. - [References](https://documentation.samson-connect.net/developers/latest/referencing/index.md): safe pointers and indexed reference containers for nodes. - [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md): saving, cloning, and restoring extension data. - [Signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md): event-driven communication between objects. - [Undo and redo](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md): how to make user actions reversible. ## Infrastructure and utilities - [Functors](https://documentation.samson-connect.net/developers/latest/functors/index.md): reusable predicates and callable helpers used across the SDK. - [Identifiers](https://documentation.samson-connect.net/developers/latest/identifiers/index.md): UUIDs, class descriptors, and stable identities. - [Logging](https://documentation.samson-connect.net/developers/latest/logging/index.md): developer-facing logging and diagnostics. - [Units](https://documentation.samson-connect.net/developers/latest/units/index.md): strongly typed physical quantities and conversions. - [Versioning](https://documentation.samson-connect.net/developers/latest/versioning/index.md): version numbers, compatibility, and upgrade-related checks. ## Suggested reading paths - Building an app or editor: start with [Apps](https://documentation.samson-connect.net/developers/latest/apps/index.md), [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md), [Undo and redo](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md), [Signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md), and [Controllers](https://documentation.samson-connect.net/developers/latest/controllers/index.md). - Working with nodes and models: start with [Node Specification Language](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md), [References](https://documentation.samson-connect.net/developers/latest/referencing/index.md), and [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md). - Working on visualization: start with [Rendering](https://documentation.samson-connect.net/developers/latest/rendering/index.md), [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md), [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md), and [Animations](https://documentation.samson-connect.net/developers/latest/animations/index.md). - Building low-level SDK features: start with [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md), [Memory management](https://documentation.samson-connect.net/developers/latest/memory-management/index.md), [Logging](https://documentation.samson-connect.net/developers/latest/logging/index.md), [Identifiers](https://documentation.samson-connect.net/developers/latest/identifiers/index.md), and [Versioning](https://documentation.samson-connect.net/developers/latest/versioning/index.md). # Apps An **app** is the most general-purpose extension class in SAMSON. Use an app when your feature should appear as a tool or command in the UI, open its own window, run a workflow, connect to external software or services, or expose reusable functionality that is not naturally an editor, importer, exporter, or model. Apps are listed in **Home > Apps**. When a user opens an app, its GUI appears and the app logic becomes available. ## Mental model Think of an app as a pair of cooperating classes: 1. a data-side app object derived from [`SBDApp`](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) 1. an optional GUI object derived from [`SBGApp`](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) The `SBDApp` class owns the app logic and is the part you expose through [introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md). The `SBGApp` class is the user-facing window or widget layer. This split is useful because it keeps the functional API separate from the interface. That makes the app easier to script, reuse, test, and maintain. ## When an app is the right choice Choose an app when your feature is primarily: - a command or batch workflow - a panel with controls and actions - a bridge to an external executable, service, or dataset - a reusable service object exposed to other extensions Typical examples: - docking or simulation launchers - format conversion or analysis tools - project utilities - marketplace or network-connected integrations ## When an app is not the right choice Do not default to an app if another extension type is a better fit: - use an [editor](https://documentation.samson-connect.net/developers/latest/editors/index.md) for direct viewport interaction - use an [importer](https://documentation.samson-connect.net/developers/latest/importers/index.md) or [exporter](https://documentation.samson-connect.net/developers/latest/exporters/index.md) for file formats - use [models or simulators](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md) when the feature becomes part of the scientific runtime state ## Common implementation pattern Many apps follow this structure: 1. derive a class from [`SBDApp`](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) 1. expose the main actions or data through [introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) 1. derive a GUI class from [`SBGApp`](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) 1. connect GUI controls to the app logic 1. read or modify the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) as needed That pattern works well because it keeps business logic out of widget code. ## A realistic example Suppose you want to build a tool that sends selected atoms to an external optimization service: - the **app** gathers parameters and orchestrates the workflow - the **GUI** lets the user choose options and launch the job - the app reads the current selection from the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) - after the remote job finishes, the app updates or creates nodes with the result That is an app problem, not an editor problem, because the main interaction is command-oriented rather than direct viewport manipulation. ## What to read next - Use [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to scaffold a new app. - Read [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md) for the widget side of app development. - Read [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md) for worked examples. # Color schemes A **color scheme** answers one rendering question: *how should this object be colored?* Use color schemes when your extension needs to color structural content or [visual models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models) according to rules such as element type, residue, chain, model membership, or a scalar property. The main class family is exposed through api/classSBDDataGraphNodeColorScheme.md. ## Mental model Color schemes are part of the visual layer, not the scientific model itself. They can be applied to a [data graph node](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), and when they are applied at one node, they affect that node and its descendants. This makes them a practical way to impose a coherent coloring rule over part of a hierarchy. Color schemes usually work together with [materials](https://documentation.samson-connect.net/developers/latest/materials/index.md): - the **material** controls the broader rendering appearance - the **color scheme** decides which colors are assigned ## Where color schemes are used Color schemes can be applied to: - structural nodes, such as atoms and bonds - [visual models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models), such as custom representations or field visualizations Typical use cases include: - uniform highlighting - per-element coloring - per-chain coloring - coloring by residue or secondary structure - coloring by a numeric attribute such as temperature factor See also [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) [User guide: Color schemes](https://documentation.samson-connect.net/users/latest/colorizing/) [User guide: Default color palettes](https://documentation.samson-connect.net/users/latest/color-palettes/) [User guide: Visualizing](https://documentation.samson-connect.net/users/latest/visualizing/) ## Colors See also [`SBColor`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypeColor/index.md) ## Available color schemes The built-in schemes fall into a few common families. - **Constant color schemes** - [**Constant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/index.md): applies one color uniformly - [**Constant (illustrate)**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstantIllustrate/index.md): mostly uniform, with a lightened treatment for some atom types - **Per-element color schemes** - [**Per element**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPK/index.md): classic CPK coloring; the default for many structural models - [**Per element (custom carbons)**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKConstantCarbons/index.md) - [**Per element (per chain carbons)**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKPerChainCarbons/index.md) - [**Per element (per structural model carbons)**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKPerStructuralModelCarbons/index.md) - **Per-attribute color schemes** - [**Per attribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md): base family for color mapping driven by node attributes and palettes - [`SBDColorSchemePerChainID`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerChainID/index.md) - [`SBDColorSchemePerChainIllustrate`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerChainIllustrate/index.md) - [`SBDColorSchemePerFormalCharge`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerFormalCharge/index.md) - [`SBDColorSchemePerOccupancy`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerOccupancy/index.md) - [`SBDColorSchemePerPartialCharge`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerPartialCharge/index.md) - [`SBDColorSchemePerResidueHydrophobicity`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueHydrophobicity/index.md) - [`SBDColorSchemePerResidueSequenceNumber`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueSequenceNumber/index.md) - [`SBDColorSchemePerResidueType`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueType/index.md) - [`SBDColorSchemePerSecondaryStructureType`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerSecondaryStructureType/index.md) - [`SBDColorSchemePerSideChainCharge`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerSideChainCharge/index.md) - [`SBDColorSchemePerSideChainPolarity`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerSideChainPolarity/index.md) - [`SBDColorSchemePerStructuralModel`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/index.md) - [`SBDColorSchemePerStructuralModelIllustrate`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModelIllustrate/index.md) - [`SBDColorSchemePerTemperatureFactor`](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerTemperatureFactor/index.md) ## Choosing a scheme As a rule of thumb: - use a **constant** scheme for highlighting or quick visual overrides - use a **per-element** scheme for chemically meaningful default coloring - use a **per-attribute** scheme when the color should convey data ## See also - [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) - [User guide: Color schemes](https://documentation.samson-connect.net/users/latest/colorizing/) - [User guide: Default color palettes](https://documentation.samson-connect.net/users/latest/color-palettes/) - [User guide: Visualizing](https://documentation.samson-connect.net/users/latest/visualizing/) # Controllers Controllers are special [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) objects that act as interactive 3D widgets in the viewport. Use a controller when the user should manipulate something visually and directly in 3D, but the thing they click on is not itself the target scientific object. In other words, a controller is a handle, gizmo, or manipulator that affects other nodes. Examples include translation, rotation, scaling, or camera-style interaction widgets. For example, see the existing move editors in SAMSON. ## Mental model A controller is itself a node, but it exists mainly to control other nodes. The main classes are: - [`SBDController`](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) for the controller object - [`SBDControllerNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) for the individual interactive pieces of the controller A controller may contain several controller nodes. In the translation example above, separate nodes handle movement along X, Y, Z, and in the camera plane. ## Where controllers fit Controllers often work together with other extension types: - an [editor](https://documentation.samson-connect.net/developers/latest/editors/index.md) decides when a controller should be created, shown, or activated - the controller receives interaction through its controller nodes - the controller updates the actual target nodes in the data graph That makes controllers a good choice for reusable viewport manipulators. ## When to use a controller Choose a controller when: - the interaction is spatial and should stay visible in the 3D view - the user needs handles, axes, pivots, or drag targets - the same manipulation behavior may be reused across tools Do not use a controller for simple command buttons or non-spatial settings panels. Those usually belong in an [app](https://documentation.samson-connect.net/developers/latest/apps/index.md) or [editor](https://documentation.samson-connect.net/developers/latest/editors/index.md). ## Example scenario Suppose you are building a custom move tool for a new object type: - the editor activates the tool - the controller appears around the current selection - the user drags one controller node - the controller converts that drag into transforms applied to the underlying data graph nodes That pattern keeps viewport manipulation logic separate from the higher-level editor workflow. ## What to read next - Read [Editors](https://documentation.samson-connect.net/developers/latest/editors/index.md) for the event-routing side of interactive tools. - Read [Data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) if you need to understand how controllers relate to other nodes. # Editors An **editor** is a viewport-facing tool that receives user interaction events such as mouse and keyboard input. Use an editor when the user should act directly in the 3D view: create objects, select them, deform them, transform them, or perform guided interactive workflows. Editors are shown in the editor area on the left side of the viewport. Note One and only one editor is **active** at any time. ## Mental model An editor is the main entry point for interactive tools. The core class is [`SBGEditor`](https://documentation.samson-connect.net/developers/latest/api/classSBGEditor/index.md). Choose an editor when the tool behavior is driven by user gestures in the viewport rather than by a standalone settings window. Editors are often used together with: - [controllers](https://documentation.samson-connect.net/developers/latest/controllers/index.md) for visible 3D handles - [data graph node GUIs](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) for object-specific interaction - [apps](https://documentation.samson-connect.net/developers/latest/apps/index.md) when you also need a separate window or command panel ## The flow of events Qt events reaching the viewport are processed in this order: - If `Shift` is pressed, the [active camera](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentCamera/index.md) is operated, the Qt event is accepted, and nothing more may happen. - If `Shift` is not pressed, the Qt event is passed to the [active editor](https://documentation.samson-connect.net/developers/latest/api/classSBGEditor/index.md). If the active editor accepts the event, nothing more may happen. - If the active editor ignores the Qt event, a [data graph node](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) is picked in the viewport. If the picked node has a corresponding [`SBGDataGraphNode`](https://documentation.samson-connect.net/developers/latest/api/classSBGDataGraphNode/index.md) GUI class, then the Qt event is passed to this GUI. This order matters because it explains why an editor should accept only the events it truly handles. If it consumes everything, object-level interaction never gets a chance to run. ## When an editor is the right choice Editors work well for: - creation tools - manipulation tools - selection tools - interaction modes that stay active until the user switches away Typical examples: - a nanotube or graphene builder - a lasso or rectangle selector - a rigid transform tool - a custom domain-specific modeling instrument ## Practical guidance When implementing an editor, define clearly: - how it becomes active - which gestures it handles - when it should accept or ignore an event - whether it creates or activates [controllers](https://documentation.samson-connect.net/developers/latest/controllers/index.md) - how it updates the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) That makes the editor predictable and easier to combine with the rest of the SAMSON interaction model. ## Example scenario Suppose you want to implement an editor that creates a polymer path from viewport clicks: - the editor becomes the active tool - each click adds or moves a control point - keyboard modifiers change the creation mode - the editor creates or updates nodes in the data graph as the interaction progresses That is editor-driven interaction because the workflow is stateful and gesture-based. ## What to read next - Use [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to scaffold an editor. - Read [Controllers](https://documentation.samson-connect.net/developers/latest/controllers/index.md) if your tool needs draggable 3D handles. - Read [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md) for concrete examples of editor implementations. # Exporters An **exporter** writes SAMSON content to an external file format. Use an exporter when your extension should turn data graph content into a file that can be archived, exchanged with another tool, or consumed by a downstream workflow. Typical examples include structure writers, mesh exporters, trajectory snapshots, and tool-specific exchange formats. ## Key class and core responsibilities File exporters derive from [`SBIFileExporter`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileExporter/index.md). An exporter should: - declare the target file extension through [`SBIFileExporter::getExtension`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileExporter/#function-getextension) - provide a user-facing file dialog filter through [`SBIFileExporter::getFilter`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileExporter/#function-getfilter) - implement `exportToFile` to serialize the relevant nodes ## How exporters are used An exporter may be used: - from the SAMSON UI when the user exports a file - programmatically via [`SAMSON::exportToFile`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-exporttofile) In both cases, SAMSON can route the request to the exporter matching the chosen file extension. ## What to think about when designing an exporter The main design question is what subset of the data graph should be represented in the external format. A good exporter defines: - which node types it supports - what happens when unsupported nodes are present - how scientific metadata is preserved, approximated, or omitted - whether the exporter writes the entire selection or a reduced representation If the format cannot represent the full SAMSON object graph, document the loss clearly. ## Example scenario Suppose you need to export a selected nanostructure to a simulation package: - the exporter collects the selected nodes - it extracts the subset of properties required by the target format - it writes the target file while validating units, identifiers, and topology assumptions That is exporter logic, even if you also provide an [app](https://documentation.samson-connect.net/developers/latest/apps/index.md) to choose additional export options. ## What to read next - Use [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to scaffold an exporter. - Read [Importers](https://documentation.samson-connect.net/developers/latest/importers/index.md) if you also need the reverse path. - Read [Getting nodes](https://documentation.samson-connect.net/developers/latest/getting-nodes/index.md) when you need precise node collection logic before writing a file. # Functors SAMSON uses [`SBCFunctor`](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md)-based functors to represent small pieces of reusable logic such as predicates for selection and conditions used during traversal. In practice, you will encounter functors most often when querying the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). ## Mental model A functor lets you describe *what* you want without manually writing the traversal and filtering logic at each call site. That makes code easier to read and easier to combine. Instead of writing nested `if` statements in a custom loop, you can often compose predicates directly. ## Selection functors Selection functors are predicates that can be combined with logical operators. They are commonly passed to node-collection APIs. Example: ```cpp // Find all atoms with a partial charge larger than 0.4f SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes( nodeIndexer, SBNode::IsType(SBNode::Atom) && SBAtom::HasPartialCharge() && (SBAtom::GetPartialCharge() >= 0.4f)); ``` This style is useful because the intent stays visible: - restrict to atoms - require a partial charge - apply a numerical threshold ## When functors are useful Use functors when: - you need concise node filtering logic - the selection condition should be composable - the same predicate may be reused in several places If the selection logic becomes a first-class reusable object with parameters and lifecycle of its own, a [selector](https://documentation.samson-connect.net/developers/latest/selectors/index.md) may be a better abstraction. ## What to read next - [Getting nodes](https://documentation.samson-connect.net/developers/latest/getting-nodes/index.md) for more practical node-query examples - [Selectors](https://documentation.samson-connect.net/developers/latest/selectors/index.md) for reusable selection objects rather than inline predicate composition # Identifiers Many SAMSON objects are identified by a **Universally Unique Identifier** (UUID), especially extensions and classes exposed through the SDK. Use this page when you need to understand why a class registration macro asks for a UUID, when you must generate a new one, and why changing an existing UUID is usually a breaking change. ## Key class SAMSON represents UUIDs with [`SBUUID`](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md). A UUID is a 36-character identifier made of 32 hexadecimal digits and 4 hyphens, for example: `D5A1BA95-9CD4-3424-9713-06B979F5C0D9` ## Why UUIDs matter in SAMSON UUIDs are used to identify things that must remain distinguishable across builds, extensions, and runtime discovery mechanisms. Typical cases include: - an extension package - an exposed class registered through [introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) - objects that need stable identity across serialization and dynamic lookup workflows For example, class registration macros such as `SB_REGISTER_TYPE` take a UUID so SAMSON can recognize that class reliably. ## When to generate a new UUID Generate a new UUID when you introduce a new exposed type or another new entity that requires its own stable identity. Do **not** generate a new UUID for an existing class just because you changed its implementation. Replacing a UUID means "this is a different type", which can break discovery, compatibility, or serialized data expectations. ## Tooling The [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) creates UUIDs for the classes it scaffolds. When you later add new exposed classes manually, use the UUID Generator extension rather than inventing identifiers by hand. ## Practical advice - Treat UUIDs as stable identifiers, not as version numbers. - Generate once, then keep them unchanged unless you intentionally introduce a new type. - Be especially careful with UUIDs used in class registration and serialized content. ## What to read next - [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) for class registration and exposure - [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) if the identity of your types affects persisted documents # Importers An **importer** reads an external file format and turns it into SAMSON data. Use an importer when the main job of your extension is to parse files and create or update nodes in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). Typical examples include molecular structure formats, volumetric maps, custom simulation outputs, and project exchange formats. Importers are available when users open files from **Home > File**, and they can also be invoked programmatically. ## Key class and core responsibilities File importers derive from [`SBIFileImporter`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileImporter/index.md). An importer is expected to: - advertise the handled file extension through [`SBIFileImporter::getExtension`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileImporter/#function-getextension) - provide a user-facing file dialog filter through [`SBIFileImporter::getFilter`](https://documentation.samson-connect.net/developers/latest/api/classSBIFileImporter/#function-getfilter) - implement `importFromFile` to parse the input and populate or update the data graph ## How importers are used An importer may run in two common situations: - a user opens a file in the SAMSON UI - a developer calls `SAMSON::importFromFile(...)` and lets SAMSON dispatch to the appropriate importer That means an importer should be robust both in interactive use and in automation workflows. ## What a good importer does in practice A well-behaved importer usually does more than parse text or binary records. It also: - creates the right node hierarchy in the data graph - preserves as much semantic information as the format allows - reports errors clearly when the file is malformed or incomplete - behaves predictably when optional data is missing If your format carries scientific metadata, decide early which parts become persistent node state, which parts become properties, and which parts are ignored. ## Example scenario Suppose you are adding support for a custom trajectory snapshot format: - the importer reads the file header and per-frame records - it creates or updates structural nodes in the data graph - it stores any import-specific metadata needed later for analysis or visualization If that format also needs a custom visual representation, the importer may create nodes that are later rendered by a [visual model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models). ## What to read next - Use [Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) to scaffold an importer. - Read [Exporters](https://documentation.samson-connect.net/developers/latest/exporters/index.md) if you also need the reverse workflow. - Read [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) if imported data must later be saved in SAMSON documents. # Introspection SAMSON Extensions can expose functionality to SAMSON and to other extensions through an **introspection mechanism**. This is what makes extensions discoverable as more than isolated binaries. Through introspection, SAMSON can discover classes, create instances dynamically, surface metadata in the UI, serialize extension-defined objects, and call exposed functions without needing your source code or headers at the call site. Exposition is driven by **descriptor files** compiled with the extension. At a high level, exposing a SAMSON Extension involves two tasks: 1. writing one descriptor per class that should be exposed 1. writing one descriptor for the extension itself The [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) already creates descriptor files for generated classes. In most real extensions, you start from those files and then extend them as your API and UI metadata evolve. ## Read this first Read this page when: - you need a class to appear in SAMSON discovery mechanisms - you want functions to be callable across extension boundaries - you need dynamic construction through proxies or factories - you are debugging why an exposed class is not visible or instantiable For a first implementation, focus on these sections in order: 1. [Registering classes for exposition](#registering-classes-for-exposition) 1. [Class descriptor structure](#class-descriptor-structure) 1. [Extension descriptor structure](#extension-descriptor-structure) 1. [Constructing class instances](#constructing-class-instances) Common mistakes on a first pass are: - forgetting `SB_CLASS` - registering the type but not declaring the base type - exposing constructors incorrectly - omitting metadata that the UI expects, such as public name or GUI UUID See also See the [Creating visualizations: Van der Waals visual model](https://documentation.samson-connect.net/developers/latest/tutorials/vdw-visual-model/#inspector) tutorial for an example of exposing functions as attributes to be used in the *Inspector*. ## Exposing classes ### Registering classes for exposition Exposing a class to SAMSON first involves three steps: 1. Adding the `SB_CLASS` macro to the declaration of the class. 1. Registering the class with SAMSON's type system using the `SB_REGISTER_TARGET_TYPE` or `SB_REGISTER_TYPE` macros. 1. Registering a potential derivation relationship with SAMSON's type system using the `SB_DECLARE_BASE_TYPE` macro. The following App header code, generated by the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (in a file called `SEMyApp.hpp`), demonstrates the above-mentioned three steps: ```cpp class SEMyApp : public SBDApp { SB_CLASS public: /// \name Constructors and destructors //@{ SEMyApp(); ///< Constructs an app virtual ~SEMyApp(); ///< Destructs the app //@} /// \name GUI //@{ SEMyAppGUI* getGUI() const; ///< Returns a pointer to the app GUI //@} }; SB_REGISTER_TARGET_TYPE(SEMyApp, "SEMyApp", "D5A1BA95-9CD4-3424-9713-06B979F5C0D9"); SB_DECLARE_BASE_TYPE(SEMyApp, SBDApp); ``` The macros should be added in specific positions: - The `SB_CLASS` macro should be added inside the class declaration. - The `SB_REGISTER_TARGET_TYPE` macro should be added after the class declaration. - The `SB_DECLARE_BASE_TYPE` macro should be added after the class has been registered with `SB_REGISTER_TARGET_TYPE`. The `SB_REGISTER_TARGET_TYPE` macro has the following syntax: - The first parameter (without quotes) is the type that should be registered - The second parameter (in quotes) is the short name of the class. This should be a single word with a syntax typical of class names. If a short name is not needed (e.g., because the original class name is short enough), then the original class name should be used. - The third parameter (in quotes) is the [class's unique identifier](https://documentation.samson-connect.net/developers/latest/identifiers/index.md), which could be generated thanks to the provided [UUID Generator](https://documentation.samson-connect.net/developers/latest/identifiers/index.md). The `SB_DECLARE_BASE_TYPE` macro has the following syntax: - The first parameter is the derived type. - The second parameter is the base type. This class *must be exposed as well* (this is the case for base classes provided in the SAMSON SDK, such as the `SBDApp` class in the example above). Note At the moment, SAMSON's introspection mechanism may not expose multiple inheritance relationships: while it *is* perfectly possible to expose a class that inherits multiple classes, the `SB_DECLARE_BASE_TYPE` macro may be used to expose only *one* derivation relationship, with only one of the base classes. ### Writing class descriptors Once a class is registered and its potential derivation relationship is declared using the macros described in the previous section, a corresponding *class descriptor* may be written. #### Class descriptor structure A class descriptor implements a *proxy* for the class and contains the following main descriptions: 1. A class type. 1. A class description. 1. A class public name. It is this name that will be shown in the **Home > Apps** menu. 1. A class GUI UUID - the unique identifier of the App's GUI class (can be found in the App's GUI header). 1. An app's shortcut. 1. An app's icon that will be shown in the **Home > Apps** menu. 1. An app's tooltip - it will be visible to users on hover and when searching; you can put HTML text here. 1. A class version number. 1. A factory description, i.e. a list of constructors descriptions. 1. An interface description, i.e. a list of member functions descriptions. Descriptions are written using macros provided by the SAMSON SDK. In particular, a class descriptor is enclosed between two macros, `SB_CLASS_BEGIN` and `SB_CLASS_END`, that take as argument the class name (e.g., `SB_CLASS_BEGIN(SEMyApp)` and `SB_CLASS_END(SEMyApp)` for the example above). Class descriptors are generator automatically by the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) as header files like `include/SE*Descriptor.hpp`. The example below shows a descriptor generated by the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) (in a file called `SEMyAppDescriptor.hpp`) for the App class it has generated: ```cpp SB_CLASS_BEGIN(SEMyApp); SB_CLASS_TYPE(SBCClass::App); SB_CLASS_DESCRIPTION("SAMSON Extension generator pro tip: modify me"); SB_CLASS_PUBLIC_NAME("SEMyApp"); SB_CLASS_GUI_UUID("..."); SB_CLASS_GUI_SHORTCUT(""); SB_CLASS_ICON_FILE_NAME(""); SB_CLASS_TOOL_TIP(""); SB_CLASS_VERSION_NUMBER("1.0.0"); SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; SB_INTERFACE_BEGIN; SB_INTERFACE_END; SB_CLASS_END(SEMyApp); ``` #### Type description The class type is added to the class descriptor thanks to the `SB_CLASS_TYPE` macro. The argument of the macro should be one of the possible [class types](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-type). #### Class description The class description is added to the class descriptor thanks to the `SB_CLASS_DESCRIPTION` macro. The argument of the macro should be a short string. #### Class public name The class public name is added to the class descriptor thanks to the `SB_CLASS_PUBLIC_NAME` macro. The argument of the macro should be a short string. It is this name that will be shown in the **Home > Apps** menu and in the search. #### Class GUI UUID The class GUI UUID is added to the class descriptor thanks to the `SB_CLASS_GUI_UUID` macro. The argument of the macro should be a string containing the unique identifier of the App's GUI class (can be found in the App's GUI header). #### Class GUI shortcut The class description is added to the class descriptor thanks to the `SB_CLASS_GUI_SHORTCUT` macro. The argument of the macro should be a short string containing the shortcut with which the app can be invoked. This is optional and the shortcut should be verified if it does not interfere with existing shortcuts in SAMSON. #### Class GUI icon The class GUI icon is added to the class descriptor thanks to the `SB_CLASS_ICON_FILE_NAME` macro. The argument of the macro should be a string containing a path to the app's icon, the same as in the app's GUI. It is this icon that will be shown in the **Home > Apps** menu and in the search. #### Class tooltip The class tooltip is added to the class descriptor thanks to the `SB_CLASS_TOOL_TIP` macro. The argument of the macro should be a string (can contain HTML). It is this tooltip that will be shown in the **Home > Apps** menu and in the search. #### Class version number The class version number is added to the class descriptor thanks to the `SB_CLASS_VERSION_NUMBER` macro. The argument of the macro should be a string corresponding to a three-part version number: "major.minor.patch", which should be increased in particular when [serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) of the class changes. #### Factory description The [class factory](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md), i.e. the collection of [class constructors](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md), is added to the class descriptor between the `SB_FACTORY_BEGIN` and `SB_FACTORY_END` macros: ```cpp SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; ``` Each constructor should be added using one of the seventeen provided macros `SB_CONSTRUCTOR_0`, `SB_CONSTRUCTOR_1`, ... `SB_CONSTRUCTOR_16`, where the integer indicates the number of arguments taken by the constructor, and the argument types are provided as arguments to macros. For example, the following class constructor ```cpp SEMyApp(int i, double d, const SBAtom* atom); ``` may be exposed with the following macro: ```cpp SB_CONSTRUCTOR_3(int, double, const SBAtom*); ``` If multiple constructors are exposed, they are all described in a *unique* pair of enclosing macros `SB_FACTORY_BEGIN` and `SB_FACTORY_END`, e.g.: ```cpp SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_CONSTRUCTOR_1(const std::string&); SB_CONSTRUCTOR_1(int); SB_FACTORY_END; ``` Important Note that one constructor that takes no argument **should always exist and be exposed**, i.e. there should always be constructor exposed via `SB_CONSTRUCTOR_0`. #### Interface description The [class interface](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md), i.e. the collection of [class functions](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md), is added to the class descriptor between the `SB_INTERFACE_BEGIN` and `SB_INTERFACE_END` macros. For example, the member function ```cpp void setName(const std::string&); ``` may be exposed with the following macro inserted between the `SB_INTERFACE_BEGIN` and `SB_INTERFACE_END` macros: ```cpp SB_FUNCTION_1(void, setName, const std::string&); ``` If a function is `const`: ```cpp std::string getName() const; ``` then it may be exposed with a macro for `const` functions: ```cpp SB_CONST_FUNCTION_0(std::string, getName); ``` Finally, if a function is `static`: ```cpp static unsigned int getNumberOfInstances(); ``` then it may be exposed with a macro for `static` functions: ```cpp SB_STATIC_FUNCTION_0(unsigned int, getNumberOfInstances); ``` In general, each function should be added using one of the following provided macros: - `SB_FUNCTION_0`, `SB_FUNCTION_1`, ... `SB_FUNCTION_16` for regular (i.e. non-const, non-static) functions, where the integer indicates the number of arguments taken by the function. - `SB_CONST_FUNCTION_0`, `SB_CONST_FUNCTION_1`, ... `SB_CONST_FUNCTION_16` for `const` functions, where the integer indicates the number of arguments taken by the const function. - `SB_STATIC_FUNCTION_0`, `SB_STATIC_FUNCTION_1`, ... `SB_STATIC_FUNCTION_16` for `static` functions, where the integer indicates the number of arguments taken by the static function. If multiple functions are exposed, they are all described in a *unique* pair of enclosing macros `SB_INTERFACE_BEGIN` and `SB_INTERFACE_END`, e.g.: ```cpp SB_INTERFACE_BEGIN; SB_CONST_FUNCTION_0(std::string, getName); SB_FUNCTION_1(void, setName, const std::string&); SB_CONST_FUNCTION_2(SBQuantity::length, getDistance, const SBAtom*, const SBAtom*); SB_STATIC_FUNCTION_0(int, getNumberOfInstances); SB_INTERFACE_END; ``` Important Note that even when no functions are exposed, the class descriptor **should always contain a class interface**: ```cpp SB_INTERFACE_BEGIN; SB_INTERFACE_END; ``` Note **Virtual functions that are part of the API of SAMSON** (i.e. are **member functions of classes defined in the SAMSON SDK**), and that are reimplemented in derived classes in SAMSON Extensions, **do not have to be exposed**: since the function is defined in the SAMSON SDK, developers may write code that calls the function without relying on the [introspection mechanism](https://documentation.samson-connect.net/developers/latest/introspection/index.md), and the appropriate implementation will be called at runtime. ### Attributes description for the Inspector If your class can be accessed through the [Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) (e.g., if the class represents a new data graph node type), you can expose class functionality using the following macros from the [class interface](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md): - `SB_ATTRIBUTE_READ_ONLY`, `SB_ATTRIBUTE_READ_ONLY_NONCONST` - expose a read-only attribute. - `SB_ATTRIBUTE_READ_WRITE` - expose a changeable attribute. - `SB_ATTRIBUTE_READ_WRITE_RESET` - expose a changeable attribute that can be reset to a default value. - `SB_ATTRIBUTE_READ_WRITE_CLEAR` - expose a changeable attribute that can be cleared. - `SB_ATTRIBUTE_READ_WRITE_CLEAR_ARRAY` - expose a changeable array that can be cleared. - `SB_ATTRIBUTE_READ_WRITE_RANGE`, `SB_ATTRIBUTE_SPIN_BOX` - expose a changeable attribute that has minimum and maximum values defined. - `SB_ATTRIBUTE_READ_WRITE_RESET_RANGE`, `SB_ATTRIBUTE_SPIN_BOX_RESET` - expose a changeable attribute that has minimum and maximum values defined and that can be reset to a default value. - `SB_ATTRIBUTE_READ_WRITE_RANGE_SLIDER`, `SB_ATTRIBUTE_SLIDER` - expose a changeable attribute that has minimum and maximum values defined. - `SB_ATTRIBUTE_READ_WRITE_RESET_RANGE_SLIDER`, `SB_ATTRIBUTE_SLIDER_RESET` - expose a changeable attribute that has minimum and maximum values defined and that can be reset to a default value. - `SB_ATTRIBUTE_READ_WRITE_LIST`, `SB_ATTRIBUTE_COMBO_BOX` - expose a changeable attribute that can be selected from a list. - `SB_ATTRIBUTE_READ_WRITE_RESET_LIST`, `SB_ATTRIBUTE_COMBO_BOX_RESET` - expose a changeable attribute that can be selected from a list and that can be reset to a default value. - `SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_ONLY` - expose a string attribute as rich text. - `SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_WRITE_CLEAR` - expose a changeable string attribute as rich text. - `SB_ATTRIBUTE_PUSH_BUTTON`, `SB_ATTRIBUTE_PUSH_BUTTON_CONST`, `SB_ATTRIBUTE_PUSH_BUTTON_STATIC` - expose calling a function via a button. These macros also expose the functions associated with an attribute, such as getters, setters, and others depending on the macro. Tip If you want to expose more functionality for an attribute (e.g., tooltip, enable flag, visibility flag, single step for ranges, suffix for spin boxes, etc.), you can use `SB_ATTRIBUTE_BEGIN` and `SB_ATTRIBUTE_END` and describe the exposed functionality in more detail. If you want to expose `static` attributes (i.e. attributes exposed via `static` functions), you can do it using the analogs of the above-described macros but with `SB_ATTRIBUTE_*` changed to `SB_STATIC_ATTRIBUTE_*`, e.g.: `SB_STATIC_ATTRIBUTE_BEGIN`, `SB_STATIC_ATTRIBUTE_END`, `SB_STATIC_ATTRIBUTE_READ_ONLY`, `SB_STATIC_ATTRIBUTE_READ_WRITE`, `SB_STATIC_ATTRIBUTE_PUSH_BUTTON`, `SB_STATIC_ATTRIBUTE_SPIN_BOX`, and so on. ## Exposing a SAMSON Extension Once descriptors have been written for all classes that should be exposed, a descriptor may be written for the SAMSON Extension itself. ### Extension descriptor structure A SAMSON Extension descriptor contains five parts: 1. A description. 1. A documentation address. 1. A version number. 1. A list of exposed classes. 1. A list of categories. Again, descriptions are written using macros provided by the SAMSON SDK. Typically, this descriptor is generated by the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) as a source file (`source/SE*Descriptor.cpp`), and it needs to be completed when more classes are added to the SAMSON Extension: ```cpp SB_ELEMENT_DESCRIPTION("This SAMSON Extension contains an App that shakes atoms."); SB_ELEMENT_DOCUMENTATION("Resource/Documentation/doc.html"); SB_ELEMENT_VERSION_NUMBER("1.0.0"); SB_ELEMENT_CLASSES_BEGIN; SB_ELEMENT_CLASS(SEMyApp); SB_ELEMENT_CLASSES_END; SB_ELEMENT_CATEGORIES_BEGIN; SB_ELEMENT_CATEGORY(SBClass::Category::General); SB_ELEMENT_CATEGORIES_END; ``` ### Description The description is added to the SAMSON Extension descriptor thanks to the `SB_ELEMENT_DESCRIPTION` macro. The argument of the macro should be a short string. ### Documentation address The address of the SAMSON Extension documentation is added to the SAMSON Extension descriptor thanks to the `SB_ELEMENT_DOCUMENTATION` macro. The argument of the macro should be a short string containing the address relative to the installation folder of the SAMSON Extension (typically in the [generated](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) `Resource/Documentation/` folder). ### Version number The version number of the SAMSON Extension is added to the SAMSON Extension descriptor thanks to the `SB_ELEMENT_VERSION_NUMBER` macro. The argument of the macro should be a short string containing a [well-formated version number](https://documentation.samson-connect.net/developers/latest/versioning/index.md). Note that the version number of the SAMSON Extension is completely independent of the version number of the SAMSON SDK used to build the SAMSON Extension. Please refer to the chapter about [versioning](https://documentation.samson-connect.net/developers/latest/versioning/index.md) for more information. ### List of exposed classes The list of exposed classes is added to the SAMSON Extension descriptor between the `SB_ELEMENT_CLASSES_BEGIN` and `SB_ELEMENT_CLASSES_END` macros: ```cpp SB_ELEMENT_CLASSES_BEGIN; SB_ELEMENT_CLASS(SEMyApp); SB_ELEMENT_CLASSES_END; ``` Each exposed class (i.e. each class which has a descriptor) should be added using the `SB_ELEMENT_CLASS` macro. If multiple classes are exposed, they are all described in a *unique* pair of enclosing macros `SB_ELEMENT_CLASSES_BEGIN` and `SB_ELEMENT_CLASSES_END`, e.g.: ```cpp SB_ELEMENT_CLASSES_BEGIN; SB_ELEMENT_CLASS(SEMyApp); SB_ELEMENT_CLASS(SEElementMyVisualModel); SB_ELEMENT_CLASS(SEElementMyFirstInteractionModel); SB_ELEMENT_CLASS(SEElementMySecondInteractionModel); SB_ELEMENT_CLASSES_END; ``` ### List of categories The list of SAMSON Extension categories is added to the SAMSON Extension descriptor between the `SB_ELEMENT_CATEGORIES_BEGIN` and `SB_ELEMENT_CATEGORIES_END` macros: ```cpp SB_ELEMENT_CATEGORIES_BEGIN; SB_ELEMENT_CATEGORY(SBClass::Category::General); SB_ELEMENT_CATEGORIES_END; ``` Each category should be added using the `SB_ELEMENT_CATEGORY` macro, which takes as argument a [category](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-category). If the SAMSON Extension should belong to multiple categories, they are all listed in a *unique* pair of enclosing macros `SB_ELEMENT_CATEGORIES_BEGIN` and `SB_ELEMENT_CATEGORIES_END`, e.g.: ```cpp SB_ELEMENT_CATEGORIES_BEGIN; SB_ELEMENT_CATEGORY(SBClass::Category::General); SB_ELEMENT_CATEGORY(SBClass::Category::Medicine); SB_ELEMENT_CATEGORY(SBClass::Category::Biology); SB_ELEMENT_CATEGORIES_END; ``` ## Using exposed classes Once a class is exposed, SAMSON and other SAMSON Extensions may create instances of it and call its member functions. This section explains how. You can use the [Exposed Functionality Viewer](https://www.samson-connect.net/extensions/92c88bef-d33d-3eab-2380-1d4b1788ac1b) directly available in SAMSON (**Home > Apps > Developer > Exposed functionality viewer**) to see classes and functions exposed per extension. You can simply choose the extension, class, and function you are interested in and copy the generated sample code from the **C++ usage** tab - you will only need to provide function arguments, if required. ### Class proxies The functionality of an exposed class is accessible through its [class proxy](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md), which gathers: - the [class factory](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md) (its collection of [constructors](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md)); - the [class interface](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md) (its collection of [member functions](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md)). The [class proxy](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) of an exposed class is retrieved using SAMSON: ```cpp SBProxy* classProxy = SAMSON::getProxy("SEMyApp"); ``` In case there is a risk that several SAMSON Extensions might provide a class called `SEMyApp`, it is possible to specify the name and the [UUID](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) of the SAMSON Extension: ```cpp SBProxy* classProxy = SAMSON::getProxy("SEMyApp", SBUUID("C8EC88EA-38CE-70F4-2A74-C71F2C86A692")); ``` The SAMSON Extension [UUID](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) is guaranteed to be unique if the SAMSON Extension has been installed from [SAMSON Connect](https://www.samson-connect.net/). ### Constructing class instances The creation of a class instance depends on the type of the exposed class. #### Special classes For exposed classes that derive from some classes from the SDK, SAMSON provides convenience factory functions to create instances. The following convenience factory functions are available through the `SAMSON` facade: - `SAMSON::makeController` - creates a controller instance. - `SAMSON::makeInteractionModel` - creates an interaction model instance. - `SAMSON::makeNeighborSearch` - creates a neighbor search instance. - `SAMSON::makeStateUpdater` - creates a state updater instance. - `SAMSON::makeSimulator` - creates a simulator instance. - `SAMSON::makeVisualModel` - creates a visual model instance. - `SAMSON::makePropertyModel` - creates a property model instance. - `SAMSON::makeAnimation` - creates an animation instance. - `SAMSON::makeSelector` - creates a node selector instance. Assume for example a SAMSON Extension provides a [particle interaction model](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelParticleSystem/index.md): ```cpp class MyInteractionModel : public class SBMInteractionModelParticleSystem { MyInteractionModel(SBMDyamicalModelParticleSystem* dynamicalModel); ~MyInteractionModel(); ... virtual void updateInteractions(); ... }; ``` Then, an instance of this class can be created as follows (you can also provide an UUID of the extension with the interaction model class as the third argument if there is a risk that this class name can be exposed by other SAMSON Extensions): ```cpp SBMInteractionModelParticleSystem* interactionModel = SAMSON::makeInteractionModel(dynamicalModel, "MyInteractionModel"); ``` where `dynamicalModel` is the argument that would be passed to the constructor of the interaction model. If only the reimplemented virtual functions of the interaction model should be used (e.g., [updateInteractions](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelParticleSystem/#function-updateinteractions)), then the `interactionModel` pointer is sufficient, even though `interactionModel` is a pointer to a [`SBMInteractionModelParticleSystem`](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelParticleSystem/index.md) and not a pointer to an `MyInteractionModel`. #### General case In case the exposed class does *not* derive from a type for which SAMSON offers convenience functions, such as the `SAMAON::makeInteractionModel` function mentioned in the previous section, a class instance may be directly created from a [class proxy](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md). Assume for example a SAMSON Extension contains the following class: ```cpp class A { SB_CLASS public: A() {} virtual ~A() {} }; SB_REGISTER_TYPE(A, "A", "BF99103E-06FE-C4C1-D929-4C6E833B101C"); ``` as well as the following class descriptor: ```cpp SB_CLASS_BEGIN(A); SB_CLASS_TYPE(SBCClass::App); SB_CLASS_DESCRIPTION("Empty class"); SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; SB_INTERFACE_BEGIN; SB_INTERFACE_END; SB_CLASS_END(A); ``` Then SAMSON may be used to retrieve a [proxy](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) to the class `A`: ```cpp SBProxy* classProxy = SAMSON::getProxy("A"); ``` which may then be used to create an instance of class `A`: ```cpp SBValue classInstance = classProxy->createInstance(); ``` It must be noted that, in this case, the pointer to the object of class `A` return by the [proxy](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) is *held* in a [value holder](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md). Assume a SAMSON Extension called `SEElement` defines a class `A`, and another SAMSON Extension called `SEOtherElement` wants to use it. If the SAMSON Extension called `SEOtherElement` does not have access to the declaration of class `A` (typically provided in a header file included in `SEElement`), it cannot use the symbol `A` in its source code. For example, if the source code of `SEOtherElement` contained the line: ```cpp A* a = new A(); ``` the compiler would complain that the symbol `A` is not defined. In order to provide access to exposed classes, SAMSON uses a mechanism to *hold values* (for example, pointers to objects) in a uniform way. In the example above, the constructor exposed in the SAMSON Extension `SEElement` returns a [value holder](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) that stores a pointer to the new instance of class `A`: ```cpp return new SBValueHolder(new A()); ``` and the SAMSON Extension `SEOtherElement` sees it as an [`SBValue`](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) that stores this [value holder](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) as a pointer to a [`SBCMetaValueBase`](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) (the base class of `SBValueHolder`): ```cpp SBValue classInstance = classProxy->createInstance(); ``` ### Calling non-static functions Assume a SAMSON Extension contains the following class: ```cpp class A { SB_CLASS public: A() {} virtual ~A() {} int multiplyByTwo(int i) { return 2 * i; } }; SB_REGISTER_TYPE(A, "A", "BF99103E-06FE-C4C1-D929-4C6E833B101C"); ``` as well as the following class descriptor: ```cpp SB_CLASS_BEGIN(A); SB_CLASS_TYPE(SBCClass::App); SB_CLASS_DESCRIPTION("Integer multiplier"); SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; SB_INTERFACE_BEGIN; SB_FUNCTION_1(int, multiplyByTwo, int); SB_INTERFACE_END; SB_CLASS_END(A); ``` In this example, the function `multiplyByTwo` may be called by other SAMSON Extensions. Since the function is not static, we must first construct an instance of class `A`: ```cpp SBProxy* classProxy = SAMSON::getProxy("A"); SBValue classInstance = classProxy->createInstance(); ``` We may then call the function: ```cpp SBValue argument = SB_VALUE(17); SBValue resultHolder = classProxy->call( classInstance, "multiplyByTwo", argument); if (SB_CAN_CAST(resultHolder)) { int result = SB_CAST(resultHolder); } ``` Here, we also use api/classSBCMetaValue.md to wrap arguments provided to the called function. In this example, we can unwrap the `int` held in the returned api/classSBCMetaValue.md with `SB_CAST`: ```cpp int result = SB_CAST(resultHolder); ``` because `int` is a standard C++ type that all SAMSON Extensions may use. If the return value of the exposed function is not of a type known by the SAMSON Extension that calls the function, unwrapping is not possible, but the return type's functionality may still be accessible through its [proxy](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md), and the returned [value](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) may still be passed as an argument to other exposed functions. ### Calling static functions If an exposed function is `static`, then no class instance is required, and the first argument (the class instance) passed to the `call` function can be set to `0` or `nullptr`. ### Optimizations When multiple instances of the same class are created, it is more efficient to store a pointer to a [class constructor](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md): ```cpp SBProxy* classProxy = SAMSON::getProxy("A"); SBFactory* classFactory = classProxy->getFactory(); SBConstructor* classConstructor = classFactory->getConstructor(); ``` which we may then use to construct an instance of class `A`: ```cpp SBValue classInstance = classConstructor->createInstance(); ``` Similarly, when multiple calls to the same function are performed, it is more efficient to store a pointer to a [class function](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) and reuse it: ```cpp SBProxy* classProxy = SAMSON::getProxy("A"); SBInterface* classInterface = classProxy->getInterface(); SBFunction* classFunction = classInterface->getFunction( "multiplyByTwo", SB_VALUE(1)); ``` We may then use the exposed function by wrapping arguments and unwrapping results: ```cpp SBValue classInstance = classProxy->createInstance(); SBValue argument = SB_VALUE(17); SBValue resultHolder = classFunction->call(classInstance, argument); if (SB_CAN_CAST(resultHolder)) { int result = SB_CAST(resultHolder); } ``` # Logging Do not rely on `std::cout` for extension diagnostics. In the user version of SAMSON there is no regular developer console, so plain standard output is not a reliable way to surface messages. Instead, SAMSON provides logging macros that attach context such as file, function, line, and extension identity. Tip If your extension, or a library/executable used in it, use `std::cout`, `std::cerr`, `qDebug()`, `qWarning()`, then you or the user can see these messages via the [Log Viewer extension](https://www.samson-connect.net/extensions/554fefc0-cf52-a7ec-bebb-3230c5705739). ## Main logging macros The most common macros are: - `SB_INFORMATION` - `SB_WARNING` - `SB_ERROR` These messages are routed to the console or the log file through SAMSON's logging system. You can see the log via the **Interface > Show log**. ## When to use each level - Use `SB_INFORMATION` for useful runtime information during development or for notable non-problem events. - Use `SB_WARNING` when something unexpected happened but the extension can continue safely. - Use `SB_ERROR` when an operation failed or the state is invalid. Because the log level controls which messages are emitted, information and trace-style output should remain meaningful rather than noisy. ## Why the macros matter The logging macros include location metadata automatically. That makes them much more useful than ad hoc print statements when debugging extension behavior across many source files. They also integrate with SAMSON's own logging manager, so they remain visible in the environments where users and developers actually run the software. ## Example ```cpp if (!resultIsValid) { SB_ERROR("Failed to compute the custom interaction model parameters"); return; } SB_INFORMATION("Custom interaction model initialized"); ``` ## Practical advice - Use logging for diagnostics, not for user-facing workflow messaging. - Keep messages specific enough to identify the failed step. - Prefer one useful error over many repetitive low-signal messages. ## See also - `SB_TRACE` and the timer macros in the logging headers if you need deeper diagnostics or performance timing # Materials In SAMSON, a **material** controls how a [data graph node](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) and its descendants should look when rendered. Use materials when your extension needs to change visual appearance without changing the underlying scientific data. Materials are part of the rendering-side description of an object. ## Key class The main class is [`SBDDataGraphNodeMaterial`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md). Materials can be attached to nodes and inherited by descendants, which makes them a convenient way to apply a consistent visual style to a whole subtree of the data graph. ## Material appearance presets You can use already available material appearance presets or create your own via [`SBDDataGraphNodeMaterialAppearance`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterialAppearance/index.md). ## Materials and color schemes A material is often used together with a [color scheme](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md). The material describes rendering-related appearance, while the color scheme determines how colors are chosen. For example, a color scheme may color atoms: - by residue - by chain - by atom type - by a node property such as temperature factor or velocity This separation is useful because it lets you vary coloring logic without redesigning the rest of the rendering style. ## When to use materials Choose materials when you want to: - override or customize the appearance of a model - propagate a visual style through a node hierarchy - build a visualization mode that should not alter the underlying model state If your extension needs a fundamentally different geometric representation, a [visual model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models) is often the right companion abstraction. ## Example scenario Suppose your extension displays a custom nanostructure and you want to highlight regions by a computed scalar value: - the visual model provides the geometry - the material defines how that geometry is rendered - the color scheme maps the scalar value to colors That split keeps rendering concerns explicit and reusable. ## See also - [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) - [User guide: Color schemes](https://documentation.samson-connect.net/users/latest/colorizing/) - [User guide: Visualizing](https://documentation.samson-connect.net/users/latest/visualizing/) ______________________________________________________________________ ## description: Understand the two memory-management mechanisms used in SAMSON: custom heap allocation and reference-based garbage collection. # Memory management SAMSON exposes two distinct memory-management mechanisms: - **custom heap management** for performance-sensitive allocation patterns - **reference-based garbage collection** through the SAMSON referencing system Most extension developers need to understand the second one first. The custom heap mechanism is useful, but only for specific performance hotspots. ## Custom heap management Use custom heap management when your code allocates and destroys very large numbers of small objects and normal heap traffic becomes a measurable bottleneck. To opt in, add `SB_HEAP` in the class declaration: ```cpp #include "SBCHeap.hpp" class MyClass { SB_HEAP; public: MyClass(); virtual ~MyClass(); }; ``` The class definition must then be accompanied by a custom heap implementation, thanks to the macro `SB_HEAP_IMPLEMENTATION`: ```cpp #include "MyClass.hpp" SB_HEAP_IMPLEMENTATION(MyClass, 4096); ``` The integer argument is the initial number of pre-allocated objects. SAMSON can adapt if more are needed at the same time. `SB_HEAP` redefines `new` and `delete` for that class so the rest of the code can stay unchanged. In practice, only use this after you have evidence that allocation churn matters. It is a performance tool, not the default memory model for everyday extension code. ## Garbage collection SAMSON uses a [custom referencing mechanism](https://documentation.samson-connect.net/developers/latest/referencing/index.md) to track references between objects. This mechanism supports features such as [signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md), but it also gives SAMSON a basic form of garbage collection. The rule is simple: - if an object is a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) - and no [reference owner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) references it anymore - SAMSON deletes it This is why raw `delete` is usually the wrong tool for SAMSON objects such as data graph nodes. Lifetime is controlled by the referencing system, not by ad hoc ownership guesses. ## Practical guidance - Learn [Referencing](https://documentation.samson-connect.net/developers/latest/referencing/index.md) before writing long-lived extension code that stores SAMSON objects. - Reach for `SB_HEAP` only when profiling shows a real allocation bottleneck. - Assume that many important SAMSON objects participate in reference-managed lifetime. For more detail, see [Referencing](https://documentation.samson-connect.net/developers/latest/referencing/index.md). # Node Specification Language The **Node Specification Language** (NSL) is SAMSON's string-based query language for selecting [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) nodes. Use NSL when a selection should be expressible as a compact query string instead of only as C++ code. It is useful in the UI, in scripts, and in extension code that wants to accept or generate human-readable selections. For example, the Find command in SAMSON lets users enter an NSL expression to select nodes. Internally, SAMSON converts an NSL string into a node predicate (`SBNodePredicate`) that can be passed to node-collection functions. NSL can therefore be used in two ways: - directly as a string query - indirectly by compiling the string into a predicate with api/classSAMSON.md#function-makenodepredicate See also See [User guide: Node Specification Language](https://documentation.samson-connect.net/users/latest/nsl/) for more information. ## Mental model NSL is the string representation of the same kind of selection logic you can also express with [functors](https://documentation.samson-connect.net/developers/latest/functors/index.md), getters, and predicates in C++. That makes it useful when: - you want the query to be editable or configurable - you want to expose a selection rule to users - you want to store or transmit a selection expression ## Equivalent C++ predicate logic Under the hood, NSL relates to the same predicate system used in C++: ```cpp // find all atoms with temperature factor > 1.0 SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsType(SBNode::Atom) && (SBAtom::GetTemperatureFactor() > 1.0)); ``` ## Direct use: query with a string You can use an NSL string directly to retrieve nodes: ```cpp // Select all residue nodes from the active document // that are within 4 angstrom of any sulfur atom. // Note: the selection string may be abbreviated to "n.t r w 4A of S" SBNodeIndexer nodeIndexer; SAMSON::getNodes(nodeIndexer, "node.type residue within 4A of S"); ``` ## Indirect use: compile to a predicate You can also convert an NSL string into a reusable predicate. Note that ownership of the returned predicate is passed to the caller, who must delete it after use. ```cpp // Make a predicate that is true if and only if // the node is a hydrogen atom bonded to an oxygen atom. // Note: the selection string may be abbreviated to "H l O" SBNodePredicate* nodePredicate = SAMSON::makeNodePredicate("H linking O"); ``` This route is useful when the query comes from configuration or user input but you want to reuse the predicate more than once. ## When to prefer NSL Prefer NSL when: - the query should be editable by users - the selection should be serializable as text - readability as a declarative query matters more than compile-time composition Prefer direct C++ predicates when: - the selection logic is static and code-local - the query depends on C++ types or logic that does not map naturally to NSL - you want compile-time checking without a string parsing step Please refer to [Getting nodes](https://documentation.samson-connect.net/developers/latest/getting-nodes/index.md) to learn more about using NSL in practical node-collection workflows. See also [Functors](https://documentation.samson-connect.net/developers/latest/functors/index.md) # Referencing SAMSON uses its own referencing system in place of ordinary long-lived C++ pointers for many important runtime objects, especially [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). If you keep persistent references to SAMSON objects, you should almost always use the provided [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) rather than raw pointers. Two properties make [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) central to SAMSON's runtime model: - Collective ownership: all [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that have a reference to a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) collectively own the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). When the last reference to the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) disappears, the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted. - Backward referencing: all [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that have a reference to a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) are back-referenced by the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). When the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted, all referencing [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) stop referencing the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). ## Read this first Read this page before you: - store nodes or other SAMSON objects beyond a local expression - connect signals and slots between long-lived objects - write code that creates and later deletes data graph nodes The practical rules are: 1. treat long-lived SAMSON objects as reference-managed 1. use `SBPointer`, `SBPointerIndexer`, or `SBPointerList` depending on the shape of ownership you need 1. do not use raw `delete` on reference targets If you remember only one thing from this page, remember this: **persistent raw pointers to reference targets are a bug waiting to happen**. ## Definitions The following two definitions are used: 1. A [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is an object that can be referenced (pointed to) by another object. 1. A [reference owner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) is an object that can reference (point to) another object. ## Reference targets [Reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) are objects of classes that derive from the [`SBCReferenceTarget`](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) class. Reference targets maintain a list of [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that reference them. In SAMSON, many classes are [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). In particular, all [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) are [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). ## Reference owners In SAMSON, three types of [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) are defined: - [SAMSON pointers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md): [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that may reference a single [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) - [SAMSON pointer indexers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md): [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that may index a collection of [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) - [SAMSON pointer lists](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md): [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that may store a list of [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) ### SAMSON Pointers [SAMSON pointers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) replace C++ pointers when referencing SAMSON objects that are [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) (i.e. derive, directly or indirectly, from [`SBCReferenceTarget`](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md)). ### SAMSON Pointer indexes [SAMSON pointer indexers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) are [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that may index a collection of [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) in the same way that [`SBCContainerIndexer`](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) may be used to index collections of values. Indexing is particularly useful when [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) must be associated with a collection of data. Assume, for example, that a selection of atoms should be stored by a SAMSON Extension, and that an array of `SBPosition3` should be managed to store, for example, atom positions. The atoms may have been extracted from the current selection: ```cpp SBPointer document = SAMSON::getActiveDocument(); const SBPointerIndexer* selection = document->getSelectedNodes(); SBNodeIndexer atomIndexer; SB_FOR(SBNode* node, *selection) node->getNodes(atomIndexer, SBNode::Atom); SBPosition3* positionArray = new SBPosition3[atomIndexer.size()]; ``` In order to keep persistent references to the atoms and benefit from the properties of [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md), pointers may be stored in a [SAMSON pointer indexer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md): ```cpp SBPointerIndexer atomPointerIndexer; // typically in a header file for (unsigned int i = 0; i < atomIndexer.size(); ++i) { atomPointerIndexer.addReferenceTarget(atomIndexer[i]); positionArray[i] = static_cast(atomIndexer[i])->getPosition(); } ``` The `atomPointerIndexer` indexer maps the `n` atoms to integers `0, 1, ..., n-1`. It may be used to go from indices to atoms: ```cpp SBAtom* atom = atomPointerIndexer.getReferenceTarget(17); // atom with index 17 ``` and to retrieve the unique index that `atomPointerIndexer` associates to an atom: ```cpp unsigned int index = atomPointerIndexer.getIndex(atom); // index = 17 ``` The mapping from [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) to `unsigned int`s permitted by [SAMSON pointer indexers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) is particularly useful to manage data associated with [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). Assume a [structural event](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelEvent/index.md) signals that an atom position changed. The [SAMSON pointer indexer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) may be used to retrieve which element of the `positionArray` array should be updated: ```cpp if (event->getType() == SBStructuralEvent::ParticlePositionChanged) { // get the atom address SBAtom* atom = static_cast(event->getNode()); // make sure the atom is indexed // and save its position should it be the cases unsigned int index; if (atomPointerIndexer.getIndex(atom, index)) positionArray[index] = atom->getPosition(); } ``` ### SAMSON Pointer lists [SAMSON pointer lists](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md) are [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that may list a collection of [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) in the same way that [`SBCContainerList`](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) may be used to index lists of values. When a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted, all links of the [SAMSON pointer list](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md) that reference the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) are automatically removed from the list. ## Properties of reference owners As noted in the introduction, [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) have two main properties: - they collectively own the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) they reference - they are notified when a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) they reference is deleted ### Collective ownership [Reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) collectively *own* the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) they point to: when the last [reference owner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) stops referencing the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md), the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted. Assume for example an [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is pointed to by two [SAMSON pointers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md): ```cpp SBPointer atomPointer1 = new SBAtom(); SBPointer atomPointer2 = atomPointer1; ``` If the first pointer becomes `nullptr`: ```cpp atomPointer1 = nullptr; ``` the [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is still pointed to by the second pointer, and nothing happens. However, as soon as the second pointer stops referencing the [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md): ```cpp atomPointer2 = nullptr; ``` the [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is deleted. Note that this is a general mechanism: ownership is shared by all [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that reference a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). For example, if an [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is pointed to by a [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md), a [SAMSON pointer indexer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) and a [SAMSON pointer list](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md): ```cpp SBPointer atomPointer = new SBAtom(); SBPointerIndexer atomPointerIndexer; atomPointerIndexer.addReferenceTarget(atomPointer()); SBPointerList atomList; atomList.addReferenceTarget(atomPointer()); ``` then the following instructions lead to the atom being deleted: ```cpp atomPointerIndexer.removeReferenceTarget(atomPointer()); atomList.removeReferenceTarget(atomPointer()); atomPointer = nullptr; // the atom is deleted, since it is not referenced anymore ``` Note that a [reference owner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) stops referencing when it becomes destructed. Assume for example that a reference to an [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is made on the stack (for example through a [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) declared in a local scope), although the [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is created on the heap: ```cpp void garbageCollectionExample() { SBPointer atom = new SBAtom(SBElement::Carbon); } ``` When the function `garbageCollectionExample` terminates, the [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) `atom` is destroyed. As a result, it stops referencing the atom object (the instance of the [`SBAtom`](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) class). Since this reference was the only one, the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) (the atom object) is deleted. ### Notification of reference target destructions [Reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) are notified when a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) they reference is deleted. For example, if a [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) stores the address of an [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md): ```cpp SBPointer atomPointer = new SBAtom(); ``` and the atom is deleted at some point, then `atomPointer` will become invalid (i.e. `atomPointer.isValid()` will return `false`). In effect, the [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) will behave like a `nullptr`. For example, a comparison to `nullptr` (`atomPointer == nullptr`) will return `true`. More generally, when a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted, all [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that reference the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) are notified: - [SAMSON pointers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) that were referencing the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) become invalid. - [SAMSON pointer indexers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) that were referencing the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) stop indexing it. - [SAMSON pointer lists](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md) that contained references to the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) lose these references (i.e. the references are erased from the lists). Notifying [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted has a linear complexity in the number of [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md), and does not depend on the number of other [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) the [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) may point to. ## When should reference owners be used? [Reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) should be used when a reference to a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) should *persist*, and there is a risk that the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) may be deleted by another [reference owner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md). The need for [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) may depend on the type of SAMSON class being implemented. For example, an [importer](https://documentation.samson-connect.net/developers/latest/api/classSBIFileImporter/index.md) typically does not need to store references to the [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) it adds to the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). However, an app may need to store references to the [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) it works with, in case the user or other SAMSON Extensions may delete them. ## Using reference owners ### Referencing a reference target Referencing a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) depends on the type of [reference owner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) being used. - [SAMSON pointers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) work as C++ pointers: ```cpp SBPointer atom = new SBAtom(SBElement::Carbon); ``` - [SAMSON pointer indexers](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) work similarly to [indexers](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md): ```cpp SBPointerIndexer atomPointerIndexer; atomPointerIndexer.addReferenceTarget(new SBAtom(SBElement::Hydrogen)); atomPointerIndexer.addReferenceTarget(new SBAtom(SBElement::Hydrogen)); atomPointerIndexer.addReferenceTarget(new SBAtom(SBElement::Oxygen)); atomPointerIndexer.addReferenceTarget(new SBAtom(SBElement::Carbon)); atomPointerIndexer.addReferenceTarget(new SBAtom(SBElement::Carbon)); ``` - [SAMSON pointer lists](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md) work similarly to [lists](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md): ```cpp SBPointerList atomList; atomList.addReferenceTarget(new SBAtom(SBElement::Hydrogen)); atomList.addReferenceTarget(new SBAtom(SBElement::Hydrogen)); atomList.addReferenceTarget(new SBAtom(SBElement::Oxygen)); atomList.addReferenceTarget(new SBAtom(SBElement::Carbon)); atomList.addReferenceTarget(new SBAtom(SBElement::Carbon)); ``` ### Deleting a reference target To delete a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md), the [deleteReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-deletereferencetarget) function should be used. In particular, the C++ `delete` operator should **not** be used. In SAMSON, [reference targets](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) store a list of [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) that reference them. When a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted, all [reference owners](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) are notified and their reference to the [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is removed. Assume for example that an atom is pointed to by two SAMSON pointers: ```cpp SBPointer atom1 = new SBAtom(SBElement::Carbon); SBPointer atom2 = atom1; ``` Then, if the atom is deleted through e.g. `atom1`: ```cpp atom1.deleteReferenceTarget(); ``` then `atom2` is warned and stops referencing the deleted object. In many cases, however, it may be unnecessary to explicitly delete a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md), since SAMSON performs a basic form of garbage collection. If, for example, an [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is constructed and referenced by a single [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) in a given scope, then the [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is automatically deleted when the [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) goes out of scope because that [SAMSON pointer](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) was the only [reference owner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) holding a reference to the [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md): ```cpp { SBPointer atom = new SBAtom(SBElement::Carbon); } // here, the atom is automatically deleted ``` # Rendering SAMSON uses an internal OpenGL renderer to display the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). As an extension developer, you usually interact with the renderer by implementing `display`-style functions in your classes. The most common case is a [visual model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models) derived from [`SBMVisualModel`](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModel/index.md), but editors and other node types may also contribute to what appears in the viewport. If your geometry should be selectable, you also need to think about selection rendering, not just visual rendering. ## The practical responsibilities of an extension When you add custom rendered content, there are usually three questions to answer: - how should it look in the main viewport - how should it behave during picking and selection - does it need 2D editor overlays or helper visuals Those map to different rendering stages and functions in SAMSON. See See [User guide: Rendering effects](https://documentation.samson-connect.net/users/latest/rendering-effects/) and [User guide: Visualizing](https://documentation.samson-connect.net/users/latest/visualizing/) for more information on SAMSON's rendering possibilities and settings. ## The rendering pipeline SAMSON renders each frame using the following pipeline: - **Shadow computations**: the data graph and active editor are rendered for shadow generation. - **Data graph rendering**: the document content is rendered. Only [structural models](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#structural-models) have a default visual representation. For many other node types, SAMSON calls the nodes' `display` functions. - **Editor rendering**: the [active editor](https://documentation.samson-connect.net/developers/latest/editors/index.md) can draw temporary 3D helper geometry used during interaction. - **Frame post-processing**: effects such as shadows, fog, and highlighting are applied. - **Editor interface rendering**: the active editor can draw a 2D overlay interface. This separation is important because not all visuals belong in the same stage. A persistent representation belongs in a model `display` function; a temporary interaction aid often belongs in an editor `display` or `displayInterface`. ## Shadows SAMSON uses shadow maps to implement shadows. During the Shadow computations step, the data graph is rendered from the point of view of the first light, to generate a depth map that is used during the post-processing step to determine whether a pixel should be shadowed or not. If you want your nodes to display shadow, then implement for the relevant node type in the `display` function a part for the `SBNode::RenderingPass::ShadowingGeometry` rendering type. ## Display utility functions SAMSON uses, and expects extensions to use, *core-profile* OpenGL functionality. Legacy calls such as `glBegin` and `glEnd` are not supported in extension rendering code. Because raw core-profile OpenGL can be cumbersome, SAMSON provides utility functions for common batched drawing tasks. These are especially helpful when implementing `display` functions for [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). For example, api/classSAMSON.md#function-displaytriangles can be used to draw triangles in a viewport. These helpers are also important for selection rendering because the picking pipeline needs a selectable representation, not just a visually pleasing one. ## Selection rendering The renderer is also used for picking. If you add custom selectable geometry to the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), implement for the relevant node type in the `display` function a part for the `SBNode::RenderingPass::SelectableGeometry` rendering type. That function should render the selectable representation in a way that matches how users expect picking to work. ## Practical guidance - Put persistent scene representation in model or node `display` functions. - Put temporary interaction visuals in editor rendering functions. - Implement selection rendering explicitly when your custom geometry must be pickable. - Use SAMSON display utilities instead of unsupported legacy OpenGL patterns. Please refer to the documentation of the SAMSON interface for information about each display function. # Serialization Serialization is the mechanism SAMSON uses to turn runtime objects into stored data and back again. In practice, serialization is what makes copying, pasting, saving, and loading work. If your extension defines custom [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) nodes with persistent state or references, you need to understand how to serialize them correctly. ## Read this first Read this page when: - your extension defines custom serializable data graph nodes - you added new persistent state to an existing node class - copy/paste or document save/load behaves incorrectly For a first implementation, the safe recipe is: 1. make the node report `isSerializable() == true` 1. call the base-class `serialize` and `unserialize` first 1. read and write fields in the exact same order 1. handle referenced nodes carefully, using node indices when possible The most common bugs are: - forgetting the base-class serialization call - changing write order without matching read order - mishandling referenced nodes during copy versus full-document save - assuming a referenced node was serialized when it was not ## Overview All [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) defined by the SAMSON API implement a [serialize](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) and an [unserialize](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) function. Serialization is performed through a [serializer class](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) passed to the `serialize` and `unserialize` functions. ## Writing serialization and unserialization functions If your extension introduces new classes derived from [data graph node](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) types, such as [visual models](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModel/index.md), [interaction models](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModel/index.md), [property models](https://documentation.samson-connect.net/developers/latest/api/classSBMPropertyModel/index.md), [controllers](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md), [labels](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentLabel/index.md), or [state updaters](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdater/index.md), you may need to reimplement `serialize`, `unserialize`, and `isSerializable`. In the re-implementation of the [serialize](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) function, it is necessary to call the [serialize](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) function of a parent class first, which in turn calls the [serialize](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) function of its parents, and so on all the way up to [`SBNode`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) itself. The parent functions are needed for correct saving and loading of node properties. This makes it possible to save the node's name, visibility flag, etc. The same applies to the [unserialize](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) function. When SAMSON serializes a group of [nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), it proceeds in two passes: 1. First, all nodes that are to be serialized are added to a [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md). This way, each node that's about to be serialized has an index. It's those indices that are used to indicate which nodes are referenced by other nodes. 1. Then, the `serialize` function of each node is called. This function receives the [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md). During unserialization, SAMSON also proceeds in two steps: 1. First, it creates all required nodes and indexes them in a [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md), in the same order as during serialization. 1. Then, the `unserialize` function of each node is called. This function receives the [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md). Note Saving of the [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) leads to the serialization of every node that can be serialized, while copying leads to the serialization only of copied nodes. Thus, while serializing, it is necessary to check whether the referenced node is present in the [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md). If a node that is referenced by a serialized node is also serialized then during the serialization it is necessary to indicate the index in the [node indexer](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) of the referenced node, else it is necessary to indicate an address of the referenced node. Please see the section and example below for more information. ## Basic rules of serialization - Unserialization should be done in the same order as serialization and for the same number of parameters. - When you serialize a class and its base class is serializable, you should call the serialization function of the base class first. The same for unserialization. - If a node referenced by the serialized node is also to be serialized (e.g. it is a case when saving a [document](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md)), then serialize the referenced node's index in the `nodeIndexer` (see the [serialize](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) function definition). If a node referenced by the serialized node is not to be serialized (e.g. it is a case when copying a node), then serialize the reference node's address. And serialize a boolean flag for each referenced node indicating whether it was serialized via its index or address. ## Example Let's consider how to serialize a custom class derived from [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) types on an example of a custom [visual model](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/#visual-models) which references [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). First, it is necessary to indicate to SAMSON that the custom visual model is serializable. For that, we re-implement the [isSerializable](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable) function to return `true`: ```cpp bool SECustomVisualModel::isSerializable() const { return true; } ``` Now, we need to re-implement both `serialize` and `unserialize` functions. The `serialize` function allows for serialization of a node (a visual model in this case). ```cpp void SECustomVisualModel::serialize(SBCSerializer* serializer, const SBNodeIndexer& nodeIndexer, const SBVersionNumber& sdkVersionNumber, const SBVersionNumber& classVersionNumber) const { // Serialization of the parent class SBMVisualModel::serialize(serializer, nodeIndexer, sdkVersionNumber, classVersionNumber); // Write visual model parameters serializer->writeFloatElement("visualModelParameter1", visualModelParameter1); serializer->writeIntElement("visualModelParameter2", visualModelParameter2); // ... // Write the number of atoms to which the visual model is applied serializer->writeUnsignedIntElement("numberOfAtoms", atomIndexer.size()); unsigned int atomIndex = 0; // the index of the atom in the indexer // Write indices of the atoms to which this visual model is applied SB_FOR(SBPointer atom, atomIndexer) { if (nodeIndexer.getIndex(atom(), atomIndex)) { // the atom is indexed serializer->writeBoolElement("atomIsIndexed", true); serializer->writeUnsignedIntElement("atomIndex", atomIndex); } else { // the atom is not indexed, // the user must be copying just the visual model // so we serialize the atom address itself serializer->writeBoolElement("atomIsIndexed", false); serializer->writeUnsignedLongLongElement("atomIndex", (unsigned long long)atom()); } } } ``` First we invoke the serialization function of the parent class. Then we save information on a custom node itself: custom node's parameters, number of nodes which are referenced by the custom node (e.g. nodes to which the visual model is applied), and the indices of these nodes in the `nodeIndexer` or their addresses. We check whether the atom itself was serialized or not. Basically, saving leads to the serialization of every node that can be serialized, while copying leads to the serialization only of nodes which are being copied. If atom was serialized we save its index in the `nodeIndexer`, else we save the atom's address. The `unserialize` function allows for unserialization of a node (a visual model in this case). ```cpp void SECustomVisualModel::unserialize(SBCSerializer* serializer, const SBNodeIndexer& nodeIndexer, const SBVersionNumber& sdkVersionNumber, const SBVersionNumber& classVersionNumber) { // Unserialization of the parent class SBMVisualModel::unserialize(serializer, nodeIndexer, sdkVersionNumber, classVersionNumber); // Read visual model parameters visualModelParameter1 = serializer->readFloatElement(); visualModelParameter2 = serializer->readIntElement(); // ... // Read the number of atoms to which this visual model is applied unsigned int numberOfAtoms = serializer->readUnsignedIntElement(); unsigned int atomIndex = 0; // the index of the atom in the indexer // Read indices of the atoms to which this visual model is applied and // add these node into the atom indexer of the visual model for (unsigned int i = 0; i < numberOfAtoms; ++i) { atomIsIndexed = serializer->readBoolElement(); if (atomIsIndexed) { // the atom was serialized too atomIndex = serializer->readUnsignedIntElement(); atomIndexer.addReferenceTarget(nodeIndexer[atomIndex]); } else { // the atom was not serialized, it must still exist in memory atomIndexer.addReferenceTarget( (SBAtom*)serializer->readUnsignedLongLongElement()); } } } ``` First, we invoke the unserialization function of the parent class. This will create the node in the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md). Then we read information on a custom node itself: custom node's parameters, number of nodes referenced by the custom node (e.g. nodes to which the visual model is applied), and the indices of these nodes in the `nodeIndexer` or their addresses. We check whether the referenced node itself was serialized or not. If the referenced node was serialized we read its index in the `nodeIndexer`, else we read the referenced node's address. # Signals and slots SAMSON provides a signals and slots mechanism that extensions can use to react to changes incrementally instead of recomputing everything from scratch. This is especially useful for adaptive workflows: tools that must respond when nodes move, models change, simulations advance, or document content is added and removed. ## Introduction ### Definitions We use the following definitions: - A signal is an object that emits events - An event is an object that is emitted by a signal - A slot is a function that receives an event emitted by a signal ## When to use signals and slots Use this mechanism when your extension needs to stay synchronized with changing state over time. Typical examples: - an app that monitors a selection or a set of atoms - an interaction model that updates incrementally - a visualization that reacts when an underlying model changes - a controller that needs to respond to other document events ### Example Assume an [app](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) implements an adaptive algorithm that needs to be notified when some [atoms](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) changes their positions. An [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is a [structural node](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNode/index.md), and the position is a property of this [structural node](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNode/index.md). A position change is thus a [structural event](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelEvent/index.md), and the app will implement a slot that receives a [structural event](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelEvent/index.md): ```cpp void SEMyElementApp::onStructuralEvent(SBStructuralEvent* event) { if (event->getType() == SBStructuralEvent::ParticlePositionChanged) { // get the atom which sent the event SBAtom* atom = static_cast(event->getNode()); // do something ... } } ``` and connect this slot to the structural signal of some [atoms](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md): ```cpp atom->connectStructuralSignalToSlot( this, // the pointer to the app SB_SLOT(&SEMyElementApp::onStructuralEvent) // the slot ); ``` Whenever an atom position changes, the slot will be called immediately. When the app does not need to be notified anymore, it can disconnect atoms: ```cpp atom->disconnectStructuralSignalFromSlot( this, // the pointer to the app SB_SLOT(&SEMyElementApp::onStructuralEvent) // the slot ); ``` The important pattern is: 1. identify the object that emits the relevant event 1. implement a slot on a receiving object 1. connect the signal only while you need it 1. disconnect it when the relationship is no longer needed ## Types of events SAMSON's [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) may send the following types of events: 1. [Base events](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md): events sent by [data graph nodes](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) about their base properties (e.g. their [selection flag](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag)). 1. [Document events](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentEvent/index.md): events sent by [documents](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) and [folders](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentFolder/index.md). 1. [Structural events](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelEvent/index.md): events sent by [structural models](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) and [structural nodes](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNode/index.md). 1. [Visual events](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModelEvent/index.md): events sent by [visual models](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModel/index.md). 1. [Dynamical events](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelEvent/index.md): events sent by [dynamical models](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModel/index.md). 1. [Interaction events](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelEvent/index.md): events sent by [interaction models](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModel/index.md). 1. [Property events](https://documentation.samson-connect.net/developers/latest/api/classSBMPropertyModelEvent/index.md): events sent by [property models](https://documentation.samson-connect.net/developers/latest/api/classSBMPropertyModel/index.md). 1. [Simulator events](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulatorEvent/index.md): events sent by [simulators](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulator/index.md). 1. [State updater events](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdaterEvent/index.md): events sent by [state updaters](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdater/index.md). 1. [Controller events](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/index.md): events sent by [controllers](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md). In general, events report changes in properties of the sending object or container. For example, when the position of an [atom](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) changes, that atom emits the corresponding [structural event](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelEvent/index.md). The event family is determined by the class that owns the changed property. For example: - an atom position change is a **structural event** - adding a structural model to a document is a **document event** ## Important constraint A class must be a [reference target](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) to receive signals. As a result, slots are typically implemented on non-GUI classes such as [`SBDApp`](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md), which indirectly derive from [`SBCReferenceTarget`](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). This is one reason why reactive logic often belongs in data-side classes rather than directly in widget classes. Please refer to [Referencing](https://documentation.samson-connect.net/developers/latest/referencing/index.md) for the lifetime and ownership model that makes this mechanism work. # Undo and redo Most SAMSON SDK operations that modify the [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) can participate in the undo/redo system. As a developer, the main question is not whether undo exists, but how to group your own changes into meaningful user-level actions. The SAMSON API uses the concept of a **holding** for that purpose. If a function is undoable, its API documentation explicitly says so. ## Basic pattern Wrap related modifications between `SAMSON::beginHolding(...)` and `SAMSON::endHolding()`. Example: ```cpp SBCamera* camera = SAMSON::getActiveCamera(); // get the active camera SAMSON::beginHolding("Change camera name"); // turn the Undo system on camera->setName("New camera name"); // change the camera name SAMSON::endHolding(); // turn the Undo system off SAMSON::undo(); // undo the name change ``` In that example, the camera rename becomes one undoable action named `Change camera name`. ## Mental model Think of a holding as an undo transaction: - changes inside one holding are grouped together - the group appears as one step in the user's history - `undo()` and `redo()` replay or revert the grouped action That means you should group operations according to user intent, not according to low-level implementation details. ## When to start a holding Start a holding when your extension is about to perform a coherent state change such as: - creating a new object - deleting or replacing nodes - applying a transform to a selection - changing several related properties as one command If a user presses one button and your code updates ten nodes, that usually belongs in one holding. ## Common pitfalls - Do not forget to call `SAMSON::endHolding()` after `beginHolding(...)`. - Do not create overly granular undo steps for a single user command. - Do not wrap internal temporary state changes in separate holdings unless the user should actually see them in history. For advanced cases, SAMSON also provides functions such as [`SAMSON::disableHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-disableholding) and [`SAMSON::enableHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-enableholding) to control holding behavior. ## Practical example Suppose an app creates a custom node, assigns several properties, and attaches a visual model. From the user's perspective, that is one action: "Create custom object". Even if several SDK calls are involved, they should usually be grouped in one holding so a single `undo()` removes the full result. Tip See the [User guide: History](https://documentation.samson-connect.net/users/latest/history/) for the user's representation of the undo and redo mechanism. See also [`SAMSON::isHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-isholding), [`SAMSON::beginHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-beginholding), [`SAMSON::disableHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-disableholding), [`SAMSON::enableHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-enableholding), [`SAMSON::endHolding`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-endholding), [`SAMSON::undo`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-undo), [`SAMSON::redo`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-redo), [`SAMSON::isUndoing`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-isundoing), [`SAMSON::isRedoing`](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/#function-isredoing) # Units In SAMSON, physical quantities are **strongly typed**. That means values such as length, energy, force, or time are not represented as anonymous `double`s by default. They carry unit information in their type, which lets the compiler catch many dimensional mistakes before the code runs. For extension development, this is one of the most important habits to adopt early: if you are writing new SAMSON-facing code, prefer quantity types over raw floating-point values whenever the value has physical meaning. In order to use units types, the `SBQuantity.hpp` header should be included: ```cpp #include "SBQuantity.hpp" ``` but this file is often indirectly included *via* other files (e.g. `"SBAtom.hpp"`, etc.). Thanks to *metaprogramming techniques*, conversions and checks are performed at compile time, and have no runtime impact on performance. ## Read this first Read this page when: - you are writing new scientific code in a SAMSON extension - you are integrating third-party code that currently uses raw numeric values - you need to define a new derived unit or unit system For a first implementation, focus on: 1. [Basic usage](#basic-usage) 1. [Conversions](#conversions) 1. [Operations](#operations) 1. [Making new units](#making-new-units), only if predefined units are not enough The safest rule is simple: use explicit quantities at your API boundaries, even if you temporarily convert to plain numeric values inside adapted third-party code. ## Definitions The following definitions are used in SAMSON: - A **base unit** is used to measure one type of *physical quantities* (e.g. `meter` is a base unit for measuring length). - A **system of units** is a *set of base units used together*. For example, there are seven base units in the International System of Units (SI): meter (length), kilogram (mass), second (time), ampere (current), kelvin (temperature), mole (amount of substance) and candela (luminous intensity). - A **scaled base unit** is a *multiple of a base unit* (a power of ten). For example, `nanometer` is a scaled version of `meter`. - The **scale** of a scaled base unit is the corresponding power of ten, e.g. the scale of `nanometer` is `-9`, relative to the `meter`. - An **exponentiated unit** is a *power of a unit*, such as `nanometer^2`. - The **exponent** of an exponentiated unit is the corresponding exponent, e.g. the exponent of `nanometer^2` is `2`. - **Derived units** are *products of exponentiated units*. For instance, `newton` is defined as `kg.m.s^-2`, while `nanonewton` is defined in SAMSON as `yg.pm.fs^-2` (`yoctogram.picometer.femtosecond^-2`), for reasons detailed below. SAMSON uses scales to avoid loss of precision when dealing with typical quantities encountered in nanosciences. For example, internally, `nanometer` is an instance of a template type parameterized by the scale `-9`, which stores a value (as a `double`) in nanometers. Internally, SAMSON uses the international system of units (SI), but is able to perform conversion to and from other units (e.g. convert kilocalories per mole to zeptojoules). ## Basic usage ### Declaration and definition Quantities are declared in typical C++ fashion, for example using types defined in the SAMSON SDK: ```cpp SBQuantity::angstrom l; // l is a length expressed in angstroms SBQuantity::zeptojoule e; // e is an energy expressed in zeptojoules SBQuantity::dimensionless d; // d is a dimensionless quantity ``` SAMSON has default type definitions (*via* typedefs) for common dimensions. For example, the following two statements are equivalent: ```cpp SBQuantity::zeptojoule e1(10); // e1 is equal to 10 zeptojoules SBQuantity::energy e2(10); // e2 is equal to 10 zeptojoules ``` Please refer to [this section](#list-of-default-types) for the list of default types. There is no implicit conversion from C++ types (e.g. `double`) to SAMSON quantities, to help developers avoid mistakes: ```cpp SBQuantity::angstrom d1 = 10; // error, does not compile SBQuantity::angstrom d2(10); // OK, d2 is equal to 10 angstroms SBQuantity::angstrom d3 = SBQuantity::nm(1); // OK, d3 is equal to 10 angstroms ``` ### Conversions SAMSON automatically converts between compatible units in the same system, or between different systems when conversions have been defined: ```cpp SBQuantity::angstrom d = SBQuantity::nm(1); // d = 10 angstroms SBQuantity::zJ e = SBQuantity::kcalPerMol(1); // e = 6.94769(...) zeptojoules ``` When units are incompatible, an error is detected at compilation time. This *automatic dimensional analysis* helps developers manipulate physical quantities correctly: ```cpp SBQuantity::angstrom d = SBQuantity::nm(1); // d = 10 angstroms SBQuantity::force f = SBQuantity::nanonewton(1); // f = 1 nanonewton SBQuantity::energy w1 = f/d; // error, does not compile SBQuantity::energy w2 = f*d; // OK, w2 = 1000 zeptojoules ``` ### Operations Typical operations are possible through overloaded operators: ```cpp SBQuantity::mass m=SBQuantity::yg(1); // m = 1 yoctogram SBQuantity::velocity v=SBQuantity::pmPerFs(1); // v = 1 pm per femtosecond SBQuantity::energy k = 0.5*m*v*v; // k = 0.5 zeptojoules ``` Note that **operations are only defined for units that belong to the same system** (SI, atomic units, etc.), so that conversions have to be performed before applying operations between quantities expressed in different systems: ```cpp SBQuantity::kcalPerMol e(1); // e = 1 kilocalorie per mole SBQuantity::pm l(1); // l = 1 picometer SBQuantity::nanonewton f1 = e/l; // error, incompatible systems SBQuantity::nanonewton f2 = (SBQuantity::J)e/l; // OK, e is converted to SI ``` ### Mathematical functions For convenience, many usual mathematical functions have been overloaded for quantities, e.g.: ```cpp SBQuantity::energy a(-1.0); // a = -1 zeptojoule SBQuantity::energy b = abs(a); // b = 1 zeptojoule SBQuantity::dimensionless x(-2.0); // x = -2 SBQuantity::dimensionless y = exp(x); // OK, x is dimensionless SBQuantity::area d(9); // d = 9 picometer^2 SBQuantity::length e = sqrt(d); // e = 3 picometers ``` Note that some functions only compile for dimensionless quantities (e.g. `exp`, `log`, `cos`, `sin`, etc.). All overloaded functions have the same syntax as their regular C++ counterpart, except for `pow` and `root`, which use a template syntax: ```cpp SBQuantity::length a(2.0); // a = 2 picometers SBQuantity::squareLength b = pow<2>(a); // b = 4 picometer^2 SBQuantity::length c = root<2>(b); // c = 2 picometers ``` ### Making new units Numerous units have been predefined in SAMSON (see the documentation of SBDQuantity). However, when a new type is required, templates may be used to form it through inversions ([`SBDQuantityInverse`](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityInverse/index.md)), products ([`SBDQuantityProduct2`](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityProduct2/index.md), etc.), divisions ([`SBDQuantityDivision`](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityDivision/index.md)), powers ([`SBDQuantityPower`](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityPower/index.md)), and roots ([`SBDQuantityRoot`](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityRoot/index.md)): ```cpp // a is expressed in inverse moles SBQuantityInverse::Type a; // b is expressed in moles.seconds SBQuantityProduct2::Type b; // c is expressed in grams per mole SBQuantityProduct2::Type> >::Type c; // d is expressed in grams per mole SBQuantityDivision::Type d; // e is expressed in picometer^6 SBQuantityPower<6, SBQuantity::picometer>::Type e; // f is expressed in angstroms SBQuantityRoot<3, SBQuantity::cubicAngstrom>::Type f; ``` For convenience, templates have been defined for products of up to seven units (`SBQuantityProduct2`, ..., `SBQuantityProduct7`), e.g.: ```cpp // a is expressed in moles.seconds.grams SBQuantityProduct3< SBQuantity::mole, SBQuantity::second, SBQuantity::gram>::Type a; ``` Of course, typedefs may be used to help declare variables: ```cpp // gramPerMole is a new unit typedef SBQuantityProduct2< SBQuantity::gram, SBQuantityInverse::Type> >::Type gramPerMole; gramPerMole a; // a is expressed in grams per mole ``` Note that products and divisions have the following limitation: they must involve units within the same systems and, if two unit types have non-zero exponents for a given base unit, then the associated scales must be the same. It is thus acceptable to declare: ```cpp // f is in force units SBQuantityDivision::Type f; ``` since both `SBQuantity::energy` and `SBQuantity::length` involve picometers (scale -12), but the following is incorrect: ```cpp // this is incorrect SBQuantityDivision::Type f; ``` since the calculation involves two different scales: picometers in the energy (scale -12), and angstroms (scale -10). ## Defined systems ### SI units (International System of Units) The standard SI units. ### Non-SI unit systems - Atomic units (AU) - Dalton - Electronvolt - KilocaloriePerMole It will often be useful to make new units based on existing units. For example, assume you want to define. ## Defining new systems When integrating existing code as SAMSON Extensions you can define your own unit systems and units. ## List of default types SAMSON has a list of default types, for common dimensions. For example, instead of declaring a length as follows: ```cpp SBQuantity::nanometer l1; // l1 is a length ``` it might be preferable to write: ```cpp SBQuantity::length l2; // l2 is a length ``` These dimensions are typedefs for units that are natural in nanoscience, when expressed in the international system of units. For example, `length` is a typedef for `picometer`, so that, in the example above, `l1` and `l2` have *different types* (but conversions are possible). As a result, when *defining* a variable (*i.e.* when assigning a value to it), it is strongly encouraged to use units instead of dimensions: ```cpp // unclear and risky (the definition of length could change) SBQuantity::length l1(10); // OK (even if the definition of length would change) SBQuantity::length l2 = SBQuantity::angstrom(10); ``` ### Default types Here is the non-comprehensive list of default types defined in SAMSON. To see all the defined units please check the corresponding headers. #### Base types - `SBQuantity::length` == `SBQuantity::picometer` - `SBQuantity::mass` == `SBQuantity::yoctogram` - `SBQuantity::time` == `SBQuantity::femtosecond` - `SBQuantity::intensity` == `SBQuantity::nanoampere` - `SBQuantity::temperature` == `SBQuantity::kelvin` - `SBQuantity::amountOfSubstance` == `SBQuantity::mole` - `SBQuantity::luminousIntensity` == `SBQuantity::candela` There are also inverse, square, inverse square base units defined, e.g.: - `SBQuantity::inverseLength` - `SBQuantity::squareLength` - `SBQuantity::inverseSquareLength` - `SBQuantity::cubicLength` - `SBQuantity::inverseCubicLength` - `SBQuantity::inverseMass` - `SBQuantity::inverseTime` - `SBQuantity::squareTime` - etc. #### Derived types - `SBQuantity::distance` == `SBQuantity::length` - `SBQuantity::inverseDistance` == `SBQuantity::inverseLength` - `SBQuantity::squareDistance` == `SBQuantity::squareLength` - `SBQuantity::inverseSquareDistance` == `SBQuantity::inverseSquareLength` - `SBQuantity::cubicDistance` == `SBQuantity::cubicLength` - `SBQuantity::inverseCubicDistance` == `SBQuantity::inverseCubicLength` - `SBQuantity::electricCharge` - `SBQuantity::voltage` - `SBQuantity::electricField` - `SBQuantity::magneticDensity` - `SBQuantity::angularVelocity` == `SBQuantity::inverseTime` - `SBQuantity::angularAcceleration` == `SBQuantity::inverseSquareTime` - `SBQuantity::pressure` - `SBQuantity::lengthMass` - `SBQuantity::inverseLengthInverseMass` - `SBQuantity::area` == `SBQuantity::squareLength` - `SBQuantity::inverseArea` == `SBQuantity::inverseSquareLength` - `SBQuantity::volume` == `SBQuantity::cubicLength` - `SBQuantity::inverseVolume` == `SBQuantity::inverseCubicLength` - `SBQuantity::position` == `SBQuantity::length` - `SBQuantity::velocity` - `SBQuantity::acceleration` - `SBQuantity::force` - `SBQuantity::energy` - `SBQuantity::inverseForce` - `SBQuantity::lengthPerForce` - `SBQuantity::forcePerLength` - `SBQuantity::energyPerSquareLength` - `SBQuantity::momentum` - `SBQuantity::inverseMomentum` - `SBQuantity::momentOfInertia` - `SBQuantity::inverseMomentOfInertia` - `SBQuantity::electronDensity` ### Vectors Here is the list of defined [vector](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalVector3/index.md) dimensions, and their corresponding types: - [`SBVector3`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalVector3/index.md): `SBPhysicalVector3` - `SBPicometerPerSecond3`: `SBPhysicalVector3` - `SBRadian3`: `SBPhysicalVector3` - `SBRadianPerSecond3`: `SBPhysicalVector3` - `SBLength3`: `SBPhysicalVector3` - `SBInverseLength3`: `SBPhysicalVector3` - `SBSquareLength3`: `SBPhysicalVector3` - `SBPosition3`: `SBPhysicalVector3` - `SBVelocity3`: `SBPhysicalVector3` - `SBAcceleration3`: `SBPhysicalVector3` - `SBEnergy3`: `SBPhysicalVector3` - `SBTorque3`: `SBPhysicalVector3` - `SBForce3`: `SBPhysicalVector3` - `SBMomentum3`: `SBPhysicalVector3` - `SBInverseMomentum3`: `SBPhysicalVector3` See also [`SBDTypePhysicalVector3`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalVector3/index.md) ### Spatial vectors Here is the list of defined [spatial vector](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalVector6/index.md) dimensions, and their corresponding types: - [`SBVector6`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalVector6/index.md): `SBPhysicalVector6` - `SBForce6`: `SBPhysicalVector6` - `SBVelocity6`: `SBPhysicalVector6` - `SBAcceleration6`: `SBPhysicalVector6` See also [`SBDTypePhysicalVector6`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalVector6/index.md) ### Intervals Here is the list of defined [interval dimensions](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalInterval/index.md), and their corresponding types: - `SBInterval`: `SBDTypePhysicalInterval` - `SBLengthInterval`: `SBDTypePhysicalInterval` - `SBSquareLengthInterval`: `SBDTypePhysicalInterval` - `SBPositionInterval`: `SBDTypePhysicalInterval` - `SBVelocityInterval`: `SBDTypePhysicalInterval` - `SBAccelerationInterval`: `SBDTypePhysicalInterval` - `SBEnergyInterval`: `SBDTypePhysicalInterval` - `SBForceInterval`: `SBDTypePhysicalInterval` - `SBMomentumInterval`: `SBDTypePhysicalInterval` See also [`SBDTypePhysicalInterval`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalInterval/index.md) ### Interval vectors Here is the list of defined [interval vector dimensions](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalIAVector3/index.md), and their corresponding types: - [`SBIAVector3`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalIAVector3/index.md): `SBDTypePhysicalIAVector3` - `SBIARadian3`: `SBDTypePhysicalIAVector3` - `SBIARadianPerSecond3`: `SBDTypePhysicalIAVector3` - `SBIAPosition3`: `SBDTypePhysicalIAVector3` - `SBIAPosition3`: `SBDTypePhysicalIAVector3` - `SBIAVelocity3`: `SBDTypePhysicalIAVector3` - `SBIAAcceleration3`: `SBDTypePhysicalIAVector3` - `SBIAForce3`: `SBDTypePhysicalIAVector3` - `SBIAMomentum3`: `SBDTypePhysicalIAVector3` See also [`SBDTypePhysicalIAVector3`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalIAVector3/index.md) ### Matrices Here is the list of defined [3x3 matrix](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalMatrix33/index.md) dimensions, and their corresponding types: - [`SBMatrix33`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalMatrix33/index.md): `SBPhysicalMatrix33` - `SBMass33`: `SBPhysicalMatrix33` - `SBInverseMass33`: `SBPhysicalMatrix33` - `SBInertiaTensor33`: `SBPhysicalMatrix33` - `SBInverseInertiaTensor33`: `SBPhysicalMatrix33` See also [`SBDTypePhysicalMatrix33`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalMatrix33/index.md) ### Spatial matrices Here is the list of defined [6x6 spatial matrix](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalMatrix66/index.md) dimensions, and their corresponding types: - [`SBMatrix66`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalMatrix66/index.md) - dimensionless - `SBInertia66` - `SBInverseInertia66` See also [`SBDTypePhysicalMatrix66`](https://documentation.samson-connect.net/developers/latest/api/classSBDTypePhysicalMatrix66/index.md) # Versioning Versioning matters in SAMSON because an extension is built against a specific SDK release and then loaded into a specific SAMSON runtime. This page focuses on the developer-facing side of versioning: compatibility, upgrade strategy, and extension release numbers. For the end-user explanation, see the [User guide: Versioning](https://documentation.samson-connect.net/users/latest/versioning/). See also [`SBCContainerVersionNumber`](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) ## Two version numbers matter As an extension developer, you usually care about two independent version lines: - the **SAMSON / SDK version** you build against - your own **extension version** that users see in releases These serve different purposes. The SDK version controls whether the extension is compatible with a given SAMSON runtime. The extension version tells users and the marketplace which release of your extension is newer. ## SAMSON and SDK semantic versioning SAMSON and the SDK follow a semantic versioning scheme based on `major.minor.patch`. The practical rule is: - incompatible platform changes increment the major version - backward-compatible feature additions increment the minor version - backward-compatible fixes increment the patch version That policy is what makes compatibility decisions possible at startup. ## Compatibility of SAMSON Extensions When SAMSON starts, it checks the SDK version that was used to build each extension and decides whether that version is compatible with the running SAMSON version. The key compatibility rule is: - the major versions must match - the SDK minor version must not be newer than the SAMSON minor version Example: - an extension built with SDK `1.5.2` can load in SAMSON `1.7.8` - an extension built with SDK `1.8.5` cannot load in SAMSON `1.7.8` This protects users from loading extensions that may depend on newer API functionality than their SAMSON build provides. ## Extension version numbers Independent of the SDK version, each extension has its own `major.minor.patch` version number. Use that extension version to communicate your own releases: - breaking changes - new features - fixes SAMSON does not enforce a strict policy for how you increment the extension version beyond the `major.minor.patch` format, but you should still follow a consistent scheme. The most useful choice is usually normal semantic versioning. ## Automatic updates SAMSON can automatically update installed extensions when a newer **compatible** version becomes available on [SAMSON Connect](https://www.samson-connect.net/). That means: - publishing a newer extension version is not enough by itself - the uploaded build must also target an SDK version compatible with the user's SAMSON installation If you publish only a build for a newer incompatible major SDK version, users on older SAMSON releases will not receive that update. ## Practical release advice - Update the SDK regularly if you want access to new APIs and fixes. - Increase the extension version when you publish a new marketplace release. - Be deliberate when raising your minimum supported SAMSON/SDK baseline, because that changes who can install or auto-update the extension. ## What to read next - [Publishing a SAMSON Extension](https://documentation.samson-connect.net/developers/latest/distributing/index.md) for the release workflow - [All versions](https://documentation.samson-connect.net/developers/latest/all-versions/index.md) if you need archived documentation for another SDK release # Animations In SAMSON, an **animation** is a document node that is a **part of a presentation** ([`SBDDocumentPresentation`](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentPresentation/index.md)) and that describes a change over time. Use animations as part of presentations when your extension needs to drive timed behavior such as moving nodes, revealing content, changing the camera, or building other complex presentation workflow. Animations are not just transient effects: they are represented as nodes in the presentation node and can therefore participate in presentation / visualization workflows. ## Key class The main class is [`SBDDocumentAnimation`](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentAnimation/index.md). Animations are part of the document/data graph layer, which makes them suitable for: - persistent presentation sequences - replayable camera motions - timed transformations of selected nodes - scripted or UI-created scientific demonstrations ## Mental model An animation usually targets one or more nodes and applies a category-specific change over a frame interval. Depending on the concrete derived class, that change may be: - a node motion - an entrance or exit effect - a camera movement - another presentation-related change Because animations are first-class objects, you can create them, organize them, serialize them, and expose them through SAMSON mechanisms just like other document content. ## When to implement custom animations Create a custom animation when your extension needs a reusable timed behavior that users can apply or replay. Typical examples: - animate a docking or undocking process - record and replay a trajectory path - create a camera fly-through for a scientific presentation - reveal a custom model progressively over time If you only need a one-off immediate state change, an animation may be unnecessary. In that case, a command, editor, or simulator step is often a better fit. ## Example scenario Suppose your extension computes a morph between two conformations. A custom animation can: - store the target nodes - expose timing and easing parameters - update the visual or structural state as the current frame changes That makes the result reusable in a presentation rather than being a single irreversible command. ## See also - [User Guide: Presenting and animating](https://documentation.samson-connect.net/users/latest/presenting/) - [User Guide: Animations](https://documentation.samson-connect.net/users/latest/animations/) - [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) if the animation should be discoverable and instantiable through SAMSON # Selectors A **selector** is an object that computes a subset of nodes from a larger set of [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) nodes. Use a selector when you want reusable, named selection logic that can be stored, instantiated, and reused across features rather than rewriting the same filtering code inline every time. ## Key class The base class is [`SBDDataGraphNodeSelector`](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeSelector/index.md). A selector receives an input node set and populates an output node set. In other words, it encapsulates a selection rule. ## Why selectors are useful Selectors are useful when selection logic needs to be: - reusable across several commands or workflows - configurable through parameters - serializable - exposed through SAMSON mechanisms rather than hard-coded in one function They are especially relevant in workflows such as visual presets, domain-specific selection commands, or scripted feature pipelines. ## Selectors and NSL Selectors are related to the [node specification language](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md) (NSL). A selector may implement `getNSLExpression()` and return an equivalent NSL expression when such an expression exists. That makes selectors a bridge between: - object-oriented selection logic implemented in C++ - declarative selection strings used elsewhere in SAMSON Not every selector can be represented as NSL, but when it can, the selector becomes easier to inspect and reuse. ## Creating and using selectors Selectors can be instantiated directly in your code, and SAMSON can also create them dynamically through mechanisms such as `SAMSON::makeSelector` when the selector is exposed and registered appropriately. That is useful when you want extensions or scripts to request a selection strategy by class name and extension UUID rather than by direct C++ type access. ## Example scenario Suppose you often need "all atoms of a ligand neighborhood within a given cutoff that also satisfy a custom property test". You could write that logic inline every time, but a selector gives you a better abstraction: - the cutoff becomes a parameter - the selection logic becomes reusable - the selector can later be surfaced in a richer workflow such as a preset or scripted pipeline ## What to read next - [Getting nodes](https://documentation.samson-connect.net/developers/latest/getting-nodes/index.md) for direct node-collection recipes - [Node specification language](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md) for declarative selection strings # All versions # All versions Use this page when you need documentation for a different SDK release than 11.0.1. Older guides are useful when: - maintaining an extension that targets an earlier SDK - checking whether an API or workflow changed between releases - reading version-specific installation or build instructions Open the archive here: [Developer guides for other SAMSON SDK versions](https://documentation.samson-connect.net/developer-guide-versions/). # API # API This section is the high-level map of the SAMSON SDK. It does not replace the generated API reference. Instead, it helps you decide which library group to open first and which concepts to review before you dive into individual classes. The SDK is organized into seven library groups. In practice, most extension developers move between these pages and the concept chapters such as [SDK Organization](https://documentation.samson-connect.net/developers/latest/sdk-organization/index.md), [Data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md), [Developing GUI](https://documentation.samson-connect.net/developers/latest/developing-gui/index.md), and [Modeling and Simulation](https://documentation.samson-connect.net/developers/latest/modeling-and-simulation/index.md). ## How to use this section - Start with the library group that matches the problem you are solving. - Open the library page underneath it to find the main classes and macros to look up next. - Use the generated API pages for signatures and detailed member-level behavior. ## Library groups - [The Core Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Core/index.md): reflection, references, serialization, logging, containers, and undo infrastructure. - [The DataModel Library Group](https://documentation.samson-connect.net/developers/latest/sdk/DataModel/index.md): documents, nodes, apps, controllers, quantities, and other data graph building blocks. - [The Facade Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Facade/index.md): the `SAMSON` entry point used by extensions to access application-level services. - [The GUI Library Group](https://documentation.samson-connect.net/developers/latest/sdk/GUI/index.md): application GUI classes, editors, windows, widgets, settings, and render-side helpers. - [The IO Library Group](https://documentation.samson-connect.net/developers/latest/sdk/IO/index.md): importer, exporter, and file-reader infrastructure. - [The Modeling Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Modeling/index.md): structural, visual, interaction, dynamical, and property models. - [The Simulation Library Group](https://documentation.samson-connect.net/developers/latest/sdk/Simulation/index.md): simulators, state updaters, and neighbor-search components. ## Suggested starting points - Writing an app, editor, or tool window: start with [DataModel](https://documentation.samson-connect.net/developers/latest/sdk/DataModel/index.md), [GUI](https://documentation.samson-connect.net/developers/latest/sdk/GUI/index.md), and [Facade](https://documentation.samson-connect.net/developers/latest/sdk/Facade/index.md). - Working with custom nodes or documents: start with [DataModel](https://documentation.samson-connect.net/developers/latest/sdk/DataModel/index.md) and [Core](https://documentation.samson-connect.net/developers/latest/sdk/Core/index.md). - Building file import/export support: start with [IO](https://documentation.samson-connect.net/developers/latest/sdk/IO/index.md), then check [GUI](https://documentation.samson-connect.net/developers/latest/sdk/GUI/index.md) for user-facing dialogs. - Implementing models or simulations: start with [Modeling](https://documentation.samson-connect.net/developers/latest/sdk/Modeling/index.md) and [Simulation](https://documentation.samson-connect.net/developers/latest/sdk/Simulation/index.md). ## See also - [SDK Organization](https://documentation.samson-connect.net/developers/latest/sdk-organization/index.md) - [Fundamentals](https://documentation.samson-connect.net/developers/latest/fundamentals/index.md) # Macros # Macros ## c - **COMMA** ([**SBCMetaRegister.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaRegister_8hpp/index.md)) - **C_PROC** ([**SBCTimeClock.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCTimeClock_8hpp/index.md)) ## l - **LINK_STYLE** ([**SBGAction.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGAction_8hpp/index.md)) ## s - **SB_CLASS** ([**SBCClass.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClass_8hpp/index.md)) - **SB_CLASS_BASE** ([**SBCClass.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClass_8hpp/index.md)) - **SB_ELEMENT_UUID_DEFINTION** ([**SBCClass.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClass_8hpp/index.md)) - **SB_OS** ([**SBCClass.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClass_8hpp/index.md)) - **SBAttributeChange** ([**SBCClassAttributeChange.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassAttributeChange_8hpp/index.md)) - **SBAttributeChangeVector** ([**SBCClassAttributeChangeVector.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassAttributeChangeVector_8hpp/index.md)) - **SB_CALLABLE_MEMBER_DOC_BRIEF** ([**SBCClassCallableMemberDoc.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassCallableMemberDoc_8hpp/index.md)) - **SB_CALLABLE_MEMBER_DOC_DEPRECATED** ([**SBCClassCallableMemberDoc.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassCallableMemberDoc_8hpp/index.md)) - **SB_CALLABLE_MEMBER_DOC_NOTE** ([**SBCClassCallableMemberDoc.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassCallableMemberDoc_8hpp/index.md)) - **SB_CALLABLE_MEMBER_DOC_PARAM** ([**SBCClassCallableMemberDoc.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassCallableMemberDoc_8hpp/index.md)) - **SB_CALLABLE_MEMBER_DOC_RETURNS** ([**SBCClassCallableMemberDoc.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassCallableMemberDoc_8hpp/index.md)) - **SB_CALLABLE_MEMBER_DOC_SEE_ALSO** ([**SBCClassCallableMemberDoc.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassCallableMemberDoc_8hpp/index.md)) - **SB_CALLABLE_MEMBER_DOC_SINCE** ([**SBCClassCallableMemberDoc.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassCallableMemberDoc_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_TEMPLATE** ([**SBCClassConstFunction.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassConstFunction_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_TEMPLATE** ([**SBCClassConstructor.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassConstructor_8hpp/index.md)) - **SB_DLLEXPORT** ([**SBCClassExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassExport_8hpp/index.md), [**SBCContainerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerExport_8hpp/index.md), [**SBCFunctorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorExport_8hpp/index.md), [**SBCGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCGraphExport_8hpp/index.md), [**SBCHeapExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCHeapExport_8hpp/index.md), [**SBCLogExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLogExport_8hpp/index.md), [**SBCMetaExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaExport_8hpp/index.md), [**SBCReferenceExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferenceExport_8hpp/index.md), [**SBCSerializerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCSerializerExport_8hpp/index.md), [**SBCUndoExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoExport_8hpp/index.md), [**SBDAppExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAppExport_8hpp/index.md), [**SBDAssetExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAssetExport_8hpp/index.md), [**SBDAssistantExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAssistantExport_8hpp/index.md), [**SBDColorSchemeExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDColorSchemeExport_8hpp/index.md), [**SBDControllerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDControllerExport_8hpp/index.md), [**SBDDataGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphExport_8hpp/index.md), [**SBDDocumentExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDocumentExport_8hpp/index.md), [**SBDPaletteExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDPaletteExport_8hpp/index.md), [**SBDQuantityExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityExport_8hpp/index.md), [**SBDTypeExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypeExport_8hpp/index.md), [**SBDVisualizationExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDVisualizationExport_8hpp/index.md), [**SAMSONExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SAMSONExport_8hpp/index.md), [**SBGActionExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGActionExport_8hpp/index.md), [**SBGAppExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGAppExport_8hpp/index.md), [**SBGAssistantExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGAssistantExport_8hpp/index.md), [**SBGDataGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGDataGraphExport_8hpp/index.md), [**SBGDynamicalModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGDynamicalModelExport_8hpp/index.md), [**SBGEditorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGEditorExport_8hpp/index.md), [**SBGFileExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGFileExport_8hpp/index.md), [**SBGInteractionModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGInteractionModelExport_8hpp/index.md), [**SBGPropertyModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGPropertyModelExport_8hpp/index.md), [**SBGRenderExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGRenderExport_8hpp/index.md), [**SBGSettingsExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGSettingsExport_8hpp/index.md), [**SBGStructuralModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGStructuralModelExport_8hpp/index.md), [**SBGUIExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGUIExport_8hpp/index.md), [**SBGVisualModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGVisualModelExport_8hpp/index.md), [**SBGWidgetExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGWidgetExport_8hpp/index.md), [**SBGWindowExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGWindowExport_8hpp/index.md), [**SBIFileExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBIFileExport_8hpp/index.md), [**SBMDynamicalModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMDynamicalModelExport_8hpp/index.md), [**SBMElementExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMElementExport_8hpp/index.md), [**SBMInteractionModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMInteractionModelExport_8hpp/index.md), [**SBMModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMModelExport_8hpp/index.md), [**SBMPropertyModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMPropertyModelExport_8hpp/index.md), [**SBMStructuralModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMStructuralModelExport_8hpp/index.md), [**SBMVisualModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMVisualModelExport_8hpp/index.md), [**SBSNeighborSearchExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSNeighborSearchExport_8hpp/index.md), [**SBSSimulatorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSSimulatorExport_8hpp/index.md), [**SBSStateUpdaterExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSStateUpdaterExport_8hpp/index.md)) - **SB_DLLIMPORT** ([**SBCClassExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassExport_8hpp/index.md), [**SBCContainerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerExport_8hpp/index.md), [**SBCFunctorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorExport_8hpp/index.md), [**SBCGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCGraphExport_8hpp/index.md), [**SBCHeapExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCHeapExport_8hpp/index.md), [**SBCLogExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLogExport_8hpp/index.md), [**SBCMetaExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaExport_8hpp/index.md), [**SBCReferenceExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferenceExport_8hpp/index.md), [**SBCSerializerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCSerializerExport_8hpp/index.md), [**SBCUndoExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoExport_8hpp/index.md), [**SBDAppExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAppExport_8hpp/index.md), [**SBDAssetExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAssetExport_8hpp/index.md), [**SBDAssistantExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAssistantExport_8hpp/index.md), [**SBDColorSchemeExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDColorSchemeExport_8hpp/index.md), [**SBDControllerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDControllerExport_8hpp/index.md), [**SBDDataGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphExport_8hpp/index.md), [**SBDDocumentExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDocumentExport_8hpp/index.md), [**SBDPaletteExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDPaletteExport_8hpp/index.md), [**SBDQuantityExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityExport_8hpp/index.md), [**SBDTypeExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypeExport_8hpp/index.md), [**SBDVisualizationExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDVisualizationExport_8hpp/index.md), [**SAMSONExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SAMSONExport_8hpp/index.md), [**SBGActionExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGActionExport_8hpp/index.md), [**SBGAppExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGAppExport_8hpp/index.md), [**SBGAssistantExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGAssistantExport_8hpp/index.md), [**SBGDataGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGDataGraphExport_8hpp/index.md), [**SBGDynamicalModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGDynamicalModelExport_8hpp/index.md), [**SBGEditorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGEditorExport_8hpp/index.md), [**SBGFileExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGFileExport_8hpp/index.md), [**SBGInteractionModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGInteractionModelExport_8hpp/index.md), [**SBGPropertyModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGPropertyModelExport_8hpp/index.md), [**SBGRenderExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGRenderExport_8hpp/index.md), [**SBGSettingsExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGSettingsExport_8hpp/index.md), [**SBGStructuralModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGStructuralModelExport_8hpp/index.md), [**SBGUIExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGUIExport_8hpp/index.md), [**SBGVisualModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGVisualModelExport_8hpp/index.md), [**SBGWidgetExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGWidgetExport_8hpp/index.md), [**SBGWindowExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGWindowExport_8hpp/index.md), [**SBIFileExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBIFileExport_8hpp/index.md), [**SBMDynamicalModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMDynamicalModelExport_8hpp/index.md), [**SBMElementExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMElementExport_8hpp/index.md), [**SBMInteractionModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMInteractionModelExport_8hpp/index.md), [**SBMModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMModelExport_8hpp/index.md), [**SBMPropertyModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMPropertyModelExport_8hpp/index.md), [**SBMStructuralModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMStructuralModelExport_8hpp/index.md), [**SBMVisualModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMVisualModelExport_8hpp/index.md), [**SBSNeighborSearchExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSNeighborSearchExport_8hpp/index.md), [**SBSSimulatorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSSimulatorExport_8hpp/index.md), [**SBSStateUpdaterExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSStateUpdaterExport_8hpp/index.md)) - **SB_SBCCLASS_EXPORT** ([**SBCClassExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassExport_8hpp/index.md)) - **SB_CONSTRUCTOR_0** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_0_BEGIN** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_1** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_10** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_11** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_12** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_13** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_14** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_15** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_16** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_2** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_3** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_4** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_5** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_6** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_7** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_8** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_9** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_END** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_CONSTRUCTOR_N_BEGIN** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_FACTORY_BEGIN** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_FACTORY_END** ([**SBCClassFactory.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFactory_8hpp/index.md)) - **SB_MAKE_FUNCTION_TEMPLATE** ([**SBCClassFunction.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassFunction_8hpp/index.md)) - **SB_ATTRIBUTE_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_CLEAR** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_COMBO_BOX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_COMBO_BOX_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_COUNT** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_DEFAULT** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_ENABLED_FLAG** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_END** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_GET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_GET_CURRENT_INDEX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_HAS** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_ITEM_TEXT** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_MAXIMUM** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_MINIMUM** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_NON_CONST_GET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_PUSH_BUTTON** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_PUSH_BUTTON_CONST** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_PUSH_BUTTON_STATIC** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_ONLY** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_ONLY_NONCONST** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_CLEAR** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_CLEAR_ARRAY** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_LIST** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_RANGE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_RANGE_SLIDER** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_RESET_LIST** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_RESET_RANGE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_READ_WRITE_RESET_RANGE_SLIDER** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_ONLY** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_WRITE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_RICH_TEXT_EDIT_READ_WRITE_CLEAR** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SET_CURRENT_INDEX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SINGLE_STEP** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SIZE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SLIDER** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SLIDER_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SPIN_BOX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SPIN_BOX_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_SUFFIX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_TOOL_TIP** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_ATTRIBUTE_VISIBILITY_FLAG** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_0** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_0_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_1** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_10** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_11** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_12** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_13** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_14** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_15** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_16** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_2** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_3** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_4** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_5** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_6** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_7** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_8** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_9** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_END** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_CONST_FUNCTION_N_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_0** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_0_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_1** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_10** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_11** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_12** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_13** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_14** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_15** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_16** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_2** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_3** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_4** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_5** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_6** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_7** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_8** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_9** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_END** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_FUNCTION_N_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_INHERIT** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_INTERFACE_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_INTERFACE_END** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_CLEAR** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_COMBO_BOX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_COMBO_BOX_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_COUNT** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_DEFAULT** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_ENABLED_FLAG** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_END** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_GET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_GET_CURRENT_INDEX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_HAS** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_ITEM_TEXT** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_MAXIMUM** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_MINIMUM** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_PUSH_BUTTON** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_ONLY** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_CLEAR** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_CLEAR_ARRAY** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_LIST** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_RANGE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_RANGE_SLIDER** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_RESET_LIST** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_RESET_RANGE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_READ_WRITE_RESET_RANGE_SLIDER** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_RICH_TEXT_EDIT_READ_ONLY** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_RICH_TEXT_EDIT_READ_WRITE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_RICH_TEXT_EDIT_READ_WRITE_CLEAR** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SET_CURRENT_INDEX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SINGLE_STEP** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SIZE** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SLIDER** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SLIDER_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SPIN_BOX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SPIN_BOX_RESET** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_SUFFIX** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_TOOL_TIP** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_ATTRIBUTE_VISIBILITY_FLAG** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_0** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_0_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_1** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_10** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_11** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_12** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_13** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_14** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_15** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_16** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_2** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_3** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_4** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_5** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_6** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_7** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_8** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_9** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_END** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_STATIC_FUNCTION_N_BEGIN** ([**SBCClassInterface.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassInterface_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPE_LIST9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONSTRUCTOR_SIGNATURE9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_CONST_FUNCTION_SIGNATURE_WITHOUT_OUTPUT9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_ARGUMENTS_9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_GENERIC_CALL_ARGUMENTS_9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_SIGNATURE_WITHOUT_OUTPUT9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GENERIC_CAN_CALL_9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPE9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME0** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME1** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME10** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME11** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME12** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME13** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME14** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME15** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME16** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME2** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME3** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME4** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME5** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME6** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME7** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME8** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_MAKE_GET_PARAMETER_TYPENAME9** ([**SBCClassMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassMacros_8hpp/index.md)) - **SB_CLASS_BEGIN** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_DESCRIPTION** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_END** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_GUI_SHORTCUT** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_GUI_UUID** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_ICON_FILE_NAME** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_IMPLEMENTATION** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_MINIMUM_USER_PLAN** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_NON_DISCOVERABLE** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_PUBLIC_NAME** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_SHORTCUT** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_TOOL_TIP** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_TYPE** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_CLASS_VERSION_NUMBER** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_CATEGORIES_BEGIN** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_CATEGORIES_END** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_CATEGORY** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_CLASS** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_CLASSES_BEGIN** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_CLASSES_END** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_DEPENDENCIES_BEGIN** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_DEPENDENCIES_END** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_DEPENDENCY** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_DESCRIPTION** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_DOCUMENTATION** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_VERSION_HASH** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_VERSION_NUMBER** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_WORKSPACE** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_WORKSPACES_BEGIN** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_ELEMENT_WORKSPACES_END** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_SDK_VERSION_HASH** ([**SBCClassProxy.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassProxy_8hpp/index.md)) - **SB_MAKE_STATIC_FUNCTION_TEMPLATE** ([**SBCClassStaticFunction.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCClassStaticFunction_8hpp/index.md)) - **SBBuffer** ([**SBCContainerBuffer.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerBuffer_8hpp/index.md)) - **SB_SBCCONTAINER_EXPORT** ([**SBCContainerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerExport_8hpp/index.md)) - **SB_FOR** ([**SBCContainerFor.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerFor_8hpp/index.md)) - **SBHashMap** ([**SBCContainerHashMap.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerHashMap_8hpp/index.md)) - **SBHashMapEntry** ([**SBCContainerHashMap.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerHashMap_8hpp/index.md)) - **SBIndexer** ([**SBCContainerIndexer.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerIndexer_8hpp/index.md)) - **SBList** ([**SBCContainerList.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerList_8hpp/index.md)) - **SBListLink** ([**SBCContainerListLink.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerListLink_8hpp/index.md)) - **SB_REVERSE_FOR** ([**SBCContainerReverseFor.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerReverseFor_8hpp/index.md)) - **SBVector** ([**SBCContainerVector.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCContainerVector_8hpp/index.md)) - **SB_MAKE_FUNCTOR_TEMPLATE** ([**SBCFunctor.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctor_8hpp/index.md)) - **SBFunctorConstant0** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant1** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant10** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant11** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant12** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant13** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant14** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant15** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant16** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant2** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant3** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant4** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant5** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant6** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant7** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant8** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBFunctorConstant9** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SB_MAKE_FUNCTOR_CONSTANT_TEMPLATE** ([**SBCFunctorConstant.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorConstant_8hpp/index.md)) - **SBDivide0** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide1** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide10** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide11** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide12** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide13** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide14** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide15** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide16** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide2** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide3** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide4** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide5** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide6** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide7** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide8** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SBDivide9** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SB_MAKE_FUNCTOR_DIVIDE_TEMPLATE** ([**SBCFunctorDivide.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorDivide_8hpp/index.md)) - **SB_SBCFUNCTOR_EXPORT** ([**SBCFunctorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorExport_8hpp/index.md)) - **SBMinus0** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus1** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus10** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus11** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus12** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus13** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus14** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus15** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus16** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus2** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus3** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus4** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus5** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus6** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus7** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus8** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBMinus9** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SB_MAKE_FUNCTOR_MINUS_TEMPLATE** ([**SBCFunctorMinus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorMinus_8hpp/index.md)) - **SBPlus0** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus1** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus10** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus11** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus12** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus13** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus14** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus15** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus16** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus2** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus3** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus4** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus5** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus6** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus7** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus8** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPlus9** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SB_MAKE_FUNCTOR_PLUS_TEMPLATE** ([**SBCFunctorPlus.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPlus_8hpp/index.md)) - **SBPredicate0** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate1** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate10** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate11** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate12** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate13** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate14** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate15** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate16** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate2** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate3** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate4** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate5** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate6** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate7** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate8** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBPredicate9** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SB_MAKE_PREDICATE_TEMPLATE** ([**SBCFunctorPredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicate_8hpp/index.md)) - **SBAnd0** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd1** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd10** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd11** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd12** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd13** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd14** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd15** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd16** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd2** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd3** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd4** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd5** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd6** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd7** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd8** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAnd9** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SB_MAKE_PREDICATE_AND_TEMPLATE** ([**SBCFunctorPredicateAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAnd_8hpp/index.md)) - **SBAndAnd0** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd1** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd10** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd11** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd12** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd13** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd14** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd15** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd16** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd2** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd3** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd4** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd5** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd6** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd7** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd8** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBAndAnd9** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SB_MAKE_PREDICATE_AND_AND_TEMPLATE** ([**SBCFunctorPredicateAndAnd.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateAndAnd_8hpp/index.md)) - **SBEqualTo0** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo1** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo10** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo11** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo12** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo13** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo14** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo15** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo16** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo2** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo3** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo4** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo5** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo6** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo7** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo8** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBEqualTo9** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SB_MAKE_PREDICATE_EQUAL_TO_TEMPLATE** ([**SBCFunctorPredicateEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateEqualTo_8hpp/index.md)) - **SBGreaterThan0** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan1** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan10** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan11** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan12** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan13** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan14** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan15** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan16** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan2** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan3** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan4** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan5** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan6** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan7** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan8** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThan9** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SB_MAKE_PREDICATE_GREATER_THAN_TEMPLATE** ([**SBCFunctorPredicateGreaterThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThan_8hpp/index.md)) - **SBGreaterThanOrEqualTo0** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo1** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo10** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo11** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo12** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo13** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo14** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo15** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo16** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo2** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo3** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo4** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo5** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo6** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo7** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo8** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBGreaterThanOrEqualTo9** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SB_MAKE_PREDICATE_GREATER_THAN_OR_EQUAL_TO_TEMPLATE** ([**SBCFunctorPredicateGreaterThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateGreaterThanOrEqualTo_8hpp/index.md)) - **SBLessThan0** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan1** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan10** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan11** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan12** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan13** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan14** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan15** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan16** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan2** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan3** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan4** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan5** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan6** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan7** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan8** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThan9** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SB_MAKE_PREDICATE_LESS_THAN_TEMPLATE** ([**SBCFunctorPredicateLessThan.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThan_8hpp/index.md)) - **SBLessThanOrEqualTo0** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo1** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo10** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo11** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo12** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo13** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo14** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo15** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo16** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo2** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo3** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo4** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo5** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo6** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo7** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo8** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBLessThanOrEqualTo9** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SB_MAKE_PREDICATE_LESS_THAN_OR_EQUAL_TO_TEMPLATE** ([**SBCFunctorPredicateLessThanOrEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateLessThanOrEqualTo_8hpp/index.md)) - **SBNot0** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot1** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot10** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot11** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot12** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot13** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot14** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot15** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot16** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot2** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot3** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot4** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot5** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot6** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot7** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot8** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNot9** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SB_MAKE_PREDICATE_NOT_TEMPLATE** ([**SBCFunctorPredicateNot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNot_8hpp/index.md)) - **SBNotEqualTo0** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo1** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo10** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo11** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo12** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo13** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo14** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo15** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo16** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo2** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo3** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo4** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo5** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo6** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo7** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo8** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBNotEqualTo9** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SB_MAKE_PREDICATE_NOT_EQUAL_TO_TEMPLATE** ([**SBCFunctorPredicateNotEqualTo.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateNotEqualTo_8hpp/index.md)) - **SBOr0** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr1** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr10** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr11** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr12** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr13** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr14** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr15** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr16** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr2** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr3** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr4** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr5** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr6** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr7** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr8** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOr9** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SB_MAKE_PREDICATE_OR_TEMPLATE** ([**SBCFunctorPredicateOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOr_8hpp/index.md)) - **SBOrOr0** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr1** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr10** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr11** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr12** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr13** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr14** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr15** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr16** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr2** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr3** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr4** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr5** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr6** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr7** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr8** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBOrOr9** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SB_MAKE_PREDICATE_OR_OR_TEMPLATE** ([**SBCFunctorPredicateOrOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateOrOr_8hpp/index.md)) - **SBXOr0** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr1** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr10** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr11** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr12** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr13** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr14** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr15** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr16** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr2** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr3** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr4** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr5** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr6** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr7** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr8** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBXOr9** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SB_MAKE_PREDICATE_XOR_TEMPLATE** ([**SBCFunctorPredicateXOr.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorPredicateXOr_8hpp/index.md)) - **SBTimes0** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes1** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes10** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes11** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes12** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes13** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes14** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes15** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes16** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes2** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes3** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes4** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes5** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes6** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes7** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes8** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SBTimes9** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SB_MAKE_FUNCTOR_TIMES_TEMPLATE** ([**SBCFunctorTimes.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCFunctorTimes_8hpp/index.md)) - **SB_SBCGRAPH_EXPORT** ([**SBCGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCGraphExport_8hpp/index.md)) - **SB_HEAP** ([**SBCHeap.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCHeap_8hpp/index.md)) - **SB_HEAP_IMPLEMENTATION** ([**SBCHeap.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCHeap_8hpp/index.md)) - **SB_EXPORT** ([**SBCHeapExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCHeapExport_8hpp/index.md)) - **SB_SBCHEAP_EXPORT** ([**SBCHeapExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCHeapExport_8hpp/index.md)) - **SB_ANALYTICS** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_CHECK_DURATION** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_CHECK_DURATION_1** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_CHRONO** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_ERROR** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_FILENAME** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_FUNCTION** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_ID_STRING** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_INFORMATION** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_INT_TO_STRING** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_INT_TO_STRING2** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_LINE** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_PRINT_DEBUG** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_SAMSON_LOG_LEVEL** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_STACK_HISTORY** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_CREATE** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_CREATE_1** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_MEASURE_PRINT** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_MEASURE_PRINT_1** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_MEASURE_PRINT_CUMULATIVE** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_MEASURE_PRINT_CUMULATIVE_1** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_PRINT** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_PRINT_1** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_REUSE** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TIMER_REUSE_1** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_TRACE** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_WARNING** ([**SBCLog.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLog_8hpp/index.md)) - **SB_SBCLOG_EXPORT** ([**SBCLogExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCLogExport_8hpp/index.md)) - **SB_DECLARE_BASE_TYPE** ([**SBCMetaBaseType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaBaseType_8hpp/index.md)) - **SB_MAKE_CAN_CAST_POINTER_TO_FUNCTION_TEMPLATE** ([**SBCMetaCanCast.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaCanCast_8hpp/index.md)) - **SB_MAKE_CAN_CAST_POINTER_TO_MEMBER_FUNCTION_TEMPLATE** ([**SBCMetaCanCast.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaCanCast_8hpp/index.md)) - **SBCast** ([**SBCMetaCast.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaCast_8hpp/index.md)) - **SB_MAKE_CAST_POINTER_TO_FUNCTION_TEMPLATE** ([**SBCMetaCast.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaCast_8hpp/index.md)) - **SB_MAKE_CAST_POINTER_TO_MEMBER_FUNCTION_TEMPLATE** ([**SBCMetaCast.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaCast_8hpp/index.md)) - **SB_MAKE_DECOMPOSE_FUNCTION_TEMPLATE** ([**SBCMetaDecomposeType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaDecomposeType_8hpp/index.md)) - **SB_MAKE_DECOMPOSE_POINTER_TO_FUNCTION_TEMPLATE** ([**SBCMetaDecomposeType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaDecomposeType_8hpp/index.md)) - **SB_MAKE_DECOMPOSE_POINTER_TO_MEMBER_FUNCTION_TEMPLATE** ([**SBCMetaDecomposeType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaDecomposeType_8hpp/index.md)) - **SB_SBCMETA_EXPORT** ([**SBCMetaExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaExport_8hpp/index.md)) - **SB_DECLARE_FUNDAMENTAL_TYPE** ([**SBCMetaIsFundamentalType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaIsFundamentalType_8hpp/index.md)) - **SB_DECLARE_NUMERIC_TYPE** ([**SBCMetaIsNumericType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaIsNumericType_8hpp/index.md)) - **SB_D** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_DECLARE_DATA** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_DECLARE_INTERFACE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_ARGUMENT_TYPEDEF_LIST9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_CACHE_LAST_EMIT_ARGUMENTS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_ARGUMENTS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_FUNCTION_CALL_ARGUMENTS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_GET_LAST_EMIT_ARGUMENTS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_INIT_LAST_EMIT_ARGUMENTS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_LAST_EMIT_ARGUMENTS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SHORT_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_FUNCTION_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SHORT_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_CONST_MEMBER_FUNCTION_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SHORT_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_FUNCTION_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SHORT_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_META_POINTER_TO_MEMBER_FUNCTION_SIGNATURE9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_PARAMETERS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_0** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_1** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_10** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_11** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_12** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_13** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_14** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_15** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_16** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_2** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_3** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_4** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_5** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_6** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_7** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_8** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_MAKE_TEMPLATE_SPECIALIZATION_PARAMETERS_9** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_PP_CONCATENATE** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_PP_CONCATENATE_I** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_PP_EXPAND** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_PP_STR** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_PP_STR_I** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_S** ([**SBCMetaMacros.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaMacros_8hpp/index.md)) - **SB_REGISTER_TYPE** ([**SBCMetaRegister.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaRegister_8hpp/index.md)) - **SBType** ([**SBCMetaType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaType_8hpp/index.md)) - **SB_CAN_CAST** ([**SBCMetaValue.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaValue_8hpp/index.md)) - **SB_CAST** ([**SBCMetaValue.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaValue_8hpp/index.md)) - **SB_TYPE** ([**SBCMetaValue.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaValue_8hpp/index.md)) - **SB_VALUE** ([**SBCMetaValue.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaValue_8hpp/index.md)) - **SBValueHolder** ([**SBCMetaValueHolder.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaValueHolder_8hpp/index.md)) - **SBValueType** ([**SBCMetaValueType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCMetaValueType_8hpp/index.md)) - **SB_SBCREFERENCE_EXPORT** ([**SBCReferenceExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferenceExport_8hpp/index.md)) - **SBPointer** ([**SBCReferencePointer.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferencePointer_8hpp/index.md)) - **SBPointerIndexer** ([**SBCReferencePointerIndexer.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferencePointerIndexer_8hpp/index.md)) - **SBPointerList** ([**SBCReferencePointerList.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferencePointerList_8hpp/index.md)) - **SBPointerListLink** ([**SBCReferencePointerList.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferencePointerList_8hpp/index.md)) - **SB_CONST_LIST_FOR** ([**SBCReferencePointerList.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferencePointerList_8hpp/index.md)) - **SB_CONST_LIST_REVERSE_FOR** ([**SBCReferencePointerList.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferencePointerList_8hpp/index.md)) - **SB_REGISTER_TARGET_TYPE** ([**SBCReferenceRegister.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCReferenceRegister_8hpp/index.md)) - **SB_SBCSERIALIZER_EXPORT** ([**SBCSerializerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCSerializerExport_8hpp/index.md)) - **SB_HOLD_ADD** ([**SBCUndoCommand.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoCommand_8hpp/index.md)) - **SB_HOLD_ADD_IMPLEMENTATION** ([**SBCUndoCommand.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoCommand_8hpp/index.md)) - **SB_HOLD_CLEAR** ([**SBCUndoCommand.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoCommand_8hpp/index.md)) - **SB_HOLD_CLEAR_IMPLEMENTATION** ([**SBCUndoCommand.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoCommand_8hpp/index.md)) - **SB_HOLD_SET** ([**SBCUndoCommand.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoCommand_8hpp/index.md)) - **SB_HOLD_SET_IMPLEMENTATION** ([**SBCUndoCommand.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoCommand_8hpp/index.md)) - **SB_HOLD_SET_POINTER_IMPLEMENTATION** ([**SBCUndoCommand.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoCommand_8hpp/index.md)) - **SB_SBCUNDO_EXPORT** ([**SBCUndoExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBCUndoExport_8hpp/index.md)) - **SB_SBDAPP_EXPORT** ([**SBDAppExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAppExport_8hpp/index.md)) - **SB_SBDASSET_EXPORT** ([**SBDAssetExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAssetExport_8hpp/index.md)) - **SB_SBDASSISTANT_EXPORT** ([**SBDAssistantExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDAssistantExport_8hpp/index.md)) - **SB_SBDCOLORSCHEME_EXPORT** ([**SBDColorSchemeExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDColorSchemeExport_8hpp/index.md)) - **SBColorSchemePerAttribute** ([**SBDColorSchemePerAttribute.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDColorSchemePerAttribute_8hpp/index.md)) - **SB_SBDCONTROLLER_EXPORT** ([**SBDControllerExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDControllerExport_8hpp/index.md)) - **SB_SBDDATAGRAPH_EXPORT** ([**SBDDataGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphExport_8hpp/index.md)) - **SBNodeGetter** ([**SBDDataGraphNodeGetter.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphNodeGetter_8hpp/index.md)) - **SB_NODE_GETTER_0** ([**SBDDataGraphNodeGetter.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphNodeGetter_8hpp/index.md)) - **SB_NODE_GETTER_IMPLEMENTATION_0** ([**SBDDataGraphNodeGetter.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphNodeGetter_8hpp/index.md)) - **SB_NODE_PREDICATE_0** ([**SBDDataGraphNodePredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphNodePredicate_8hpp/index.md)) - **SB_NODE_PREDICATE_1** ([**SBDDataGraphNodePredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphNodePredicate_8hpp/index.md)) - **SB_NODE_PREDICATE_IMPLEMENTATION_0** ([**SBDDataGraphNodePredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphNodePredicate_8hpp/index.md)) - **SB_NODE_PREDICATE_IMPLEMENTATION_1** ([**SBDDataGraphNodePredicate.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDataGraphNodePredicate_8hpp/index.md)) - **SB_SBDDOCUMENT_EXPORT** ([**SBDDocumentExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDDocumentExport_8hpp/index.md)) - **SB_SBDPALETTE_EXPORT** ([**SBDPaletteExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDPaletteExport_8hpp/index.md)) - **SB_QUANTITY_ATOMIC_UNIT_OF_ACTION** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ATOMIC_UNIT_OF_CHARGE** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ATOMIC_UNIT_OF_ELECTRIC_POTENTIAL** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ATOMIC_UNIT_OF_ENERGY** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ATOMIC_UNIT_OF_LENGTH** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ATOMIC_UNIT_OF_TIME** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_AVOGADRO_CONSTANT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_BOHR_RADIUS** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_BOLTZMANN_CONSTANT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_COULOMB_CONSTANT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ELECTRONVOLT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ELECTRON_MASS** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ELECTRON_MASS_IN_U** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_ELEMENTARY_CHARGE** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_HARTREE_ENERGY** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_HARTREE_ENERGY_IN_EV** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_LUMINOUS_EFFICACY** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_MOLAR_MASS_CONSTANT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_NEUTRON_MASS** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_PLANCK_CONSTANT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_PROTON_MASS** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_REDUCED_PLANCK_CONSTANT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_SPEED_OF_LIGHT_IN_VACUUM** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_STANDARD_ACCELERATION_OF_GRAVITY** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_STANDARD_ATMOSPHERE** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_STANDARD_STATE_PRESSURE** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_THERMOCHEMICAL_CALORIE** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_UNIFIED_ATOMIC_MASS_UNIT** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_QUANTITY_VACUUM_ELECTRIC_PERMITTIVITY** ([**SBDQuantityConstantDefines.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConstantDefines_8hpp/index.md)) - **SB_REGISTER_QUANTITY_CONVERSION** ([**SBDQuantityConverter.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityConverter_8hpp/index.md)) - **SB_REGISTER_DERIVED_UNIT** ([**SBDQuantityDerivedUnit.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityDerivedUnit_8hpp/index.md)) - **SBQuantityDivision** ([**SBDQuantityDivision.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityDivision_8hpp/index.md)) - **SB_SBDQUANTITY_EXPORT** ([**SBDQuantityExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityExport_8hpp/index.md)) - **SBQuantityInverse** ([**SBDQuantityInverse.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityInverse_8hpp/index.md)) - **SBQuantityPower** ([**SBDQuantityPower.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityPower_8hpp/index.md)) - **SBQuantityProduct2** ([**SBDQuantityProduct.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityProduct_8hpp/index.md)) - **SBQuantityProduct3** ([**SBDQuantityProduct.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityProduct_8hpp/index.md)) - **SBQuantityProduct4** ([**SBDQuantityProduct.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityProduct_8hpp/index.md)) - **SBQuantityProduct5** ([**SBDQuantityProduct.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityProduct_8hpp/index.md)) - **SBQuantityProduct6** ([**SBDQuantityProduct.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityProduct_8hpp/index.md)) - **SBQuantityProduct7** ([**SBDQuantityProduct.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityProduct_8hpp/index.md)) - **SBQuantityRoot** ([**SBDQuantityRoot.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityRoot_8hpp/index.md)) - **SBScaledUnit** ([**SBDQuantityScaledUnit.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityScaledUnit_8hpp/index.md)) - **SB_REGISTER_SCALED_UNIT** ([**SBDQuantityScaledUnit.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityScaledUnit_8hpp/index.md)) - **SBQuantityType** ([**SBDQuantityType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityType_8hpp/index.md)) - **SB_REGISTER_UNIT_SYSTEM_1** ([**SBDQuantityUnitSystem.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitSystem_8hpp/index.md)) - **SB_REGISTER_UNIT_SYSTEM_2** ([**SBDQuantityUnitSystem.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitSystem_8hpp/index.md)) - **SB_REGISTER_UNIT_SYSTEM_3** ([**SBDQuantityUnitSystem.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitSystem_8hpp/index.md)) - **SB_REGISTER_UNIT_SYSTEM_4** ([**SBDQuantityUnitSystem.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitSystem_8hpp/index.md)) - **SB_REGISTER_UNIT_SYSTEM_5** ([**SBDQuantityUnitSystem.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitSystem_8hpp/index.md)) - **SB_REGISTER_UNIT_SYSTEM_6** ([**SBDQuantityUnitSystem.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitSystem_8hpp/index.md)) - **SB_REGISTER_UNIT_SYSTEM_7** ([**SBDQuantityUnitSystem.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitSystem_8hpp/index.md)) - **SBUnitType** ([**SBDQuantityUnitType.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDQuantityUnitType_8hpp/index.md)) - **SBCubicPolynomial** ([**SBDTypeCubicPolynomial.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypeCubicPolynomial_8hpp/index.md)) - **SB_SBDTYPE_EXPORT** ([**SBDTypeExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypeExport_8hpp/index.md)) - **SBPhysicalIAVector3** ([**SBDTypePhysicalIAVector3.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypePhysicalIAVector3_8hpp/index.md)) - **SB_SIGN_BIT** ([**SBDTypePhysicalIAVector3.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypePhysicalIAVector3_8hpp/index.md)) - **SBPhysicalInterval** ([**SBDTypePhysicalInterval.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypePhysicalInterval_8hpp/index.md)) - **SBPhysicalMatrix33** ([**SBDTypePhysicalMatrix33.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypePhysicalMatrix33_8hpp/index.md)) - **SBPhysicalMatrix66** ([**SBDTypePhysicalMatrix66.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypePhysicalMatrix66_8hpp/index.md)) - **SBPhysicalVector3** ([**SBDTypePhysicalVector3.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypePhysicalVector3_8hpp/index.md)) - **SBPhysicalVector6** ([**SBDTypePhysicalVector6.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDTypePhysicalVector6_8hpp/index.md)) - **SB_SBDVISUALIZATION_EXPORT** ([**SBDVisualizationExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBDVisualizationExport_8hpp/index.md)) - **SB_ELEMENT_PATH** ([**SAMSON.hpp**](https://documentation.samson-connect.net/developers/latest/api/SAMSON_8hpp/index.md)) - **SB_SAMSON_EXPORT** ([**SAMSONExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SAMSONExport_8hpp/index.md)) - **SB_SBGACTION_EXPORT** ([**SBGActionExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGActionExport_8hpp/index.md)) - **SB_SBGAPP_EXPORT** ([**SBGAppExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGAppExport_8hpp/index.md)) - **SB_SBGASSISTANT_EXPORT** ([**SBGAssistantExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGAssistantExport_8hpp/index.md)) - **SB_SBGDATAGRAPH_EXPORT** ([**SBGDataGraphExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGDataGraphExport_8hpp/index.md)) - **SB_SBGDYNAMICALMODEL_EXPORT** ([**SBGDynamicalModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGDynamicalModelExport_8hpp/index.md)) - **SB_SBGEDITOR_EXPORT** ([**SBGEditorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGEditorExport_8hpp/index.md)) - **SB_SBGFILE_EXPORT** ([**SBGFileExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGFileExport_8hpp/index.md)) - **SB_SBGINTERACTIONMODEL_EXPORT** ([**SBGInteractionModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGInteractionModelExport_8hpp/index.md)) - **SB_SBGPROPERTYMODEL_EXPORT** ([**SBGPropertyModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGPropertyModelExport_8hpp/index.md)) - **SB_SBGRENDER_EXPORT** ([**SBGRenderExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGRenderExport_8hpp/index.md)) - **SB_SBGSETTINGS_EXPORT** ([**SBGSettingsExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGSettingsExport_8hpp/index.md)) - **SB_SBGSTRUCTURALMODEL_EXPORT** ([**SBGStructuralModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGStructuralModelExport_8hpp/index.md)) - **SB_SBGUI_EXPORT** ([**SBGUIExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGUIExport_8hpp/index.md)) - **SB_SBGVISUALMODEL_EXPORT** ([**SBGVisualModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGVisualModelExport_8hpp/index.md)) - **SB_SBGWIDGET_EXPORT** ([**SBGWidgetExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGWidgetExport_8hpp/index.md)) - **SB_SBGWINDOW_EXPORT** ([**SBGWindowExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBGWindowExport_8hpp/index.md)) - **SB_SBIFILE_EXPORT** ([**SBIFileExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBIFileExport_8hpp/index.md)) - **SB_SBMDYNAMICALMODEL_EXPORT** ([**SBMDynamicalModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMDynamicalModelExport_8hpp/index.md)) - **SB_SBMELEMENT_EXPORT** ([**SBMElementExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMElementExport_8hpp/index.md)) - **SB_SBMINTERACTIONMODEL_EXPORT** ([**SBMInteractionModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMInteractionModelExport_8hpp/index.md)) - **SB_SBMMODEL_EXPORT** ([**SBMModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMModelExport_8hpp/index.md)) - **SB_SBMPROPERTYMODEL_EXPORT** ([**SBMPropertyModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMPropertyModelExport_8hpp/index.md)) - **SB_SBMSTRUCTURALMODEL_EXPORT** ([**SBMStructuralModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMStructuralModelExport_8hpp/index.md)) - **SB_SBMVISUALMODEL_EXPORT** ([**SBMVisualModelExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBMVisualModelExport_8hpp/index.md)) - **SB_SBSNEIGHBORSEARCH_EXPORT** ([**SBSNeighborSearchExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSNeighborSearchExport_8hpp/index.md)) - **SB_SBSSIMULATOR_EXPORT** ([**SBSSimulatorExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSSimulatorExport_8hpp/index.md)) - **SB_SBSSTATEUPDATER_EXPORT** ([**SBSStateUpdaterExport.hpp**](https://documentation.samson-connect.net/developers/latest/api/SBSStateUpdaterExport_8hpp/index.md)) # SBAttribute # Class SBCClassAttribute [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/index.md) *This class describes a class attribute in a class proxy.* - `#include ` ## Public Types | Type | Name | | ---- | ---------------------------------------------------------- | | enum | [**Access**](#enum-access) *Available attribute accesses.* | | enum | [**Type**](#enum-type) *Available attribute types.* | ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCClassAttribute**](#function-sbcclassattribute-12) ([**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) attributeType, [**SBCClassAttribute::Access**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/#enum-access) access, [**SBCClassAttribute::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/#enum-type) type, const std::string & attributeName, const std::string & attributeDescription, const std::string & attributeGroup, bool staticFlag) *Constructs a class attribute.* | | | [**SBCClassAttribute**](#function-sbcclassattribute-22) ([**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) attributeType, [**SBCClassAttribute::Access**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/#enum-access) access, [**SBCClassAttribute::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/#enum-type) type, const std::string & attributeName, const std::string & attributeDescription, const std::string & attributeGroup, bool staticFlag, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getFunction, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * setFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * hasFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * clearFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getSizeFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getMinimumFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getMaximumFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getSingleStepFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getSuffixFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getCountFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getCurrentIndexFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * setCurrentIndexFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getItemTextFunction=nullptr, [**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * getDefaultFunction=nullptr) *Constructs a class attribute.* | | void | [**clear**](#function-clear) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Clears the value of the attribute when possible.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**get**](#function-get) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Gets the attribute from the* `object` *.* | | [**SBCClassAttribute::Access**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/#enum-access) | [**getAccess**](#function-getaccess) () const *Returns the access of the attribute.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getAttributeType**](#function-getattributetype) () const *Returns the type of the attribute value.* | | int | [**getCount**](#function-getcount) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the number of items of the attribute for the* `object` *.* | | int | [**getCurrentIndex**](#function-getcurrentindex) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the attribute's current index from the* `object` *.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getDefault**](#function-getdefault) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the attribute's default value from the* `object` *.* | | std::string | [**getDescription**](#function-getdescription) () const *Returns the description of the attribute.* | | bool | [**getEnabledFlag**](#function-getenabledflag) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns* `true` *if the attribute should be enabled in the*[Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) \_\_ | | std::string | [**getGroup**](#function-getgroup) () const *Returns the group of the attribute.* | | std::string | [**getItemText**](#function-getitemtext) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const int & index) const *Returns the attribute's text for the* `index` *from the*`object` *.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getMaximum**](#function-getmaximum) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the attribute's maximum value from the* `object` *.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getMinimum**](#function-getminimum) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the attribute's minimum value from the* `object` *.* | | std::string | [**getName**](#function-getname) () const *Returns the name of the attribute.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getSingleStep**](#function-getsinglestep) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the attribute's single step from the* `object` *.* | | unsigned int | [**getSize**](#function-getsize) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the size of the array attribute in the* `object` *when relevant.* | | bool | [**getStaticFlag**](#function-getstaticflag) () const *Returns whether the attribute is static.* | | std::string | [**getSuffix**](#function-getsuffix) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the attribute's suffix from the* `object` *.* | | std::string | [**getToolTip**](#function-gettooltip) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns the tool tip of the attribute.* | | [**SBCClassAttribute::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/#enum-type) | [**getType**](#function-gettype) () const *Returns the type of the attribute.* | | bool | [**getVisibilityFlag**](#function-getvisibilityflag) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns* `true` *if the attribute should be visible in the*[Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) \_\_ | | bool | [**has**](#function-has) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object) const *Returns whether the attribute has a value when the attribute is clearable.* | | bool | [**hasDefault**](#function-hasdefault) () noexcept const *Returns* `true` *if the attribute has a default value.* | | bool | [**hasMaximum**](#function-hasmaximum) () noexcept const *Returns* `true` *if the attribute has a maximum value.* | | bool | [**hasMinimum**](#function-hasminimum) () noexcept const *Returns* `true` *if the attribute has a minimum value.* | | bool | [**hasSingleStep**](#function-hassinglestep) () noexcept const *Returns* `true` *if the attribute has a single step value.* | | void | [**set**](#function-set) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & size=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Sets the attribute in the* `object` *to a specific*`value` *.* | | void | [**setClearFunction**](#function-setclearfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `clear` *function.* | | void | [**setCurrentIndex**](#function-setcurrentindex) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const int & index) const *Sets the attribute's current index in the* `object` *to a specific*`index` *.* | | void | [**setGetCountFunction**](#function-setgetcountfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getCount` *function.* | | void | [**setGetCurrentIndexFunction**](#function-setgetcurrentindexfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getCurrentIndex` *function.* | | void | [**setGetDefaultFunction**](#function-setgetdefaultfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getDefault` *function.* | | void | [**setGetEnabledFlagFunction**](#function-setgetenabledflagfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getEnabledFlag` *function.* | | void | [**setGetFunction**](#function-setgetfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `get` *function.* | | void | [**setGetItemTextFunction**](#function-setgetitemtextfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getItemText` *function.* | | void | [**setGetMaximumFunction**](#function-setgetmaximumfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getMaximum` *function.* | | void | [**setGetMinimumFunction**](#function-setgetminimumfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getMinimum` *function.* | | void | [**setGetSingleStepFunction**](#function-setgetsinglestepfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getSingleStep` *function.* | | void | [**setGetSizeFunction**](#function-setgetsizefunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getSize` *function.* | | void | [**setGetSuffixFunction**](#function-setgetsuffixfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getSuffix` *function.* | | void | [**setGetToolTipFunction**](#function-setgettooltipfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getToolTip` *function.* | | void | [**setGetVisibilityFlagFunction**](#function-setgetvisibilityflagfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `getVisibilityFlag` *function.* | | void | [**setHasFunction**](#function-sethasfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `has` *function.* | | void | [**setSetCurrentIndexFunction**](#function-setsetcurrentindexfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `setCurrentIndex` *function.* | | void | [**setSetFunction**](#function-setsetfunction) ([**SBFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Sets the* `set` *function.* | | | [**~SBCClassAttribute**](#function-sbcclassattribute) () *Destructs the class attribute.* | ## Public Types Documentation ### enum Access *Available attribute accesses.* ```C++ enum SBCClassAttribute::Access { ReadOnly = 0, ReadWrite = 1, ReadWriteClear = 2 }; ``` ______________________________________________________________________ ### enum Type *Available attribute types.* ```C++ enum SBCClassAttribute::Type { Scalar = 0, Array = 1, Range = 2, Slider = 3, List = 4, RichText = 5, PushButton = 6, ImagePath = 7, ImageBase64 = 8 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCClassAttribute [1/2] *Constructs a class attribute.* ```C++ SBCClassAttribute::SBCClassAttribute ( SBValue attributeType, SBCClassAttribute::Access access, SBCClassAttribute::Type type, const std::string & attributeName, const std::string & attributeDescription, const std::string & attributeGroup, bool staticFlag ) ``` Creates an attribute with the given type, access level, and metadata. **Parameters:** - `attributeType` The type of the attribute value. - `access` The access mode of the attribute (read-only, read-write, or read-write-clear). - `type` The attribute type (scalar, array, range, etc.). - `attributeName` The name of the attribute. - `attributeDescription` The description of the attribute. - `attributeGroup` The group to which the attribute belongs. - `staticFlag` `true` if the attribute is static; otherwise `false`. ______________________________________________________________________ ### function SBCClassAttribute [2/2] *Constructs a class attribute.* ```C++ SBCClassAttribute::SBCClassAttribute ( SBValue attributeType, SBCClassAttribute::Access access, SBCClassAttribute::Type type, const std::string & attributeName, const std::string & attributeDescription, const std::string & attributeGroup, bool staticFlag, SBFunction * getFunction, SBFunction * setFunction=nullptr, SBFunction * hasFunction=nullptr, SBFunction * clearFunction=nullptr, SBFunction * getSizeFunction=nullptr, SBFunction * getMinimumFunction=nullptr, SBFunction * getMaximumFunction=nullptr, SBFunction * getSingleStepFunction=nullptr, SBFunction * getSuffixFunction=nullptr, SBFunction * getCountFunction=nullptr, SBFunction * getCurrentIndexFunction=nullptr, SBFunction * setCurrentIndexFunction=nullptr, SBFunction * getItemTextFunction=nullptr, SBFunction * getDefaultFunction=nullptr ) ``` Constructs a class attribute with custom accessor functions. Creates an attribute with the given type, access level, metadata, and optional function pointers for attribute operations. **Parameters:** - `attributeType` The type of the attribute value. - `access` The access mode of the attribute. - `type` The attribute type. - `attributeName` The name of the attribute. - `attributeDescription` The description of the attribute. - `attributeGroup` The group to which the attribute belongs. - `staticFlag` `true` if the attribute is static; otherwise `false`. - `getFunction` Function used to retrieve the attribute value. - `setFunction` Function used to set the attribute value. - `hasFunction` Function used to determine if the attribute has a value. - `clearFunction` Function used to clear the attribute value. - `getSizeFunction` Function used to obtain the size of the attribute. - `getMinimumFunction` Function used to obtain the minimum permissible value. - `getMaximumFunction` Function used to obtain the maximum permissible value. - `getSingleStepFunction` Function used to obtain the single step increment value. - `getSuffixFunction` Function used to obtain the suffix string for the attribute. - `getCountFunction` Function used to obtain the number of items for list-type attributes. - `getCurrentIndexFunction` Function used to obtain the current index of a list attribute. - `setCurrentIndexFunction` Function used to set the current index of a list attribute. - `getItemTextFunction` Function used to obtain the text of an item in a list attribute. - `getDefaultFunction` Function used to obtain the default value of the attribute. ______________________________________________________________________ ### function clear *Clears the value of the attribute when possible.* ```C++ void SBCClassAttribute::clear ( const SBValue & object ) const ``` Clears the attribute value on the given object, if supported. **Parameters:** - `object` The object whose attribute should be cleared. ______________________________________________________________________ ### function get *Gets the attribute from the* `object` *.* ```C++ SBValue SBCClassAttribute::get ( const SBValue & object ) const ``` Retrieves the attribute value from an object. **Parameters:** - `object` The object from which to get the attribute value. **Returns:** The attribute value as an SBValue. ______________________________________________________________________ ### function getAccess *Returns the access of the attribute.* ```C++ SBCClassAttribute::Access SBCClassAttribute::getAccess () const ``` Returns the access level of the attribute. **Returns:** The access mode (read-only, read-write, or read-write-clear). ______________________________________________________________________ ### function getAttributeType *Returns the type of the attribute value.* ```C++ SBValue SBCClassAttribute::getAttributeType () const ``` Returns the underlying value type of the attribute. **Returns:** The attribute's SBValue type. ______________________________________________________________________ ### function getCount *Returns the number of items of the attribute for the* `object` *.* ```C++ int SBCClassAttribute::getCount ( const SBValue & object ) const ``` Retrieves the number of items in a list-type attribute for the given object. This function returns the total number of items contained in the attribute. **Parameters:** - `object` The object to query. **Returns:** The count of items. ______________________________________________________________________ ### function getCurrentIndex *Returns the attribute's current index from the* `object` *.* ```C++ int SBCClassAttribute::getCurrentIndex ( const SBValue & object ) const ``` Retrieves the current index of a list-type attribute for the given object. This function returns the currently selected index within the attribute's list. **Parameters:** - `object` The object to query. **Returns:** The current index. ______________________________________________________________________ ### function getDefault *Returns the attribute's default value from the* `object` *.* ```C++ SBValue SBCClassAttribute::getDefault ( const SBValue & object ) const ``` Retrieves the default value of the attribute for the given object. **Parameters:** - `object` The object to query. **Returns:** The default attribute value as an SBValue. ______________________________________________________________________ ### function getDescription *Returns the description of the attribute.* ```C++ std::string SBCClassAttribute::getDescription () const ``` **Returns:** The attribute description. ______________________________________________________________________ ### function getEnabledFlag *Returns* `true` *if the attribute should be enabled in the*[Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) \_\_ ```C++ bool SBCClassAttribute::getEnabledFlag ( const SBValue & object ) const ``` Determines whether the attribute should be enabled in the inspector for the given object. This function indicates if the attribute is currently enabled for interaction in the inspector UI. **Parameters:** - `object` The object to query. **Returns:** `true` if the attribute should be enabled; otherwise `false`. ______________________________________________________________________ ### function getGroup *Returns the group of the attribute.* ```C++ std::string SBCClassAttribute::getGroup () const ``` **Returns:** The attribute group. ______________________________________________________________________ ### function getItemText *Returns the attribute's text for the* `index` *from the*`object` *.* ```C++ std::string SBCClassAttribute::getItemText ( const SBValue & object, const int & index ) const ``` Retrieves the text for a specific item in a list-type attribute. This function returns the display text associated with the item at the specified index. **Parameters:** - `object` The object to query. - `index` The index of the item. **Returns:** The item text. ______________________________________________________________________ ### function getMaximum *Returns the attribute's maximum value from the* `object` *.* ```C++ SBValue SBCClassAttribute::getMaximum ( const SBValue & object ) const ``` Retrieves the maximum permissible value of the attribute for the given object. **Parameters:** - `object` The object to query. **Returns:** The maximum value as an SBValue. ______________________________________________________________________ ### function getMinimum *Returns the attribute's minimum value from the* `object` *.* ```C++ SBValue SBCClassAttribute::getMinimum ( const SBValue & object ) const ``` Retrieves the minimum permissible value of the attribute for the given object. **Parameters:** - `object` The object to query. **Returns:** The minimum value as an SBValue. ______________________________________________________________________ ### function getName *Returns the name of the attribute.* ```C++ std::string SBCClassAttribute::getName () const ``` **Returns:** The attribute name. ______________________________________________________________________ ### function getSingleStep *Returns the attribute's single step from the* `object` *.* ```C++ SBValue SBCClassAttribute::getSingleStep ( const SBValue & object ) const ``` Retrieves the single-step increment value of the attribute for the given object. This function returns the increment used for stepping the attribute's numeric value. **Parameters:** - `object` The object to query. **Returns:** The single-step value as an SBValue. ______________________________________________________________________ ### function getSize *Returns the size of the array attribute in the* `object` *when relevant.* ```C++ unsigned int SBCClassAttribute::getSize ( const SBValue & object ) const ``` Retrieves the size of an array attribute for the given object. Retrieves the size by calling the configured getSizeFunction if present, and returns the result as an unsigned integer. **Parameters:** - `object` The object to query. **Returns:** The size of the attribute as an unsigned integer. ______________________________________________________________________ ### function getStaticFlag *Returns whether the attribute is static.* ```C++ bool SBCClassAttribute::getStaticFlag () const ``` **Returns:** `true` if the attribute is static; otherwise `false`. ______________________________________________________________________ ### function getSuffix *Returns the attribute's suffix from the* `object` *.* ```C++ std::string SBCClassAttribute::getSuffix ( const SBValue & object ) const ``` Retrieves the suffix string associated with the attribute for the given object. This function obtains the suffix string used for display purposes. **Parameters:** - `object` The object to query. **Returns:** The suffix string. ______________________________________________________________________ ### function getToolTip *Returns the tool tip of the attribute.* ```C++ std::string SBCClassAttribute::getToolTip ( const SBValue & object ) const ``` Retrieves the tool tip string for the attribute for the given object. This function returns the tooltip text providing additional information about the attribute. **Parameters:** - `object` The object to query. **Returns:** The tool tip string. ______________________________________________________________________ ### function getType *Returns the type of the attribute.* ```C++ SBCClassAttribute::Type SBCClassAttribute::getType () const ``` **Returns:** The attribute type (scalar, array, range, etc.). ______________________________________________________________________ ### function getVisibilityFlag *Returns* `true` *if the attribute should be visible in the*[Inspector](https://documentation.samson-connect.net/users/latest/inspecting/) \_\_ ```C++ bool SBCClassAttribute::getVisibilityFlag ( const SBValue & object ) const ``` Determines whether the attribute should be visible in the inspector for the given object. This function indicates if the attribute is currently visible in the inspector UI. **Parameters:** - `object` The object to query. **Returns:** `true` if the attribute should be visible; otherwise `false`. ______________________________________________________________________ ### function has *Returns whether the attribute has a value when the attribute is clearable.* ```C++ bool SBCClassAttribute::has ( const SBValue & object ) const ``` Checks whether the attribute has a value for the given object. Determines the presence of a value by invoking the associated hasFunction, if defined, and returns its boolean result. **Parameters:** - `object` The object to check. **Returns:** `true` if the attribute has a value; otherwise `false`. ______________________________________________________________________ ### function hasDefault *Returns* `true` *if the attribute has a default value.* ```C++ bool SBCClassAttribute::hasDefault () noexcept const ``` Indicates whether the attribute has a default value. **Returns:** `true` if a default value is defined; otherwise `false`. ______________________________________________________________________ ### function hasMaximum *Returns* `true` *if the attribute has a maximum value.* ```C++ bool SBCClassAttribute::hasMaximum () noexcept const ``` Indicates whether the attribute has a maximum value defined. **Returns:** `true` if a maximum value is defined; otherwise `false`. ______________________________________________________________________ ### function hasMinimum *Returns* `true` *if the attribute has a minimum value.* ```C++ bool SBCClassAttribute::hasMinimum () noexcept const ``` Indicates whether the attribute has a minimum value defined. **Returns:** `true` if a minimum value is defined; otherwise `false`. ______________________________________________________________________ ### function hasSingleStep *Returns* `true` *if the attribute has a single step value.* ```C++ bool SBCClassAttribute::hasSingleStep () noexcept const ``` Indicates whether the attribute has a single-step value defined. **Returns:** `true` if a single-step value is defined; otherwise `false`. ______________________________________________________________________ ### function set *Sets the attribute in the* `object` *to a specific*`value` *.* ```C++ void SBCClassAttribute::set ( const SBValue & object, const SBValue & value, const SBValue & size=SBValue () ) const ``` Sets the attribute value on an object. **Parameters:** - `object` The object on which to set the attribute. - `value` The new value for the attribute. - `size` Optional size parameter for array attributes; defaults to an empty SBValue. ______________________________________________________________________ ### function setClearFunction *Sets the* `clear` *function.* ```C++ void SBCClassAttribute::setClearFunction ( SBFunction * function ) ``` Sets the function used to clear the attribute. **Parameters:** - `function` Pointer to the SBFunction that clears the attribute. ______________________________________________________________________ ### function setCurrentIndex *Sets the attribute's current index in the* `object` *to a specific*`index` *.* ```C++ void SBCClassAttribute::setCurrentIndex ( const SBValue & object, const int & index ) const ``` Sets the current index of a list-type attribute for the given object. This function updates the selected index of the attribute's list to the specified value. **Parameters:** - `object` The object whose attribute index is to be set. - `index` The new current index. ______________________________________________________________________ ### function setGetCountFunction *Sets the* `getCount` *function.* ```C++ void SBCClassAttribute::setGetCountFunction ( SBFunction * function ) ``` Sets the function used to get the item count of a list-type attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the count. ______________________________________________________________________ ### function setGetCurrentIndexFunction *Sets the* `getCurrentIndex` *function.* ```C++ void SBCClassAttribute::setGetCurrentIndexFunction ( SBFunction * function ) ``` Sets the function used to get the current index of a list-type attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the current index. ______________________________________________________________________ ### function setGetDefaultFunction *Sets the* `getDefault` *function.* ```C++ void SBCClassAttribute::setGetDefaultFunction ( SBFunction * function ) ``` Sets the function used to get the default value of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the default value. ______________________________________________________________________ ### function setGetEnabledFlagFunction *Sets the* `getEnabledFlag` *function.* ```C++ void SBCClassAttribute::setGetEnabledFlagFunction ( SBFunction * function ) ``` Sets the function used to get the enabled flag of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the enabled flag. ______________________________________________________________________ ### function setGetFunction *Sets the* `get` *function.* ```C++ void SBCClassAttribute::setGetFunction ( SBFunction * function ) ``` Sets the function used to get the attribute value. **Parameters:** - `function` Pointer to the SBFunction that retrieves the attribute value. ______________________________________________________________________ ### function setGetItemTextFunction *Sets the* `getItemText` *function.* ```C++ void SBCClassAttribute::setGetItemTextFunction ( SBFunction * function ) ``` Sets the function used to get the text of an item in a list-type attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the item text. ______________________________________________________________________ ### function setGetMaximumFunction *Sets the* `getMaximum` *function.* ```C++ void SBCClassAttribute::setGetMaximumFunction ( SBFunction * function ) ``` Sets the function used to get the maximum value of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the maximum value. ______________________________________________________________________ ### function setGetMinimumFunction *Sets the* `getMinimum` *function.* ```C++ void SBCClassAttribute::setGetMinimumFunction ( SBFunction * function ) ``` Sets the function used to get the minimum value of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the minimum value. ______________________________________________________________________ ### function setGetSingleStepFunction *Sets the* `getSingleStep` *function.* ```C++ void SBCClassAttribute::setGetSingleStepFunction ( SBFunction * function ) ``` Sets the function used to get the single-step increment value of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the single-step value. ______________________________________________________________________ ### function setGetSizeFunction *Sets the* `getSize` *function.* ```C++ void SBCClassAttribute::setGetSizeFunction ( SBFunction * function ) ``` Sets the function used to get the size of the attribute. **Parameters:** - `function` Pointer to the SBFunction that obtains the attribute size. ______________________________________________________________________ ### function setGetSuffixFunction *Sets the* `getSuffix` *function.* ```C++ void SBCClassAttribute::setGetSuffixFunction ( SBFunction * function ) ``` Sets the function used to get the suffix string of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the suffix. ______________________________________________________________________ ### function setGetToolTipFunction *Sets the* `getToolTip` *function.* ```C++ void SBCClassAttribute::setGetToolTipFunction ( SBFunction * function ) ``` Sets the function used to get the tool tip string of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the tool tip. ______________________________________________________________________ ### function setGetVisibilityFlagFunction *Sets the* `getVisibilityFlag` *function.* ```C++ void SBCClassAttribute::setGetVisibilityFlagFunction ( SBFunction * function ) ``` Sets the function used to get the visibility flag of the attribute. **Parameters:** - `function` Pointer to the SBFunction that retrieves the visibility flag. ______________________________________________________________________ ### function setHasFunction *Sets the* `has` *function.* ```C++ void SBCClassAttribute::setHasFunction ( SBFunction * function ) ``` Sets the function used to determine if the attribute has a value. **Parameters:** - `function` Pointer to the SBFunction that checks the attribute existence. ______________________________________________________________________ ### function setSetCurrentIndexFunction *Sets the* `setCurrentIndex` *function.* ```C++ void SBCClassAttribute::setSetCurrentIndexFunction ( SBFunction * function ) ``` Sets the function used to set the current index of a list-type attribute. **Parameters:** - `function` Pointer to the SBFunction that sets the current index. ______________________________________________________________________ ### function setSetFunction *Sets the* `set` *function.* ```C++ void SBCClassAttribute::setSetFunction ( SBFunction * function ) ``` Sets the function used to set the attribute value. **Parameters:** - `function` Pointer to the SBFunction that sets the attribute value. ______________________________________________________________________ ### function ~SBCClassAttribute *Destructs the class attribute.* ```C++ SBCClassAttribute::~SBCClassAttribute () ``` Destroys the class attribute. ______________________________________________________________________ # SBAttributeChange # Class SBCClassAttributeChange **template \** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassAttributeChange**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttributeChange/index.md) *This template class describes a class attribute change.* - `#include ` ## Public Attributes | Type | Name | | --------- | ------------------------------------------------------------- | | Attribute | [**newValue**](#variable-newvalue) *The new attribute value.* | | Class | [**object**](#variable-object) *The owner.* | | Attribute | [**oldValue**](#variable-oldvalue) *The old attribute value.* | ## Public Functions | Type | Name | | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCClassAttributeChange**](#function-sbcclassattributechange-12) () *Default constructor.* | | | [**SBCClassAttributeChange**](#function-sbcclassattributechange-22) (const Class & object, const Attribute & oldValue, const Attribute & newValue) *Constructor.* | | | [**~SBCClassAttributeChange**](#function-sbcclassattributechange) () *Destructor.* | ## Public Attributes Documentation ### variable newValue *The new attribute value.* ```C++ Attribute SBCClassAttributeChange< Class, Attribute >::newValue; ``` ______________________________________________________________________ ### variable object *The owner.* ```C++ Class SBCClassAttributeChange< Class, Attribute >::object; ``` ______________________________________________________________________ ### variable oldValue *The old attribute value.* ```C++ Attribute SBCClassAttributeChange< Class, Attribute >::oldValue; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCClassAttributeChange [1/2] *Default constructor.* ```C++ inline SBCClassAttributeChange::SBCClassAttributeChange () ``` ______________________________________________________________________ ### function SBCClassAttributeChange [2/2] *Constructor.* ```C++ inline SBCClassAttributeChange::SBCClassAttributeChange ( const Class & object, const Attribute & oldValue, const Attribute & newValue ) ``` ______________________________________________________________________ ### function ~SBCClassAttributeChange *Destructor.* ```C++ inline SBCClassAttributeChange::~SBCClassAttributeChange () ``` ______________________________________________________________________ # SBAttributeChangeVector # Class SBCClassAttributeChangeVector **template \** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassAttributeChangeVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttributeChangeVector/index.md) *This template class describes a vector of class attribute changes.* - `#include ` Inherits the following classes: [SBCContainerVector](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) ## Public Functions | Type | Name | | ---- | ------------------------------------------------------------------------------------------------ | | | [**SBCClassAttributeChangeVector**](#function-sbcclassattributechangevector-12) () | | | [**SBCClassAttributeChangeVector**](#function-sbcclassattributechangevector-22) (unsigned int n) | | | [**~SBCClassAttributeChangeVector**](#function-sbcclassattributechangevector) () | ## Public Functions inherited from SBCContainerVector See [SBCContainerVector](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) | Type | Name | | --------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector-17) () *Constructs an empty vector.* | | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector-27) (unsigned int n) *Constructs a vector of reserved size* `n` *.* | | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector-37) (unsigned int n, unsigned int c, const T & t) *Constructs a vector of reserved size* `n` *and current size*`c` *, filled with*`c` *copies of*`t` *.* | | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector-47) (T * a, unsigned int n) *Constructs a vector from an array.* | | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector-57) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & vector) *Copy constructor.* | | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector-67) ([**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) && vector) noexcept *Move constructor.* | | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector-77) (std::initializer_list< T > list) *Constructor using the initializer list.* | | unsigned int | [**allocatedSize**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-allocatedsize) () noexcept const *Returns the allocated size (in memory) of the vector.* | | T & | [**back**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-back-12) () *Returns a reference to the last element.* | | T const & | [**back**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-back-22) () const *Returns a reference to the last element.* | | iterator | [**begin**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-begin-12) () *Returns an iterator that points to the beginning of the vector.* | | const_iterator | [**begin**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-begin-22) () const *Returns an iterator that points to the beginning of the vector.* | | void | [**clear**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-clear) () *Empties the vector.* | | bool | [**contains**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-contains) (const T & t) *Returns true when the vector contains* `t` *.* | | bool | [**empty**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-empty) () noexcept const *Returns true if and only if the vector is empty.* | | iterator | [**end**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-end-12) () *Returns an iterator that points to the end of the vector.* | | const_iterator | [**end**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-end-22) () const *Returns an iterator that points to the end of the vector.* | | void | [**free**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-free) () *Frees the memory allocated for the vector.* | | T & | [**front**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-front-12) () *Returns a reference to the last element.* | | T const & | [**front**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-front-22) () const *Returns a reference to the last element.* | | T & | [**getElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-getelement-12) (unsigned int i) *Returns a reference to element* `i` *.* | | T const & | [**getElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-getelement-22) (unsigned int i) const *Returns a reference to element* `i` *.* | | unsigned int | [**getMemoryFootPrint**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-getmemoryfootprint) () const *Returns the memory footprint of the vector.* | | T \* | [**getPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-getpointer-12) (unsigned int i) *Returns a pointer to element* `i` *.* | | T const \* | [**getPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-getpointer-22) (unsigned int i) const *Returns a pointer to element* `i` *.* | | void | [**insert**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-insert) (unsigned int i, const T & t) *Inserts* `t` *at position*`i` *if possible. If an element was present at position*`i` *, it is pushed at the back of the vector.* | | void | [**insertLinear**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-insertlinear) (unsigned int i, const T & t) *Inserts* `t` *at position*`i` *if possible.* | | bool | [**operator!=**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-operator) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & other) *Returns whether this vector is different from an* `other` *vector.* | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & | [**operator=**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-operator_1) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & vector) *Copy assignment.* | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & | [**operator=**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-operator_2) ([**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) && vector) noexcept *Move assignment.* | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & | [**operator=**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-operator_3) (std::initializer_list< T > list) *Assignment using the initializer list.* | | bool | [**operator==**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-operator_4) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & other) const *Returns whether this vector is equal to an* `other` *vector.* | | T & | [**operator[]**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-operator_5) (unsigned int i) *Returns a reference to element* `i` *.* | | T const & | [**operator[]**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-operator_6) (unsigned int i) const *Returns a reference to element* `i` *.* | | void | [**pop_back**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-pop_back) () *Removes the last element from the vector.* | | void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-print) (unsigned int offset=0) const *Prints the vector.* | | void | [**push_back**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-push_back) (const T & t) *Appends* `t` *to the vector.* | | reverse_iterator | [**rbegin**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-rbegin-12) () *Returns a reverse iterator that points to the reverse beginning of the vector.* | | const_reverse_iterator | [**rbegin**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-rbegin-22) () const *Returns a reverse iterator that points to the reverse beginning of the vector.* | | void | [**remove**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-remove) (unsigned int i) *Removes element* `i` *from the vector, and replaces it with the last element.* | | void | [**removeAll**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-removeall) (const T & t) *Removes all* `t` *from the vector. The vector is reordered as when applying multiple remove operations.* | | void | [**removeLinear**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-removelinear-12) (unsigned int i) *Removes element* `i` *from the vector.* | | void | [**removeLinear**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-removelinear-22) (unsigned int first, unsigned int last) *Removes all elements between (and including) positions* `first` *and*`last` *.* | | reverse_iterator | [**rend**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-rend-12) () *Returns a reverse iterator that points to the reverse end of the vector.* | | const_reverse_iterator | [**rend**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-rend-22) () const *Returns a reverse iterator that points to the reverse end of the vector.* | | void | [**resize**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-resize) (unsigned int newSize) *Resize to size* `n` *.* | | void | [**setArray**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-setarray) (T * newArray, unsigned int newSize) *build from array* | | unsigned int | [**size**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-size) () noexcept const *Returns the size of the vector.* | | virtual | [**~SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/#function-sbccontainervector) () *Destructs the vector.* | ## Public Functions Documentation ### function SBCClassAttributeChangeVector [1/2] ```C++ inline SBCClassAttributeChangeVector::SBCClassAttributeChangeVector () ``` ______________________________________________________________________ ### function SBCClassAttributeChangeVector [2/2] ```C++ inline SBCClassAttributeChangeVector::SBCClassAttributeChangeVector ( unsigned int n ) ``` ______________________________________________________________________ ### function ~SBCClassAttributeChangeVector ```C++ inline SBCClassAttributeChangeVector::~SBCClassAttributeChangeVector () ``` ______________________________________________________________________ # SBClass # Class SBCClass [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) *This class is the main root class.* [More...](#detailed-description) - `#include ` ## Public Types | Type | Name | | ---- | ------------------------------------------------------------ | | enum | [**Category**](#enum-category) *Available class categories.* | | enum | [**Type**](#enum-type) *Available class types.* | ## Public Functions | Type | Name | | ------- | ------------------------------------------------------------- | | | [**SBCClass**](#function-sbcclass) () *Constructs a class.* | | virtual | [**~SBCClass**](#function-sbcclass) () *Destructs the class.* | ## Public Static Functions | Type | Name | | ----------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getClassCategoryString**](#function-getclasscategorystring) ([**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-category) category) *Returns a string describing the category of the class.* | | std::string | [**getClassTypeString**](#function-getclasstypestring) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-type) type) *Returns a string describing the type of the class.* | ## Detailed Description This class is the root class of numerous classes in SAMSON. In particular, all [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) node classes indirectly derive from [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md), as well as many SAMSON Extensions classes. This class derives class *types* and class *categories*. The static function [**getClassTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#function-getclasstypestring) may be used to retrieve the string description corresponding to a class type, and the static function [**getClassCategoryString**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#function-getclasscategorystring) may be used to retrieve the string description corresponding to a class category ([**SBCClass::Category**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-category)). **Short name**: SBClass ## Public Types Documentation ### enum Category *Available class categories.* ```C++ enum SBCClass::Category { Assembly = 100, Biology = 200, Chemistry = 300, Developer = 400, Education = 500, Electronics = 600, General = 700, Materials = 800, Medicine = 900, Metrology = 1000, Modeling = 1100, Optics = 1200, Particles = 1300, Pharmacy = 1400, Photonics = 1500, Physics = 1600, Simulation = 1700, Toxicology = 1800, Visualization = 1900 }; ``` ______________________________________________________________________ ### enum Type *Available class types.* ```C++ enum SBCClass::Type { Base = 1, App = 10, Editor = 20, Importer = 30, Exporter = 31, Tutorial = 40, VisualModel = 100, DynamicalModelArticulatedBodySystem = 200, DynamicalModelParticleSystem = 201, DynamicalModelRigidBodySystem = 202, InteractionModelArticulatedBodySystem = 300, InteractionModelParticleSystem = 301, InteractionModelRigidBodySystem = 302, PropertyModel = 400, PropertyModelFunction = 401, NeighborSearchArticulatedBodySystem = 500, NeighborSearchParticleSystem = 501, NeighborSearchRigidBodySystem = 502, StateUpdaterArticulatedBodySystem = 600, StateUpdaterParticleSystem = 601, StateUpdaterRigidBodySystem = 602, RenderProgram = 700, Controller = 800, ControllerNode = 801, Label = 900, NodeGUI = 1000, Properties = 2000, Factory = 3000, StructuralModelFactory = 3001, DynamicalModelParticleSystemFactory = 3002, InteractionModelParticleSystemFactory = 3003, VisualModelFactory = 3004, PropertyModelFactory = 3005, ControllerFactory = 3006, LabelFactory = 3007, Inspector = 4000, InspectorFactory = 4001, AssetLibrary = 5000, AnimationFactory = 7000, EntranceAnimation = 7001, HighlightAnimation = 7002, MotionAnimation = 7003, ExitAnimation = 7004, CameraAnimation = 7005, OtherAnimation = 7006, ColorScheme = 8000, ColorPalette = 9000, Selector = 10000, Assistant = 20000, Custom = 100000 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCClass *Constructs a class.* ```C++ SBCClass::SBCClass () ``` Default constructor for [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md). Constructs a new [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) instance. ______________________________________________________________________ ### function ~SBCClass *Destructs the class.* ```C++ virtual SBCClass::~SBCClass () ``` Destructor for [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md). Destroys the [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) instance and releases associated resources. ______________________________________________________________________ ## Public Static Functions Documentation ### function getClassCategoryString *Returns a string describing the category of the class.* ```C++ static std::string SBCClass::getClassCategoryString ( Category category ) ``` Returns a string describing the specified class category. The function maps each [**SBCClass::Category**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-category) enumeration value to its textual representation. **Parameters:** - `category` The class category to describe. **Returns:** A string representation of the class category, or "Undefined" if the category is unknown. ______________________________________________________________________ ### function getClassTypeString *Returns a string describing the type of the class.* ```C++ static std::string SBCClass::getClassTypeString ( Type type ) ``` Returns a string describing the specified class type. The function maps each [**SBCClass::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-type) enumeration value to its textual representation. **Parameters:** - `type` The class type to describe. **Returns:** A string representation of the class type, or "Undefined" if the type is unknown. ______________________________________________________________________ # SBConstructor # Class SBCClassConstructor [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) *This class describes a class constructor in a class proxy.* [More...](#detailed-description) - `#include ` Inherits the following classes: SBCClassCallableMember Inherited by the following classes: [SBCClassConstructor0](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor0/index.md) ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCClassConstructor**](#function-sbcclassconstructor-12) () noexcept *Constructs a class constructor.* | | | [**SBCClassConstructor**](#function-sbcclassconstructor-22) (const [**SBCClassCallableMemberDoc::Spec**](https://documentation.samson-connect.net/developers/latest/api/structSBCClassCallableMemberDoc_1_1Spec/index.md) & spec) *Constructs a class constructor with the given doc.specs.* | | virtual bool | [**canCreateInstance**](#function-cancreateinstance) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Returns* `true` *if and only if the constructor can create an instance with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**createInstance**](#function-createinstance) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Creates an instance of the class with arguments* `t0` *,*`t1` *, ...,*`t15` *.* | | virtual std::string | [**getClassName**](#function-getclassname) () const = 0 *Returns the class name.* | | virtual unsigned int | [**getNumberOfParameters**](#function-getnumberofparameters) () noexcept override const = 0 *Returns the number of parameters of the constructor.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getParameterType**](#function-getparametertype) (int i) override const = 0 *Returns the parameter type of the constructor parameter* `i` *.* | | virtual std::string | [**getParameterTypeName**](#function-getparametertypename) (int i) override const = 0 *Returns the parameter type name of the constructor parameter* `i` *.* | | virtual std::string | [**signature**](#function-signature) (bool addArgumentNames=false) override const *Returns the signature of the constructor; if* `addArgumentNames` *is*`true` *then also adds names of arguments.* | | virtual | [**~SBCClassConstructor**](#function-sbcclassconstructor) () *Destructs the constructor.* | ## Detailed Description A class constructor object is a functor that provides access to a SAMSON Extension constructor that has been exposed through a class descriptor (see [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md)). Assume for example a SAMSON Extension contains the following class: ```C++ class A { SB_CLASS public: A() {} virtual ~A() {} }; SB_REGISTER_TYPE(A, "A", "BF99103E-06FE-C4C1-D929-4C6E833B101C"); ``` as well as the following class descriptor: ```C++ SB_CLASS_BEGIN(A); SB_CLASS_TYPE(SBCClass::App); SB_CLASS_DESCRIPTION("Empty class"); SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; SB_INTERFACE_BEGIN; SB_INTERFACE_END; SB_CLASS_END(A); ``` In this example, the constructor `A()` is accessible to other SAMSON Extensions through the [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md), *even when the definition of class A is not available*. Precisely, even though other developers might not have access to the definition of class `A` (i.e. they do not have the appropriate header file), they may still retrieve constructors through the [**class proxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md): ```C++ SBProxy* classProxy = SAMSON::getProxy("A"); SBFactory* classFactory = classProxy->getFactory(); SBConstructor* classConstructor = classFactory->getConstructor(); ``` which they may then use to construct an instance of class `A`: ```C++ SBValue classInstance = classConstructor->createInstance(); ``` Note that the [**class proxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) also makes it possible to directly create an instance of an exposed class without having first to obtain the [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) object: ```C++ SBValue classInstance = classProxy->createInstance(); ``` However, when multiple calls to the constructor are performed, it is more efficient to store a pointer to a [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) object and reuse it. Note that a class constructor object should **never be deleted**. Please refer to the chapter about [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) for more information. **Short name**: SBConstructor **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) **See also:** [**SBCClassFactory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md), [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) ## Public Functions Documentation ### function SBCClassConstructor [1/2] *Constructs a class constructor.* ```C++ SBCClassConstructor::SBCClassConstructor () noexcept ``` ______________________________________________________________________ ### function SBCClassConstructor [2/2] *Constructs a class constructor with the given doc.specs.* ```C++ SBCClassConstructor::SBCClassConstructor ( const SBCClassCallableMemberDoc::Spec & spec ) ``` Constructs a class constructor with the given documentation specification. **Parameters:** - `spec` Documentation specification for the constructor. ______________________________________________________________________ ### function canCreateInstance *Returns* `true` *if and only if the constructor can create an instance with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual bool SBCClassConstructor::canCreateInstance ( const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Returns true if and only if the constructor can create an instance with the given arguments. **Parameters:** - `t0` First argument (optional). - `t1` Second argument (optional). - `t2` Third argument (optional). - `t3` Fourth argument (optional). - `t4` Fifth argument (optional). - `t5` Sixth argument (optional). - `t6` Seventh argument (optional). - `t7` Eighth argument (optional). - `t8` Ninth argument (optional). - `t9` Tenth argument (optional). - `t10` Eleventh argument (optional). - `t11` Twelfth argument (optional). - `t12` Thirteenth argument (optional). - `t13` Fourteenth argument (optional). - `t14` Fifteenth argument (optional). - `t15` Sixteenth argument (optional). **Returns:** `true` if the constructor can create an instance with the supplied arguments; `false` otherwise. ______________________________________________________________________ ### function createInstance *Creates an instance of the class with arguments* `t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBValue SBCClassConstructor::createInstance ( const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Creates an instance of the class using the supplied arguments. **Parameters:** - `t0` First argument (optional). - `t1` Second argument (optional). - `t2` Third argument (optional). - `t3` Fourth argument (optional). - `t4` Fifth argument (optional). - `t5` Sixth argument (optional). - `t6` Seventh argument (optional). - `t7` Eighth argument (optional). - `t8` Ninth argument (optional). - `t9` Tenth argument (optional). - `t10` Eleventh argument (optional). - `t11` Twelfth argument (optional). - `t12` Thirteenth argument (optional). - `t13` Fourteenth argument (optional). - `t14` Fifteenth argument (optional). - `t15` Sixteenth argument (optional). **Returns:** SBValue representing the created instance. ______________________________________________________________________ ### function getClassName *Returns the class name.* ```C++ virtual std::string SBCClassConstructor::getClassName () const = 0 ``` ______________________________________________________________________ ### function getNumberOfParameters *Returns the number of parameters of the constructor.* ```C++ virtual unsigned int SBCClassConstructor::getNumberOfParameters () noexcept override const = 0 ``` ______________________________________________________________________ ### function getParameterType *Returns the parameter type of the constructor parameter* `i` *.* ```C++ virtual SBValue SBCClassConstructor::getParameterType ( int i ) override const = 0 ``` ______________________________________________________________________ ### function getParameterTypeName *Returns the parameter type name of the constructor parameter* `i` *.* ```C++ virtual std::string SBCClassConstructor::getParameterTypeName ( int i ) override const = 0 ``` ______________________________________________________________________ ### function signature *Returns the signature of the constructor; if* `addArgumentNames` *is*`true` *then also adds names of arguments.* ```C++ virtual std::string SBCClassConstructor::signature ( bool addArgumentNames=false ) override const ``` Returns the signature of the constructor. **Parameters:** - `addArgumentNames` If true, the signature includes the argument names (if available). **Returns:** String containing the constructor signature. ______________________________________________________________________ ### function ~SBCClassConstructor *Destructs the constructor.* ```C++ virtual SBCClassConstructor::~SBCClassConstructor () ``` Destructs the class constructor. ______________________________________________________________________ # SBFactory # Class SBCClassFactory [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassFactory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md) *This class describes a class factory in a class proxy.* [More...](#detailed-description) - `#include ` ## Public Functions | Type | Name | | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCClassFactory**](#function-sbcclassfactory) () *Constructs a class factory.* | | void | [**addConstructor**](#function-addconstructor) ([**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) * constructor) *Adds a constructor to the factory.* | | [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) \* | [**getConstructor**](#function-getconstructor) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Returns the constructor with arguments* `t0` *,*`t1` *, ...,*`t15` *.* | | SBHashMap< std::string, [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) * > const & | [**getConstructorMap**](#function-getconstructormap) () const *Returns the constructor map.* | | unsigned int | [**getNumberOfConstructors**](#function-getnumberofconstructors) () noexcept const *Returns the number of registered constructors.* | | void | [**print**](#function-print) (unsigned int offset=0) const *Prints the factory.* | | virtual | [**~SBCClassFactory**](#function-sbcclassfactory) () *Destructs the factory.* | ## Detailed Description **Short name**: SBFactory ## Public Functions Documentation ### function SBCClassFactory *Constructs a class factory.* ```C++ SBCClassFactory::SBCClassFactory () ``` Constructs a new [**SBCClassFactory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md) instance. Initializes the internal map that stores constructors. ______________________________________________________________________ ### function addConstructor *Adds a constructor to the factory.* ```C++ void SBCClassFactory::addConstructor ( SBCClassConstructor * constructor ) ``` Registers the provided constructor in the internal map. If the pointer is null, an error is logged. **Parameters:** - `constructor` Pointer to the [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) to add. Must not be null. ______________________________________________________________________ ### function getConstructor *Returns the constructor with arguments* `t0` *,*`t1` *, ...,*`t15` *.* ```C++ SBCClassConstructor * SBCClassFactory::getConstructor ( const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Retrieves a constructor matching the provided arguments. Searches the registered constructors and returns the one that can create an instance with the given arguments. If multiple constructors match, an error is logged and the first match is returned. If none match, nullptr is returned. **Parameters:** - `t0` First argument value (default constructed if not provided). - `t1` Second argument value. - `t2` Third argument value. - `t3` Fourth argument value. - `t4` Fifth argument value. - `t5` Sixth argument value. - `t6` Seventh argument value. - `t7` Eighth argument value. - `t8` Ninth argument value. - `t9` Tenth argument value. - `t10` Eleventh argument value. - `t11` Twelfth argument value. - `t12` Thirteenth argument value. - `t13` Fourteenth argument value. - `t14` Fifteenth argument value. - `t15` Sixteenth argument value. **Returns:** Pointer to a matching [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md), or nullptr if none found. ______________________________________________________________________ ### function getConstructorMap *Returns the constructor map.* ```C++ SBHashMap< std::string, SBCClassConstructor * > const & SBCClassFactory::getConstructorMap () const ``` Returns the map of registered constructors. Provides read-only access to the internal map that associates constructor signatures with their instances. **Returns:** Constant reference to the map of constructors. ______________________________________________________________________ ### function getNumberOfConstructors *Returns the number of registered constructors.* ```C++ unsigned int SBCClassFactory::getNumberOfConstructors () noexcept const ``` Retrieves the count of constructors currently stored in the factory. **Returns:** Number of constructors. ______________________________________________________________________ ### function print *Prints the factory.* ```C++ void SBCClassFactory::print ( unsigned int offset=0 ) const ``` Prints information about the factory and its constructors. Outputs the factory details and a list of registered constructor signatures, indented by the specified offset. **Parameters:** - `offset` Number of tab characters to indent the output. ______________________________________________________________________ ### function ~SBCClassFactory *Destructs the factory.* ```C++ virtual SBCClassFactory::~SBCClassFactory () ``` Destroys the [**SBCClassFactory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md) instance. Releases the internal constructor map. ______________________________________________________________________ # SBFunction # Class SBCClassFunction [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) *This class describes a class function in a class proxy.* [More...](#detailed-description) - `#include ` Inherits the following classes: SBCClassCallableMember Inherited by the following classes: [SBCClassConstFunction0< void, Class >](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstFunction0_3_01void_00_01Class_01_4/index.md), [SBCClassFunction0< void, Class >](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction0_3_01void_00_01Class_01_4/index.md), [SBCClassStaticFunction0< void >](https://documentation.samson-connect.net/developers/latest/api/classSBCClassStaticFunction0_3_01void_01_4/index.md), [SBCClassConstFunction0](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstFunction0/index.md), [SBCClassConstFunction0< void, Class >](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstFunction0_3_01void_00_01Class_01_4/index.md), [SBCClassFunction0](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction0/index.md), [SBCClassFunction0< void, Class >](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction0_3_01void_00_01Class_01_4/index.md), [SBCClassStaticFunction0](https://documentation.samson-connect.net/developers/latest/api/classSBCClassStaticFunction0/index.md), [SBCClassStaticFunction0< void >](https://documentation.samson-connect.net/developers/latest/api/classSBCClassStaticFunction0_3_01void_01_4/index.md) ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCClassFunction**](#function-sbcclassfunction-12) () noexcept *Constructs a class function.* | | | [**SBCClassFunction**](#function-sbcclassfunction-22) (const [**SBCClassCallableMemberDoc::Spec**](https://documentation.samson-connect.net/developers/latest/api/structSBCClassCallableMemberDoc_1_1Spec/index.md) & spec) *Constructs a class function with the given doc.specs.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**call**](#function-call) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Calls the function for the specific* `object` *with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual bool | [**canCall**](#function-cancall) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Returns* `true` *if and only if the function can be called with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual std::string | [**getName**](#function-getname) () noexcept const = 0 *Returns the name of the function.* | | virtual unsigned int | [**getNumberOfParameters**](#function-getnumberofparameters) () noexcept override const = 0 *Returns the number of parameters of the function.* | | virtual std::string | [**getOutputType**](#function-getoutputtype) () const = 0 *Returns the output type of the function.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getParameterType**](#function-getparametertype) (int i) override const = 0 *Returns the parameter type of the function parameter* `i` *.* | | virtual std::string | [**getParameterTypeName**](#function-getparametertypename) (int i) override const = 0 *Returns the parameter type name of the function parameter* `i` *.* | | virtual bool | [**isConstFunction**](#function-isconstfunction) () noexcept const = 0 *Returns* `true` *if and only if the function is a const function.* | | virtual bool | [**isStaticFunction**](#function-isstaticfunction) () noexcept const = 0 *Returns* `true` *if and only if the function is a static function.* | | virtual std::string | [**signature**](#function-signature) (bool addArgumentNames=false) override const *Returns the signature of the function; if* `addArgumentNames` *is*`true` *then also adds names of arguments.* | | virtual | [**~SBCClassFunction**](#function-sbcclassfunction) () *Destructs the class function.* | ## Detailed Description A class function object is a functor that provides access to a SAMSON Extension function that has been exposed through a class descriptor (see [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md)). Assume for example a SAMSON Extension contains the following class: ```C++ class A { SB_CLASS public: A() {} virtual ~A() {} int multiplyByTwo(int i) { return 2 * i; } }; SB_REGISTER_TYPE(A, "A", "BF99103E-06FE-C4C1-D929-4C6E833B101C"); ``` as well as the following class descriptor: ```C++ SB_CLASS_BEGIN(A); SB_CLASS_TYPE(SBCClass::App); SB_CLASS_DESCRIPTION("Integer multiplier"); SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; SB_INTERFACE_BEGIN; SB_FUNCTION_1(int, multiplyByTwo, int); SB_INTERFACE_END; SB_CLASS_END(A); ``` In this example, the function `multiplyByTwo` is accessible to other SAMSON Extensions through the [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md), *even when the definition of class A is not available*. Precisely, even though other developers might not have access to the definition of class `A` (i.e. they do not have the appropriate header file), they may still access its functionality: ```C++ SBProxy* classProxy = SAMSON::getProxy("A"); SBInterface* classInterface = classProxy->getInterface(); SBFunction* classFunction = classInterface->getFunction("multiplyByTwo", SB_VALUE(0)); ``` Since, in this example, the function is not static, we need an object of type `A`: ```C++ SBValue classInstance = classProxy->createInstance(); ``` We may then use the exposed function by wrapping arguments and unwrapping results: ```C++ SBValue argument = SB_VALUE(17); SBValue resultHolder = classFunction->call(classInstance, argument); int result = SB_CAST(resultHolder); ``` Note that the [**class proxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) also makes it possible to directly call a function provided by an exposed class without having first to obtain the [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) object: ```C++ SBValue argument = SB_VALUE(17); SBValue resultHolder = classProxy->call(classInstance, "multiplyByTwo", argument); int result = SB_CAST(resultHolder); ``` However, when multiple calls are performed, it is more efficient to store a pointer to a [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) object and reuse it. Note that a class function object should **never be deleted**. Please refer to the chapter about [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) for more information. **Short name**: SBFunction **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) **See also:** [**SBCClassInterface**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md), [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) ## Public Functions Documentation ### function SBCClassFunction [1/2] *Constructs a class function.* ```C++ SBCClassFunction::SBCClassFunction () noexcept ``` Default constructs a [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) object. Creates a new [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) instance without any specific documentation specification. ______________________________________________________________________ ### function SBCClassFunction [2/2] *Constructs a class function with the given doc.specs.* ```C++ SBCClassFunction::SBCClassFunction ( const SBCClassCallableMemberDoc::Spec & spec ) ``` Constructs a [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) with the given documentation specification. Initializes the function using the provided specification which contains documentation details. **Parameters:** - `spec` The documentation specification used to initialize the function. ______________________________________________________________________ ### function call *Calls the function for the specific* `object` *with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBValue SBCClassFunction::call ( const SBValue & object, const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Calls the function on the given object with the provided arguments. Invokes the wrapped function using the specified object and up to sixteen optional arguments. The object must be a valid instance of the class that provides the function. **Parameters:** - `object` The object on which to invoke the function. - `t0` Optional first argument. - `t1` Optional second argument. - `t2` Optional third argument. - `t3` Optional fourth argument. - `t4` Optional fifth argument. - `t5` Optional sixth argument. - `t6` Optional seventh argument. - `t7` Optional eighth argument. - `t8` Optional ninth argument. - `t9` Optional tenth argument. - `t10` Optional eleventh argument. - `t11` Optional twelfth argument. - `t12` Optional thirteenth argument. - `t13` Optional fourteenth argument. - `t14` Optional fifteenth argument. - `t15` Optional sixteenth argument. **Returns:** The result of the function call wrapped in an SBValue. ______________________________________________________________________ ### function canCall *Returns* `true` *if and only if the function can be called with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual bool SBCClassFunction::canCall ( const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Checks if the function can be called with the provided arguments. Determines whether the function can be invoked given the optional arguments. The function can be called only if the number of valid arguments does not exceed the function's parameter count and each argument type matches the expected type. **Parameters:** - `t0` Optional first argument. - `t1` Optional second argument. - `t2` Optional third argument. - `t3` Optional fourth argument. - `t4` Optional fifth argument. - `t5` Optional sixth argument. - `t6` Optional seventh argument. - `t7` Optional eighth argument. - `t8` Optional ninth argument. - `t9` Optional tenth argument. - `t10` Optional eleventh argument. - `t11` Optional twelfth argument. - `t12` Optional thirteenth argument. - `t13` Optional fourteenth argument. - `t14` Optional fifteenth argument. - `t15` Optional sixteenth argument. **Returns:** `true` if the function can be called with the given arguments; otherwise `false`. ______________________________________________________________________ ### function getName *Returns the name of the function.* ```C++ virtual std::string SBCClassFunction::getName () noexcept const = 0 ``` ______________________________________________________________________ ### function getNumberOfParameters *Returns the number of parameters of the function.* ```C++ virtual unsigned int SBCClassFunction::getNumberOfParameters () noexcept override const = 0 ``` ______________________________________________________________________ ### function getOutputType *Returns the output type of the function.* ```C++ virtual std::string SBCClassFunction::getOutputType () const = 0 ``` ______________________________________________________________________ ### function getParameterType *Returns the parameter type of the function parameter* `i` *.* ```C++ virtual SBValue SBCClassFunction::getParameterType ( int i ) override const = 0 ``` ______________________________________________________________________ ### function getParameterTypeName *Returns the parameter type name of the function parameter* `i` *.* ```C++ virtual std::string SBCClassFunction::getParameterTypeName ( int i ) override const = 0 ``` ______________________________________________________________________ ### function isConstFunction *Returns* `true` *if and only if the function is a const function.* ```C++ virtual bool SBCClassFunction::isConstFunction () noexcept const = 0 ``` ______________________________________________________________________ ### function isStaticFunction *Returns* `true` *if and only if the function is a static function.* ```C++ virtual bool SBCClassFunction::isStaticFunction () noexcept const = 0 ``` ______________________________________________________________________ ### function signature *Returns the signature of the function; if* `addArgumentNames` *is*`true` *then also adds names of arguments.* ```C++ virtual std::string SBCClassFunction::signature ( bool addArgumentNames=false ) override const ``` Returns the textual signature of the function. Generates a string representing the function signature, optionally including the names of the arguments if requested. **Parameters:** - `addArgumentNames` If true, includes argument names in the signature; otherwise only types are shown. **Returns:** A string containing the function signature. ______________________________________________________________________ ### function ~SBCClassFunction *Destructs the class function.* ```C++ virtual SBCClassFunction::~SBCClassFunction () ``` Destroys the [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) object. Cleans up any resources associated with the function. Note that function objects should never be deleted by user code. ______________________________________________________________________ # SBInterface # Class SBCClassInterface [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassInterface**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md) *This class describes a class interface in a class proxy.* [More...](#detailed-description) - `#include ` ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCClassInterface**](#function-sbcclassinterface) () *Constructs a class interface.* | | void | [**addAttribute**](#function-addattribute) ([**SBCClassAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/index.md) * attribute) *Adds a function to the interface.* | | void | [**addFunction**](#function-addfunction) ([**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * function) *Adds a function to the interface.* | | [**SBCClassAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/index.md) \* | [**getAttribute**](#function-getattribute) (const std::string & attributeName) const *Returns the attribute with name* `attributeName` *.* | | SBHashMap< std::string, [**SBCClassAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassAttribute/index.md) * > const & | [**getAttributeMap**](#function-getattributemap) () const *Returns the attribute map.* | | [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) \* | [**getConstFunction**](#function-getconstfunction) (const std::string & functionName, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Returns the const function with name* `functionName` *and arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) \* | [**getFunction**](#function-getfunction) (const std::string & functionName, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Returns the function with name* `functionName` *and arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | SBHashMap< std::string, [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) * > const & | [**getFunctionMap**](#function-getfunctionmap) () const *Returns the function map.* | | unsigned int | [**getNumberOfAttributes**](#function-getnumberofattributes) () noexcept const *Returns the number of registered attributes.* | | unsigned int | [**getNumberOfFunctions**](#function-getnumberoffunctions) () noexcept const *Returns the number of registered functions.* | | void | [**print**](#function-print) (unsigned int offset=0) const *Prints the interface.* | | virtual | [**~SBCClassInterface**](#function-sbcclassinterface) () *Destructs the interface.* | ## Detailed Description A class interface is a collection of [**class functions**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) exposed through a class descriptor (see [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md)). Assume for example a SAMSON Extension contains the following class: ```C++ class A { SB_CLASS public: A() {} virtual ~A() {} int multiplyByTwo(int i) { return 2 * i; } }; SB_REGISTER_TYPE(A, "A", "BF99103E-06FE-C4C1-D929-4C6E833B101C"); ``` as well as the following class descriptor: ```C++ SB_CLASS_BEGIN(A); SB_CLASS_TYPE(SBCClass::App); SB_CLASS_DESCRIPTION("Integer multiplier"); SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; SB_INTERFACE_BEGIN; SB_FUNCTION_1(int, multiplyByTwo, int); SB_INTERFACE_END; SB_CLASS_END(A); ``` In this example, the function `multiplyByTwo` is accessible to other SAMSON Extensions through the [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md), *even when the definition of class A is not available*. Precisely, even though other developers might not have access to the definition of class `A` (i.e. they do not have the appropriate header file), they may still access its interface from the [**class proxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md): ```C++ SBProxy* classProxy = SAMSON::getProxy("A"); SBInterface* classInterface = classProxy->getInterface(); ``` They may then obtain [**function objects**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) from the interface: ```C++ SBFunction* classFunction = classInterface->getFunction("multiplyByTwo", SB_VALUE(0)); ``` Since, in this example, the function is not static, we need an object of type `A`: ```C++ SBValue classInstance = classProxy->createInstance(); ``` We may then use the exposed function by wrapping arguments and unwrapping results: ```C++ SBValue argument = SB_VALUE(17); SBValue resultHolder = classFunction->call(classInstance, argument); int result = SB_CAST(resultHolder); ``` Note that the [**class proxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) also makes it possible to directly call a function provided by an exposed class without having first to obtain the [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) object: ```C++ SBValue argument = SB_VALUE(17); SBValue resultHolder = classProxy->call(classInstance, "multiplyByTwo", argument); int result = SB_CAST(resultHolder); ``` However, when multiple calls are performed, it is more efficient to store a pointer to a [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) object and reuse it. Note that a class interface should **never be deleted**. Please refer to the chapter about [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) for more information. **Short name**: SBInterface **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) **See also:** [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md), [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) ## Public Functions Documentation ### function SBCClassInterface *Constructs a class interface.* ```C++ SBCClassInterface::SBCClassInterface () ``` Initializes the internal maps used to store functions and attributes. ______________________________________________________________________ ### function addAttribute *Adds a function to the interface.* ```C++ void SBCClassInterface::addAttribute ( SBCClassAttribute * attribute ) ``` Adds an attribute to the interface. Registers the given attribute so it can be accessed through the interface. **Parameters:** - `attribute` Pointer to the attribute to be added. Must not be nullptr. ______________________________________________________________________ ### function addFunction *Adds a function to the interface.* ```C++ void SBCClassInterface::addFunction ( SBCClassFunction * function ) ``` Registers the given function so it can be accessed through the interface. **Parameters:** - `function` Pointer to the function to be added. Must not be nullptr. ______________________________________________________________________ ### function getAttribute *Returns the attribute with name* `attributeName` *.* ```C++ SBCClassAttribute * SBCClassInterface::getAttribute ( const std::string & attributeName ) const ``` Returns the attribute with the given name. Retrieves a previously registered attribute from the interface. **Parameters:** - `attributeName` Name of the attribute to retrieve. **Returns:** Pointer to the attribute, or nullptr if it does not exist. ______________________________________________________________________ ### function getAttributeMap *Returns the attribute map.* ```C++ SBHashMap< std::string, SBCClassAttribute * > const & SBCClassInterface::getAttributeMap () const ``` Returns a constant reference to the map of registered attributes. The returned map maps attribute names to attribute objects. **Returns:** Reference to the internal attribute map. ______________________________________________________________________ ### function getConstFunction *Returns the const function with name* `functionName` *and arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ SBCClassFunction * SBCClassInterface::getConstFunction ( const std::string & functionName, const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Returns a const function matching the given name and arguments. Searches the registered functions for a const overload with the specified name that can be called with the provided arguments. **Parameters:** - `functionName` Name of the function to retrieve. - `t0` First argument value (optional, default constructed). - `t1` Second argument value (optional, default constructed). - `t2` Third argument value (optional, default constructed). - `t3` Fourth argument value (optional, default constructed). - `t4` Fifth argument value (optional, default constructed). - `t5` Sixth argument value (optional, default constructed). - `t6` Seventh argument value (optional, default constructed). - `t7` Eighth argument value (optional, default constructed). - `t8` Ninth argument value (optional, default constructed). - `t9` Tenth argument value (optional, default constructed). - `t10` Eleventh argument value (optional, default constructed). - `t11` Twelfth argument value (optional, default constructed). - `t12` Thirteenth argument value (optional, default constructed). - `t13` Fourteenth argument value (optional, default constructed). - `t14` Fifteenth argument value (optional, default constructed). - `t15` Sixteenth argument value (optional, default constructed). **Returns:** Pointer to a matching const function, or nullptr if none is found. ______________________________________________________________________ ### function getFunction *Returns the function with name* `functionName` *and arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ SBCClassFunction * SBCClassInterface::getFunction ( const std::string & functionName, const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Returns a non-const function matching the given name and arguments. Searches the registered functions for one with the specified name that can be called with the provided arguments. **Parameters:** - `functionName` Name of the function to retrieve. - `t0` First argument value (optional, default constructed). - `t1` Second argument value (optional, default constructed). - `t2` Third argument value (optional, default constructed). - `t3` Fourth argument value (optional, default constructed). - `t4` Fifth argument value (optional, default constructed). - `t5` Sixth argument value (optional, default constructed). - `t6` Seventh argument value (optional, default constructed). - `t7` Eighth argument value (optional, default constructed). - `t8` Ninth argument value (optional, default constructed). - `t9` Tenth argument value (optional, default constructed). - `t10` Eleventh argument value (optional, default constructed). - `t11` Twelfth argument value (optional, default constructed). - `t12` Thirteenth argument value (optional, default constructed). - `t13` Fourteenth argument value (optional, default constructed). - `t14` Fifteenth argument value (optional, default constructed). - `t15` Sixteenth argument value (optional, default constructed). **Returns:** Pointer to a matching function, or nullptr if none is found. ______________________________________________________________________ ### function getFunctionMap *Returns the function map.* ```C++ SBHashMap< std::string, SBCClassFunction * > const & SBCClassInterface::getFunctionMap () const ``` Returns a constant reference to the map of registered functions. The returned map maps function signatures to function objects. **Returns:** Reference to the internal function map. ______________________________________________________________________ ### function getNumberOfAttributes *Returns the number of registered attributes.* ```C++ unsigned int SBCClassInterface::getNumberOfAttributes () noexcept const ``` **Returns:** The count of attributes stored in the interface. ______________________________________________________________________ ### function getNumberOfFunctions *Returns the number of registered functions.* ```C++ unsigned int SBCClassInterface::getNumberOfFunctions () noexcept const ``` **Returns:** The count of functions stored in the interface. ______________________________________________________________________ ### function print *Prints the interface.* ```C++ void SBCClassInterface::print ( unsigned int offset=0 ) const ``` Prints the interface description to standard output. The output includes the list of functions and attributes, indented by the specified offset. **Parameters:** - `offset` Number of tab characters to indent the output. ______________________________________________________________________ ### function ~SBCClassInterface *Destructs the interface.* ```C++ virtual SBCClassInterface::~SBCClassInterface () ``` Releases the internal maps storing functions and attributes. ______________________________________________________________________ # SBProxy # Class SBCClassProxy [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) *This class describes a class proxy.* [More...](#detailed-description) - `#include ` ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**call**](#function-call) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Calls the function for the specific* `object` *with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual void | [**clear**](#function-clear) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Clears attribute* `attributeName` *from the*`object` *when possible.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**constCall**](#function-constcall) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Calls the const function for the specific* `object` *with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**createInstance**](#function-createinstance) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Creates an instance of the class with arguments* `t0` *,*`t1` *, ...,*`t15` *.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**createInstanceType**](#function-createinstancetype) () const *Creates a value type that holds the class type.* | | virtual bool | [**deleteInstance**](#function-deleteinstance) ([**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & instance) const *Deletes the instance of the class exposed via this proxy; if successful, sets* `instance` *to an empty value and returns*`true` *.* | | virtual [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**get**](#function-get) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the value of attribute* `attributeName` *for the specific*`object` *.* | | virtual SBCClassProxyData \* | [**getData**](#function-getdata) () noexcept const *Returns the private data class object.* | | virtual std::string | [**getDescription**](#function-getdescription) () noexcept const *Returns the description of the class.* | | virtual std::string | [**getElement**](#function-getelement) () noexcept const *Returns the SAMSON Extension containing the class.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getElementUUID**](#function-getelementuuid) () const *Returns the UUID of the SAMSON Extension containing the class.* | | virtual [**SBCClassFactory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md) const \* | [**getFactory**](#function-getfactory) () const *Returns the factory of the class if defined, else nullptr.* | | virtual std::string | [**getGUIShortcut**](#function-getguishortcut) () noexcept const *Returns the shortcut of the GUI of the class.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getGUIUUID**](#function-getguiuuid) () const *Returns the UUID of the GUI of the class.* | | virtual std::string | [**getIconFileName**](#function-geticonfilename) () noexcept const *Returns the file name of the class icon.* | | virtual [**SBCClassInterface**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md) const \* | [**getInterface**](#function-getinterface) () const *Returns the interface of the class if defined, else nullptr.* | | virtual [**SBUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) | [**getMinimumUserPlan**](#function-getminimumuserplan) () noexcept const *Returns the minimum user plan required to use this class.* | | virtual std::string | [**getName**](#function-getname) () noexcept const *Returns the name of the class.* | | virtual std::string | [**getPublicName**](#function-getpublicname) () noexcept const *Returns the public name of the class.* | | virtual [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) | [**getSDKVersionNumber**](#function-getsdkversionnumber) () noexcept const *Returns the version number of the SAMSON SDK used to compile the class.* | | virtual std::string | [**getShortcut**](#function-getshortcut) () noexcept const *Returns the shortcut of the class.* | | virtual unsigned int | [**getSize**](#function-getsize) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the size of attribute* `attributeName` *in the*`object` *when relevant.* | | virtual std::string | [**getToolTip**](#function-gettooltip) () noexcept const *Returns the tooltip of the class.* | | virtual [**SBCClass::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-type) | [**getType**](#function-gettype) () noexcept const *Returns the type of the class.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getUUID**](#function-getuuid) () const *Returns the UUID of the class.* | | virtual [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) | [**getVersionNumber**](#function-getversionnumber) () const *Returns the version number of the class.* | | virtual bool | [**has**](#function-has) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns whether attribute* `attributeName` *exists in the*`object` *and has a value.* | | virtual bool | [**isDiscoverable**](#function-isdiscoverable) () noexcept const *Returns* `true` *if can be discovered by the user.* | | void | [**print**](#function-print) (unsigned int offset=0) const *Prints debugging information.* | | virtual void | [**set**](#function-set) (const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & size=0) const *Sets the value of attribute* `attributeName` *for the specific*`object` *to*`value` *.* | | virtual void | [**setData**](#function-setdata) (SBCClassProxyData * data) *Sets the private data class object.* | | virtual | [**~SBCClassProxy**](#function-sbcclassproxy) () *Destructs the class proxy.* | ## Protected Functions | Type | Name | | ---- | --------------------------------------------------------------------------------- | | | [**SBCClassProxy**](#function-sbcclassproxy) () noexcept *Protected constructor.* | ## Detailed Description This class describes a class proxy (see [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md)), i.e. an access to a class that has been exposed through a class descriptor in a SAMSON Extension. Assume for example a SAMSON Extension contains the following class: ```C++ class A { SB_CLASS public: A() {} virtual ~A() {} int multiplyByTwo(int i) { return 2 * i; } }; SB_REGISTER_TYPE(A, "A", "BF99103E-06FE-C4C1-D929-4C6E833B101C"); ``` as well as the following class descriptor: ```C++ SB_CLASS_BEGIN(A); SB_CLASS_TYPE(SBCClass::App); SB_CLASS_DESCRIPTION("Integer multiplier"); SB_FACTORY_BEGIN; SB_CONSTRUCTOR_0(); SB_FACTORY_END; SB_INTERFACE_BEGIN; SB_FUNCTION_1(int, multiplyByTwo, int); SB_INTERFACE_END; SB_CLASS_END(A); ``` In this example, the functionality of class `A` is accessible to developers of SAMSON Extensions, *even when the definition of class A is not available*. Precisely, even though other developers might not have access to the definition of class `A` (i.e., they do not have the appropriate header file), they may still create instances of it: ```C++ SBProxy* classProxy = SAMSON::getProxy("A"); SBValue classInstance = classProxy->createInstance(); ``` and call its functions: ```C++ SBValue argument = SB_VALUE(17); SBValue resultHolder = classProxy->call(classInstance, "multiplyByTwo", argument); int result = SB_CAST(resultHolder); ``` In general, a class proxy gives access to information about a class (e.g., its [**name**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/#function-getname), its [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/#function-gettype), etc.), as well as its [**factory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md) (its collection of constructors) and its [**interface**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md) (its collection of functions). Note that, when multiple instances of the class are created, or when multiple calls are performed, it is more efficient to store pointers to [**class constructors**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md) and [**class functions**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) and reuse them. Note that a class proxy should **never be deleted**. Please refer to the chapter about [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) for more information. **Short name**: SBProxy **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) **See also:** [**SBCClassFactory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md), [**SBCClassConstructor**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassConstructor/index.md), [**SBCClassInterface**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md), [**SBCClassFunction**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFunction/index.md) ## Public Functions Documentation ### function call *Calls the function for the specific* `object` *with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBValue SBCClassProxy::call ( const SBValue & object, const std::string & functionName, const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Calls a non-const function of the class on the given object. **Parameters:** - `object` The object on which to call the function. - `functionName` The name of the function to call. - `t0` First argument to pass to the function. - `t1` Second argument to pass to the function. - `t2` Third argument to pass to the function. - `t3` Fourth argument to pass to the function. - `t4` Fifth argument to pass to the function. - `t5` Sixth argument to pass to the function. - `t6` Seventh argument to pass to the function. - `t7` Eighth argument to pass to the function. - `t8` Ninth argument to pass to the function. - `t9` Tenth argument to pass to the function. - `t10` Eleventh argument to pass to the function. - `t11` Twelfth argument to pass to the function. - `t12` Thirteenth argument to pass to the function. - `t13` Fourteenth argument to pass to the function. - `t14` Fifteenth argument to pass to the function. - `t15` Sixteenth argument to pass to the function. **Returns:** The result of the function call as an SBValue, or 0 if the function was not found. ______________________________________________________________________ ### function clear *Clears attribute* `attributeName` *from the*`object` *when possible.* ```C++ virtual void SBCClassProxy::clear ( const SBValue & object, const std::string & attributeName ) const ``` Clears the named attribute from the given object. **Parameters:** - `object` The object from which to clear the attribute. - `attributeName` The name of the attribute to clear. ______________________________________________________________________ ### function constCall *Calls the const function for the specific* `object` *with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBValue SBCClassProxy::constCall ( const SBValue & object, const std::string & functionName, const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Calls a const function of the class on the given object. **Parameters:** - `object` The object on which to call the function. - `functionName` The name of the const function to call. - `t0` First argument to pass to the function. - `t1` Second argument to pass to the function. - `t2` Third argument to pass to the function. - `t3` Fourth argument to pass to the function. - `t4` Fifth argument to pass to the function. - `t5` Sixth argument to pass to the function. - `t6` Seventh argument to pass to the function. - `t7` Eighth argument to pass to the function. - `t8` Ninth argument to pass to the function. - `t9` Tenth argument to pass to the function. - `t10` Eleventh argument to pass to the function. - `t11` Twelfth argument to pass to the function. - `t12` Thirteenth argument to pass to the function. - `t13` Fourteenth argument to pass to the function. - `t14` Fifteenth argument to pass to the function. - `t15` Sixteenth argument to pass to the function. **Returns:** The result of the function call as an SBValue, or 0 if the function was not found. ______________________________________________________________________ ### function createInstance *Creates an instance of the class with arguments* `t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBValue SBCClassProxy::createInstance ( const SBValue & t0=SBValue (), const SBValue & t1=SBValue (), const SBValue & t2=SBValue (), const SBValue & t3=SBValue (), const SBValue & t4=SBValue (), const SBValue & t5=SBValue (), const SBValue & t6=SBValue (), const SBValue & t7=SBValue (), const SBValue & t8=SBValue (), const SBValue & t9=SBValue (), const SBValue & t10=SBValue (), const SBValue & t11=SBValue (), const SBValue & t12=SBValue (), const SBValue & t13=SBValue (), const SBValue & t14=SBValue (), const SBValue & t15=SBValue () ) const ``` Creates an instance of the class using the provided constructor arguments. Attempts to find a matching constructor based on the given arguments and creates an instance. **Parameters:** - `t0` First constructor argument. - `t1` Second constructor argument. - `t2` Third constructor argument. - `t3` Fourth constructor argument. - `t4` Fifth constructor argument. - `t5` Sixth constructor argument. - `t6` Seventh constructor argument. - `t7` Eighth constructor argument. - `t8` Ninth constructor argument. - `t9` Tenth constructor argument. - `t10` Eleventh constructor argument. - `t11` Twelfth constructor argument. - `t12` Thirteenth constructor argument. - `t13` Fourteenth constructor argument. - `t14` Fifteenth constructor argument. - `t15` Sixteenth constructor argument. **Returns:** An SBValue representing the newly created instance, or 0 if no matching constructor was found. ______________________________________________________________________ ### function createInstanceType *Creates a value type that holds the class type.* ```C++ virtual SBValue SBCClassProxy::createInstanceType () const ``` Returns a value representing the type of the class. **Returns:** An SBValue containing a SBValueType representing the class type. ______________________________________________________________________ ### function deleteInstance *Deletes the instance of the class exposed via this proxy; if successful, sets* `instance` *to an empty value and returns*`true` *.* ```C++ virtual bool SBCClassProxy::deleteInstance ( SBValue & instance ) const ``` Deletes the given class instance and resets it to an empty value. An instance of a class can be deleted only if it exposed at least one constructor. **Parameters:** - `instance` The instance of the class to delete; will be set to an empty value on success. **Returns:** `true` if the instance was successfully deleted; `false` otherwise. ______________________________________________________________________ ### function get *Returns the value of attribute* `attributeName` *for the specific*`object` *.* ```C++ virtual SBValue SBCClassProxy::get ( const SBValue & object, const std::string & attributeName ) const ``` Retrieves the value of a named attribute from the given object. **Parameters:** - `object` The object from which to retrieve the attribute. - `attributeName` The name of the attribute to retrieve. **Returns:** The attribute value as an SBValue, or 0 if the attribute was not found. ______________________________________________________________________ ### function getData *Returns the private data class object.* ```C++ virtual SBCClassProxyData * SBCClassProxy::getData () noexcept const ``` **Returns:** A pointer to SBCClassProxyData, or nullptr if none. ______________________________________________________________________ ### function getDescription *Returns the description of the class.* ```C++ virtual std::string SBCClassProxy::getDescription () noexcept const ``` **Returns:** The description as a std::string. ______________________________________________________________________ ### function getElement *Returns the SAMSON Extension containing the class.* ```C++ virtual std::string SBCClassProxy::getElement () noexcept const ``` **Returns:** The name of the element as a std::string. ______________________________________________________________________ ### function getElementUUID *Returns the UUID of the SAMSON Extension containing the class.* ```C++ virtual SBCContainerUUID SBCClassProxy::getElementUUID () const ``` **Returns:** The [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) of the element. ______________________________________________________________________ ### function getFactory *Returns the factory of the class if defined, else nullptr.* ```C++ virtual SBCClassFactory const * SBCClassProxy::getFactory () const ``` **Returns:** Pointer to [**SBCClassFactory**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassFactory/index.md), or nullptr. ______________________________________________________________________ ### function getGUIShortcut *Returns the shortcut of the GUI of the class.* ```C++ virtual std::string SBCClassProxy::getGUIShortcut () noexcept const ``` **Returns:** The GUI shortcut as a std::string. ______________________________________________________________________ ### function getGUIUUID *Returns the UUID of the GUI of the class.* ```C++ virtual SBCContainerUUID SBCClassProxy::getGUIUUID () const ``` **Returns:** The [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) of the GUI. ______________________________________________________________________ ### function getIconFileName *Returns the file name of the class icon.* ```C++ virtual std::string SBCClassProxy::getIconFileName () noexcept const ``` **Returns:** The icon file name as a std::string. ______________________________________________________________________ ### function getInterface *Returns the interface of the class if defined, else nullptr.* ```C++ virtual SBCClassInterface const * SBCClassProxy::getInterface () const ``` **Returns:** Pointer to [**SBCClassInterface**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassInterface/index.md), or nullptr. ______________________________________________________________________ ### function getMinimumUserPlan *Returns the minimum user plan required to use this class.* ```C++ virtual SBUserPlan SBCClassProxy::getMinimumUserPlan () noexcept const ``` **Returns:** The SBUserPlan representing the minimum user plan. ______________________________________________________________________ ### function getName *Returns the name of the class.* ```C++ virtual std::string SBCClassProxy::getName () noexcept const ``` **Returns:** The class name as a std::string. ______________________________________________________________________ ### function getPublicName *Returns the public name of the class.* ```C++ virtual std::string SBCClassProxy::getPublicName () noexcept const ``` **Returns:** The public name as a std::string. ______________________________________________________________________ ### function getSDKVersionNumber *Returns the version number of the SAMSON SDK used to compile the class.* ```C++ virtual SBVersionNumber SBCClassProxy::getSDKVersionNumber () noexcept const ``` **Returns:** The SBVersionNumber of the SDK. ______________________________________________________________________ ### function getShortcut *Returns the shortcut of the class.* ```C++ virtual std::string SBCClassProxy::getShortcut () noexcept const ``` **Returns:** The shortcut as a std::string. ______________________________________________________________________ ### function getSize *Returns the size of attribute* `attributeName` *in the*`object` *when relevant.* ```C++ virtual unsigned int SBCClassProxy::getSize ( const SBValue & object, const std::string & attributeName ) const ``` Returns the size of a named attribute in the given object. **Parameters:** - `object` The object containing the attribute. - `attributeName` The name of the attribute. **Returns:** The size of the attribute, or 0 if the attribute was not found. ______________________________________________________________________ ### function getToolTip *Returns the tooltip of the class.* ```C++ virtual std::string SBCClassProxy::getToolTip () noexcept const ``` **Returns:** The tooltip as a std::string. ______________________________________________________________________ ### function getType *Returns the type of the class.* ```C++ virtual SBCClass::Type SBCClassProxy::getType () noexcept const ``` **Returns:** The [**SBCClass::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/#enum-type) of the class. ______________________________________________________________________ ### function getUUID *Returns the UUID of the class.* ```C++ virtual SBCContainerUUID SBCClassProxy::getUUID () const ``` **Returns:** The [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) of the class. ______________________________________________________________________ ### function getVersionNumber *Returns the version number of the class.* ```C++ virtual SBVersionNumber SBCClassProxy::getVersionNumber () const ``` **Returns:** The SBVersionNumber of the class. ______________________________________________________________________ ### function has *Returns whether attribute* `attributeName` *exists in the*`object` *and has a value.* ```C++ virtual bool SBCClassProxy::has ( const SBValue & object, const std::string & attributeName ) const ``` Checks if a named attribute exists in the given object. **Parameters:** - `object` The object to check. - `attributeName` The name of the attribute to check. **Returns:** `true` if the attribute exists and is accessible; `false` otherwise. ______________________________________________________________________ ### function isDiscoverable *Returns* `true` *if can be discovered by the user.* ```C++ virtual bool SBCClassProxy::isDiscoverable () noexcept const ``` Returns true if the class is discoverable by the user. **Returns:** `true` if discoverable; `false` otherwise. ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ void SBCClassProxy::print ( unsigned int offset=0 ) const ``` Prints debugging information for the class proxy. **Parameters:** - `offset` Number of tabs to indent the output. ______________________________________________________________________ ### function set *Sets the value of attribute* `attributeName` *for the specific*`object` *to*`value` *.* ```C++ virtual void SBCClassProxy::set ( const SBValue & object, const std::string & attributeName, const SBValue & value, const SBValue & size=0 ) const ``` Sets the value of a named attribute on the given object. **Parameters:** - `object` The object on which to set the attribute. - `attributeName` The name of the attribute to set. - `value` The value to assign to the attribute. - `size` Optional size parameter for the attribute. ______________________________________________________________________ ### function setData *Sets the private data class object.* ```C++ virtual void SBCClassProxy::setData ( SBCClassProxyData * data ) ``` **Parameters:** - `data` The data object to set. ______________________________________________________________________ ### function ~SBCClassProxy *Destructs the class proxy.* ```C++ virtual SBCClassProxy::~SBCClassProxy () ``` Destroys the [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) object. ______________________________________________________________________ ## Protected Functions Documentation ### function SBCClassProxy *Protected constructor.* ```C++ SBCClassProxy::SBCClassProxy () noexcept ``` Constructs a [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) object. ______________________________________________________________________ # SBBuffer # Class SBCContainerBuffer **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) *This template class describes an extensible array of elements that may be incrementally changed.* [More...](#detailed-description) - `#include ` ## Classes | Type | Name | | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**const_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer_1_1const__iterator/index.md) | | class | [**const_reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer_1_1const__reverse__iterator/index.md) | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | --------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerBuffer**](#function-sbccontainerbuffer-14) () *Constructs an empty buffer.* | | | [**SBCContainerBuffer**](#function-sbccontainerbuffer-24) (unsigned int i) *Constructs a buffer with size* `i` *.* | | | [**SBCContainerBuffer**](#function-sbccontainerbuffer-34) (const [**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) & buffer) *Copy constructor.* | | | [**SBCContainerBuffer**](#function-sbccontainerbuffer-44) ([**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) && buffer) noexcept *Move constructor.* | | void | [**addElement**](#function-addelement) (const T & t) *Adds the element* `t` *to the buffer.* | | iterator | [**begin**](#function-begin-12) () *Returns an iterator that points to the beginning of the vector containing the indices of the changed elements.* | | const_iterator | [**begin**](#function-begin-22) () const *Returns a const iterator that points to the beginning of the vector containing the indices of the changed elements.* | | bool | [**empty**](#function-empty) () const *Returns true if and only if the buffer is empty.* | | iterator | [**end**](#function-end-12) () *Returns an iterator that points to the end of the vector containing the indices of the changed elements.* | | const_iterator | [**end**](#function-end-22) () const *Returns a const iterator that points to the end of the vector containing the indices of the changed elements.* | | void | [**flush**](#function-flush) () *Flushes the buffer.* | | bool | [**getChangedElementFlag**](#function-getchangedelementflag) (unsigned int i) const *Returns true if and only if element* `i` *was changed since the last buffer flush.* | | unsigned int | [**getChangedElementIndex**](#function-getchangedelementindex) (unsigned int i) const *Returns the index of the* `i-th` *changed element.* | | T const & | [**getElement**](#function-getelement) (unsigned int i) const *Returns a const reference to element* `i` *.* | | SBTime | [**getLastFlushTime**](#function-getlastflushtime) () noexcept const *Returns the last flush time.* | | unsigned int | [**getMemoryFootPrint**](#function-getmemoryfootprint) () const *Returns the memory footprint of the buffer.* | | unsigned int | [**getNumberOfChangedElements**](#function-getnumberofchangedelements) () noexcept const *Returns the number of changed elements since the last buffer flush.* | | void | [**insertElement**](#function-insertelement) (unsigned int i, const T & t) *Inserts element* `t` *at position*`i` *.* | | [**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) & | [**operator=**](#function-operator) (const [**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) & buffer) *Copy assignment.* | | [**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) & | [**operator=**](#function-operator_1) ([**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md) && buffer) *Move assignment.* | | T const & | [**operator[]**](#function-operator_2) (unsigned int i) const *Returns a const reference to element* `i` *.* | | void | [**print**](#function-print) (unsigned int offset=0) const *Prints some debugging information.* | | reverse_iterator | [**rbegin**](#function-rbegin-12) () *Returns a reverse iterator that points to the reverse beginning of the vector containing the indices of the changed elements.* | | const_reverse_iterator | [**rbegin**](#function-rbegin-22) () const *Returns a const reverse iterator that points to the reverse beginning of the vector containing the indices of the changed elements.* | | void | [**removeElement**](#function-removeelement) (unsigned int i) *Removes the element with index* `i` *from the buffer.* | | reverse_iterator | [**rend**](#function-rend-12) () *Returns a reverse iterator that points to the reverse end of the vector containing the indices of the changed elements.* | | const_reverse_iterator | [**rend**](#function-rend-22) () const *Returns a const reverse iterator that points to the reverse end of the vector containing the indices of the changed elements.* | | void | [**setElement**](#function-setelement) (unsigned int i, const T & t) *Sets the value of element* `i` *to*`t` *.* | | unsigned int | [**size**](#function-size) () const *Returns the size of the buffer.* | | virtual | [**~SBCContainerBuffer**](#function-sbccontainerbuffer) () *Destructs the buffer.* | ## Detailed Description **Template parameters:** - `T` The type of the elements contained in the buffer Consider a classical force-field. Typically, many terms in the potential energy function only depend on a few atoms positions. For example, a bond term may only depend on the relative positions of two atoms. Whatever the size of the molecular system, if only a few atoms moved between two subsequent time steps, then only some energy terms and some forces need to be updated. An algorithm which manages to update only those terms that need to change is called *incremental*, and is typically much more efficient than a non-incremental algorithm that would update all energy terms and all forces when only a few atoms have moved. In general, assume a group of *output values* (e.g. the forces in the example above) depend on a group of *input values* (the atomic positions in the example above), Assume moreover that these output values need to be updated at successive *update times* (for example at each time step of a simulation). Incremental algorithms manage to maintain up-to-date all output values, by updating only those output values that need to be changed, based on changes in the input values that occurred *since the last update time*. One important task that all incremental algorithms have to achieve is thus to determine which input values changed since the last update time. This is what buffers do: they store values in an array, and track which values changed since a given time. Assume for example that we want to incrementally maintain the sum of a group of 100 `double` values, without having to recompute the sum from scratch at each *update time*. One possibility is thus to store these values in a buffer of `double:` ```C++ SBBuffer buffer; ``` We then initialize the buffer with the initial input values: ```C++ // initialize the buffer for (unsigned int i = 0; i < 100; i++) buffer.addElement(0.0); ``` In general, a buffer may actually be created and stored in a different object, and we simply have access to it. For example, a [**particle system**](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelParticleSystem/index.md) maintains a position buffer which stores the cartesian coordinates of all particles, and an [**interaction model**](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelParticleSystem/index.md) may use this position buffer to perform incremental updates of energies and forces. It is thus frequently useful, on the client side, to store a copy of the values contained in the buffer, in order to have access to the *previous* values. This copy is typically performed during a (non-incremental) initialization: ```C++ // compute the initial value of the sum double sum = 0.0; double previousValueArray[100]; for (unsigned int i = 0; i < 100; i++) { sum += buffer[i]; previousValueArray[i] = buffer[i]; } buffer.flush(); ``` Note the call to the [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush) function, which empties the list of changed elements. We may now enter a cycle of incremental updates of the sum, where some buffer values change: ```C++ buffer.setElement(17, 1.0); // set buffer[17] to 1.0 buffer.setElement(8, 2.0); // set buffer[8] to 2.0 buffer.setElement(75, 3.0); // set buffer[75] to 3.0 buffer.setElement(99, 4.0); // set buffer[99] to 4.0 buffer.setElement(75, 5.0); // set buffer[75] to 5.0 buffer.flush(); ``` In this example, the value of `buffer[75]` is changed twice, but the buffer only stores the fact that this value changed, and not the number of times it changed between two [**flushes**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush). As a result, the list of changed elements only contains four indices: 17, 8, 75 and 99. In this simple example, we could incrementally update the sum whenever we are notified that one value in the buffer changed. For example, assuming the value of `buffer[17]` changed from `oldValue` to `newValue`, we could do: ```C++ sum += newValue - oldValue; // incrementally update the sum ``` In general, though, updating output values may be computationally expensive, and it may thus be preferable to compute the required changes *only when needed*, based on *the list of changed input values*: ```C++ // incrementally update the value of the sum for (unsigned int i = 0; i < buffer.getNumberOfChangedElements(); i++) { unsigned int changedElementIndex = buffer.getChangedElementIndex(i); sum += buffer[changedElementIndex] - previousValueArray[changedElementIndex]; previousValueArray[changedElementIndex] = buffer[changedElementIndex]; } buffer.flush(); ``` In this example, the function [**getNumberOfChangedElements**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-getnumberofchangedelements) returns 4, and the function [**getChangedElementIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-getchangedelementindex) successively returns 17, 8, 75 and 99. Note how the array of previous values is updated once each previous value has been used to incrementally update the sum. The complexity of the sum update is linear in the number of changed elements, which may be significantly faster than re-computing the sum from scratch when the number of changed elements is small compared to the total number of elements. **Short name**: SBBuffer **See also:** SB_FOR ## Public Functions Documentation ### function SBCContainerBuffer [1/4] *Constructs an empty buffer.* ```C++ inline SBCContainerBuffer::SBCContainerBuffer () ``` This constructs creates an empty buffer. Note that this assumes that the template parameter `T` has a constructor that takes no parameter (i.e. it is possible to initialize an array of elements of type `T`). ______________________________________________________________________ ### function SBCContainerBuffer [2/4] *Constructs a buffer with size* `i` *.* ```C++ inline SBCContainerBuffer::SBCContainerBuffer ( unsigned int i ) ``` This constructor fills the buffer with default values of the template type `T`. Note that this assumes that the template parameter `T` has a constructor that takes no parameter (i.e. it is possible to initialize an array of elements of type `T`). ______________________________________________________________________ ### function SBCContainerBuffer [3/4] *Copy constructor.* ```C++ inline SBCContainerBuffer::SBCContainerBuffer ( const SBCContainerBuffer & buffer ) ``` ______________________________________________________________________ ### function SBCContainerBuffer [4/4] *Move constructor.* ```C++ inline SBCContainerBuffer::SBCContainerBuffer ( SBCContainerBuffer && buffer ) noexcept ``` ______________________________________________________________________ ### function addElement *Adds the element* `t` *to the buffer.* ```C++ inline void SBCContainerBuffer::addElement ( const T & t ) ``` This function appends the element `t` to the buffer. The new element is added to the list of changed elements. ______________________________________________________________________ ### function begin [1/2] *Returns an iterator that points to the beginning of the vector containing the indices of the changed elements.* ```C++ inline iterator SBCContainerBuffer::begin () ``` ______________________________________________________________________ ### function begin [2/2] *Returns a const iterator that points to the beginning of the vector containing the indices of the changed elements.* ```C++ inline const_iterator SBCContainerBuffer::begin () const ``` ______________________________________________________________________ ### function empty *Returns true if and only if the buffer is empty.* ```C++ inline bool SBCContainerBuffer::empty () const ``` ______________________________________________________________________ ### function end [1/2] *Returns an iterator that points to the end of the vector containing the indices of the changed elements.* ```C++ inline iterator SBCContainerBuffer::end () ``` ______________________________________________________________________ ### function end [2/2] *Returns a const iterator that points to the end of the vector containing the indices of the changed elements.* ```C++ inline const_iterator SBCContainerBuffer::end () const ``` ______________________________________________________________________ ### function flush *Flushes the buffer.* ```C++ inline void SBCContainerBuffer::flush () ``` This function flushes the buffer, i.e. clears the list of changed elements and sets the last flush time to the current time. After a call to flush, getNumberOfChangedElements returns 0. **See also:** [**getNumberOfChangedElements**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-getnumberofchangedelements) ______________________________________________________________________ ### function getChangedElementFlag *Returns true if and only if element* `i` *was changed since the last buffer flush.* ```C++ inline bool SBCContainerBuffer::getChangedElementFlag ( unsigned int i ) const ``` ______________________________________________________________________ ### function getChangedElementIndex *Returns the index of the* `i-th` *changed element.* ```C++ inline unsigned int SBCContainerBuffer::getChangedElementIndex ( unsigned int i ) const ``` This function returns the index of the `i-th` changed element. **See also:** [**getNumberOfChangedElements**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-getnumberofchangedelements) ______________________________________________________________________ ### function getElement *Returns a const reference to element* `i` *.* ```C++ inline T const & SBCContainerBuffer::getElement ( unsigned int i ) const ``` This function returns a const reference to element `i`. Since the buffer needs to track changes to the array elements, this function cannot be used to modify the value of an element. Instead, use the [**setElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-setelement) function. **See also:** [**setElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-setelement) ______________________________________________________________________ ### function getLastFlushTime *Returns the last flush time.* ```C++ inline SBTime SBCContainerBuffer::getLastFlushTime () noexcept const ``` This function returns the last flush time, i.e. the time at which the [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush) function was called. **See also:** [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush) ______________________________________________________________________ ### function getMemoryFootPrint *Returns the memory footprint of the buffer.* ```C++ inline unsigned int SBCContainerBuffer::getMemoryFootPrint () const ``` ______________________________________________________________________ ### function getNumberOfChangedElements *Returns the number of changed elements since the last buffer flush.* ```C++ inline unsigned int SBCContainerBuffer::getNumberOfChangedElements () noexcept const ``` Whenever an element of the buffer is set to a new value (i.e. a call to setElement actually changes the value of the element), the buffer memorizes the index of the changed element. This function returns the total number of changed elements since the last buffer [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush). Note that the buffer does not memorize the number of times an element has been changed since the last buffer [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush), but only *the fact that it has been changed*. As a result, the number of changed elements is always between 0 and the size of the buffer. **See also:** [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush), [**getChangedElementIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-getchangedelementindex), [**setElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-setelement), [**size**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-size) ______________________________________________________________________ ### function insertElement *Inserts element* `t` *at position*`i` *.* ```C++ inline void SBCContainerBuffer::insertElement ( unsigned int i, const T & t ) ``` This function inserts element `t` at position `i`. If `i` is strictly larger than the size of the buffer, the function does nothing. **Important**: when `i` is strictly smaller than the size of the buffer, the inserted element displaces an element, which moves to the last position of the buffer. If this displaced element had been changed since the last buffer [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush), the corresponding index is changed in the list of changed elements. **Example**: assume a buffer contains 99 elements (these elements could be integers, strings, positions, forces, etc.), and the list of changed elements contains the indices 17, 8, 75 and 97. If an element is inserted at position 97, then element 97 is moved to the end of the buffer (position 99), and the list of changed elements now contains the indices 17, 8, 75, 99 (corresponding to the moved element), and 97 (corresponding to the new element). ______________________________________________________________________ ### function operator= *Copy assignment.* ```C++ inline SBCContainerBuffer & SBCContainerBuffer::operator= ( const SBCContainerBuffer & buffer ) ``` ______________________________________________________________________ ### function operator= *Move assignment.* ```C++ inline SBCContainerBuffer & SBCContainerBuffer::operator= ( SBCContainerBuffer && buffer ) ``` ______________________________________________________________________ ### function operator[] *Returns a const reference to element* `i` *.* ```C++ inline T const & SBCContainerBuffer::operator[] ( unsigned int i ) const ``` This operator returns a const reference to element `i`. Since the buffer needs to track changes to the array elements, this operator cannot be used to modify the value of an element. Instead, use the [**setElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-setelement) function. **See also:** [**setElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-setelement) ______________________________________________________________________ ### function print *Prints some debugging information.* ```C++ inline void SBCContainerBuffer::print ( unsigned int offset=0 ) const ``` ______________________________________________________________________ ### function rbegin [1/2] *Returns a reverse iterator that points to the reverse beginning of the vector containing the indices of the changed elements.* ```C++ inline reverse_iterator SBCContainerBuffer::rbegin () ``` ______________________________________________________________________ ### function rbegin [2/2] *Returns a const reverse iterator that points to the reverse beginning of the vector containing the indices of the changed elements.* ```C++ inline const_reverse_iterator SBCContainerBuffer::rbegin () const ``` ______________________________________________________________________ ### function removeElement *Removes the element with index* `i` *from the buffer.* ```C++ inline void SBCContainerBuffer::removeElement ( unsigned int i ) ``` This function removes the element with index `i` from the buffer. **Important**: when the removed element `i` is not the last element of the array, the last element of the array is moved to position `i`. In effect, this amounts to changing the index of the last element. If this last element had been changed since the last buffer [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush), the corresponding index is changed in the list of changed elements. **Example**: assume a buffer contains 100 elements, indexed from 0 to 99 (these elements could be integers, strings, positions, forces, etc.), and the list of changed elements contains the indices 17, 8, 75 and 99. If element 97 is removed from the buffer, then element 99 is moved to position 97, and the list of changed elements now contains the indices 17, 8, 75 and 97. ______________________________________________________________________ ### function rend [1/2] *Returns a reverse iterator that points to the reverse end of the vector containing the indices of the changed elements.* ```C++ inline reverse_iterator SBCContainerBuffer::rend () ``` ______________________________________________________________________ ### function rend [2/2] *Returns a const reverse iterator that points to the reverse end of the vector containing the indices of the changed elements.* ```C++ inline const_reverse_iterator SBCContainerBuffer::rend () const ``` ______________________________________________________________________ ### function setElement *Sets the value of element* `i` *to*`t` *.* ```C++ inline void SBCContainerBuffer::setElement ( unsigned int i, const T & t ) ``` This function sets the value of element `i` to `t`. If the previous value of element `i` was different from `t`, the index `i` is inserted in the set of changed elements. **Note**: the index of a changed element is inserted at most once between two calls to the [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush) function. **See also:** [**flush**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-flush), [**getNumberOfChangedElements**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-getnumberofchangedelements), [**getChangedElementIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/#function-getchangedelementindex) ______________________________________________________________________ ### function size *Returns the size of the buffer.* ```C++ inline unsigned int SBCContainerBuffer::size () const ``` This function returns the number of elements in the buffer. ______________________________________________________________________ ### function ~SBCContainerBuffer *Destructs the buffer.* ```C++ inline virtual SBCContainerBuffer::~SBCContainerBuffer () ``` ______________________________________________________________________ # SBFractionalKey # Class SBCContainerFractionalKey [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) *This class describes a fractional key used for assigning a unique index to nodes and sort them in a context of collaborative editing.* [More...](#detailed-description) - `#include ` ## Public Static Attributes | Type | Name | | --------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------- | | const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) | [**one**](#variable-one) *The one fractional key.* | | const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) | [**zero**](#variable-zero) *The zero fractional key.* | ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerFractionalKey**](#function-sbccontainerfractionalkey-16) (char c) *Constructs a fractional key from a char.* | | | [**SBCContainerFractionalKey**](#function-sbccontainerfractionalkey-26) (const SBVector< char > & charVector) *Constructs a fractional key from a vector of chars.* | | | [**SBCContainerFractionalKey**](#function-sbccontainerfractionalkey-36) (const std::string & key) *Constructs a fractional key from a std::string.* | | | [**SBCContainerFractionalKey**](#function-sbccontainerfractionalkey-46) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) *Copy constructor.* | | | [**SBCContainerFractionalKey**](#function-sbccontainerfractionalkey-56) ([**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) && other) *Move constructor.* | | | [**SBCContainerFractionalKey**](#function-sbccontainerfractionalkey-66) () noexcept *Constructs an invalid fractional key.* | | bool | [**isValid**](#function-isvalid) () const *Returns* `true` *if and only if the fractional key is valid.* | | bool | [**operator!=**](#function-operator) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) const *Inequality operator.* | | std::string | [**operator()**](#function-operator_1) () const *Returns the fractional key in string format.* | | bool | [**operator\<**](#function-operator_2) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) const *Lexicographic comparison with another fractional key.* | | bool | [**operator\<=**](#function-operator_3) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) const *Lexicographic comparison with another fractional key.* | | [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & | [**operator=**](#function-operator_4) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) *Copy assignment operator.* | | [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & | [**operator=**](#function-operator_5) ([**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) && other) *Move assignment operator.* | | bool | [**operator==**](#function-operator_6) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) const *Equality operator.* | | bool | [**operator>**](#function-operator_7) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) const *Lexicographic comparison with another fractional key.* | | bool | [**operator>=**](#function-operator_8) (const [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) & other) const *Lexicographic comparison with another fractional key.* | | [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) | \[\*\*operator | | virtual | [**~SBCContainerFractionalKey**](#function-sbccontainerfractionalkey) () *Destructs the fractional key.* | ## Detailed Description [**SBCContainerFractionalKey**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerFractionalKey/index.md) objects can hold fractional keys (also called fractional indices). Fractional keys are arbitrary-precision fractions between 0 and 1 (excluding 0 and 1). For compactness, fractional keys only store the decimal part of the fraction, and are stored as series of printable ASCII characters (ASCII codes 32-126 included), resulting in a base-95 representation. The number 0 is represented by an empty key, while the number 1 is represented by a key containing the char 127 only. Both 0 and 1 are not considered valid fractional keys. **Short name**: SBFractionalKey ## Public Static Attributes Documentation ### variable one *The one fractional key.* ```C++ SBCContainerFractionalKey const SBCContainerFractionalKey::one; ``` ______________________________________________________________________ ### variable zero *The zero fractional key.* ```C++ SBCContainerFractionalKey const SBCContainerFractionalKey::zero; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCContainerFractionalKey [1/6] *Constructs a fractional key from a char.* ```C++ SBCContainerFractionalKey::SBCContainerFractionalKey ( char c ) ``` Constructs a fractional key from a single character. **Parameters:** - `c` Character representing the fractional key. ______________________________________________________________________ ### function SBCContainerFractionalKey [2/6] *Constructs a fractional key from a vector of chars.* ```C++ SBCContainerFractionalKey::SBCContainerFractionalKey ( const SBVector< char > & charVector ) ``` Constructs a fractional key from a vector of characters. **Parameters:** - `charVector` Vector of characters representing the fractional key. ______________________________________________________________________ ### function SBCContainerFractionalKey [3/6] *Constructs a fractional key from a std::string.* ```C++ SBCContainerFractionalKey::SBCContainerFractionalKey ( const std::string & key ) ``` Constructs a fractional key from a string. **Parameters:** - `key` String containing the fractional key. ______________________________________________________________________ ### function SBCContainerFractionalKey [4/6] *Copy constructor.* ```C++ SBCContainerFractionalKey::SBCContainerFractionalKey ( const SBCContainerFractionalKey & other ) ``` Copy constructs a fractional key. **Parameters:** - `other` Fractional key to copy. ______________________________________________________________________ ### function SBCContainerFractionalKey [5/6] *Move constructor.* ```C++ SBCContainerFractionalKey::SBCContainerFractionalKey ( SBCContainerFractionalKey && other ) ``` Move constructs a fractional key. **Parameters:** - `other` Fractional key to move. ______________________________________________________________________ ### function SBCContainerFractionalKey [6/6] *Constructs an invalid fractional key.* ```C++ SBCContainerFractionalKey::SBCContainerFractionalKey () noexcept ``` ______________________________________________________________________ ### function isValid *Returns* `true` *if and only if the fractional key is valid.* ```C++ bool SBCContainerFractionalKey::isValid () const ``` Checks whether the fractional key is valid. Determines if the fractional key conforms to the required format and character range. **Returns:** `true` if the key is a valid fractional key, `false` otherwise. ______________________________________________________________________ ### function operator!= *Inequality operator.* ```C++ bool SBCContainerFractionalKey::operator!= ( const SBCContainerFractionalKey & other ) const ``` Inequality comparison. **Parameters:** - `other` Fractional key to compare with. **Returns:** `true` if the keys are not equal, `false` otherwise. ______________________________________________________________________ ### function operator() *Returns the fractional key in string format.* ```C++ std::string SBCContainerFractionalKey::operator() () const ``` Returns the string representation of the fractional key. Provides the fractional key as a std::string, handling special cases for zero and one. **Returns:** The fractional key as a std::string. ______________________________________________________________________ ### function operator\< *Lexicographic comparison with another fractional key.* ```C++ bool SBCContainerFractionalKey::operator< ( const SBCContainerFractionalKey & other ) const ``` Lexicographic less-than comparison. Determines if this key precedes another in lexicographic order. **Parameters:** - `other` Fractional key to compare with. **Returns:** `true` if this key is less than the other key, `false` otherwise. ______________________________________________________________________ ### function operator\<= *Lexicographic comparison with another fractional key.* ```C++ bool SBCContainerFractionalKey::operator<= ( const SBCContainerFractionalKey & other ) const ``` Lexicographic less-than-or-equal comparison. **Parameters:** - `other` Fractional key to compare with. **Returns:** `true` if this key is less than or equal to the other key, `false` otherwise. ______________________________________________________________________ ### function operator= *Copy assignment operator.* ```C++ SBCContainerFractionalKey & SBCContainerFractionalKey::operator= ( const SBCContainerFractionalKey & other ) ``` Assigns the contents of another fractional key to this key. **Parameters:** - `other` Fractional key to assign from. **Returns:** Reference to this fractional key. ______________________________________________________________________ ### function operator= *Move assignment operator.* ```C++ SBCContainerFractionalKey & SBCContainerFractionalKey::operator= ( SBCContainerFractionalKey && other ) ``` Moves the contents of another fractional key into this key. **Parameters:** - `other` Fractional key to move from. **Returns:** Reference to this fractional key. ______________________________________________________________________ ### function operator== *Equality operator.* ```C++ bool SBCContainerFractionalKey::operator== ( const SBCContainerFractionalKey & other ) const ``` Equality comparison. Checks whether this key is equal to another. **Parameters:** - `other` Fractional key to compare with. **Returns:** `true` if the keys are equal, `false` otherwise. ______________________________________________________________________ ### function operator> *Lexicographic comparison with another fractional key.* ```C++ bool SBCContainerFractionalKey::operator> ( const SBCContainerFractionalKey & other ) const ``` Lexicographic greater-than comparison. Determines if this key follows another in lexicographic order. **Parameters:** - `other` Fractional key to compare with. **Returns:** `true` if this key is greater than the other key, `false` otherwise. ______________________________________________________________________ ### function operator>= *Lexicographic comparison with another fractional key.* ```C++ bool SBCContainerFractionalKey::operator>= ( const SBCContainerFractionalKey & other ) const ``` Lexicographic greater-than-or-equal comparison. **Parameters:** - `other` Fractional key to compare with. **Returns:** `true` if this key is greater than or equal to the other key, `false` otherwise. ______________________________________________________________________ ### function operator| *Generate a key between this fractional and another fractional key.* ```C++ SBCContainerFractionalKey SBCContainerFractionalKey::operator| ( const SBCContainerFractionalKey & other ) const ``` Generates a new fractional key that lies between this key and another. Creates a key that is lexicographically between this key and the given upper bound. **Parameters:** - `other` The other fractional key to use as an upper bound. **Returns:** A new fractional key positioned between this key and the other key. ______________________________________________________________________ ### function ~SBCContainerFractionalKey *Destructs the fractional key.* ```C++ virtual SBCContainerFractionalKey::~SBCContainerFractionalKey () ``` Destroys the fractional key. ______________________________________________________________________ # SBHashMap # Class SBCContainerHashMap **template \** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md) *This template class describes a hashtable-based map.* [More...](#detailed-description) - `#include ` ## Classes | Type | Name | | ----- | ----------------------------------------------------------------------------------------------------------------------------------------- | | class | [**const_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap_1_1const__iterator/index.md) | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap_1_1iterator/index.md) | ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerHashMap**](#function-sbccontainerhashmap-14) (unsigned int nElements=0) *Creates a new hash map.* | | | [**SBCContainerHashMap**](#function-sbccontainerhashmap-24) (const [**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md) & hashMap) *Copy constructor.* | | | [**SBCContainerHashMap**](#function-sbccontainerhashmap-34) ([**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md) && hashMap) noexcept *Move constructor.* | | | [**SBCContainerHashMap**](#function-sbccontainerhashmap-44) (std::initializer_list< std::pair< KeyType, ValueType > > init) *Creates a new hash map from the given initializer list.* | | iterator | [**begin**](#function-begin-12) () *Returns an iterator that points to the beginning of the hash map.* | | const_iterator | [**begin**](#function-begin-22) () const *Returns an iterator that points to the beginning of the hash map.* | | void | [**clear**](#function-clear) () *Erases all entries in the hash map.* | | bool | [**empty**](#function-empty) () noexcept const *Returns* `true` *when the hash map contains no entry.* | | iterator | [**end**](#function-end-12) () *Returns an iterator that points to the end of the hash map.* | | const_iterator | [**end**](#function-end-22) () const *Returns an iterator that points to the end of the hash map.* | | bool | [**erase**](#function-erase) (const KeyType & key) *Attempts to erase an entry with a specific* *key* *and returns*`true` *if successful.* | | iterator | [**find**](#function-find-12) (const KeyType & key) *Finds a key in the hash map.* | | const_iterator | [**find**](#function-find-22) (const KeyType & key) const *Finds a key in the hash map.* | | unsigned int | [**getMemoryFootprint**](#function-getmemoryfootprint) () const *Returns the memory footprint of the hash map.* | | bool | [**getValue**](#function-getvalue-12) (const KeyType & key, ValueType & value) const *Returns* `true` *if the\_\_key* *has an associated value and puts it in the\_\_value* *, else returns*`false` *.* | | std::optional< ValueType > | [**getValue**](#function-getvalue-22) (const KeyType & key) const *Returns the value associated to the* *key* *if found.* | | bool | [**hasValue**](#function-hasvalue) (const KeyType & key) const *Returns* `true` *if the\_\_key* *has an associated value.* | | SBHashMapEntry< KeyType, ValueType > \* | [**insert**](#function-insert) (const KeyType & key, const ValueType & value) *Inserts an element in the hash map.* | | [**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md) & | [**operator=**](#function-operator) (const [**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md) & hashMap) *Copy assignment.* | | [**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md) & | [**operator=**](#function-operator_1) ([**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md) && hashMap) *Move assignment.* | | ValueType & | [**operator[]**](#function-operator_2) (const KeyType & key) *Returns a reference to the value mapped to the key, which is inserted if necessary.* | | unsigned int | [**size**](#function-size) () noexcept const *The number of entries in the hash map.* | | std::map< KeyType, ValueType > | [**toStdMap**](#function-tostdmap) () const *Returns an* `std::map` *containing the same (key, value) pairs.* | | std::unordered_map< KeyType, ValueType > | [**toStdUnorderedMap**](#function-tostdunorderedmap) () const *Returns an* `std::unordered_map` *containing the same (key, value) pairs.* | | virtual | [**~SBCContainerHashMap**](#function-sbccontainerhashmap) () *Deletes the hash map.* | ## Protected Attributes | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------- | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md)< SBCContainerHashMapEntry< KeyType, ValueType > * > \* | [**hashMap**](#variable-hashmap) *The hash table.* | | unsigned int | [**numberOfEntries**](#variable-numberofentries) *The number of entries in the hash map.* | ## Detailed Description **Parameters:** - `KeyType` The type of keys - `ValueType` The type of values - `HashMapFunctor` The hash map functor, used to hash keys (by default, this is a SBCContainerHashMapFunctor) - `KeyComparator` The key comparator, used to compare keys (by default, this is a SBCContainerHashMapKeyComparator) This template class describes a hashtable-based map. This container is used for example to index objects (see [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md)), and may be used to efficiently map *keys* to *values*: ```C++ SBVector v; SBHashMap h; // create atoms and map them to integers for (unsigned int i = 0; i<10; i++) { v.push_back(new SBAtom(SBElement::Carbon)); h.insert(v[i], 6 * i + 17) } // print integers associated to atoms unsigned int j = 0; for (unsigned int i = 0; i < 10; i++) if (h.getValue(v[i], j)) std::cout << j << '\n'; ``` **Short name**: SBHashMap **See also:** SB_FOR ## Public Functions Documentation ### function SBCContainerHashMap [1/4] *Creates a new hash map.* ```C++ explicit SBCContainerHashMap::SBCContainerHashMap ( unsigned int nElements=0 ) ``` ______________________________________________________________________ ### function SBCContainerHashMap [2/4] *Copy constructor.* ```C++ SBCContainerHashMap::SBCContainerHashMap ( const SBCContainerHashMap & hashMap ) ``` ______________________________________________________________________ ### function SBCContainerHashMap [3/4] *Move constructor.* ```C++ SBCContainerHashMap::SBCContainerHashMap ( SBCContainerHashMap && hashMap ) noexcept ``` ______________________________________________________________________ ### function SBCContainerHashMap [4/4] *Creates a new hash map from the given initializer list.* ```C++ SBCContainerHashMap::SBCContainerHashMap ( std::initializer_list< std::pair< KeyType, ValueType > > init ) ``` If the initializer list contains duplicate keys, the last one wins. ______________________________________________________________________ ### function begin [1/2] *Returns an iterator that points to the beginning of the hash map.* ```C++ inline iterator SBCContainerHashMap::begin () ``` ______________________________________________________________________ ### function begin [2/2] *Returns an iterator that points to the beginning of the hash map.* ```C++ inline const_iterator SBCContainerHashMap::begin () const ``` ______________________________________________________________________ ### function clear *Erases all entries in the hash map.* ```C++ void SBCContainerHashMap::clear () ``` ______________________________________________________________________ ### function empty *Returns* `true` *when the hash map contains no entry.* ```C++ bool SBCContainerHashMap::empty () noexcept const ``` ______________________________________________________________________ ### function end [1/2] *Returns an iterator that points to the end of the hash map.* ```C++ inline iterator SBCContainerHashMap::end () ``` ______________________________________________________________________ ### function end [2/2] *Returns an iterator that points to the end of the hash map.* ```C++ inline const_iterator SBCContainerHashMap::end () const ``` ______________________________________________________________________ ### function erase *Attempts to erase an entry with a specific* *key* *and returns*`true` *if successful.* ```C++ bool SBCContainerHashMap::erase ( const KeyType & key ) ``` ______________________________________________________________________ ### function find [1/2] *Finds a key in the hash map.* ```C++ inline iterator SBCContainerHashMap::find ( const KeyType & key ) ``` ______________________________________________________________________ ### function find [2/2] *Finds a key in the hash map.* ```C++ inline const_iterator SBCContainerHashMap::find ( const KeyType & key ) const ``` ______________________________________________________________________ ### function getMemoryFootprint *Returns the memory footprint of the hash map.* ```C++ unsigned int SBCContainerHashMap::getMemoryFootprint () const ``` ______________________________________________________________________ ### function getValue [1/2] *Returns* `true` *if the\_\_key* *has an associated value and puts it in the\_\_value* *, else returns*`false` *.* ```C++ bool SBCContainerHashMap::getValue ( const KeyType & key, ValueType & value ) const ``` ______________________________________________________________________ ### function getValue [2/2] *Returns the value associated to the* *key* *if found.* ```C++ std::optional< ValueType > SBCContainerHashMap::getValue ( const KeyType & key ) const ``` ______________________________________________________________________ ### function hasValue *Returns* `true` *if the\_\_key* *has an associated value.* ```C++ bool SBCContainerHashMap::hasValue ( const KeyType & key ) const ``` ______________________________________________________________________ ### function insert *Inserts an element in the hash map.* ```C++ SBHashMapEntry< KeyType, ValueType > * SBCContainerHashMap::insert ( const KeyType & key, const ValueType & value ) ``` ______________________________________________________________________ ### function operator= *Copy assignment.* ```C++ SBCContainerHashMap & SBCContainerHashMap::operator= ( const SBCContainerHashMap & hashMap ) ``` ______________________________________________________________________ ### function operator= *Move assignment.* ```C++ SBCContainerHashMap & SBCContainerHashMap::operator= ( SBCContainerHashMap && hashMap ) ``` ______________________________________________________________________ ### function operator[] *Returns a reference to the value mapped to the key, which is inserted if necessary.* ```C++ inline ValueType & SBCContainerHashMap::operator[] ( const KeyType & key ) ``` ______________________________________________________________________ ### function size *The number of entries in the hash map.* ```C++ unsigned int SBCContainerHashMap::size () noexcept const ``` ______________________________________________________________________ ### function toStdMap *Returns an* `std::map` *containing the same (key, value) pairs.* ```C++ inline std::map< KeyType, ValueType > SBCContainerHashMap::toStdMap () const ``` ______________________________________________________________________ ### function toStdUnorderedMap *Returns an* `std::unordered_map` *containing the same (key, value) pairs.* ```C++ inline std::unordered_map< KeyType, ValueType > SBCContainerHashMap::toStdUnorderedMap () const ``` ______________________________________________________________________ ### function ~SBCContainerHashMap *Deletes the hash map.* ```C++ virtual SBCContainerHashMap::~SBCContainerHashMap () ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable hashMap *The hash table.* ```C++ SBCContainerVector*>* SBCContainerHashMap< KeyType, ValueType, HashMapFunctor, KeyComparator >::hashMap; ``` ______________________________________________________________________ ### variable numberOfEntries *The number of entries in the hash map.* ```C++ unsigned int SBCContainerHashMap< KeyType, ValueType, HashMapFunctor, KeyComparator >::numberOfEntries; ``` ______________________________________________________________________ # SBIndexer # Class SBCContainerIndexer **template \** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) *This template class is used to efficiently index objects.* [More...](#detailed-description) - `#include ` ## Classes | Type | Name | | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**const_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer_1_1const__iterator/index.md) | | class | [**const_reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer_1_1const__reverse__iterator/index.md) | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerIndexer**](#function-sbccontainerindexer-17) () *Creates an indexer.* | | | [**SBCContainerIndexer**](#function-sbccontainerindexer-27) (unsigned int initialSize) *Creates an indexer with a default pre-allocated size.* | | | [**SBCContainerIndexer**](#function-sbccontainerindexer-37) (std::set< ObjectType > & objectSet) *Constructs an indexer using the set of objects.* | | | [**SBCContainerIndexer**](#function-sbccontainerindexer-47) (std::vector< ObjectType > & objectVector) *Constructs an indexer using the vector of objects.* | | | [**SBCContainerIndexer**](#function-sbccontainerindexer-57) (std::initializer_list< ObjectType > objectList) *Constructs an indexer using the initializer list.* | | | [**SBCContainerIndexer**](#function-sbccontainerindexer-67) (const [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) & indexer) *Copy constructor.* | | | [**SBCContainerIndexer**](#function-sbccontainerindexer-77) ([**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) && indexer) noexcept *Move constructor.* | | iterator | [**begin**](#function-begin-12) () *Returns an iterator that points to the beginning of the indexer.* | | const_iterator | [**begin**](#function-begin-22) () const *Returns an iterator that points to the beginning of the indexer.* | | void | [**clear**](#function-clear) () *Clears the indexer.* | | bool | [**empty**](#function-empty) () const *Returns* `true` *if and only if the indexer is empty.* | | iterator | [**end**](#function-end-12) () *Returns an iterator that points to the end of the indexer.* | | const_iterator | [**end**](#function-end-22) () const *Returns an iterator that points to the end of the indexer.* | | unsigned int | [**eraseIndex**](#function-eraseindex) (unsigned int objectIndex) *Erases object* *objectIndex* *from the indexer.* | | unsigned int | [**eraseObject**](#function-eraseobject) (const ObjectType & object) *Erases the* *object* *from the indexer.* | | unsigned int | [**getIndex**](#function-getindex-12) (const ObjectType & object) const *Returns the index associated to the* *object* *.* | | bool | [**getIndex**](#function-getindex-22) (const ObjectType & object, unsigned int & index) const *Returns the index associated to the* *object* *.* | | ObjectType | [**getObject**](#function-getobject) (unsigned int index) const *Returns the object associated to the* *index* *.* | | bool | [**hasIndex**](#function-hasindex) (const ObjectType & object) const *Returns* `true` *if the\_\_object* *has an index.* | | unsigned int | [**insert**](#function-insert) (unsigned int i, const ObjectType & object) *Inserts an object in the indexer at position* `i` *if possible, and returns the index of the object.* | | [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) & | [**operator=**](#function-operator) (const [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) & indexer) *Copy assignment.* | | [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) & | [**operator=**](#function-operator_1) ([**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) && indexer) noexcept *Move assignment.* | | ObjectType | [**operator[]**](#function-operator_2) (unsigned int index) const *Returns the object associated to the* *index* *.* | | unsigned int | [**pop_back**](#function-pop_back) () *Adds an object in the indexer and returns the index of the object.* | | void | [**print**](#function-print-12) (std::ostream & os) const *Prints some debugging information.* | | void | [**print**](#function-print-22) () const *Prints some debugging information.* | | unsigned int | [**push_back**](#function-push_back) (const ObjectType & object) *Adds an object in the indexer if possible, and returns the index of the object.* | | reverse_iterator | [**rbegin**](#function-rbegin-12) () *Returns a reverse iterator that points to the reverse beginning of the indexer.* | | const_reverse_iterator | [**rbegin**](#function-rbegin-22) () const *Returns a reverse iterator that points to the reverse beginning of the indexer.* | | reverse_iterator | [**rend**](#function-rend-12) () *Returns a reverse iterator that points to the reverse end of the indexer.* | | const_reverse_iterator | [**rend**](#function-rend-22) () const *Returns a reverse iterator that points to the reverse end of the indexer.* | | unsigned int | [**size**](#function-size) () const *Returns the number of indexed objects.* | | virtual | [**~SBCContainerIndexer**](#function-sbccontainerindexer) () *Destructs the indexer.* | ## Protected Attributes | Type | Name | | ---------- | --------------------------------------------------------------- | | HashMap \* | [**indexMap**](#variable-indexmap) *The hash map.* | | Vector \* | [**objectVector**](#variable-objectvector) *The object vector.* | ## Detailed Description Fast indexing of objects is required in SAMSON because objects may operate on lists of other objects (e.g. a collision detection solver operates on a list of structural model components). An indexer provides a way to map the set of `n` objects to a set of ordered indices, from `0` to `n-1`, which can then be used for fast access to information associated to the mapped objects. [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) makes it possible to index values **contiguously**. Precisely, it is guaranteed that (n) values are always indexed by integers in ([0, n - 1]). To achieve this, when an object with index (i\\neq n - 1) is removed from the index, the index of object (n - 1) becomes (i). [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) may be used to index values compactly and dynamically. ```C++ // create atoms unsigned int nAtoms = 100; SBAtom** atomArray = new SBAtom*[nAtoms]; for (unsigned int i = 0; i* atomIndexer = new SBIndexer(); for (unsigned int i = 0; ipush_back(atomArray[i]); // print indices for (unsigned int i = 0; ihasIndex(atomArray[i])) std::cout << " Atom " << atomArray[i] << " -> " << atomIndexer->getIndex(atomArray[i]) << ".\n"; else std::cout << " Atom " << atomArray[i] << " -> no index.\n"; } // erase atomArray[9] from the index atomIndexer->eraseObject(atomArray[9]); // print indices // atomArray[9] has no index // atomArray[99] now has index 9 for (unsigned int i = 0; ihasIndex(atomArray[i])) std::cout << " Atom " << atomArray[i] << " -> " << atomIndexer->getIndex(atomArray[i]) << ".\n"; else std::cout << " Atom " << atomArray[i] << " -> no index.\n"; } // erase atom with index 2 atomIndexer->eraseIndex(2); // print indices // atomArray[9] has no index // atomArray[99] now has index 9 // atomArray[2] has no index // atomArray[98] has index 2 for (unsigned int i = 0; ihasIndex(atomArray[i])) std::cout << " Atom " << atomArray[i] << " -> " << atomIndexer->getIndex(atomArray[i]) << ".\n"; else std::cout << " Atom " << atomArray[i] << " -> no index.\n"; } ``` Internally, [**SBCContainerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerIndexer/index.md) uses a *hash map* (by default [**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md)) to assign indices and a *vector* (by default [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md)) to store objects. As a result, retrieving indices takes an almost constant time, while retrieving objects takes constant time. **Short name**: SBIndexer **See also:** [**SBCContainerBuffer**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerBuffer/index.md), [**SBCContainerHashMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerHashMap/index.md), [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md), SB_FOR ## Public Functions Documentation ### function SBCContainerIndexer [1/7] *Creates an indexer.* ```C++ SBCContainerIndexer::SBCContainerIndexer () ``` ______________________________________________________________________ ### function SBCContainerIndexer [2/7] *Creates an indexer with a default pre-allocated size.* ```C++ explicit SBCContainerIndexer::SBCContainerIndexer ( unsigned int initialSize ) ``` ______________________________________________________________________ ### function SBCContainerIndexer [3/7] *Constructs an indexer using the set of objects.* ```C++ explicit SBCContainerIndexer::SBCContainerIndexer ( std::set< ObjectType > & objectSet ) ``` ______________________________________________________________________ ### function SBCContainerIndexer [4/7] *Constructs an indexer using the vector of objects.* ```C++ explicit SBCContainerIndexer::SBCContainerIndexer ( std::vector< ObjectType > & objectVector ) ``` ______________________________________________________________________ ### function SBCContainerIndexer [5/7] *Constructs an indexer using the initializer list.* ```C++ SBCContainerIndexer::SBCContainerIndexer ( std::initializer_list< ObjectType > objectList ) ``` ______________________________________________________________________ ### function SBCContainerIndexer [6/7] *Copy constructor.* ```C++ SBCContainerIndexer::SBCContainerIndexer ( const SBCContainerIndexer & indexer ) ``` ______________________________________________________________________ ### function SBCContainerIndexer [7/7] *Move constructor.* ```C++ SBCContainerIndexer::SBCContainerIndexer ( SBCContainerIndexer && indexer ) noexcept ``` ______________________________________________________________________ ### function begin [1/2] *Returns an iterator that points to the beginning of the indexer.* ```C++ iterator SBCContainerIndexer::begin () ``` ______________________________________________________________________ ### function begin [2/2] *Returns an iterator that points to the beginning of the indexer.* ```C++ const_iterator SBCContainerIndexer::begin () const ``` ______________________________________________________________________ ### function clear *Clears the indexer.* ```C++ void SBCContainerIndexer::clear () ``` ______________________________________________________________________ ### function empty *Returns* `true` *if and only if the indexer is empty.* ```C++ bool SBCContainerIndexer::empty () const ``` ______________________________________________________________________ ### function end [1/2] *Returns an iterator that points to the end of the indexer.* ```C++ iterator SBCContainerIndexer::end () ``` ______________________________________________________________________ ### function end [2/2] *Returns an iterator that points to the end of the indexer.* ```C++ const_iterator SBCContainerIndexer::end () const ``` ______________________________________________________________________ ### function eraseIndex *Erases object* *objectIndex* *from the indexer.* ```C++ unsigned int SBCContainerIndexer::eraseIndex ( unsigned int objectIndex ) ``` The function returns an unsigned int with the following meaning: - if the *object* was not present in the index, the returned value is the number of indexed objects. - else, the returned value is the index of the object that was removed, in [0, size-1]. Note that these two returned values coincide when the client (unsuccessfully) attempts to erase object with index *size*. ______________________________________________________________________ ### function eraseObject *Erases the* *object* *from the indexer.* ```C++ unsigned int SBCContainerIndexer::eraseObject ( const ObjectType & object ) ``` The function returns an unsigned int with the following meaning: - if the *object* was not present in the index, the returned value is the number of indexed objects. - else, the returned value is the index of the object that was removed, in [0, size-1]. Note that these two returned values coincide when the client (unsuccessfully) attempts to erase object with index *size*. ______________________________________________________________________ ### function getIndex [1/2] *Returns the index associated to the* *object* *.* ```C++ unsigned int SBCContainerIndexer::getIndex ( const ObjectType & object ) const ``` ______________________________________________________________________ ### function getIndex [2/2] *Returns the index associated to the* *object* *.* ```C++ bool SBCContainerIndexer::getIndex ( const ObjectType & object, unsigned int & index ) const ``` ______________________________________________________________________ ### function getObject *Returns the object associated to the* *index* *.* ```C++ ObjectType SBCContainerIndexer::getObject ( unsigned int index ) const ``` ______________________________________________________________________ ### function hasIndex *Returns* `true` *if the\_\_object* *has an index.* ```C++ bool SBCContainerIndexer::hasIndex ( const ObjectType & object ) const ``` ______________________________________________________________________ ### function insert *Inserts an object in the indexer at position* `i` *if possible, and returns the index of the object.* ```C++ unsigned int SBCContainerIndexer::insert ( unsigned int i, const ObjectType & object ) ``` ______________________________________________________________________ ### function operator= *Copy assignment.* ```C++ SBCContainerIndexer & SBCContainerIndexer::operator= ( const SBCContainerIndexer & indexer ) ``` ______________________________________________________________________ ### function operator= *Move assignment.* ```C++ SBCContainerIndexer & SBCContainerIndexer::operator= ( SBCContainerIndexer && indexer ) noexcept ``` ______________________________________________________________________ ### function operator[] *Returns the object associated to the* *index* *.* ```C++ ObjectType SBCContainerIndexer::operator[] ( unsigned int index ) const ``` ______________________________________________________________________ ### function pop_back *Adds an object in the indexer and returns the index of the object.* ```C++ unsigned int SBCContainerIndexer::pop_back () ``` ______________________________________________________________________ ### function print [1/2] *Prints some debugging information.* ```C++ void SBCContainerIndexer::print ( std::ostream & os ) const ``` ______________________________________________________________________ ### function print [2/2] *Prints some debugging information.* ```C++ void SBCContainerIndexer::print () const ``` ______________________________________________________________________ ### function push_back *Adds an object in the indexer if possible, and returns the index of the object.* ```C++ unsigned int SBCContainerIndexer::push_back ( const ObjectType & object ) ``` ______________________________________________________________________ ### function rbegin [1/2] *Returns a reverse iterator that points to the reverse beginning of the indexer.* ```C++ reverse_iterator SBCContainerIndexer::rbegin () ``` ______________________________________________________________________ ### function rbegin [2/2] *Returns a reverse iterator that points to the reverse beginning of the indexer.* ```C++ const_reverse_iterator SBCContainerIndexer::rbegin () const ``` ______________________________________________________________________ ### function rend [1/2] *Returns a reverse iterator that points to the reverse end of the indexer.* ```C++ reverse_iterator SBCContainerIndexer::rend () ``` ______________________________________________________________________ ### function rend [2/2] *Returns a reverse iterator that points to the reverse end of the indexer.* ```C++ const_reverse_iterator SBCContainerIndexer::rend () const ``` ______________________________________________________________________ ### function size *Returns the number of indexed objects.* ```C++ unsigned int SBCContainerIndexer::size () const ``` ______________________________________________________________________ ### function ~SBCContainerIndexer *Destructs the indexer.* ```C++ virtual SBCContainerIndexer::~SBCContainerIndexer () ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable indexMap *The hash map.* ```C++ HashMap* SBCContainerIndexer< ObjectType, HashMap, Vector >::indexMap; ``` ______________________________________________________________________ ### variable objectVector *The object vector.* ```C++ Vector* SBCContainerIndexer< ObjectType, HashMap, Vector >::objectVector; ``` ______________________________________________________________________ # SBList # Class SBCContainerList **template \** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) *This template class describes an encapsulated doubly-linked list.* [More...](#detailed-description) - `#include ` ## Classes | Type | Name | | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**const_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList_1_1const__iterator/index.md) | | class | [**const_reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList_1_1const__reverse__iterator/index.md) | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCContainerList**](#function-sbccontainerlist-13) () noexcept *Constructs an empty list.* | | | [**SBCContainerList**](#function-sbccontainerlist-23) (const [**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) & list) *Copy constructor.* | | | [**SBCContainerList**](#function-sbccontainerlist-33) ([**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) && list) noexcept *Move constructor.* | | iterator | [**begin**](#function-begin-12) () *Returns an iterator that points to the beginning of the list.* | | const_iterator | [**begin**](#function-begin-22) () const *Returns an iterator that points to the beginning of the list.* | | void | [**clear**](#function-clear) () *Clears the list.* | | void | [**deleteLinkFromList**](#function-deletelinkfromlist) (LinkType * link) *Deletes the link* `link` *from the list.* | | bool | [**empty**](#function-empty) () noexcept const *Returns true if and only if the list is empty.* | | iterator | [**end**](#function-end-12) () *Returns an iterator that points to the end of the list.* | | const_iterator | [**end**](#function-end-22) () const *Returns an iterator that points to the end of the list.* | | LinkType \* | [**getBeginLink**](#function-getbeginlink-12) () *Returns a pointer to the first link in the list.* | | LinkType const \* | [**getBeginLink**](#function-getbeginlink-22) () const *Returns a pointer to the first link in the list.* | | LinkType \* | [**getEndLink**](#function-getendlink-12) () *Returns a pointer to the last link in the list.* | | LinkType const \* | [**getEndLink**](#function-getendlink-22) () const *Returns a pointer to the last link in the list.* | | unsigned int | [**getMemoryFootprint**](#function-getmemoryfootprint) () const *Returns the memory footprint of the list.* | | bool | [**hasLink**](#function-haslink) (LinkType * link) const *Returns true if and only if the list contains the link* `link` *.* | | [**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) & | [**operator=**](#function-operator) (const [**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) & list) *Copy assignment.* | | [**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) & | [**operator=**](#function-operator_1) ([**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) && list) *Move assignment.* | | void | [**pop_back**](#function-pop_back) () *Removes the last element of the list.* | | void | [**pop_front**](#function-pop_front) () *Removes the first element of the list.* | | void | [**push_back**](#function-push_back) (const ValueType & t) *Adds* `t` *at the end of the list.* | | void | [**push_front**](#function-push_front) (const ValueType & t) *Adds* `t` *at the beginning of the list.* | | reverse_iterator | [**rbegin**](#function-rbegin-12) () *Returns a reverse iterator that points to the beginning of the reverse list.* | | const_reverse_iterator | [**rbegin**](#function-rbegin-22) () const *Returns a reverse iterator that points to the beginning of the reverse list.* | | reverse_iterator | [**rend**](#function-rend-12) () *Returns a reverse iterator that points to the beginning of the reverse list.* | | const_reverse_iterator | [**rend**](#function-rend-22) () const *Returns a reverse iterator that points to the beginning of the reverse list.* | | unsigned int | [**size**](#function-size) () const *Returns the size of the list.* | | virtual | [**~SBCContainerList**](#function-sbccontainerlist) () *Destructs the list.* | ## Protected Attributes | Type | Name | | ----------- | ------------------------------------ | | LinkType \* | [**beginLink**](#variable-beginlink) | | LinkType \* | [**endLink**](#variable-endlink) | ## Detailed Description **Template parameters:** - `ValueType` The type of values contained in the list - `LinkType` The type of links contained in the list This template class describes an encapsulated doubly-linked list: ```C++ SBList l; // add atoms to the front of the list for (unsigned int i = 0; i<10; i++) l.push_front(new SBAtom(SBElement::Carbon)); // print atoms positions (version 1) for (SBList::iterator i = l.begin(); i != l.end(); i++) (*i)->getPosition().print(); // print atoms positions (version 2) SB_FOR(SBAtom* atom, l) atom->getPosition().print(); ``` **Short name**: SBList **See also:** [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md), SB_FOR ## Public Functions Documentation ### function SBCContainerList [1/3] *Constructs an empty list.* ```C++ inline SBCContainerList::SBCContainerList () noexcept ``` ______________________________________________________________________ ### function SBCContainerList [2/3] *Copy constructor.* ```C++ inline SBCContainerList::SBCContainerList ( const SBCContainerList & list ) ``` ______________________________________________________________________ ### function SBCContainerList [3/3] *Move constructor.* ```C++ inline SBCContainerList::SBCContainerList ( SBCContainerList && list ) noexcept ``` ______________________________________________________________________ ### function begin [1/2] *Returns an iterator that points to the beginning of the list.* ```C++ inline iterator SBCContainerList::begin () ``` ______________________________________________________________________ ### function begin [2/2] *Returns an iterator that points to the beginning of the list.* ```C++ inline const_iterator SBCContainerList::begin () const ``` ______________________________________________________________________ ### function clear *Clears the list.* ```C++ inline void SBCContainerList::clear () ``` ______________________________________________________________________ ### function deleteLinkFromList *Deletes the link* `link` *from the list.* ```C++ inline void SBCContainerList::deleteLinkFromList ( LinkType * link ) ``` ______________________________________________________________________ ### function empty *Returns true if and only if the list is empty.* ```C++ inline bool SBCContainerList::empty () noexcept const ``` ______________________________________________________________________ ### function end [1/2] *Returns an iterator that points to the end of the list.* ```C++ inline iterator SBCContainerList::end () ``` ______________________________________________________________________ ### function end [2/2] *Returns an iterator that points to the end of the list.* ```C++ inline const_iterator SBCContainerList::end () const ``` ______________________________________________________________________ ### function getBeginLink [1/2] *Returns a pointer to the first link in the list.* ```C++ inline LinkType * SBCContainerList::getBeginLink () ``` ______________________________________________________________________ ### function getBeginLink [2/2] *Returns a pointer to the first link in the list.* ```C++ inline LinkType const * SBCContainerList::getBeginLink () const ``` ______________________________________________________________________ ### function getEndLink [1/2] *Returns a pointer to the last link in the list.* ```C++ inline LinkType * SBCContainerList::getEndLink () ``` ______________________________________________________________________ ### function getEndLink [2/2] *Returns a pointer to the last link in the list.* ```C++ inline LinkType const * SBCContainerList::getEndLink () const ``` ______________________________________________________________________ ### function getMemoryFootprint *Returns the memory footprint of the list.* ```C++ inline unsigned int SBCContainerList::getMemoryFootprint () const ``` ______________________________________________________________________ ### function hasLink *Returns true if and only if the list contains the link* `link` *.* ```C++ inline bool SBCContainerList::hasLink ( LinkType * link ) const ``` ______________________________________________________________________ ### function operator= *Copy assignment.* ```C++ inline SBCContainerList & SBCContainerList::operator= ( const SBCContainerList & list ) ``` ______________________________________________________________________ ### function operator= *Move assignment.* ```C++ inline SBCContainerList & SBCContainerList::operator= ( SBCContainerList && list ) ``` ______________________________________________________________________ ### function pop_back *Removes the last element of the list.* ```C++ inline void SBCContainerList::pop_back () ``` ______________________________________________________________________ ### function pop_front *Removes the first element of the list.* ```C++ inline void SBCContainerList::pop_front () ``` ______________________________________________________________________ ### function push_back *Adds* `t` *at the end of the list.* ```C++ inline void SBCContainerList::push_back ( const ValueType & t ) ``` ______________________________________________________________________ ### function push_front *Adds* `t` *at the beginning of the list.* ```C++ inline void SBCContainerList::push_front ( const ValueType & t ) ``` ______________________________________________________________________ ### function rbegin [1/2] *Returns a reverse iterator that points to the beginning of the reverse list.* ```C++ inline reverse_iterator SBCContainerList::rbegin () ``` ______________________________________________________________________ ### function rbegin [2/2] *Returns a reverse iterator that points to the beginning of the reverse list.* ```C++ inline const_reverse_iterator SBCContainerList::rbegin () const ``` ______________________________________________________________________ ### function rend [1/2] *Returns a reverse iterator that points to the beginning of the reverse list.* ```C++ inline reverse_iterator SBCContainerList::rend () ``` ______________________________________________________________________ ### function rend [2/2] *Returns a reverse iterator that points to the beginning of the reverse list.* ```C++ inline const_reverse_iterator SBCContainerList::rend () const ``` ______________________________________________________________________ ### function size *Returns the size of the list.* ```C++ inline unsigned int SBCContainerList::size () const ``` This operation is linear in the number of elements in the list ______________________________________________________________________ ### function ~SBCContainerList *Destructs the list.* ```C++ inline virtual SBCContainerList::~SBCContainerList () ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable beginLink ```C++ LinkType* SBCContainerList< ValueType, LinkType >::beginLink; ``` ______________________________________________________________________ ### variable endLink ```C++ LinkType* SBCContainerList< ValueType, LinkType >::endLink; ``` ______________________________________________________________________ # SBListLink # Class SBCContainerListLink **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md) *This template class describes a doubly linked list.* [More...](#detailed-description) - `#include ` ## Public Functions | Type | Name | | --------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerListLink**](#function-sbccontainerlistlink) (const ValueType & v, [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md)< ValueType > * n=nullptr, [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md)< ValueType > * p=nullptr) *Constructs a link holding value* `v` *, with next link*`n` *and previous link*`p` *.* | | void | [**deleteLinkFromList**](#function-deletelinkfromlist) () *Deletes a link from the list while preserving the list.* | | unsigned int | [**getMemoryFootprint**](#function-getmemoryfootprint) () const *Returns the memory footprint of the link.* | | [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md)< ValueType > \* | [**getNextLink**](#function-getnextlink) () noexcept const *Returns a pointer to the next link.* | | [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md)< ValueType > \* | [**getPreviousLink**](#function-getpreviouslink) () noexcept const *Returns a pointer to the previous link.* | | ValueType & | [**getValue**](#function-getvalue-12) () noexcept *Returns a reference to the value hold by the link.* | | ValueType const & | [**getValue**](#function-getvalue-22) () noexcept const *Returns a reference to the value hold by the link.* | | virtual | [**~SBCContainerListLink**](#function-sbccontainerlistlink) () *Destructs the link.* | ## Public Static Functions | Type | Name | | ------- | ----------------------------------------------------------------------------- | | void | [**operator delete**](#function-operator-delete) (void * p, std::size_t size) | | void \* | [**operator new**](#function-operator-new) (std::size_t size) | ## Protected Attributes | Type | Name | | --------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------ | | [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md)< ValueType > \* | [**nextLink**](#variable-nextlink) | | [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md)< ValueType > \* | [**previousLink**](#variable-previouslink) | | ValueType | [**value**](#variable-value) | ## Detailed Description **Template parameters:** - `ValueType` The type of the value hold in the link The class [**SBCContainerListLink**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerListLink/index.md) is a template defining a link from a doubly-linked list. It may be used as is, to define a non-encapsulated doubly-linked list that may hold values of type `ValueType`, or through [**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md), which defines an encapsulated list. When using it alone, proper care must be taken to avoid memory leaks. ```C++ SBListLink* l = 0; // add atoms to the front of the list for (unsigned int i = 0; i<10; i++) l = new SBListLink(new SBAtom(SBElement::Carbon), l); // print atoms positions for (SBListLink* i = l; i != 0; i = i->getNextLink()) i->getValue()->getPosition().print(); ``` **Short name**: SBListLink **See also:** [**SBCContainerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerList/index.md) ## Public Functions Documentation ### function SBCContainerListLink *Constructs a link holding value* `v` *, with next link*`n` *and previous link*`p` *.* ```C++ inline SBCContainerListLink::SBCContainerListLink ( const ValueType & v, SBCContainerListLink < ValueType > * n=nullptr, SBCContainerListLink < ValueType > * p=nullptr ) ``` ______________________________________________________________________ ### function deleteLinkFromList *Deletes a link from the list while preserving the list.* ```C++ inline void SBCContainerListLink::deleteLinkFromList () ``` This function deletes the link while preserving the list: - if the link had a previous link, this previous link then points to the link's next link - if the link had a next link, this next link then points to the link's previous link ______________________________________________________________________ ### function getMemoryFootprint *Returns the memory footprint of the link.* ```C++ inline unsigned int SBCContainerListLink::getMemoryFootprint () const ``` ______________________________________________________________________ ### function getNextLink *Returns a pointer to the next link.* ```C++ inline SBCContainerListLink < ValueType > * SBCContainerListLink::getNextLink () noexcept const ``` ______________________________________________________________________ ### function getPreviousLink *Returns a pointer to the previous link.* ```C++ inline SBCContainerListLink < ValueType > * SBCContainerListLink::getPreviousLink () noexcept const ``` ______________________________________________________________________ ### function getValue [1/2] *Returns a reference to the value hold by the link.* ```C++ inline ValueType & SBCContainerListLink::getValue () noexcept ``` ______________________________________________________________________ ### function getValue [2/2] *Returns a reference to the value hold by the link.* ```C++ inline ValueType const & SBCContainerListLink::getValue () noexcept const ``` ______________________________________________________________________ ### function ~SBCContainerListLink *Destructs the link.* ```C++ inline virtual SBCContainerListLink::~SBCContainerListLink () ``` This destructor does not do anything. In particular, it does not delete the next and previous link. ______________________________________________________________________ ## Public Static Functions Documentation ### function operator delete ```C++ static inline void SBCContainerListLink::operator delete ( void * p, std::size_t size ) ``` ______________________________________________________________________ ### function operator new ```C++ static inline void * SBCContainerListLink::operator new ( std::size_t size ) ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable nextLink ```C++ SBCContainerListLink* SBCContainerListLink< ValueType >::nextLink; ``` ______________________________________________________________________ ### variable previousLink ```C++ SBCContainerListLink* SBCContainerListLink< ValueType >::previousLink; ``` ______________________________________________________________________ ### variable value ```C++ ValueType SBCContainerListLink< ValueType >::value; ``` ______________________________________________________________________ # SBString # Class SBCContainerString [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) *This class describes a string.* [More...](#detailed-description) - `#include ` ## Public Functions | Type | Name | | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerString**](#function-sbccontainerstring-14) (std::string s) *Constructs a string from a std::string* `s` *.* | | | [**SBCContainerString**](#function-sbccontainerstring-24) (const char * s) *Constructs a string from a char array* `s` *.* | | | [**SBCContainerString**](#function-sbccontainerstring-34) (const [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) & s) *Copy constructor.* | | | [**SBCContainerString**](#function-sbccontainerstring-44) ([**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) && s) noexcept *Move constructor.* | | [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) & | [**operator=**](#function-operator) (const [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) & s) *Copy assignment operator.* | | [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) & | [**operator=**](#function-operator_1) ([**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) && s) noexcept *Move assignment operator.* | | void | [**print**](#function-print-12) (std::ostream & os) const *Prints some debugging information.* | | void | [**print**](#function-print-22) () const *Prints some debugging information.* | | void | [**removeWhitespaces**](#function-removewhitespaces-12) () *Removes all whitespace characters (spaces, tabs, newlines, etc.) from the string.* | | virtual | [**~SBCContainerString**](#function-sbccontainerstring) () *Destructs the string.* | ## Public Static Functions | Type | Name | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**removeWhitespaces**](#function-removewhitespaces-22) (std::string t) *Removes all whitespace characters (spaces, tabs, newlines, etc.) from the input string.* | ## Detailed Description [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) is a simple class that encapsulates a std::string. Its initial purpose was to provide a simple way to remove whitespaces in a string: ```C++ // non-static version SBString s("Hello World"); s.removeWhitespaces(); // s becomes "HelloWorld" // static version (does not modify the input) std::string s("Hello World"); std::string r = SBString::removeWhitespaces(s); // r is "HelloWorld" ``` **Short name**: SBString ## Public Functions Documentation ### function SBCContainerString [1/4] *Constructs a string from a std::string* `s` *.* ```C++ explicit SBCContainerString::SBCContainerString ( std::string s ) ``` Constructs a [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) from a std::string. **Parameters:** - `_s` Input string used to initialize the container. ______________________________________________________________________ ### function SBCContainerString [2/4] *Constructs a string from a char array* `s` *.* ```C++ explicit SBCContainerString::SBCContainerString ( const char * s ) ``` Constructs a [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) from a C-string. **Parameters:** - `c` C-string used to initialize the container. If null, an empty string is used. ______________________________________________________________________ ### function SBCContainerString [3/4] *Copy constructor.* ```C++ SBCContainerString::SBCContainerString ( const SBCContainerString & s ) ``` Copy‑constructs a [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) from another instance. **Parameters:** - `_s` Source [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) to copy. ______________________________________________________________________ ### function SBCContainerString [4/4] *Move constructor.* ```C++ SBCContainerString::SBCContainerString ( SBCContainerString && s ) noexcept ``` Move‑constructs a [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) from another instance, transferring ownership. **Parameters:** - `_s` Source [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) to move from. ______________________________________________________________________ ### function operator= *Copy assignment operator.* ```C++ SBCContainerString & SBCContainerString::operator= ( const SBCContainerString & s ) ``` Copy‑assigns the contents of another [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) to this object. **Parameters:** - `_s` Source [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) to copy from. **Returns:** Reference to this object. ______________________________________________________________________ ### function operator= *Move assignment operator.* ```C++ SBCContainerString & SBCContainerString::operator= ( SBCContainerString && s ) noexcept ``` Move‑assigns the contents of another [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) to this object, transferring ownership. **Parameters:** - `_s` Source [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) to move from. **Returns:** Reference to this object. ______________________________________________________________________ ### function print [1/2] *Prints some debugging information.* ```C++ void SBCContainerString::print ( std::ostream & os ) const ``` Writes the stored string to the given output stream. **Parameters:** - `os` Output stream to write to. ______________________________________________________________________ ### function print [2/2] *Prints some debugging information.* ```C++ void SBCContainerString::print () const ``` Writes the stored string to the standard output (std::cout). ______________________________________________________________________ ### function removeWhitespaces [1/2] *Removes all whitespace characters (spaces, tabs, newlines, etc.) from the string.* ```C++ void SBCContainerString::removeWhitespaces () ``` Removes all whitespace characters from the stored string. ______________________________________________________________________ ### function ~SBCContainerString *Destructs the string.* ```C++ virtual SBCContainerString::~SBCContainerString () ``` Destroys the [**SBCContainerString**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerString/index.md) and releases any allocated resources. ______________________________________________________________________ ## Public Static Functions Documentation ### function removeWhitespaces [2/2] *Removes all whitespace characters (spaces, tabs, newlines, etc.) from the input string.* ```C++ static std::string SBCContainerString::removeWhitespaces ( std::string t ) ``` Returns a copy of the input string with all whitespace characters removed. **Parameters:** - `t` Input string from which whitespace will be removed. **Returns:** A new string with whitespace removed. ______________________________________________________________________ # SBUserPlan # Class SBCContainerUserPlan [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) *This class describes a user plan.* - `#include ` ## Public Types | Type | Name | | ---- | --------------------------------------------------- | | enum | [**Type**](#enum-type) *The type of the user plan.* | ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerUserPlan**](#function-sbccontaineruserplan-14) () noexcept *Constructs the None user plan.* | | | [**SBCContainerUserPlan**](#function-sbccontaineruserplan-24) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/#enum-type) type) noexcept *Constructs a user plan.* | | | [**SBCContainerUserPlan**](#function-sbccontaineruserplan-34) (const std::string & typeString) *Constructs a user plan.* | | | [**SBCContainerUserPlan**](#function-sbccontaineruserplan-44) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) *Constructs a user plan.* | | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/#enum-type) | [**getType**](#function-gettype) () noexcept const *Returns the user plan type.* | | bool | [**operator!=**](#function-operator) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) noexcept const *Inequality operator.* | | std::string | [**operator()**](#function-operator_1) () noexcept const *Returns the user plan as a string.* | | bool | [**operator\<**](#function-operator_2) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) noexcept const *Comparison with another user plan.* | | bool | [**operator\<=**](#function-operator_3) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) noexcept const *Comparison with another user plan.* | | [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & | [**operator=**](#function-operator_4) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) *Assignment operator.* | | bool | [**operator==**](#function-operator_5) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) noexcept const *Equality operator.* | | bool | [**operator>**](#function-operator_6) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) noexcept const *Comparison with another user plan.* | | bool | [**operator>=**](#function-operator_7) (const [**SBCContainerUserPlan**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUserPlan/index.md) & userPlan) noexcept const *Comparison with another user plan.* | | virtual | [**~SBCContainerUserPlan**](#function-sbccontaineruserplan) () *Destructs the user plan.* | ## Public Types Documentation ### enum Type *The type of the user plan.* ```C++ enum SBCContainerUserPlan::Type { None = 0, NoPlan = 0, Starter = 1, Professional = 2, Expert = 3, Enterprise = 4 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCContainerUserPlan [1/4] *Constructs the None user plan.* ```C++ SBCContainerUserPlan::SBCContainerUserPlan () noexcept ``` User plan class. This class describes a user plan in SAMSON. **Short name**: SBUserPlan Constructs a user plan with no plan. ______________________________________________________________________ ### function SBCContainerUserPlan [2/4] *Constructs a user plan.* ```C++ SBCContainerUserPlan::SBCContainerUserPlan ( Type type ) noexcept ``` Constructs a user plan with the specified type. **Parameters:** - `type` The type of the user plan. ______________________________________________________________________ ### function SBCContainerUserPlan [3/4] *Constructs a user plan.* ```C++ SBCContainerUserPlan::SBCContainerUserPlan ( const std::string & typeString ) ``` Constructs a user plan from its string representation. Creates a user plan based on the textual name of the plan. Supported values are "Starter", "Professional", "Expert", and "Enterprise". If the input does not match any known plan, the plan is set to NoPlan. **Parameters:** - `userPlanString` The string representing the user plan type. ______________________________________________________________________ ### function SBCContainerUserPlan [4/4] *Constructs a user plan.* ```C++ SBCContainerUserPlan::SBCContainerUserPlan ( const SBCContainerUserPlan & userPlan ) ``` Constructs a copy of the given user plan. **Parameters:** - `userPlan` The user plan to copy. ______________________________________________________________________ ### function getType *Returns the user plan type.* ```C++ Type SBCContainerUserPlan::getType () noexcept const ``` Returns the type of the user plan. **Returns:** The user plan type. ______________________________________________________________________ ### function operator!= *Inequality operator.* ```C++ bool SBCContainerUserPlan::operator!= ( const SBCContainerUserPlan & userPlan ) noexcept const ``` Checks if this user plan is not equal to another. **Parameters:** - `userPlan` The user plan to compare with. **Returns:** `true` if the user plans have different types, `false` otherwise. ______________________________________________________________________ ### function operator() *Returns the user plan as a string.* ```C++ std::string SBCContainerUserPlan::operator() () noexcept const ``` Returns the string representation of the user plan. Provides the textual name associated with the current plan type. For a plan set to NoPlan, the function returns "None". **Returns:** The name of the user plan as a string. ______________________________________________________________________ ### function operator\< *Comparison with another user plan.* ```C++ bool SBCContainerUserPlan::operator< ( const SBCContainerUserPlan & userPlan ) noexcept const ``` Checks if this user plan's type is less than another's. **Parameters:** - `userPlan` The user plan to compare with. **Returns:** `true` if this user plan's type is less, `false` otherwise. ______________________________________________________________________ ### function operator\<= *Comparison with another user plan.* ```C++ bool SBCContainerUserPlan::operator<= ( const SBCContainerUserPlan & userPlan ) noexcept const ``` Checks if this user plan's type is less than or equal to another's. **Parameters:** - `userPlan` The user plan to compare with. **Returns:** `true` if this user plan's type is less or equal, `false` otherwise. ______________________________________________________________________ ### function operator= *Assignment operator.* ```C++ SBCContainerUserPlan & SBCContainerUserPlan::operator= ( const SBCContainerUserPlan & userPlan ) ``` Assigns the given user plan to this one. **Parameters:** - `userPlan` The user plan to assign from. **Returns:** Reference to this user plan. ______________________________________________________________________ ### function operator== *Equality operator.* ```C++ bool SBCContainerUserPlan::operator== ( const SBCContainerUserPlan & userPlan ) noexcept const ``` Checks if this user plan is equal to another. **Parameters:** - `userPlan` The user plan to compare with. **Returns:** `true` if both user plans have the same type, `false` otherwise. ______________________________________________________________________ ### function operator> *Comparison with another user plan.* ```C++ bool SBCContainerUserPlan::operator> ( const SBCContainerUserPlan & userPlan ) noexcept const ``` Checks if this user plan's type is greater than another's. **Parameters:** - `userPlan` The user plan to compare with. **Returns:** `true` if this user plan's type is greater, `false` otherwise. ______________________________________________________________________ ### function operator>= *Comparison with another user plan.* ```C++ bool SBCContainerUserPlan::operator>= ( const SBCContainerUserPlan & userPlan ) noexcept const ``` Checks if this user plan's type is greater than or equal to another's. **Parameters:** - `userPlan` The user plan to compare with. **Returns:** `true` if this user plan's type is greater or equal, `false` otherwise. ______________________________________________________________________ ### function ~SBCContainerUserPlan *Destructs the user plan.* ```C++ virtual SBCContainerUserPlan::~SBCContainerUserPlan () ``` Destroys the user plan. ______________________________________________________________________ # SBUUID # Class SBCContainerUUID [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *This class describes a universally unique identifier (UUID).* [More...](#detailed-description) - `#include ` ## Public Attributes | Type | Name | | ------------------------- | -------------------------- | | std::array< uint8_t, 16 > | [**data**](#variable-data) | ## Public Static Attributes | Type | Name | | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**invalid**](#variable-invalid) *An empty invalid UUID object (equal to* [***SBCContainerUUID()***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/#function-sbccontaineruuid-55) *)* | ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerUUID**](#function-sbccontaineruuid-15) (const std::array< uint8_t, 16 > & data) *Constructs a UUID from internal data.* | | | [**SBCContainerUUID**](#function-sbccontaineruuid-25) (const std::string & uuid) *Constructs a UUID from a std::string.* | | | [**SBCContainerUUID**](#function-sbccontaineruuid-35) (const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & other) *Copy constructor.* | | | [**SBCContainerUUID**](#function-sbccontaineruuid-45) ([**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) && other) noexcept *Move constructor.* | | | [**SBCContainerUUID**](#function-sbccontaineruuid-55) () noexcept *Constructs an invalid UUID.* | | bool | [**isValid**](#function-isvalid) () noexcept const *Returns* `true` *if and only if the UUID is valid.* | | bool | [**operator!=**](#function-operator) (const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & other) const *Inequality operator.* | | std::string | [**operator()**](#function-operator_1) () const *Returns the UUID in string format.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & | [**operator++**](#function-operator_2) () *Prefix increment operator.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**operator++**](#function-operator_3) (int) *Postfix increment operator.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & | [**operator--**](#function-operator-) () *Prefix decrement operator.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**operator--**](#function-operator-_1) (int) *Postfix decrement operator.* | | bool | [**operator\<**](#function-operator_4) (const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & other) const *Lexicographic comparison with another UUID.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & | [**operator=**](#function-operator_5) (const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & other) *Copy assignment operator.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & | [**operator=**](#function-operator_6) ([**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) && other) noexcept *Move assignment operator.* | | bool | [**operator==**](#function-operator_7) (const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & other) const *Equality operator.* | | virtual | [**~SBCContainerUUID**](#function-sbccontaineruuid) () *Destructs the UUID.* | ## Detailed Description [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) objects can hold Universally Unique IDs (UUIDs), which are used to identify classes and SAMSON Extensions. In many cases, UUIDs are automatically generated thanks to the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md). UUIDs may be used e.g. to retrieve [**class proxies**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md): ```C++ SBCClassProxy* classProxy = nullptr; std::string className("ClassName"); std::string elementName("ElementName"); SBUUID elementUUID("0CE16BE8-8AA1-75C4-31A8-B3FA1CE93A94"); // retrieve a class proxy classProxy = SAMSON::getProxy(className, elementName, elementUUID); ``` When necessary, [**SBDTypeRandom**](https://documentation.samson-connect.net/developers/latest/api/classSBDTypeRandom/index.md) can be used to generate UUIDs : ```C++ SBRandom randomGenerator; SBUUID randomUUID = randomGenerator.randUUID(); ``` **Short name**: SBUUID **See also:** [Identifiers](https://documentation.samson-connect.net/developers/latest/identifiers/index.md), [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md), [**SBDTypeRandom**](https://documentation.samson-connect.net/developers/latest/api/classSBDTypeRandom/index.md) ## Public Attributes Documentation ### variable data ```C++ std::array SBCContainerUUID::data; ``` ______________________________________________________________________ ## Public Static Attributes Documentation ### variable invalid *An empty invalid UUID object (equal to* [***SBCContainerUUID()***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/#function-sbccontaineruuid-55) *)* ```C++ SBCContainerUUID SBCContainerUUID::invalid; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCContainerUUID [1/5] *Constructs a UUID from internal data.* ```C++ explicit SBCContainerUUID::SBCContainerUUID ( const std::array< uint8_t, 16 > & data ) ``` Initializes the UUID with the provided 16-byte array representing the UUID value. **Parameters:** - `data` A 16-element array containing the raw UUID bytes. ______________________________________________________________________ ### function SBCContainerUUID [2/5] *Constructs a UUID from a std::string.* ```C++ SBCContainerUUID::SBCContainerUUID ( const std::string & uuid ) ``` Constructs a UUID from a string representation. Parses a UUID string in the standard 36-character format (e.g., "123e4567-e89b-12d3-a456-426614174000"). If the string is not a valid UUID, the resulting object is set to an invalid state. **Parameters:** - `uuid` The string containing the UUID. ______________________________________________________________________ ### function SBCContainerUUID [3/5] *Copy constructor.* ```C++ SBCContainerUUID::SBCContainerUUID ( const SBCContainerUUID & other ) ``` Constructs a new UUID as a copy of an existing UUID. **Parameters:** - `other` The UUID to copy. ______________________________________________________________________ ### function SBCContainerUUID [4/5] *Move constructor.* ```C++ SBCContainerUUID::SBCContainerUUID ( SBCContainerUUID && other ) noexcept ``` Constructs a new UUID by moving the data from another UUID. **Parameters:** - `other` The UUID to move. ______________________________________________________________________ ### function SBCContainerUUID [5/5] *Constructs an invalid UUID.* ```C++ SBCContainerUUID::SBCContainerUUID () noexcept ``` Creates a UUID object that is considered invalid. It can be used as a sentinel value. ______________________________________________________________________ ### function isValid *Returns* `true` *if and only if the UUID is valid.* ```C++ bool SBCContainerUUID::isValid () noexcept const ``` Checks whether the UUID is valid. Determines if the UUID holds a valid value (i.e., not the sentinel invalid UUID). **Returns:** `true` if the UUID is valid, `false` otherwise. ______________________________________________________________________ ### function operator!= *Inequality operator.* ```C++ bool SBCContainerUUID::operator!= ( const SBCContainerUUID & other ) const ``` Checks whether this UUID is not equal to another UUID. **Parameters:** - `other` The UUID to compare with. **Returns:** `true` if the UUIDs are different, `false` otherwise. ______________________________________________________________________ ### function operator() *Returns the UUID in string format.* ```C++ std::string SBCContainerUUID::operator() () const ``` Returns the string representation of the UUID. Formats the UUID as a 36-character string in the standard representation. **Returns:** The UUID as a string in the format "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx". ______________________________________________________________________ ### function operator++ *Prefix increment operator.* ```C++ SBCContainerUUID & SBCContainerUUID::operator++ () ``` Increments the UUID lexicographically. **Returns:** Reference to this UUID after increment. ______________________________________________________________________ ### function operator++ *Postfix increment operator.* ```C++ SBCContainerUUID SBCContainerUUID::operator++ ( int ) ``` Returns a copy of the UUID before it is incremented lexicographically. **Returns:** The original UUID value before increment. ______________________________________________________________________ ### function operator-- *Prefix decrement operator.* ```C++ SBCContainerUUID & SBCContainerUUID::operator-- () ``` Decrements the UUID lexicographically. **Returns:** Reference to this UUID after decrement. ______________________________________________________________________ ### function operator-- *Postfix decrement operator.* ```C++ SBCContainerUUID SBCContainerUUID::operator-- ( int ) ``` Returns a copy of the UUID before it is decremented lexicographically. **Returns:** The original UUID value before decrement. ______________________________________________________________________ ### function operator\< *Lexicographic comparison with another UUID.* ```C++ bool SBCContainerUUID::operator< ( const SBCContainerUUID & other ) const ``` Less-than operator. Performs a lexicographic comparison between this UUID and another. **Parameters:** - `other` The UUID to compare with. **Returns:** `true` if this UUID is lexicographically less than `other`, `false` otherwise. ______________________________________________________________________ ### function operator= *Copy assignment operator.* ```C++ SBCContainerUUID & SBCContainerUUID::operator= ( const SBCContainerUUID & other ) ``` Assigns the value of another UUID to this one. **Parameters:** - `other` The UUID to assign from. **Returns:** Reference to this UUID after assignment. ______________________________________________________________________ ### function operator= *Move assignment operator.* ```C++ SBCContainerUUID & SBCContainerUUID::operator= ( SBCContainerUUID && other ) noexcept ``` Moves the value of another UUID into this one. **Parameters:** - `other` The UUID to move from. **Returns:** Reference to this UUID after assignment. ______________________________________________________________________ ### function operator== *Equality operator.* ```C++ bool SBCContainerUUID::operator== ( const SBCContainerUUID & other ) const ``` Checks whether this UUID is equal to another UUID. **Parameters:** - `other` The UUID to compare with. **Returns:** `true` if the UUIDs are equal, `false` otherwise. ______________________________________________________________________ ### function ~SBCContainerUUID *Destructs the UUID.* ```C++ virtual SBCContainerUUID::~SBCContainerUUID () ``` Destructor. Destroys the UUID object. ______________________________________________________________________ # SBVector # Class SBCContainerVector **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) *This template class describes an extensible array.* [More...](#detailed-description) - `#include ` ## Classes | Type | Name | | ----- | --------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**const_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector_1_1const__iterator/index.md) | | class | [**const_reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector_1_1const__reverse__iterator/index.md) | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | --------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCContainerVector**](#function-sbccontainervector-17) () *Constructs an empty vector.* | | | [**SBCContainerVector**](#function-sbccontainervector-27) (unsigned int n) *Constructs a vector of reserved size* `n` *.* | | | [**SBCContainerVector**](#function-sbccontainervector-37) (unsigned int n, unsigned int c, const T & t) *Constructs a vector of reserved size* `n` *and current size*`c` *, filled with*`c` *copies of*`t` *.* | | | [**SBCContainerVector**](#function-sbccontainervector-47) (T * a, unsigned int n) *Constructs a vector from an array.* | | | [**SBCContainerVector**](#function-sbccontainervector-57) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & vector) *Copy constructor.* | | | [**SBCContainerVector**](#function-sbccontainervector-67) ([**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) && vector) noexcept *Move constructor.* | | | [**SBCContainerVector**](#function-sbccontainervector-77) (std::initializer_list< T > list) *Constructor using the initializer list.* | | unsigned int | [**allocatedSize**](#function-allocatedsize) () noexcept const *Returns the allocated size (in memory) of the vector.* | | T & | [**back**](#function-back-12) () *Returns a reference to the last element.* | | T const & | [**back**](#function-back-22) () const *Returns a reference to the last element.* | | iterator | [**begin**](#function-begin-12) () *Returns an iterator that points to the beginning of the vector.* | | const_iterator | [**begin**](#function-begin-22) () const *Returns an iterator that points to the beginning of the vector.* | | void | [**clear**](#function-clear) () *Empties the vector.* | | bool | [**contains**](#function-contains) (const T & t) *Returns true when the vector contains* `t` *.* | | bool | [**empty**](#function-empty) () noexcept const *Returns true if and only if the vector is empty.* | | iterator | [**end**](#function-end-12) () *Returns an iterator that points to the end of the vector.* | | const_iterator | [**end**](#function-end-22) () const *Returns an iterator that points to the end of the vector.* | | void | [**free**](#function-free) () *Frees the memory allocated for the vector.* | | T & | [**front**](#function-front-12) () *Returns a reference to the last element.* | | T const & | [**front**](#function-front-22) () const *Returns a reference to the last element.* | | T & | [**getElement**](#function-getelement-12) (unsigned int i) *Returns a reference to element* `i` *.* | | T const & | [**getElement**](#function-getelement-22) (unsigned int i) const *Returns a reference to element* `i` *.* | | unsigned int | [**getMemoryFootPrint**](#function-getmemoryfootprint) () const *Returns the memory footprint of the vector.* | | T \* | [**getPointer**](#function-getpointer-12) (unsigned int i) *Returns a pointer to element* `i` *.* | | T const \* | [**getPointer**](#function-getpointer-22) (unsigned int i) const *Returns a pointer to element* `i` *.* | | void | [**insert**](#function-insert) (unsigned int i, const T & t) *Inserts* `t` *at position*`i` *if possible. If an element was present at position*`i` *, it is pushed at the back of the vector.* | | void | [**insertLinear**](#function-insertlinear) (unsigned int i, const T & t) *Inserts* `t` *at position*`i` *if possible.* | | bool | [**operator!=**](#function-operator) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & other) *Returns whether this vector is different from an* `other` *vector.* | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & | [**operator=**](#function-operator_1) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & vector) *Copy assignment.* | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & | [**operator=**](#function-operator_2) ([**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) && vector) noexcept *Move assignment.* | | [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & | [**operator=**](#function-operator_3) (std::initializer_list< T > list) *Assignment using the initializer list.* | | bool | [**operator==**](#function-operator_4) (const [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) & other) const *Returns whether this vector is equal to an* `other` *vector.* | | T & | [**operator[]**](#function-operator_5) (unsigned int i) *Returns a reference to element* `i` *.* | | T const & | [**operator[]**](#function-operator_6) (unsigned int i) const *Returns a reference to element* `i` *.* | | void | [**pop_back**](#function-pop_back) () *Removes the last element from the vector.* | | void | [**print**](#function-print) (unsigned int offset=0) const *Prints the vector.* | | void | [**push_back**](#function-push_back) (const T & t) *Appends* `t` *to the vector.* | | reverse_iterator | [**rbegin**](#function-rbegin-12) () *Returns a reverse iterator that points to the reverse beginning of the vector.* | | const_reverse_iterator | [**rbegin**](#function-rbegin-22) () const *Returns a reverse iterator that points to the reverse beginning of the vector.* | | void | [**remove**](#function-remove) (unsigned int i) *Removes element* `i` *from the vector, and replaces it with the last element.* | | void | [**removeAll**](#function-removeall) (const T & t) *Removes all* `t` *from the vector. The vector is reordered as when applying multiple remove operations.* | | void | [**removeLinear**](#function-removelinear-12) (unsigned int i) *Removes element* `i` *from the vector.* | | void | [**removeLinear**](#function-removelinear-22) (unsigned int first, unsigned int last) *Removes all elements between (and including) positions* `first` *and*`last` *.* | | reverse_iterator | [**rend**](#function-rend-12) () *Returns a reverse iterator that points to the reverse end of the vector.* | | const_reverse_iterator | [**rend**](#function-rend-22) () const *Returns a reverse iterator that points to the reverse end of the vector.* | | void | [**resize**](#function-resize) (unsigned int newSize) *Resize to size* `n` *.* | | void | [**setArray**](#function-setarray) (T * newArray, unsigned int newSize) *build from array* | | unsigned int | [**size**](#function-size) () noexcept const *Returns the size of the vector.* | | virtual | [**~SBCContainerVector**](#function-sbccontainervector) () *Destructs the vector.* | ## Detailed Description [**SBCContainerVector**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVector/index.md) is a lightweight template class to handle vectors of values, *i.e.* contiguous arrays of values. Its functionality is similar to the std::vector class. SBVector provides const and non-const *iterators* and *reverse iterators*: ```C++ SBVector v; // add atoms for (unsigned int i = 0; i<10; i++) v.push_back(new SBAtom(SBElement::Carbon)); // print atoms positions (version 1) for (unsigned int i = 0; i<10; i++) v[i]->getPosition().print(); // print atoms positions (version 2) for (SBVector::iterator i = v.begin(); i != v.end(); i++) (*i)->getPosition().print(); // print atoms positions (version 3) SB_FOR(SBAtom* atom, v) atom->getPosition().print(); ``` Note that, in accordance with the behavior of buffers, indexers, etc., the insert function has a amortized constant time complexity, as it pushes back the replaced element to the end of the vector. **Short name**: SBVector **See also:** SB_FOR ## Public Functions Documentation ### function SBCContainerVector [1/7] *Constructs an empty vector.* ```C++ inline SBCContainerVector::SBCContainerVector () ``` ______________________________________________________________________ ### function SBCContainerVector [2/7] *Constructs a vector of reserved size* `n` *.* ```C++ inline explicit SBCContainerVector::SBCContainerVector ( unsigned int n ) ``` ______________________________________________________________________ ### function SBCContainerVector [3/7] *Constructs a vector of reserved size* `n` *and current size*`c` *, filled with*`c` *copies of*`t` *.* ```C++ inline SBCContainerVector::SBCContainerVector ( unsigned int n, unsigned int c, const T & t ) ``` ______________________________________________________________________ ### function SBCContainerVector [4/7] *Constructs a vector from an array.* ```C++ inline SBCContainerVector::SBCContainerVector ( T * a, unsigned int n ) ``` ______________________________________________________________________ ### function SBCContainerVector [5/7] *Copy constructor.* ```C++ inline SBCContainerVector::SBCContainerVector ( const SBCContainerVector & vector ) ``` ______________________________________________________________________ ### function SBCContainerVector [6/7] *Move constructor.* ```C++ inline SBCContainerVector::SBCContainerVector ( SBCContainerVector && vector ) noexcept ``` ______________________________________________________________________ ### function SBCContainerVector [7/7] *Constructor using the initializer list.* ```C++ inline SBCContainerVector::SBCContainerVector ( std::initializer_list< T > list ) ``` ______________________________________________________________________ ### function allocatedSize *Returns the allocated size (in memory) of the vector.* ```C++ inline unsigned int SBCContainerVector::allocatedSize () noexcept const ``` ______________________________________________________________________ ### function back [1/2] *Returns a reference to the last element.* ```C++ inline T & SBCContainerVector::back () ``` ______________________________________________________________________ ### function back [2/2] *Returns a reference to the last element.* ```C++ inline T const & SBCContainerVector::back () const ``` ______________________________________________________________________ ### function begin [1/2] *Returns an iterator that points to the beginning of the vector.* ```C++ inline iterator SBCContainerVector::begin () ``` ______________________________________________________________________ ### function begin [2/2] *Returns an iterator that points to the beginning of the vector.* ```C++ inline const_iterator SBCContainerVector::begin () const ``` ______________________________________________________________________ ### function clear *Empties the vector.* ```C++ inline void SBCContainerVector::clear () ``` ______________________________________________________________________ ### function contains *Returns true when the vector contains* `t` *.* ```C++ inline bool SBCContainerVector::contains ( const T & t ) ``` ______________________________________________________________________ ### function empty *Returns true if and only if the vector is empty.* ```C++ inline bool SBCContainerVector::empty () noexcept const ``` ______________________________________________________________________ ### function end [1/2] *Returns an iterator that points to the end of the vector.* ```C++ inline iterator SBCContainerVector::end () ``` ______________________________________________________________________ ### function end [2/2] *Returns an iterator that points to the end of the vector.* ```C++ inline const_iterator SBCContainerVector::end () const ``` ______________________________________________________________________ ### function free *Frees the memory allocated for the vector.* ```C++ inline void SBCContainerVector::free () ``` ______________________________________________________________________ ### function front [1/2] *Returns a reference to the last element.* ```C++ inline T & SBCContainerVector::front () ``` ______________________________________________________________________ ### function front [2/2] *Returns a reference to the last element.* ```C++ inline T const & SBCContainerVector::front () const ``` ______________________________________________________________________ ### function getElement [1/2] *Returns a reference to element* `i` *.* ```C++ inline T & SBCContainerVector::getElement ( unsigned int i ) ``` ______________________________________________________________________ ### function getElement [2/2] *Returns a reference to element* `i` *.* ```C++ inline T const & SBCContainerVector::getElement ( unsigned int i ) const ``` ______________________________________________________________________ ### function getMemoryFootPrint *Returns the memory footprint of the vector.* ```C++ inline unsigned int SBCContainerVector::getMemoryFootPrint () const ``` ______________________________________________________________________ ### function getPointer [1/2] *Returns a pointer to element* `i` *.* ```C++ inline T * SBCContainerVector::getPointer ( unsigned int i ) ``` ______________________________________________________________________ ### function getPointer [2/2] *Returns a pointer to element* `i` *.* ```C++ inline T const * SBCContainerVector::getPointer ( unsigned int i ) const ``` ______________________________________________________________________ ### function insert *Inserts* `t` *at position*`i` *if possible. If an element was present at position*`i` *, it is pushed at the back of the vector.* ```C++ inline void SBCContainerVector::insert ( unsigned int i, const T & t ) ``` ______________________________________________________________________ ### function insertLinear *Inserts* `t` *at position*`i` *if possible.* ```C++ inline void SBCContainerVector::insertLinear ( unsigned int i, const T & t ) ``` If an element was present at position `i`, this element and all following elements are moved. This operation has a linear complexity, and may invalidate iterators. ______________________________________________________________________ ### function operator!= *Returns whether this vector is different from an* `other` *vector.* ```C++ inline bool SBCContainerVector::operator!= ( const SBCContainerVector & other ) ``` ______________________________________________________________________ ### function operator= *Copy assignment.* ```C++ inline SBCContainerVector & SBCContainerVector::operator= ( const SBCContainerVector & vector ) ``` ______________________________________________________________________ ### function operator= *Move assignment.* ```C++ inline SBCContainerVector & SBCContainerVector::operator= ( SBCContainerVector && vector ) noexcept ``` ______________________________________________________________________ ### function operator= *Assignment using the initializer list.* ```C++ inline SBCContainerVector & SBCContainerVector::operator= ( std::initializer_list< T > list ) ``` ______________________________________________________________________ ### function operator== *Returns whether this vector is equal to an* `other` *vector.* ```C++ inline bool SBCContainerVector::operator== ( const SBCContainerVector & other ) const ``` ______________________________________________________________________ ### function operator[] *Returns a reference to element* `i` *.* ```C++ inline T & SBCContainerVector::operator[] ( unsigned int i ) ``` ______________________________________________________________________ ### function operator[] *Returns a reference to element* `i` *.* ```C++ inline T const & SBCContainerVector::operator[] ( unsigned int i ) const ``` ______________________________________________________________________ ### function pop_back *Removes the last element from the vector.* ```C++ inline void SBCContainerVector::pop_back () ``` ______________________________________________________________________ ### function print *Prints the vector.* ```C++ inline void SBCContainerVector::print ( unsigned int offset=0 ) const ``` ______________________________________________________________________ ### function push_back *Appends* `t` *to the vector.* ```C++ inline void SBCContainerVector::push_back ( const T & t ) ``` ______________________________________________________________________ ### function rbegin [1/2] *Returns a reverse iterator that points to the reverse beginning of the vector.* ```C++ inline reverse_iterator SBCContainerVector::rbegin () ``` ______________________________________________________________________ ### function rbegin [2/2] *Returns a reverse iterator that points to the reverse beginning of the vector.* ```C++ inline const_reverse_iterator SBCContainerVector::rbegin () const ``` ______________________________________________________________________ ### function remove *Removes element* `i` *from the vector, and replaces it with the last element.* ```C++ inline void SBCContainerVector::remove ( unsigned int i ) ``` ______________________________________________________________________ ### function removeAll *Removes all* `t` *from the vector. The vector is reordered as when applying multiple remove operations.* ```C++ inline void SBCContainerVector::removeAll ( const T & t ) ``` ______________________________________________________________________ ### function removeLinear [1/2] *Removes element* `i` *from the vector.* ```C++ inline void SBCContainerVector::removeLinear ( unsigned int i ) ``` If elements are present after position `i`, these elements are moved. This operation has a linear complexity, and may invalidate iterators. ______________________________________________________________________ ### function removeLinear [2/2] *Removes all elements between (and including) positions* `first` *and*`last` *.* ```C++ inline void SBCContainerVector::removeLinear ( unsigned int first, unsigned int last ) ``` If elements are present after position `last`, these elements are moved. This operation has a linear complexity, and may invalidate iterators. ______________________________________________________________________ ### function rend [1/2] *Returns a reverse iterator that points to the reverse end of the vector.* ```C++ inline reverse_iterator SBCContainerVector::rend () ``` ______________________________________________________________________ ### function rend [2/2] *Returns a reverse iterator that points to the reverse end of the vector.* ```C++ inline const_reverse_iterator SBCContainerVector::rend () const ``` ______________________________________________________________________ ### function resize *Resize to size* `n` *.* ```C++ inline void SBCContainerVector::resize ( unsigned int newSize ) ``` ______________________________________________________________________ ### function setArray *build from array* ```C++ inline void SBCContainerVector::setArray ( T * newArray, unsigned int newSize ) ``` ______________________________________________________________________ ### function size *Returns the size of the vector.* ```C++ inline unsigned int SBCContainerVector::size () noexcept const ``` ______________________________________________________________________ ### function ~SBCContainerVector *Destructs the vector.* ```C++ inline virtual SBCContainerVector::~SBCContainerVector () ``` ______________________________________________________________________ # SBVersionNumber # Class SBCContainerVersionNumber [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) *This class describes a version number.* [More...](#detailed-description) - `#include ` ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCContainerVersionNumber**](#function-sbccontainerversionnumber-14) () noexcept *Constructs the 0.0.0 version number.* | | | [**SBCContainerVersionNumber**](#function-sbccontainerversionnumber-24) (const std::string & versionNumberString) *Constructs a version number from a* `versionNumberString` *.* | | | [**SBCContainerVersionNumber**](#function-sbccontainerversionnumber-34) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) *Constructs a version number from a* `versionNumber` *.* | | | [**SBCContainerVersionNumber**](#function-sbccontainerversionnumber-44) (unsigned int majorVersionNumber, unsigned int minorVersionNumber, unsigned int patchVersionNumber) noexcept *Constructs a version number* `majorVersionNumber` *.*`minorVersionNumber` *.*`patchVersionNumber` *.* | | unsigned int | [**getMajorVersionNumber**](#function-getmajorversionnumber) () noexcept const *Returns the major version number.* | | unsigned int | [**getMinorVersionNumber**](#function-getminorversionnumber) () noexcept const *Returns the minor version number.* | | unsigned int | [**getPatchVersionNumber**](#function-getpatchversionnumber) () noexcept const *Returns the patch version number.* | | bool | [**isValid**](#function-isvalid) () const *Returns* `true` *if and only if the version number is valid.* | | bool | [**operator!=**](#function-operator) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) noexcept const *Inequality operator.* | | std::string | [**operator()**](#function-operator_1) () const *Returns the version number as a string.* | | bool | [**operator\<**](#function-operator_2) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) noexcept const *Comparison with another version.* | | bool | [**operator\<=**](#function-operator_3) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) noexcept const *Comparison with another version.* | | [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & | [**operator=**](#function-operator_4) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) *Assignment operator.* | | bool | [**operator==**](#function-operator_5) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) noexcept const *Equality operator.* | | bool | [**operator>**](#function-operator_6) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) noexcept const *Comparison with another version.* | | bool | [**operator>=**](#function-operator_7) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & versionNumber) noexcept const *Comparison with another version.* | | void | [**setMajorVersionNumber**](#function-setmajorversionnumber) (unsigned int majorVersionNumber) *Sets the major version number.* | | void | [**setMinorVersionNumber**](#function-setminorversionnumber) (unsigned int minorVersionNumber) *Sets the minor version number.* | | void | [**setPatchVersionNumber**](#function-setpatchversionnumber) (unsigned int patchVersionNumber) *Sets the patch version number.* | | virtual | [**~SBCContainerVersionNumber**](#function-sbccontainerversionnumber) () *Destructs the version number.* | ## Public Static Functions | Type | Name | | ---- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | bool | [**getCompatibilityStatus**](#function-getcompatibilitystatus) (const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber, const [**SBCContainerVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & coreVersionNumber) *Returns whether a* `sdkVersionNumber` *is compatible with a*`coreVersionNumber` *.* | ## Detailed Description This class describes a version number in SAMSON, composed of three non-negative integers: - a major version number - a minor version number - a patch version number Because SAMSON Extensions depend on the version of the SDK with which they are developed, SAMSON has a strict versioning policy. Please refer to the chapter about [Versioning](https://documentation.samson-connect.net/developers/latest/versioning/index.md) for more information. **Short name**: SBVersionNumber ## Public Functions Documentation ### function SBCContainerVersionNumber [1/4] *Constructs the 0.0.0 version number.* ```C++ SBCContainerVersionNumber::SBCContainerVersionNumber () noexcept ``` Default-constructs a version number initialized to 0.0.0. ______________________________________________________________________ ### function SBCContainerVersionNumber [2/4] *Constructs a version number from a* `versionNumberString` *.* ```C++ SBCContainerVersionNumber::SBCContainerVersionNumber ( const std::string & versionNumberString ) ``` Constructs a version number from a string representation. Parses the supplied version string and extracts the major, minor, and patch components. **Parameters:** - `versionNumberString` A string in the form "major.minor.patch". ______________________________________________________________________ ### function SBCContainerVersionNumber [3/4] *Constructs a version number from a* `versionNumber` *.* ```C++ SBCContainerVersionNumber::SBCContainerVersionNumber ( const SBCContainerVersionNumber & versionNumber ) ``` Copy-constructs a version number from another instance. **Parameters:** - `versionNumber` The version number to copy. ______________________________________________________________________ ### function SBCContainerVersionNumber [4/4] *Constructs a version number* `majorVersionNumber` *.*`minorVersionNumber` *.*`patchVersionNumber` *.* ```C++ SBCContainerVersionNumber::SBCContainerVersionNumber ( unsigned int majorVersionNumber, unsigned int minorVersionNumber, unsigned int patchVersionNumber ) noexcept ``` Constructs a version number from individual components. **Parameters:** - `majorVersionNumber` The major component of the version. - `minorVersionNumber` The minor component of the version. - `patchVersionNumber` The patch component of the version. ______________________________________________________________________ ### function getMajorVersionNumber *Returns the major version number.* ```C++ unsigned int SBCContainerVersionNumber::getMajorVersionNumber () noexcept const ``` Retrieves the major component of the version number. **Returns:** The major version number. ______________________________________________________________________ ### function getMinorVersionNumber *Returns the minor version number.* ```C++ unsigned int SBCContainerVersionNumber::getMinorVersionNumber () noexcept const ``` Retrieves the minor component of the version number. **Returns:** The minor version number. ______________________________________________________________________ ### function getPatchVersionNumber *Returns the patch version number.* ```C++ unsigned int SBCContainerVersionNumber::getPatchVersionNumber () noexcept const ``` Retrieves the patch component of the version number. **Returns:** The patch version number. ______________________________________________________________________ ### function isValid *Returns* `true` *if and only if the version number is valid.* ```C++ bool SBCContainerVersionNumber::isValid () const ``` Checks whether the version number is valid (at least one component is non-zero). **Returns:** `true` if the version number is valid, `false` otherwise. ______________________________________________________________________ ### function operator!= *Inequality operator.* ```C++ bool SBCContainerVersionNumber::operator!= ( const SBCContainerVersionNumber & versionNumber ) noexcept const ``` Tests inequality of two version numbers. **Parameters:** - `versionNumber` The version number to compare with. **Returns:** `true` if the version numbers are not equal, `false` otherwise. ______________________________________________________________________ ### function operator() *Returns the version number as a string.* ```C++ std::string SBCContainerVersionNumber::operator() () const ``` Returns a string representation of the version number in "major.minor.patch" format. **Returns:** The version number as a string. ______________________________________________________________________ ### function operator\< *Comparison with another version.* ```C++ bool SBCContainerVersionNumber::operator< ( const SBCContainerVersionNumber & versionNumber ) noexcept const ``` Determines whether this version number is less than another. Compares the version components in order of significance (major, then minor, then patch). **Parameters:** - `versionNumber` The version number to compare with. **Returns:** `true` if this version number is less than the given version number, `false` otherwise. ______________________________________________________________________ ### function operator\<= *Comparison with another version.* ```C++ bool SBCContainerVersionNumber::operator<= ( const SBCContainerVersionNumber & versionNumber ) noexcept const ``` Determines whether this version number is less than or equal to another. **Parameters:** - `versionNumber` The version number to compare with. **Returns:** `true` if this version number is less than or equal to the given version number, `false` otherwise. ______________________________________________________________________ ### function operator= *Assignment operator.* ```C++ SBCContainerVersionNumber & SBCContainerVersionNumber::operator= ( const SBCContainerVersionNumber & versionNumber ) ``` Assigns another version number to this instance. **Parameters:** - `versionNumber` The version number to assign. **Returns:** Reference to this version number after assignment. ______________________________________________________________________ ### function operator== *Equality operator.* ```C++ bool SBCContainerVersionNumber::operator== ( const SBCContainerVersionNumber & versionNumber ) noexcept const ``` Tests equality of two version numbers. **Parameters:** - `versionNumber` The version number to compare with. **Returns:** `true` if both version numbers are equal, `false` otherwise. ______________________________________________________________________ ### function operator> *Comparison with another version.* ```C++ bool SBCContainerVersionNumber::operator> ( const SBCContainerVersionNumber & versionNumber ) noexcept const ``` Determines whether this version number is greater than another. Compares the version components in order of significance (major, then minor, then patch). **Parameters:** - `versionNumber` The version number to compare with. **Returns:** `true` if this version number is greater than the given version number, `false` otherwise. ______________________________________________________________________ ### function operator>= *Comparison with another version.* ```C++ bool SBCContainerVersionNumber::operator>= ( const SBCContainerVersionNumber & versionNumber ) noexcept const ``` Determines whether this version number is greater than or equal to another. **Parameters:** - `versionNumber` The version number to compare with. **Returns:** `true` if this version number is greater than or equal to the given version number, `false` otherwise. ______________________________________________________________________ ### function setMajorVersionNumber *Sets the major version number.* ```C++ void SBCContainerVersionNumber::setMajorVersionNumber ( unsigned int majorVersionNumber ) ``` Sets the major component of the version number. **Parameters:** - `majorVersionNumber` The new major version number. ______________________________________________________________________ ### function setMinorVersionNumber *Sets the minor version number.* ```C++ void SBCContainerVersionNumber::setMinorVersionNumber ( unsigned int minorVersionNumber ) ``` Sets the minor component of the version number. **Parameters:** - `minorVersionNumber` The new minor version number. ______________________________________________________________________ ### function setPatchVersionNumber *Sets the patch version number.* ```C++ void SBCContainerVersionNumber::setPatchVersionNumber ( unsigned int patchVersionNumber ) ``` Sets the patch component of the version number. **Parameters:** - `patchVersionNumber` The new patch version number. ______________________________________________________________________ ### function ~SBCContainerVersionNumber *Destructs the version number.* ```C++ virtual SBCContainerVersionNumber::~SBCContainerVersionNumber () ``` Destroys the version number. ______________________________________________________________________ ## Public Static Functions Documentation ### function getCompatibilityStatus *Returns whether a* `sdkVersionNumber` *is compatible with a*`coreVersionNumber` *.* ```C++ static bool SBCContainerVersionNumber::getCompatibilityStatus ( const SBCContainerVersionNumber & sdkVersionNumber, const SBCContainerVersionNumber & coreVersionNumber ) ``` Determines whether a SDK version is compatible with a core version. **Parameters:** - `sdkVersionNumber` The SDK version number. - `coreVersionNumber` The core version number. **Returns:** `true` if the SDK version is compatible with the core version, `false` otherwise. ______________________________________________________________________ # SBFunctor # Class SBCFunctor [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md) *This class describes a functor.* [More...](#detailed-description) - `#include ` Inherited by the following classes: [SBCFunctor0](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor0/index.md), [SBCFunctor0](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor0/index.md), [SBCFunctor0](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor0/index.md), [SBCFunctor0](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor0/index.md) ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | | | [**SBCFunctor**](#function-sbcfunctor) () *Constructs a functor.* | | virtual [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md) \* | [**clone**](#function-clone) () const *Clones the functor.* | | virtual | [**~SBCFunctor**](#function-sbcfunctor) () *Destructs the functor.* | ## Detailed Description A functor is an object of a class that acts as a function. For example, the only purpose of the following class is to compute the distance between two atoms: ```C++ class DistanceCalculator : public SBFunctor2 { public: DistanceCalculator() {} virtual ~DistanceCalculator() {} SBQuantity::length operator(SBAtom* atom1, SBAtom atom2) { return (atom1->getPosition() - atom2->getPosition()).norm(); } }; ``` The class [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md) is the base class of all functor classes: - SBCFunctor0: a functor which takes no arguments - SBCFunctor1: a functor which takes 1 argument - ... - SBCFunctor16: a functor which takes 16 arguments Functors are used in several places. In particular, predicates are functors that return a boolean and which may be logically combined. **Short name**: SBFunctor **See also:** SBCFunctorPredicate ## Public Functions Documentation ### function SBCFunctor *Constructs a functor.* ```C++ SBCFunctor::SBCFunctor () ``` Default constructor for [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md). Constructs an [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md) object. ______________________________________________________________________ ### function clone *Clones the functor.* ```C++ virtual SBCFunctor * SBCFunctor::clone () const ``` Creates a copy of this functor. Returns a pointer to a new [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md) that is a clone of this instance. The base implementation returns nullptr. **Returns:** Pointer to a cloned [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md), or nullptr if cloning is not supported. ______________________________________________________________________ ### function ~SBCFunctor *Destructs the functor.* ```C++ virtual SBCFunctor::~SBCFunctor () ``` Destructor for [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md). Destroys the [**SBCFunctor**](https://documentation.samson-connect.net/developers/latest/api/classSBCFunctor/index.md) object. ______________________________________________________________________ # SBGraph # Class SBCGraph [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCGraph**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraph/index.md) *This class describes a graph.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCGraph**](#function-sbcgraph) () | | unsigned int | [**addNode**](#function-addnode) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * g) *Adds a node to the graph node, and returns its index.* | | void | [**getArticulationPoints**](#function-getarticulationpoints) (SBIndexer< [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * > & articulationPointIndexer, SBIndexer< [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) * > & bridgeIndexer) *Finds all articulation points in the graph and adds them to* `articulationPointIndexer` *, and adds bridges to*`bridgeIndexer` *.* | | const SBIndexer< [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * > \* | [**getNodeIndexer**](#function-getnodeindexer) () const *Returns a pointer to the node index.* | | unsigned int | [**getNumberOfNodes**](#function-getnumberofnodes) () *Returns the number of nodes.* | | void | [**print**](#function-print-12) (std::ostream & os) const *Prints some debugging information.* | | void | [**print**](#function-print-22) () const *Prints some debugging information.* | | unsigned int | [**removeNode**](#function-removenode-12) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * g) *Removes a node from the graph.* | | unsigned int | [**removeNode**](#function-removenode-22) (unsigned int index) *Removes a node from the graph.* | | virtual | [**~SBCGraph**](#function-sbcgraph) () *Destroys the graph, releasing indexing structures.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------- | | std::vector< [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * > \* | [**articulationPoints**](#variable-articulationpoints) | | std::vector< std::vector< [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * > * > \* | [**children**](#variable-children) *Children during DFS traversal.* | | std::vector< int > \* | [**levelVector**](#variable-levelvector) | | std::vector< unsigned int > \* | [**lowVector**](#variable-lowvector) | | SBIndexer< [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * > \* | [**nodeIndexer**](#variable-nodeindexer) *The graph node indexer.* | | unsigned int | [**numCounter**](#variable-numcounter) | | std::vector< unsigned int > \* | [**numVector**](#variable-numvector) | | std::vector< unsigned int > \* | [**numberOfChildren**](#variable-numberofchildren) | | std::vector< unsigned int > \* | [**numberOfChildrenLeft**](#variable-numberofchildrenleft) | | std::vector< bool > \* | [**visitedVector**](#variable-visitedvector) | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description **Short name**: SBGraph Constructs an empty graph. ## Public Functions Documentation ### function SBCGraph ```C++ SBCGraph::SBCGraph () ``` ______________________________________________________________________ ### function addNode *Adds a node to the graph node, and returns its index.* ```C++ unsigned int SBCGraph::addNode ( SBCGraphNode * g ) ``` Adds a node to the graph and returns its index. **Parameters:** - `g` The node to add to the graph. **Returns:** Index of the added node. ______________________________________________________________________ ### function getArticulationPoints *Finds all articulation points in the graph and adds them to* `articulationPointIndexer` *, and adds bridges to*`bridgeIndexer` *.* ```C++ void SBCGraph::getArticulationPoints ( SBIndexer< SBCGraphNode * > & articulationPointIndexer, SBIndexer< SBCGraphArc * > & bridgeIndexer ) ``` Finds articulation points and bridges in the graph. **Parameters:** - `articulationPointIndex` Indexer to receive articulation point nodes. - `bridgeIndex` Indexer to receive bridge arcs. ______________________________________________________________________ ### function getNodeIndexer *Returns a pointer to the node index.* ```C++ const SBIndexer< SBCGraphNode * > * SBCGraph::getNodeIndexer () const ``` Returns a pointer to the node indexer. **Returns:** Const pointer to the SBIndexer of graph nodes. ______________________________________________________________________ ### function getNumberOfNodes *Returns the number of nodes.* ```C++ unsigned int SBCGraph::getNumberOfNodes () ``` Returns the number of vertices in the graph. **Returns:** Number of vertices. ______________________________________________________________________ ### function print [1/2] *Prints some debugging information.* ```C++ void SBCGraph::print ( std::ostream & os ) const ``` Prints debugging information about the graph to the given output stream. **Parameters:** - `os` Output stream to write the information to. ______________________________________________________________________ ### function print [2/2] *Prints some debugging information.* ```C++ void SBCGraph::print () const ``` Prints debugging information about the graph to the standard output. ______________________________________________________________________ ### function removeNode [1/2] *Removes a node from the graph.* ```C++ unsigned int SBCGraph::removeNode ( SBCGraphNode * g ) ``` Removes the specified node from the graph. **Parameters:** - `g` The node to remove from the graph. **Returns:** Index of the removed node. ______________________________________________________________________ ### function removeNode [2/2] *Removes a node from the graph.* ```C++ unsigned int SBCGraph::removeNode ( unsigned int index ) ``` Removes the node at the given index from the graph. **Parameters:** - `index` The index of the node to remove from the graph. **Returns:** Index of the removed node. ______________________________________________________________________ ### function ~SBCGraph *Destroys the graph, releasing indexing structures.* ```C++ virtual SBCGraph::~SBCGraph () ``` This does not delete the underlying graph nodes and edges, but only the indexing structure. ______________________________________________________________________ ## Protected Attributes Documentation ### variable articulationPoints ```C++ std::vector* SBCGraph::articulationPoints; ``` ______________________________________________________________________ ### variable children *Children during DFS traversal.* ```C++ std::vector*>* SBCGraph::children; ``` ______________________________________________________________________ ### variable levelVector ```C++ std::vector* SBCGraph::levelVector; ``` ______________________________________________________________________ ### variable lowVector ```C++ std::vector* SBCGraph::lowVector; ``` ______________________________________________________________________ ### variable nodeIndexer *The graph node indexer.* ```C++ SBIndexer* SBCGraph::nodeIndexer; ``` ______________________________________________________________________ ### variable numCounter ```C++ unsigned int SBCGraph::numCounter; ``` ______________________________________________________________________ ### variable numVector ```C++ std::vector* SBCGraph::numVector; ``` ______________________________________________________________________ ### variable numberOfChildren ```C++ std::vector* SBCGraph::numberOfChildren; ``` ______________________________________________________________________ ### variable numberOfChildrenLeft ```C++ std::vector* SBCGraph::numberOfChildrenLeft; ``` ______________________________________________________________________ ### variable visitedVector ```C++ std::vector* SBCGraph::visitedVector; ``` ______________________________________________________________________ # SBGraphArc # Class SBCGraphArc [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) *This class is used to describe horizontal references between graph nodes.* [More...](#detailed-description) - `#include ` Inherits the following classes: SBCReferenceToTarget ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCGraphArc**](#function-sbcgrapharc) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * fromNode, [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * toNode) *Constructs a graph arc linking a source node to a target node.* | | [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) \* | [**getFrom**](#function-getfrom) () const *Retrieves the source node of the arc.* | | SBCReferenceListLink \* | [**getReverseGraphArcLink**](#function-getreversegrapharclink) () const *Retrieves the reverse link associated with this arc.* | | [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) \* | [**getTo**](#function-getto) () const *Retrieves the target node of the arc.* | | virtual void | [**print**](#function-print-12) (std::ostream & os) const *Prints some debugging information.* | | void | [**print**](#function-print-22) () const *Prints some debugging information.* | | void | [**setReverseGraphArcLink**](#function-setreversegrapharclink) (SBCReferenceListLink * referenceListLink) *Sets the reverse graph arc link for this arc.* | | virtual | [**~SBCGraphArc**](#function-sbcgrapharc) () *Destroys the graph arc.* | ## Protected Attributes | Type | Name | | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------- | | [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) \* | [**from**](#variable-from) *Pointer to the 'from' node.* | | SBCReferenceListLink \* | [**reverseGraphArcLink**](#variable-reversegrapharclink) *Pointer to the reverse arc link, in the predecessors or successors arc collection.* | ## Detailed Description For example, if node B is a successor of node A (so that node A is a predecessor of node B), then two arcs are created: one to reference B in the successors of A, and one to reference A in the predecessors of B. When node B is both a predecessor and a successor of node A, four arcs are thus created. The graph can thus be seen as a directed half-edge data structure. **Short name**: SBGraphArc ## Public Functions Documentation ### function SBCGraphArc *Constructs a graph arc linking a source node to a target node.* ```C++ SBCGraphArc::SBCGraphArc ( SBCGraphNode * fromNode, SBCGraphNode * toNode ) ``` The created arc represents a directed connection from `fromNode` to `toNode`. **Parameters:** - `fromNode` The source node from which the arc originates. - `toNode` The target node to which the arc points. ______________________________________________________________________ ### function getFrom *Retrieves the source node of the arc.* ```C++ SBCGraphNode * SBCGraphArc::getFrom () const ``` **Returns:** Pointer to the node from which this arc originates. ______________________________________________________________________ ### function getReverseGraphArcLink *Retrieves the reverse link associated with this arc.* ```C++ SBCReferenceListLink * SBCGraphArc::getReverseGraphArcLink () const ``` **Returns:** Pointer to the reverse graph arc link, or nullptr if none is set. ______________________________________________________________________ ### function getTo *Retrieves the target node of the arc.* ```C++ SBCGraphNode * SBCGraphArc::getTo () const ``` **Returns:** Pointer to the node that this arc points to. ______________________________________________________________________ ### function print [1/2] *Prints some debugging information.* ```C++ virtual void SBCGraphArc::print ( std::ostream & os ) const ``` Prints debugging information about the arc to the given output stream. **Parameters:** - `os` The output stream to which the debugging information will be written. ______________________________________________________________________ ### function print [2/2] *Prints some debugging information.* ```C++ void SBCGraphArc::print () const ``` Prints debugging information about the arc to the standard output. ______________________________________________________________________ ### function setReverseGraphArcLink *Sets the reverse graph arc link for this arc.* ```C++ void SBCGraphArc::setReverseGraphArcLink ( SBCReferenceListLink * referenceListLink ) ``` **Parameters:** - `a` Pointer to the reverse graph arc link to associate with this arc. ______________________________________________________________________ ### function ~SBCGraphArc *Destroys the graph arc.* ```C++ virtual SBCGraphArc::~SBCGraphArc () ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable from *Pointer to the 'from' node.* ```C++ SBCGraphNode* SBCGraphArc::from; ``` ______________________________________________________________________ ### variable reverseGraphArcLink *Pointer to the reverse arc link, in the predecessors or successors arc collection.* ```C++ SBCReferenceListLink* SBCGraphArc::reverseGraphArcLink; ``` ______________________________________________________________________ # SBGraphArcCollection # Class SBCGraphArcCollection [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCGraphArcCollection**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArcCollection/index.md) *This class describes a collection of graph arcs.* [More...](#detailed-description) - `#include ` Inherits the following classes: SBPointerList< SBCGraphNode, SBCGraphArc > ## Classes | Type | Name | | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArcCollection_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArcCollection_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCGraphArcCollection**](#function-sbcgrapharccollection) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Constructs a graph arc collection owned by the specified graph node.* | | iterator | [**begin**](#function-begin) () *Returns a begin iterator to arcs.* | | iterator | [**end**](#function-end) () *Returns an end iterator to arcs.* | | [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) \* | [**getGraphNodeOwner**](#function-getgraphnodeowner) () const *Returns the graph node which owns the graph arc collection.* | | reverse_iterator | [**rbegin**](#function-rbegin) () *Returns a reverse begin iterator to arcs.* | | reverse_iterator | [**rend**](#function-rend) () *Returns a reverse end iterator to arcs.* | | virtual | [**~SBCGraphArcCollection**](#function-sbcgrapharccollection) () *Destroys the graph arc collection.* | ## Protected Attributes | Type | Name | | ---------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- | | [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) \* | [**graphNodeOwner**](#variable-graphnodeowner) *The graph node which owns the graph arc collection.* | ## Detailed Description **Short name**: SBGraphArcCollection ## Public Functions Documentation ### function SBCGraphArcCollection *Constructs a graph arc collection owned by the specified graph node.* ```C++ explicit SBCGraphArcCollection::SBCGraphArcCollection ( SBCGraphNode * graphNode ) ``` **Parameters:** - `g` Pointer to the graph node that will own this collection. ______________________________________________________________________ ### function begin *Returns a begin iterator to arcs.* ```C++ iterator SBCGraphArcCollection::begin () ``` Returns an iterator to the first graph arc in the collection. **Returns:** Iterator pointing to the first arc. ______________________________________________________________________ ### function end *Returns an end iterator to arcs.* ```C++ iterator SBCGraphArcCollection::end () ``` Returns an iterator to the end of the collection (past-the-last arc). **Returns:** End iterator. ______________________________________________________________________ ### function getGraphNodeOwner *Returns the graph node which owns the graph arc collection.* ```C++ SBCGraphNode * SBCGraphArcCollection::getGraphNodeOwner () const ``` Returns the graph node that owns this collection. **Returns:** Pointer to the owning [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md). ______________________________________________________________________ ### function rbegin *Returns a reverse begin iterator to arcs.* ```C++ reverse_iterator SBCGraphArcCollection::rbegin () ``` Returns a reverse iterator to the last graph arc in the collection. **Returns:** Reverse iterator pointing to the last arc. ______________________________________________________________________ ### function rend *Returns a reverse end iterator to arcs.* ```C++ reverse_iterator SBCGraphArcCollection::rend () ``` Returns a reverse iterator to the element before the first (past-the-beginning). **Returns:** Reverse end iterator. ______________________________________________________________________ ### function ~SBCGraphArcCollection *Destroys the graph arc collection.* ```C++ virtual SBCGraphArcCollection::~SBCGraphArcCollection () ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable graphNodeOwner *The graph node which owns the graph arc collection.* ```C++ SBCGraphNode* SBCGraphArcCollection::graphNodeOwner; ``` ______________________________________________________________________ # SBGraphNode # Class SBCGraphNode [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) *This class is the base class to describe a node in a directed graph with a horizontal structure.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) Inherited by the following classes: [SBCGraphNodeTemplate](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNodeTemplate/index.md) ## Classes | Type | Name | | ----- | -------------------------------------------------------------------------------------------------------------------------------------- | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCGraphNode**](#function-sbcgraphnode) () *Constructs a graph node with no connections.* | | SBCReferenceListLink \* | [**addPredecessor**](#function-addpredecessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Adds a predecessor to the graph node.* | | SBCReferenceListLink \* | [**addSuccessor**](#function-addsuccessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Adds a successor to the graph node.* | | iterator | [**beginPredecessors**](#function-beginpredecessors) () *Returns a begin iterator to predecessors.* | | iterator | [**beginSuccessors**](#function-beginsuccessors) () *Returns a begin iterator to successors.* | | iterator | [**endPredecessors**](#function-endpredecessors) () *Returns an end iterator to predecessors.* | | iterator | [**endSuccessors**](#function-endsuccessors) () *Returns an end iterator to successors.* | | [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) \* | [**getArcFromPredecessor**](#function-getarcfrompredecessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) const *Returns the arc from the predecessor* `graphNode` *(0 if not found)* | | [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) \* | [**getArcToSuccessor**](#function-getarctosuccessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) const *Returns the arc to the successor* `graphNode` *(0 if not found)* | | unsigned int | [**getNumberOfPredecessors**](#function-getnumberofpredecessors) () const *Returns the number of predecessors.* | | unsigned int | [**getNumberOfSuccessors**](#function-getnumberofsuccessors) () const *Returns the number of successors.* | | void | [**printConnections**](#function-printconnections) () const *Prints the list of connections of the nodes.* | | reverse_iterator | [**rbeginPredecessors**](#function-rbeginpredecessors) () *Returns a reverse begin iterator to predecessors.* | | reverse_iterator | [**rbeginSuccessors**](#function-rbeginsuccessors) () *Returns a reverse begin iterator to successors.* | | void | [**removeAllPredecessors**](#function-removeallpredecessors) () *Removes all predecessors to the graph node.* | | void | [**removeAllSuccessors**](#function-removeallsuccessors) () *Removes all successors to the graph node.* | | void | [**removePredecessor**](#function-removepredecessor-12) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Removes a predecessor to the graph node.* | | void | [**removePredecessor**](#function-removepredecessor-22) (SBCReferenceListLink * referenceListLink) *Removes a predecessor to the graph node (constant time)* | | void | [**removeSuccessor**](#function-removesuccessor-12) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Removes a successor to the graph node.* | | void | [**removeSuccessor**](#function-removesuccessor-22) (SBCReferenceListLink * referenceListLink) *Removes a successor to the graph node (constant time)* | | reverse_iterator | [**rendPredecessors**](#function-rendpredecessors) () *Returns a reverse end iterator to predecessors.* | | reverse_iterator | [**rendSuccessors**](#function-rendsuccessors) () *Returns a reverse end iterator to successors.* | | virtual | [**~SBCGraphNode**](#function-sbcgraphnode) () *Destroys the graph node, removing any references from its predecessors and successors.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------- | | [**SBCGraphArcCollection**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArcCollection/index.md) \* | [**predecessors**](#variable-predecessors) *The list of predecessors.* | | [**SBCGraphArcCollection**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArcCollection/index.md) \* | [**successors**](#variable-successors) *The list of successors.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description **Short name**: SBGraphNode ## Public Functions Documentation ### function SBCGraphNode *Constructs a graph node with no connections.* ```C++ SBCGraphNode::SBCGraphNode () ``` The newly created node has no successors or predecessors. ______________________________________________________________________ ### function addPredecessor *Adds a predecessor to the graph node.* ```C++ SBCReferenceListLink * SBCGraphNode::addPredecessor ( SBCGraphNode * graphNode ) ``` Adds a predecessor to the current node. The node pointed by *g* becomes a predecessor of the current node, while the current node becomes a successor of *g*. The function returns a pointer to the reference link that holds the connection, which can be used for constant‑time removal of the predecessor reference. **Parameters:** - `g` A pointer to the graph node that becomes a predecessor of this node. **Returns:** A pointer to the reference link representing the connection to the predecessor. ______________________________________________________________________ ### function addSuccessor *Adds a successor to the graph node.* ```C++ SBCReferenceListLink * SBCGraphNode::addSuccessor ( SBCGraphNode * graphNode ) ``` Adds a successor to the current node. The node pointed by *g* becomes a successor of the current node, while the current node becomes a predecessor of *g*. The function returns a pointer to the reference link that holds the connection, which can be used for constant‑time removal of the successor reference. **Parameters:** - `g` A pointer to the graph node that becomes a successor of this node. **Returns:** A pointer to the reference link representing the connection to the successor. ______________________________________________________________________ ### function beginPredecessors *Returns a begin iterator to predecessors.* ```C++ iterator SBCGraphNode::beginPredecessors () ``` Returns an iterator to the first predecessor of the node. The iterator can be used to traverse all predecessor nodes of this graph node. **Returns:** An iterator positioned at the beginning of the predecessors collection, or an end iterator if there are no predecessors. ______________________________________________________________________ ### function beginSuccessors *Returns a begin iterator to successors.* ```C++ iterator SBCGraphNode::beginSuccessors () ``` Returns an iterator to the first successor of the node. The iterator can be used to traverse all successor nodes of this graph node. **Returns:** An iterator positioned at the beginning of the successors collection, or an end iterator if there are no successors. ______________________________________________________________________ ### function endPredecessors *Returns an end iterator to predecessors.* ```C++ iterator SBCGraphNode::endPredecessors () ``` Returns an iterator marking the end of the predecessors collection. **Returns:** An iterator representing the end sentinel for the predecessors collection. ______________________________________________________________________ ### function endSuccessors *Returns an end iterator to successors.* ```C++ iterator SBCGraphNode::endSuccessors () ``` Returns an iterator marking the end of the successors collection. **Returns:** An iterator representing the end sentinel for the successors collection. ______________________________________________________________________ ### function getArcFromPredecessor *Returns the arc from the predecessor* `graphNode` *(0 if not found)* ```C++ SBCGraphArc * SBCGraphNode::getArcFromPredecessor ( SBCGraphNode * graphNode ) const ``` Retrieves the arc connecting a specific predecessor to this node. Searches the list of predecessors for a node matching *graphNode* and returns the associated arc. **Parameters:** - `graphNode` A pointer to the predecessor node whose connecting arc is requested. **Returns:** A pointer to the [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) representing the connection from *graphNode*, or nullptr if no such predecessor exists. ______________________________________________________________________ ### function getArcToSuccessor *Returns the arc to the successor* `graphNode` *(0 if not found)* ```C++ SBCGraphArc * SBCGraphNode::getArcToSuccessor ( SBCGraphNode * graphNode ) const ``` Retrieves the arc connecting this node to a specific successor. Searches the list of successors for a node matching *graphNode* and returns the associated arc. **Parameters:** - `graphNode` A pointer to the successor node whose connecting arc is requested. **Returns:** A pointer to the [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) representing the connection to *graphNode*, or nullptr if no such successor exists. ______________________________________________________________________ ### function getNumberOfPredecessors *Returns the number of predecessors.* ```C++ unsigned int SBCGraphNode::getNumberOfPredecessors () const ``` Returns the number of predecessors of the node. **Returns:** The count of predecessor connections. ______________________________________________________________________ ### function getNumberOfSuccessors *Returns the number of successors.* ```C++ unsigned int SBCGraphNode::getNumberOfSuccessors () const ``` Returns the number of successors of the node. **Returns:** The count of successor connections. ______________________________________________________________________ ### function printConnections *Prints the list of connections of the nodes.* ```C++ void SBCGraphNode::printConnections () const ``` Prints the connections of the node for debugging purposes. The method outputs the node's address, its owner references, and lists of successors and predecessors to standard output. ______________________________________________________________________ ### function rbeginPredecessors *Returns a reverse begin iterator to predecessors.* ```C++ reverse_iterator SBCGraphNode::rbeginPredecessors () ``` Returns a reverse iterator to the last predecessor of the node. The reverse iterator can be used to traverse the predecessors in reverse order. **Returns:** A reverse iterator positioned at the last predecessor, or a reverse end iterator if there are no predecessors. ______________________________________________________________________ ### function rbeginSuccessors *Returns a reverse begin iterator to successors.* ```C++ reverse_iterator SBCGraphNode::rbeginSuccessors () ``` Returns a reverse iterator to the last successor of the node. The reverse iterator can be used to traverse the successors in reverse order. **Returns:** A reverse iterator positioned at the last successor, or a reverse end iterator if there are no successors. ______________________________________________________________________ ### function removeAllPredecessors *Removes all predecessors to the graph node.* ```C++ void SBCGraphNode::removeAllPredecessors () ``` Removes all predecessors of the node. All predecessor connections are removed, and the corresponding successor references in the predecessor nodes are also cleared. The operation runs in time proportional to the number of predecessors. ______________________________________________________________________ ### function removeAllSuccessors *Removes all successors to the graph node.* ```C++ void SBCGraphNode::removeAllSuccessors () ``` Removes all successors of the node. All successor connections are removed, and the corresponding predecessor references in the successor nodes are also cleared. The operation runs in time proportional to the number of successors. ______________________________________________________________________ ### function removePredecessor [1/2] *Removes a predecessor to the graph node.* ```C++ void SBCGraphNode::removePredecessor ( SBCGraphNode * graphNode ) ``` Removes the specified predecessor from the node. The node pointed by *g* is removed from the list of predecessors, and the corresponding successor reference in *g* is also removed. **Parameters:** - `g` A pointer to the predecessor node to be removed. ______________________________________________________________________ ### function removePredecessor [2/2] *Removes a predecessor to the graph node (constant time)* ```C++ void SBCGraphNode::removePredecessor ( SBCReferenceListLink * referenceListLink ) ``` Removes a predecessor using a direct reference link. This operation runs in constant time because *referenceLink* directly points to the link holding the reference to the predecessor. The link must have been obtained from [**SBCGraphNode::addPredecessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-addpredecessor). **Parameters:** - `referenceLink` A pointer to the reference link representing the predecessor connection to be removed. ______________________________________________________________________ ### function removeSuccessor [1/2] *Removes a successor to the graph node.* ```C++ void SBCGraphNode::removeSuccessor ( SBCGraphNode * graphNode ) ``` Removes the specified successor from the node. The node pointed by *g* is removed from the list of successors, and the corresponding predecessor reference in *g* is also removed. **Parameters:** - `g` A pointer to the successor node to be removed. ______________________________________________________________________ ### function removeSuccessor [2/2] *Removes a successor to the graph node (constant time)* ```C++ void SBCGraphNode::removeSuccessor ( SBCReferenceListLink * referenceListLink ) ``` Removes a successor using a direct reference link. This operation runs in constant time because *referenceLink* directly points to the link holding the reference to the successor. The link must have been obtained from [**SBCGraphNode::addSuccessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-addsuccessor). **Parameters:** - `referenceLink` A pointer to the reference link representing the successor connection to be removed. ______________________________________________________________________ ### function rendPredecessors *Returns a reverse end iterator to predecessors.* ```C++ reverse_iterator SBCGraphNode::rendPredecessors () ``` Returns a reverse iterator marking the reverse end of the predecessors collection. **Returns:** A reverse iterator representing the reverse end sentinel for the predecessors collection. ______________________________________________________________________ ### function rendSuccessors *Returns a reverse end iterator to successors.* ```C++ reverse_iterator SBCGraphNode::rendSuccessors () ``` Returns a reverse iterator marking the reverse end of the successors collection. **Returns:** A reverse iterator representing the reverse end sentinel for the successors collection. ______________________________________________________________________ ### function ~SBCGraphNode *Destroys the graph node, removing any references from its predecessors and successors.* ```C++ virtual SBCGraphNode::~SBCGraphNode () ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable predecessors *The list of predecessors.* ```C++ SBCGraphArcCollection* SBCGraphNode::predecessors; ``` ______________________________________________________________________ ### variable successors *The list of successors.* ```C++ SBCGraphArcCollection* SBCGraphNode::successors; ``` ______________________________________________________________________ # SBGraphNodeTemplate # Class SBCGraphNodeTemplate **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCGraphNodeTemplate**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNodeTemplate/index.md) *This template class describes a generic graph node.* - `#include ` Inherits the following classes: [SBCGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) ## Classes | Type | Name | | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNodeTemplate_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNodeTemplate_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | ------------ | ------------------------------------------------------------------ | | | [**SBCGraphNodeTemplate**](#function-sbcgraphnodetemplate) (T & v) | | T const & | [**getConstReference**](#function-getconstreference) () const | | T & | [**getReference**](#function-getreference) () | | T | [**getValue**](#function-getvalue-12) () const | | virtual void | [**setValue**](#function-setvalue) (T & value) | | virtual | [**~SBCGraphNodeTemplate**](#function-sbcgraphnodetemplate) () | ## Public Functions inherited from SBCGraphNode See [SBCGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-sbcgraphnode) () *Constructs a graph node with no connections.* | | SBCReferenceListLink \* | [**addPredecessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-addpredecessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Adds a predecessor to the graph node.* | | SBCReferenceListLink \* | [**addSuccessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-addsuccessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Adds a successor to the graph node.* | | iterator | [**beginPredecessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-beginpredecessors) () *Returns a begin iterator to predecessors.* | | iterator | [**beginSuccessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-beginsuccessors) () *Returns a begin iterator to successors.* | | iterator | [**endPredecessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-endpredecessors) () *Returns an end iterator to predecessors.* | | iterator | [**endSuccessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-endsuccessors) () *Returns an end iterator to successors.* | | [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) \* | [**getArcFromPredecessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-getarcfrompredecessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) const *Returns the arc from the predecessor* `graphNode` *(0 if not found)* | | [**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) \* | [**getArcToSuccessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-getarctosuccessor) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) const *Returns the arc to the successor* `graphNode` *(0 if not found)* | | unsigned int | [**getNumberOfPredecessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-getnumberofpredecessors) () const *Returns the number of predecessors.* | | unsigned int | [**getNumberOfSuccessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-getnumberofsuccessors) () const *Returns the number of successors.* | | void | [**printConnections**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-printconnections) () const *Prints the list of connections of the nodes.* | | reverse_iterator | [**rbeginPredecessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-rbeginpredecessors) () *Returns a reverse begin iterator to predecessors.* | | reverse_iterator | [**rbeginSuccessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-rbeginsuccessors) () *Returns a reverse begin iterator to successors.* | | void | [**removeAllPredecessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-removeallpredecessors) () *Removes all predecessors to the graph node.* | | void | [**removeAllSuccessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-removeallsuccessors) () *Removes all successors to the graph node.* | | void | [**removePredecessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-removepredecessor-12) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Removes a predecessor to the graph node.* | | void | [**removePredecessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-removepredecessor-22) (SBCReferenceListLink * referenceListLink) *Removes a predecessor to the graph node (constant time)* | | void | [**removeSuccessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-removesuccessor-12) ([**SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) * graphNode) *Removes a successor to the graph node.* | | void | [**removeSuccessor**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-removesuccessor-22) (SBCReferenceListLink * referenceListLink) *Removes a successor to the graph node (constant time)* | | reverse_iterator | [**rendPredecessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-rendpredecessors) () *Returns a reverse end iterator to predecessors.* | | reverse_iterator | [**rendSuccessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-rendsuccessors) () *Returns a reverse end iterator to successors.* | | virtual | [**~SBCGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#function-sbcgraphnode) () *Destroys the graph node, removing any references from its predecessors and successors.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Public Static Functions | Type | Name | | --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | T const & | [**getValue**](#function-getvalue-22) ([**SBCGraphArc**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArc/index.md) * container) | ## Protected Attributes | Type | Name | | ---- | ---------------------------- | | T | [**value**](#variable-value) | ## Protected Attributes inherited from SBCGraphNode See [SBCGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------- | | [**SBCGraphArcCollection**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArcCollection/index.md) \* | [**predecessors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#variable-predecessors) *The list of predecessors.* | | [**SBCGraphArcCollection**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphArcCollection/index.md) \* | [**successors**](https://documentation.samson-connect.net/developers/latest/api/classSBCGraphNode/#variable-successors) *The list of successors.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Public Functions Documentation ### function SBCGraphNodeTemplate ```C++ inline SBCGraphNodeTemplate::SBCGraphNodeTemplate ( T & v ) ``` ______________________________________________________________________ ### function getConstReference ```C++ inline T const & SBCGraphNodeTemplate::getConstReference () const ``` ______________________________________________________________________ ### function getReference ```C++ inline T & SBCGraphNodeTemplate::getReference () ``` ______________________________________________________________________ ### function getValue [1/2] ```C++ inline T SBCGraphNodeTemplate::getValue () const ``` ______________________________________________________________________ ### function setValue ```C++ inline virtual void SBCGraphNodeTemplate::setValue ( T & value ) ``` ______________________________________________________________________ ### function ~SBCGraphNodeTemplate ```C++ inline virtual SBCGraphNodeTemplate::~SBCGraphNodeTemplate () ``` ______________________________________________________________________ ## Public Static Functions Documentation ### function getValue [2/2] ```C++ static inline T const & SBCGraphNodeTemplate::getValue ( SBCGraphArc * container ) ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable value ```C++ T SBCGraphNodeTemplate< T >::value; ``` ______________________________________________________________________ # SBType # Class SBCMetaType **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCMetaType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaType/index.md) *This template class provides type information.* [More...](#detailed-description) - `#include ` ## Public Types | Type | Name | | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | enum | [**TypeInformation**](#enum-typeinformation) [***Type***](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityProduct2/index.md) *information.* | ## Public Static Functions | Type | Name | | --------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getBaseTypeName**](#function-getbasetypename) () *Returns the base type name.* | | std::string | [**getClassTypeName**](#function-getclasstypename) () *Returns the class type name.* | | std::string | [**getOutputTypeName**](#function-getoutputtypename) () *Returns the output type name.* | | std::string | [**getParameterTypeName**](#function-getparametertypename) (unsigned int i) *Returns the type name of parameter* `i` *.* | | std::string | [**getParentTypeName**](#function-getparenttypename) () *Returns the parent type name.* | | std::string | [**getRootTypeName**](#function-getroottypename) () *Returns the root type name.* | | std::string | [**getShortBaseTypeName**](#function-getshortbasetypename) () *Returns the short base type name.* | | std::string | [**getShortClassTypeName**](#function-getshortclasstypename) () *Returns the short class type name.* | | std::string | [**getShortOutputTypeName**](#function-getshortoutputtypename) () *Returns the short output type name.* | | std::string | [**getShortParameterTypeName**](#function-getshortparametertypename) (unsigned int i) *Returns the short type name of parameter* `i` *.* | | std::string | [**getShortParentTypeName**](#function-getshortparenttypename) () *Returns the short parent type name.* | | std::string | [**getShortRootTypeName**](#function-getshortroottypename) () *Returns the short root type name.* | | std::string | [**getShortTypeName**](#function-getshorttypename) () *Returns the short type name.* | | std::string | [**getTypeName**](#function-gettypename) () *Returns the type name.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getTypeUUID**](#function-gettypeuuid) () *Returns the UUID of the type.* | ## Detailed Description **Parameters:** - `T` The type about which information is sought This template class provides information about a type `T`, through enumerated values and static functions, including for example: ```C++ // isConstType = true bool isConstType = SBType::IsConstType; // typeName = "const std::string&"; std::string typeName = SBType::getTypeName(); // parentTypeName = "std::string"; std::string parentTypeName = SBType::getParentTypeName(); // rootTypeName = "std::string"; std::string rootTypeName = SBType::getRootTypeName(); // shortName = "SBAtom"; std::string shortName = SBType::getShortTypeName(); ``` **Short name**: SBType **See also:** [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md), [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) ## Public Types Documentation ### enum TypeInformation [***Type***](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityProduct2/index.md) *information.* ```C++ enum SBCMetaType::TypeInformation { IsEnumType = SBCMetaIsEnumType::True, IsClassType = SBCMetaIsClassType::True, IsFundamentalType = SBCMetaIsFundamentalType::True, IsRegisteredType = SBCMetaIsRegisteredType::True, IsConstType = SBCMetaDecomposeType::IsConstType, IsVolatileType = SBCMetaDecomposeType::IsVolatileType, IsReferenceType = SBCMetaDecomposeType::IsReferenceType, IsArrayType = SBCMetaDecomposeType::IsArrayType, IsPointerType = SBCMetaDecomposeType::IsPointerType, IsPointerToMemberType = SBCMetaDecomposeType::IsPointerToMemberType, IsFunctionType = SBCMetaDecomposeType::IsFunctionType, IsPointerToFunctionType = SBCMetaDecomposeType::IsPointerToFunctionType, IsPointerToMemberFunctionType = SBCMetaDecomposeType::IsPointerToMemberFunctionType, HasBaseType = SBCMetaBaseType::HasBaseType, NumberOfParameters = SBCMetaDecomposeType::NumberOfParameters }; ``` This enumerated type returns information about the type `T`. Besides `NumberOfParameters`, each enumerated value is equal to either 1 or 0. ______________________________________________________________________ ## Public Static Functions Documentation ### function getBaseTypeName *Returns the base type name.* ```C++ static inline std::string SBCMetaType::getBaseTypeName () ``` This function returns the type name of the base type of `T`. For example, the base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBMStructuralModelNode". ______________________________________________________________________ ### function getClassTypeName *Returns the class type name.* ```C++ static inline std::string SBCMetaType::getClassTypeName () ``` This function returns the type name of the class associated to `T`, when `T` is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBMStructuralModelNodeAtom". ______________________________________________________________________ ### function getOutputTypeName *Returns the output type name.* ```C++ static inline std::string SBCMetaType::getOutputTypeName () ``` This function returns the type name of the output type of `T`, when `T` is a function. For example, the output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBMStructuralModelNodeAtom\*". ______________________________________________________________________ ### function getParameterTypeName *Returns the type name of parameter* `i` *.* ```C++ static inline std::string SBCMetaType::getParameterTypeName ( unsigned int i ) ``` This function returns the type name of parameter `i` of type `T`, when `T` is a function ("void" otherwise). For example, the type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBMStructuralModelNodeAtom\*". ______________________________________________________________________ ### function getParentTypeName *Returns the parent type name.* ```C++ static inline std::string SBCMetaType::getParentTypeName () ``` This function returns the type name of the parent type of `T`. For example, the parent type name of `int*` is "int". ______________________________________________________________________ ### function getRootTypeName *Returns the root type name.* ```C++ static inline std::string SBCMetaType::getRootTypeName () ``` This function returns the type name of the root type of `T`. For example, the root type name of `const std::string&` is "std::string". ______________________________________________________________________ ### function getShortBaseTypeName *Returns the short base type name.* ```C++ static inline std::string SBCMetaType::getShortBaseTypeName () ``` This function returns the short type name of the base type of `T`. For example, the short base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBNode". ______________________________________________________________________ ### function getShortClassTypeName *Returns the short class type name.* ```C++ static inline std::string SBCMetaType::getShortClassTypeName () ``` This function returns the short type name of the class associated to `T`, when `T` is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the short class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBAtom". ______________________________________________________________________ ### function getShortOutputTypeName *Returns the short output type name.* ```C++ static inline std::string SBCMetaType::getShortOutputTypeName () ``` This function returns the short type name of the output type of `T`, when `T` is a function. For example, the short output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBAtom\*". ______________________________________________________________________ ### function getShortParameterTypeName *Returns the short type name of parameter* `i` *.* ```C++ static inline std::string SBCMetaType::getShortParameterTypeName ( unsigned int i ) ``` This function returns the short type name of parameter `i` of type `T`, when `T` is a function ("void" otherwise). For example, the short type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBAtom\*". ______________________________________________________________________ ### function getShortParentTypeName *Returns the short parent type name.* ```C++ static inline std::string SBCMetaType::getShortParentTypeName () ``` This function returns the short type name of the parent type of `T`. For example, the short parent type name of `SBMStructuralModelNodeAtom*` is "SBAtom". ______________________________________________________________________ ### function getShortRootTypeName *Returns the short root type name.* ```C++ static inline std::string SBCMetaType::getShortRootTypeName () ``` This function returns the type name of the root type of `T`. For example, the short root type name of `const SBMStructuralModelNodeAtom &` is "SBAtom". ______________________________________________________________________ ### function getShortTypeName *Returns the short type name.* ```C++ static inline std::string SBCMetaType::getShortTypeName () ``` When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its short type name. Else, this function recursively decomposes the type in order to provide a string describing it, but using short names (e.g. "const SBAtom\*"). ______________________________________________________________________ ### function getTypeName *Returns the type name.* ```C++ static inline std::string SBCMetaType::getTypeName () ``` When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its type name. Else, this function recursively decomposes the type in order to provide a string describing it (e.g. "const SBMStructuralModelNodeAtom\*"). ______________________________________________________________________ ### function getTypeUUID *Returns the UUID of the type.* ```C++ static inline SBCContainerUUID SBCMetaType::getTypeUUID () ``` If the type is registered (via `SB_REGISTER_TYPE`), this function returns the associated [**UUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md). Else, the function returns an invalid [**UUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md). ______________________________________________________________________ # SBValue # Class SBCMetaValue [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) *This class represents values.* [More...](#detailed-description) - `#include ` ## Classes | Type | Name | | ----- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**ValueFactory< true, U >**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue_1_1ValueFactory_3_01true_00_01U_01_4/index.md) *Partial specialization for values with proxies.* | ## Public Static Attributes | Type | Name | | ------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------ | | const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**empty**](#variable-empty) *An empty, non-valid, SBValue.* | ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCMetaValue**](#function-sbcmetavalue-16) (U u) *Generic constructor.* | | | [**SBCMetaValue**](#function-sbcmetavalue-26) ([**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md)< U > * u) *Constructs a value.* | | | [**SBCMetaValue**](#function-sbcmetavalue-36) ([**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md)< U > * u) *Constructs a value.* | | | [**SBCMetaValue**](#function-sbcmetavalue-46) ([**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) * u) *Constructs a value.* | | | [**SBCMetaValue**](#function-sbcmetavalue-56) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & u) *Constructs a value.* | | | [**SBCMetaValue**](#function-sbcmetavalue-66) () noexcept *Constructs an empty value.* | | virtual [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**call**](#function-call) (const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Calls the function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual void | [**clear**](#function-clear) (const std::string & attributeName) const *Clears attribute* `attributeName` *from the value when possible.* | | virtual [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**constCall**](#function-constcall) (const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)(), const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15=[**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)()) const *Calls the const function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**get**](#function-get) (const std::string & attributeName) const *Returns the value of attribute* `attributeName` *for this value.* | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getBaseType**](#function-getbasetype) () const *Returns the base type.* | | std::string | [**getBaseTypeName**](#function-getbasetypename) () const *Returns the base type name.* | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getClassType**](#function-getclasstype) () const *Returns the class type.* | | std::string | [**getClassTypeName**](#function-getclasstypename) () const *Returns the class type name.* | | unsigned int | [**getNumberOfParameters**](#function-getnumberofparameters) () const *Returns the number of parameters of a function type.* | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getOutputType**](#function-getoutputtype) () const *Returns the output type.* | | std::string | [**getOutputTypeName**](#function-getoutputtypename) () const *Returns the output type name.* | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getParameterType**](#function-getparametertype) (unsigned int i) const *Returns the type of parameter* `i` *.* | | std::string | [**getParameterTypeName**](#function-getparametertypename) (unsigned int i) const *Returns the type name of parameter* `i` *.* | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getParentType**](#function-getparenttype) () const *Returns the parent type.* | | std::string | [**getParentTypeName**](#function-getparenttypename) () const *Returns the parent type name.* | | virtual [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \* | [**getProxy**](#function-getproxy) () const *Returns the proxy of the value.* | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**getRootType**](#function-getroottype) () const *Returns the root type.* | | std::string | [**getRootTypeName**](#function-getroottypename) () const *Returns the root type name.* | | std::string | [**getShortBaseTypeName**](#function-getshortbasetypename) () const *Returns the short base type name.* | | std::string | [**getShortClassTypeName**](#function-getshortclasstypename) () const *Returns the short class type name.* | | std::string | [**getShortOutputTypeName**](#function-getshortoutputtypename) () const *Returns the short output type name.* | | std::string | [**getShortParameterTypeName**](#function-getshortparametertypename) (unsigned int i) const *Returns the short type name of parameter* `i` *.* | | std::string | [**getShortParentTypeName**](#function-getshortparenttypename) () const *Returns the short parent type name.* | | std::string | [**getShortRootTypeName**](#function-getshortroottypename) () const *Returns the short root type name.* | | std::string | [**getShortTypeName**](#function-getshorttypename) () const *Returns the short type name.* | | virtual unsigned int | [**getSize**](#function-getsize) (const std::string & attributeName) const *Returns the size of attribute* `attributeName` *in the value when relevant.* | | std::string | [**getTypeName**](#function-gettypename) () const *Returns the type name.* | | [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getTypeUUID**](#function-gettypeuuid) () const *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* | | [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getValue**](#function-getvalue) () noexcept const *Returns the value.* | | virtual bool | [**has**](#function-has) (const std::string & attributeName) const *Returns whether attribute* `attributeName` *exists in the value and has a value.* | | bool | [**hasBaseType**](#function-hasbasetype) () const *Returns* `true` *if the value is of a type that has a base type.* | | bool | [**isArrayType**](#function-isarraytype) () const *Returns* `true` *if the value is of an array type.* | | bool | [**isClassType**](#function-isclasstype) () const *Returns* `true` *if the value is of a class type.* | | bool | [**isConstType**](#function-isconsttype) () const *Returns* `true` *if the value is of a const type.* | | bool | [**isEnumType**](#function-isenumtype) () const *Returns* `true` *if the value is of an enum type.* | | bool | [**isFunctionType**](#function-isfunctiontype) () const *Returns* `true` *if the value is of a function type.* | | bool | [**isFundamentalType**](#function-isfundamentaltype) () const *Returns* `true` *if the value is of a fundamental type.* | | bool | [**isPointerToFunctionType**](#function-ispointertofunctiontype) () const *Returns* `true` *if the value is of a pointer to function type.* | | bool | [**isPointerToMemberFunctionType**](#function-ispointertomemberfunctiontype) () const *Returns* `true` *if the value is of a pointer to member function type.* | | bool | [**isPointerToMemberType**](#function-ispointertomembertype) () const *Returns* `true` *if the value is of a pointer to member type.* | | bool | [**isPointerType**](#function-ispointertype) () const *Returns* `true` *if the value is of a pointer type.* | | bool | [**isReferenceType**](#function-isreferencetype) () const *Returns* `true` *if the value is of a reference type.* | | bool | [**isRegisteredType**](#function-isregisteredtype) () const *Returns* `true` *if the value is of a registered type.* | | bool | [**isValid**](#function-isvalid) () noexcept const *Returns whether the value is valid and can be dereferenced with* `getValue` *.* | | bool | [**isVolatileType**](#function-isvolatiletype) () const *Returns* `true` *if the value is of a volatile type.* | | | [**operator U**](#function-operator-u) () const | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & | [**operator=**](#function-operator) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value) *Assignment operator.* | | virtual void | [**set**](#function-set) (const std::string & attributeName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & size=0) const *Sets the value of attribute* `attributeName` *for this value to*`value` *.* | | | [**~SBCMetaValue**](#function-sbcmetavalue) () *Destructs the value.* | ## Public Static Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**buildType**](#function-buildtype) () | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**buildValue**](#function-buildvalue-12) () | | [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**buildValue**](#function-buildvalue-22) (U u) | | bool | [**canCastFrom**](#function-cancastfrom) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & fromValue) | | U | [**castFrom**](#function-castfrom) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & fromValue) | ## Detailed Description This class is the base class of value holders, and a key component of the introspection mechanism. In particular, it is the direct base class of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), used to contain type information, which is itself the direct base class of the template class [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md), used to hold values. Assume a SAMSON Extension called `SEElement` defines a class `A`, and another Extension called `SEOtherElement` wants to use it. If the Extension called `SEOtherElement` does not have access to the declaration of class `A` (typically provided in a header file included in `SEElement`), it cannot use the symbol `A` in its source code. For example, if the source code of `SEOtherElement` contained the line: ```C++ A* a = new A(); ``` the compiler would complain that the symbol `A` is not defined. In order to provide access to exposed classes, SAMSON uses a mechanism to *hold values* (for example, pointers to objects) in a uniform way. In the example above, the constructor exposed in the Extension `SEElement` returns a [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) that stores a pointer to the new instance of class `A`: ```C++ return new SBValueHolder(new A()); ``` and the Extension `SEOtherElement` sees it as an SBValue that stores this [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) as a pointer to a [**SBValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) (the base class of `SBValueHolder`): ```C++ SBValue classInstance = classProxy->createInstance(); ``` This class is able to provide information about a [**hold type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) or a [**hold value**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md). **Short name**: SBValue **See also:** [**SBCMetaType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaType/index.md), [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) ## Public Static Attributes Documentation ### variable empty *An empty, non-valid, SBValue.* ```C++ const SBCMetaValue SBCMetaValue::empty; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCMetaValue [1/6] *Generic constructor.* ```C++ template inline SBCMetaValue::SBCMetaValue ( U u ) ``` ______________________________________________________________________ ### function SBCMetaValue [2/6] *Constructs a value.* ```C++ template inline SBCMetaValue::SBCMetaValue ( SBCMetaValueType < U > * u ) ``` ______________________________________________________________________ ### function SBCMetaValue [3/6] *Constructs a value.* ```C++ template inline SBCMetaValue::SBCMetaValue ( SBCMetaValueHolder < U > * u ) ``` ______________________________________________________________________ ### function SBCMetaValue [4/6] *Constructs a value.* ```C++ inline SBCMetaValue::SBCMetaValue ( SBCMetaValueBase * u ) ``` ______________________________________________________________________ ### function SBCMetaValue [5/6] *Constructs a value.* ```C++ inline SBCMetaValue::SBCMetaValue ( const SBCMetaValue & u ) ``` ______________________________________________________________________ ### function SBCMetaValue [6/6] *Constructs an empty value.* ```C++ SBCMetaValue::SBCMetaValue () noexcept ``` Default constructs an empty [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). The created instance does not hold any value; its internal pointer is set to nullptr. ______________________________________________________________________ ### function call *Calls the function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBCMetaValue SBCMetaValue::call ( const std::string & functionName, const SBCMetaValue & t0=SBCMetaValue (), const SBCMetaValue & t1=SBCMetaValue (), const SBCMetaValue & t2=SBCMetaValue (), const SBCMetaValue & t3=SBCMetaValue (), const SBCMetaValue & t4=SBCMetaValue (), const SBCMetaValue & t5=SBCMetaValue (), const SBCMetaValue & t6=SBCMetaValue (), const SBCMetaValue & t7=SBCMetaValue (), const SBCMetaValue & t8=SBCMetaValue (), const SBCMetaValue & t9=SBCMetaValue (), const SBCMetaValue & t10=SBCMetaValue (), const SBCMetaValue & t11=SBCMetaValue (), const SBCMetaValue & t12=SBCMetaValue (), const SBCMetaValue & t13=SBCMetaValue (), const SBCMetaValue & t14=SBCMetaValue (), const SBCMetaValue & t15=SBCMetaValue () ) const ``` Calls a member function of the value with up to 16 arguments. This function invokes the function named `functionName` on the underlying value, passing the provided arguments `t0` through `t15`. Arguments not needed by the function may be omitted (default-initialized). **Parameters:** - `functionName` Name of the function to call on the value. - `t0` First argument to pass to the function (default empty). - `t1` Second argument to pass to the function (default empty). - `t2` Third argument to pass to the function (default empty). - `t3` Fourth argument to pass to the function (default empty). - `t4` Fifth argument to pass to the function (default empty). - `t5` Sixth argument to pass to the function (default empty). - `t6` Seventh argument to pass to the function (default empty). - `t7` Eighth argument to pass to the function (default empty). - `t8` Ninth argument to pass to the function (default empty). - `t9` Tenth argument to pass to the function (default empty). - `t10` Eleventh argument to pass to the function (default empty). - `t11` Twelfth argument to pass to the function (default empty). - `t12` Thirteenth argument to pass to the function (default empty). - `t13` Fourteenth argument to pass to the function (default empty). - `t14` Fifteenth argument to pass to the function (default empty). - `t15` Sixteenth argument to pass to the function (default empty). **Returns:** The result of the function call as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). If the function cannot be called, an empty [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) is returned. ______________________________________________________________________ ### function clear *Clears attribute* `attributeName` *from the value when possible.* ```C++ virtual void SBCMetaValue::clear ( const std::string & attributeName ) const ``` Clears the specified attribute from the value when possible. This function clears attribute `attributeName` from the value when possible. **Parameters:** - `attributeName` Name of the attribute to clear. ______________________________________________________________________ ### function constCall *Calls the const function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBCMetaValue SBCMetaValue::constCall ( const std::string & functionName, const SBCMetaValue & t0=SBCMetaValue (), const SBCMetaValue & t1=SBCMetaValue (), const SBCMetaValue & t2=SBCMetaValue (), const SBCMetaValue & t3=SBCMetaValue (), const SBCMetaValue & t4=SBCMetaValue (), const SBCMetaValue & t5=SBCMetaValue (), const SBCMetaValue & t6=SBCMetaValue (), const SBCMetaValue & t7=SBCMetaValue (), const SBCMetaValue & t8=SBCMetaValue (), const SBCMetaValue & t9=SBCMetaValue (), const SBCMetaValue & t10=SBCMetaValue (), const SBCMetaValue & t11=SBCMetaValue (), const SBCMetaValue & t12=SBCMetaValue (), const SBCMetaValue & t13=SBCMetaValue (), const SBCMetaValue & t14=SBCMetaValue (), const SBCMetaValue & t15=SBCMetaValue () ) const ``` Calls a const member function of the value with up to 16 arguments. This function invokes the const function named `functionName` on the underlying value, passing the provided arguments `t0` through `t15`. Arguments not needed by the function may be omitted (default-initialized). **Parameters:** - `functionName` Name of the const function to call on the value. - `t0` First argument to pass to the function (default empty). - `t1` Second argument to pass to the function (default empty). - `t2` Third argument to pass to the function (default empty). - `t3` Fourth argument to pass to the function (default empty). - `t4` Fifth argument to pass to the function (default empty). - `t5` Sixth argument to pass to the function (default empty). - `t6` Seventh argument to pass to the function (default empty). - `t7` Eighth argument to pass to the function (default empty). - `t8` Ninth argument to pass to the function (default empty). - `t9` Tenth argument to pass to the function (default empty). - `t10` Eleventh argument to pass to the function (default empty). - `t11` Twelfth argument to pass to the function (default empty). - `t12` Thirteenth argument to pass to the function (default empty). - `t13` Fourteenth argument to pass to the function (default empty). - `t14` Fifteenth argument to pass to the function (default empty). - `t15` Sixteenth argument to pass to the function (default empty). **Returns:** The result of the const function call as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). If the function cannot be called, an empty [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) is returned. ______________________________________________________________________ ### function get *Returns the value of attribute* `attributeName` *for this value.* ```C++ virtual SBCMetaValue SBCMetaValue::get ( const std::string & attributeName ) const ``` Retrieves the value of the specified attribute. This function returns the value of attribute `attributeName` for this value. **Parameters:** - `attributeName` Name of the attribute to retrieve. **Returns:** The attribute value as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). If the attribute does not exist, an empty [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) is returned. ______________________________________________________________________ ### function getBaseType *Returns the base type.* ```C++ SBCMetaValue SBCMetaValue::getBaseType () const ``` Returns the base type of this type. This function returns the base type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the base type of this type. For example, the base type of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is [**SBMStructuralModelNode**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNode/index.md). Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValue::getBaseTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getbasetypename). **See also:** [**SBCMetaValue::getBaseTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getbasetypename) **Returns:** The base type as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). ______________________________________________________________________ ### function getBaseTypeName *Returns the base type name.* ```C++ std::string SBCMetaValue::getBaseTypeName () const ``` Returns the type name of the base type of `T`. This function returns the type name of the base type of `T`. For example, the base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBMStructuralModelNode". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getbasetype). **See also:** [**SBCMetaValue::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getbasetype) **Returns:** The base type name as a string, or an empty string if the value is invalid. ______________________________________________________________________ ### function getClassType *Returns the class type.* ```C++ SBCMetaValue SBCMetaValue::getClassType () const ``` Returns the class type of this type when it is a pointer to a member or a member function. This function returns the class type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the class type of this type, when the type is a pointer to a member or a pointer to a member function. For example, the class type name of `& SBMStructuralModelNodeAtom::clearName` is `SBMStructuralModelNodeAtom`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValue::getClassTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getclasstypename). **See also:** [**SBCMetaValue::getClassTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getclasstypename) **Returns:** The class type as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). ______________________________________________________________________ ### function getClassTypeName *Returns the class type name.* ```C++ std::string SBCMetaValue::getClassTypeName () const ``` Returns the type name of the class associated with the held member or member function. This function returns the type name of the class associated to `T`, when `T` is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBMStructuralModelNodeAtom". Note that this function returns a string. If [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getclasstype). **See also:** [**SBCMetaValue::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getclasstype) **Returns:** The class type name as a string, or an empty string if not applicable. ______________________________________________________________________ ### function getNumberOfParameters *Returns the number of parameters of a function type.* ```C++ unsigned int SBCMetaValue::getNumberOfParameters () const ``` Retrieves the number of parameters of the held function type. If the value does not represent a function, zero is returned. **Returns:** The number of parameters, or zero if not applicable. ______________________________________________________________________ ### function getOutputType *Returns the output type.* ```C++ SBCMetaValue SBCMetaValue::getOutputType () const ``` Returns the output type of this type when it is a function. This function returns the output type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the output type of this type, when the type is a function. For example, the output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md). Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValue::getOutputTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getoutputtypename). **See also:** [**SBCMetaValue::getOutputTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getoutputtypename) **Returns:** The output type as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). ______________________________________________________________________ ### function getOutputTypeName *Returns the output type name.* ```C++ std::string SBCMetaValue::getOutputTypeName () const ``` Returns the type name of the output (return) type of the held function type. This function returns the type name of the output type of `T`, when `T` is a function. For example, the output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBMStructuralModelNodeAtom\*". Note that this function returns a string. If [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getoutputtype). **See also:** [**SBCMetaValue::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getoutputtype) **Returns:** The output type name as a string, or an empty string if not applicable. ______________________________________________________________________ ### function getParameterType *Returns the type of parameter* `i` *.* ```C++ SBCMetaValue SBCMetaValue::getParameterType ( unsigned int i ) const ``` Returns the type of parameter `i` of this function type. This function returns the type of parameter `i`, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the type of parameter `i`, when the type is a function. For example, the type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is `const SBMStructuralModelNodeAtom*`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValue::getParameterTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparametertypename). **See also:** [**SBCMetaValue::getParameterTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparametertypename) **Parameters:** - `i` Index of the parameter whose type is requested. **Returns:** The type of the requested parameter as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). ______________________________________________________________________ ### function getParameterTypeName *Returns the type name of parameter* `i` *.* ```C++ std::string SBCMetaValue::getParameterTypeName ( unsigned int i ) const ``` Returns the type name of the i-th parameter of the held function type. This function returns the type name of parameter `i` of type `T`, when `T` is a function ("void" otherwise). For example, the type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBMStructuralModelNodeAtom\*". Note that this function returns a string. If [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparametertype). **See also:** [**SBCMetaValue::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparametertype) **Parameters:** - `i` The zero-based index of the parameter. **Returns:** The parameter type name as a string, or an empty string if not applicable. ______________________________________________________________________ ### function getParentType *Returns the parent type.* ```C++ SBCMetaValue SBCMetaValue::getParentType () const ``` Returns the parent type of this type. This function returns the parent type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the parent type of this type. For example, the parent type of `int*` is `int`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValue::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparenttypename). **See also:** [**SBCMetaValue::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparenttypename) **Returns:** The parent type as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). ______________________________________________________________________ ### function getParentTypeName *Returns the parent type name.* ```C++ std::string SBCMetaValue::getParentTypeName () const ``` Returns the type name of the parent type of `T`. This function returns the type name of the parent type of `T`. For example, the parent type name of `int*` is "int". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparenttype). **See also:** [**SBCMetaValue::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparenttype), [**SBCMetaValue::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getroottypename) **Returns:** The parent type name as a string, or an empty string if the value is invalid. ______________________________________________________________________ ### function getProxy *Returns the proxy of the value.* ```C++ virtual SBCClassProxy * SBCMetaValue::getProxy () const ``` Returns the proxy object associated with the value, if any. This function returns the proxy of the underlying value. If the value does not have an associated proxy, nullptr is returned. **Returns:** Pointer to the [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) associated with the value, or nullptr if none. ______________________________________________________________________ ### function getRootType *Returns the root type.* ```C++ SBCMetaValue SBCMetaValue::getRootType () const ``` Returns the root type of this type. This function returns the root type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the root type of this type. For example, the root type of `const std::string&` is `std::string`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValue::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getroottypename). **See also:** [**SBCMetaValue::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getroottypename) **Returns:** The root type as an [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md). ______________________________________________________________________ ### function getRootTypeName *Returns the root type name.* ```C++ std::string SBCMetaValue::getRootTypeName () const ``` Returns the type name of the root type of `T`. This function returns the type name of the root type of `T`. For example, the root type name of `const std::string&` is "std::string". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getroottype). **See also:** [**SBCMetaValue::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getroottype), [**SBCMetaValue::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparenttypename) **Returns:** The root type name as a string, or an empty string if the value is invalid. ______________________________________________________________________ ### function getShortBaseTypeName *Returns the short base type name.* ```C++ std::string SBCMetaValue::getShortBaseTypeName () const ``` Returns the short type name of the base type of `T`. This function returns the short type name of the base type of `T`. For example, the short base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBNode". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getbasetype). **See also:** [**SBCMetaValue::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getbasetype) **Returns:** The short base type name as a std::string. ______________________________________________________________________ ### function getShortClassTypeName *Returns the short class type name.* ```C++ std::string SBCMetaValue::getShortClassTypeName () const ``` Returns the short type name of the class associated to `T` when it is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the short class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getclasstype). **See also:** [**SBCMetaValue::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getclasstype) **Returns:** The short class type name as a std::string. ______________________________________________________________________ ### function getShortOutputTypeName *Returns the short output type name.* ```C++ std::string SBCMetaValue::getShortOutputTypeName () const ``` Returns the short type name of the output type of `T` when it is a function. This function returns the short type name of the output type of `T`, when `T` is a function. For example, the short output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBAtom". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getoutputtype). **See also:** [**SBCMetaValue::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getoutputtype) **Returns:** The short output type name as a std::string. ______________________________________________________________________ ### function getShortParameterTypeName *Returns the short type name of parameter* `i` *.* ```C++ std::string SBCMetaValue::getShortParameterTypeName ( unsigned int i ) const ``` Returns the short type name of parameter `i` of type `T` when it is a function ("void" otherwise). For example, the short type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparametertype). **See also:** [**SBCMetaValue::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparametertype) **Parameters:** - `i` Index of the parameter whose type name is requested. **Returns:** The short type name of the requested parameter as a std::string. ______________________________________________________________________ ### function getShortParentTypeName *Returns the short parent type name.* ```C++ std::string SBCMetaValue::getShortParentTypeName () const ``` Returns the short type name of the parent type of `T`. This function returns the short type name of the parent type of `T`. For example, the short parent type name of `SBMStructuralModelNodeAtom*` is "SBAtom". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparenttype). **See also:** [**SBCMetaValue::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getparenttype), [**SBCMetaValue::getShortRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getshortroottypename) **Returns:** The short parent type name as a string, or an empty string if the value is invalid. ______________________________________________________________________ ### function getShortRootTypeName *Returns the short root type name.* ```C++ std::string SBCMetaValue::getShortRootTypeName () const ``` Returns the short type name of the root type of `T`. This function returns the type name of the root type of `T`. For example, the short root type name of `const SBMStructuralModelNodeAtom &` is "SBAtom". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValue::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getroottype). **See also:** [**SBCMetaValue::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getroottype), [**SBCMetaValue::getShortParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/#function-getshortparenttypename) **Returns:** The short root type name as a string, or an empty string if the value is invalid. ______________________________________________________________________ ### function getShortTypeName *Returns the short type name.* ```C++ std::string SBCMetaValue::getShortTypeName () const ``` Returns the short type name of the held value. When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its short type name. Else, this function recursively decomposes the type in order to provide a string describing it, but using short names (e.g. "const SBAtom\*"). **Returns:** The short type name as a string, or an empty string if the value is invalid. ______________________________________________________________________ ### function getSize *Returns the size of attribute* `attributeName` *in the value when relevant.* ```C++ virtual unsigned int SBCMetaValue::getSize ( const std::string & attributeName ) const ``` Retrieves the size of the specified attribute in the value. This function returns the size of attribute `attributeName` in the value when relevant. **Parameters:** - `attributeName` Name of the attribute whose size is requested. **Returns:** The size of the attribute as an unsigned int. Returns 0 if the attribute does not have a size or does not exist. ______________________________________________________________________ ### function getTypeName *Returns the type name.* ```C++ std::string SBCMetaValue::getTypeName () const ``` Returns the full type name of the held value. When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its type name. Else, this function recursively decomposes the type in order to provide a string describing it (e.g. "const SBMStructuralModelNodeAtom\*"). **Returns:** The type name as a string, or an empty string if the value is invalid. ______________________________________________________________________ ### function getTypeUUID *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* ```C++ SBCContainerUUID SBCMetaValue::getTypeUUID () const ``` Returns the UUID associated with the type if it is registered. If the type is registered (via `SB_REGISTER_TYPE`), this function returns the associated [**UUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md). Else, the function returns an invalid [**UUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md). **Returns:** The type UUID if registered, otherwise an invalid UUID. ______________________________________________________________________ ### function getValue *Returns the value.* ```C++ SBCMetaValueBase * SBCMetaValue::getValue () noexcept const ``` Returns the pointer to the held [**value base**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md). This function returns the pointer to the held [**value base**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md). **Returns:** Pointer to the value base, or nullptr if no value is held. ______________________________________________________________________ ### function has *Returns whether attribute* `attributeName` *exists in the value and has a value.* ```C++ virtual bool SBCMetaValue::has ( const std::string & attributeName ) const ``` Checks whether the specified attribute exists and has a value. This function returns whether attribute `attributeName` exists in the value and has a value. **Parameters:** - `attributeName` Name of the attribute to check. **Returns:** `true` if the attribute exists and has a value; otherwise `false`. Checks if the value has the specified attribute. ______________________________________________________________________ ### function hasBaseType *Returns* `true` *if the value is of a type that has a base type.* ```C++ bool SBCMetaValue::hasBaseType () const ``` Checks whether the held value's type has a base type. **Returns:** `true` if the value exists and its type has a base type; otherwise `false`. ______________________________________________________________________ ### function isArrayType *Returns* `true` *if the value is of an array type.* ```C++ bool SBCMetaValue::isArrayType () const ``` Checks whether the held value is an array type. **Returns:** `true` if the value exists and its type is an array; otherwise `false`. ______________________________________________________________________ ### function isClassType *Returns* `true` *if the value is of a class type.* ```C++ bool SBCMetaValue::isClassType () const ``` Checks whether the held value is of a class type. **Returns:** `true` if the value exists and its type is a class; otherwise `false`. ______________________________________________________________________ ### function isConstType *Returns* `true` *if the value is of a const type.* ```C++ bool SBCMetaValue::isConstType () const ``` Checks whether the held value is a const-qualified type. **Returns:** `true` if the value exists and its type is const-qualified; otherwise `false`. ______________________________________________________________________ ### function isEnumType *Returns* `true` *if the value is of an enum type.* ```C++ bool SBCMetaValue::isEnumType () const ``` Checks whether the held value is of an enumeration type. **Returns:** `true` if the value exists and its type is an enumeration; otherwise `false`. ______________________________________________________________________ ### function isFunctionType *Returns* `true` *if the value is of a function type.* ```C++ bool SBCMetaValue::isFunctionType () const ``` Checks whether the held value is a function type. **Returns:** `true` if the value exists and its type is a function; otherwise `false`. ______________________________________________________________________ ### function isFundamentalType *Returns* `true` *if the value is of a fundamental type.* ```C++ bool SBCMetaValue::isFundamentalType () const ``` Checks whether the held value is of a fundamental type. Returns true if the value is of a fundamental type (void, bool, char, signed char, unsigned char, wchar_t, short, unsigned short, int, unsigned int, long, unsigned long, float, double or long double). **Returns:** `true` if the value exists and its type is a fundamental type; otherwise `false`. ______________________________________________________________________ ### function isPointerToFunctionType *Returns* `true` *if the value is of a pointer to function type.* ```C++ bool SBCMetaValue::isPointerToFunctionType () const ``` Checks whether the held value is a pointer-to-function type. **Returns:** `true` if the value exists and its type is a pointer to function; otherwise `false`. ______________________________________________________________________ ### function isPointerToMemberFunctionType *Returns* `true` *if the value is of a pointer to member function type.* ```C++ bool SBCMetaValue::isPointerToMemberFunctionType () const ``` Checks whether the held value is a pointer-to-member-function type. **Returns:** `true` if the value exists and its type is a pointer to member function; otherwise `false`. ______________________________________________________________________ ### function isPointerToMemberType *Returns* `true` *if the value is of a pointer to member type.* ```C++ bool SBCMetaValue::isPointerToMemberType () const ``` Checks whether the held value is a pointer-to-member type. **Returns:** `true` if the value exists and its type is a pointer to member; otherwise `false`. ______________________________________________________________________ ### function isPointerType *Returns* `true` *if the value is of a pointer type.* ```C++ bool SBCMetaValue::isPointerType () const ``` Checks whether the held value is a pointer type. **Returns:** `true` if the value exists and its type is a pointer; otherwise `false`. ______________________________________________________________________ ### function isReferenceType *Returns* `true` *if the value is of a reference type.* ```C++ bool SBCMetaValue::isReferenceType () const ``` Checks whether the held value is a reference type. **Returns:** `true` if the value exists and its type is a reference; otherwise `false`. ______________________________________________________________________ ### function isRegisteredType *Returns* `true` *if the value is of a registered type.* ```C++ bool SBCMetaValue::isRegisteredType () const ``` Checks whether the held value is of a registered type. Registered types are those that have been declared with the [**SAMSON**](https://documentation.samson-connect.net/developers/latest/api/classSAMSON/index.md) registration mechanism. **Returns:** `true` if the value exists and its type is registered; otherwise `false`. ______________________________________________________________________ ### function isValid *Returns whether the value is valid and can be dereferenced with* `getValue` *.* ```C++ bool SBCMetaValue::isValid () noexcept const ``` Checks whether the value is valid and can be dereferenced with `getValue`. This function returns whether the value is valid and can be dereferenced with `getValue`. **Returns:** `true` if the value is valid, `false` otherwise. ______________________________________________________________________ ### function isVolatileType *Returns* `true` *if the value is of a volatile type.* ```C++ bool SBCMetaValue::isVolatileType () const ``` Checks whether the held value is a volatile-qualified type. **Returns:** `true` if the value exists and its type is volatile-qualified; otherwise `false`. ______________________________________________________________________ ### function operator U ```C++ template inline SBCMetaValue::operator U () const ``` ______________________________________________________________________ ### function operator= *Assignment operator.* ```C++ SBCMetaValue & SBCMetaValue::operator= ( const SBCMetaValue & value ) ``` Assigns the content of another [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) to this instance. If the current instance holds a value, it is deleted before copying the value from the source. The source value is cloned if it is valid; otherwise this instance becomes empty. **Parameters:** - `value` The source [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) to assign from. **Returns:** Reference to this [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) after assignment. ______________________________________________________________________ ### function set *Sets the value of attribute* `attributeName` *for this value to*`value` *.* ```C++ virtual void SBCMetaValue::set ( const std::string & attributeName, const SBCMetaValue & value, const SBCMetaValue & size=0 ) const ``` Sets the value of the specified attribute. This function sets the value of attribute `attributeName` for this value to `value`, optionally specifying a size. **Parameters:** - `attributeName` Name of the attribute to set. - `value` The new value to assign to the attribute. - `size` Optional size parameter for the attribute (default is an empty [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md)). ______________________________________________________________________ ### function ~SBCMetaValue *Destructs the value.* ```C++ SBCMetaValue::~SBCMetaValue () ``` Destroys the [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) and releases any held value. If the instance holds a value, the value is deleted. The internal pointer is set to nullptr. ______________________________________________________________________ ## Public Static Functions Documentation ### function buildType ```C++ template static inline SBCMetaValue SBCMetaValue::buildType () ``` ______________________________________________________________________ ### function buildValue [1/2] ```C++ static inline SBCMetaValue SBCMetaValue::buildValue () ``` ______________________________________________________________________ ### function buildValue [2/2] ```C++ template static inline SBCMetaValue SBCMetaValue::buildValue ( U u ) ``` ______________________________________________________________________ ### function canCastFrom ```C++ template static inline bool SBCMetaValue::canCastFrom ( const SBCMetaValue & fromValue ) ``` ______________________________________________________________________ ### function castFrom ```C++ template static inline U SBCMetaValue::castFrom ( const SBCMetaValue & fromValue ) ``` ______________________________________________________________________ # SBValueBase # Class SBCMetaValueBase [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) *This class is the base class of value holders.* [More...](#detailed-description) - `#include ` Inherited by the following classes: [SBCMetaValueType](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), [SBCMetaValueType](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**call**](#function-call) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15) const *Calls the function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual void | [**clear**](#function-clear) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Clears attribute* `attributeName` *from the value when possible.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**clone**](#function-clone) () const *Clones the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**constCall**](#function-constcall) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15) const *Calls the const function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**get**](#function-get) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the value of attribute* `attributeName` *for this value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getBaseType**](#function-getbasetype) () const *Returns the base type.* | | virtual std::string | [**getBaseTypeName**](#function-getbasetypename) () const *Returns the base type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getClassType**](#function-getclasstype) () const *Returns the class type.* | | virtual std::string | [**getClassTypeName**](#function-getclasstypename) () const *Returns the class type name.* | | virtual unsigned int | [**getNumberOfParameters**](#function-getnumberofparameters) () const *Returns the number of parameters of a function type.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getOutputType**](#function-getoutputtype) () const *Returns the output type.* | | virtual std::string | [**getOutputTypeName**](#function-getoutputtypename) () const *Returns the output type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParameterType**](#function-getparametertype) (unsigned int i) const *Returns the type of parameter* `i` *.* | | virtual std::string | [**getParameterTypeName**](#function-getparametertypename) (unsigned int i) const *Returns the type name of parameter* `i` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParentType**](#function-getparenttype) () const *Returns the parent type.* | | virtual std::string | [**getParentTypeName**](#function-getparenttypename) () const *Returns the parent type name.* | | virtual [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \* | [**getProxy**](#function-getproxy) () const *Returns the proxy of the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getRootType**](#function-getroottype) () const *Returns the root type.* | | virtual std::string | [**getRootTypeName**](#function-getroottypename) () const *Returns the root type name.* | | virtual std::string | [**getShortBaseTypeName**](#function-getshortbasetypename) () const *Returns the short base type name.* | | virtual std::string | [**getShortClassTypeName**](#function-getshortclasstypename) () const *Returns the short class type name.* | | virtual std::string | [**getShortOutputTypeName**](#function-getshortoutputtypename) () const *Returns the short output type name.* | | virtual std::string | [**getShortParameterTypeName**](#function-getshortparametertypename) (unsigned int i) const *Returns the short type name of parameter* `i` *.* | | virtual std::string | [**getShortParentTypeName**](#function-getshortparenttypename) () const *Returns the short parent type name.* | | virtual std::string | [**getShortRootTypeName**](#function-getshortroottypename) () const *Returns the short root type name.* | | virtual std::string | [**getShortTypeName**](#function-getshorttypename) () const *Returns the short type name.* | | virtual unsigned int | [**getSize**](#function-getsize) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the size of attribute* `attributeName` *in the value when relevant.* | | virtual std::string | [**getTypeName**](#function-gettypename) () const *Returns the type name.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getTypeUUID**](#function-gettypeuuid) () const *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* | | virtual bool | [**has**](#function-has) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns whether attribute* `attributeName` *exists in the value and has a value.* | | virtual bool | [**hasBaseType**](#function-hasbasetype) () const *Returns* `true` *if the value is of a type that has a base type.* | | virtual bool | [**isArrayType**](#function-isarraytype) () const *Returns* `true` *if the value is of an array type.* | | virtual bool | [**isClassType**](#function-isclasstype) () const *Returns* `true` *if the value is of a class type.* | | virtual bool | [**isConstType**](#function-isconsttype) () const *Returns* `true` *if the value is of a const type.* | | virtual bool | [**isEnumType**](#function-isenumtype) () const *Returns* `true` *if the value is of an enum type.* | | virtual bool | [**isFunctionType**](#function-isfunctiontype) () const *Returns* `true` *if the value is of a function type.* | | virtual bool | [**isFundamentalType**](#function-isfundamentaltype) () const *Returns* `true` *if the value is of a fundamental type.* | | virtual bool | [**isPointerToFunctionType**](#function-ispointertofunctiontype) () const *Returns* `true` *if the value is of a pointer to function type.* | | virtual bool | [**isPointerToMemberFunctionType**](#function-ispointertomemberfunctiontype) () const *Returns* `true` *if the value is of a pointer to member function type.* | | virtual bool | [**isPointerToMemberType**](#function-ispointertomembertype) () const *Returns* `true` *if the value is of a pointer to member type.* | | virtual bool | [**isPointerType**](#function-ispointertype) () const *Returns* `true` *if the value is of a pointer type.* | | virtual bool | [**isReferenceType**](#function-isreferencetype) () const *Returns* `true` *if the value is of a reference type.* | | virtual bool | [**isRegisteredType**](#function-isregisteredtype) () const *Returns* `true` *if the value is of a registered type.* | | virtual bool | [**isVolatileType**](#function-isvolatiletype) () const *Returns* `true` *if the value is of a volatile type.* | | virtual void | [**set**](#function-set) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & size) const *Sets the value of attribute* `attributeName` *for this value to*`value` *.* | | virtual | [**~SBCMetaValueBase**](#function-sbcmetavaluebase) () *Destructs the value.* | ## Protected Functions | Type | Name | | ---- | --------------------------------------------------------------------------- | | | [**SBCMetaValueBase**](#function-sbcmetavaluebase) () *Constructs a value.* | ## Detailed Description This class is the base class of value holders, and a key component of the introspection mechanism. In particular, it is the direct base class of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), used to contain type information, which is itself the direct base class of the template class [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md), used to hold values. Assume a SAMSON Extension called `SEElement` defines a class `A`, and another Extension called `SEOtherElement` wants to use it. If the Extension called `SEOtherElement` does not have access to the declaration of class `A` (typically provided in a header file included in `SEElement`), it cannot use the symbol `A` in its source code. For example, if the source code of `SEOtherElement` contained the line: ```C++ A* a = new A(); ``` the compiler would complain that the symbol `A` is not defined. In order to provide access to exposed classes, SAMSON uses a mechanism to *hold values* (for example, pointers to objects) in a uniform way. In the example above, the constructor exposed in the Extension `SEElement` returns a [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) that stores a pointer to the new instance of class `A`: ```C++ return new SBValueHolder(new A()); ``` and the Extension `SEOtherElement` sees it as an SBValue that stores this [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) as a pointer to a [**SBValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) (the base class of `SBValueHolder`): ```C++ SBValue classInstance = classProxy->createInstance(); ``` This class is able to provide information about a [**held type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) or a [**held value**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md). **Short name**: SBValueBase **See also:** [**SBCMetaType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaType/index.md), [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) ## Public Functions Documentation ### function call *Calls the function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::call ( const SBCMetaValue & object, const std::string & functionName, const SBCMetaValue & t0, const SBCMetaValue & t1, const SBCMetaValue & t2, const SBCMetaValue & t3, const SBCMetaValue & t4, const SBCMetaValue & t5, const SBCMetaValue & t6, const SBCMetaValue & t7, const SBCMetaValue & t8, const SBCMetaValue & t9, const SBCMetaValue & t10, const SBCMetaValue & t11, const SBCMetaValue & t12, const SBCMetaValue & t13, const SBCMetaValue & t14, const SBCMetaValue & t15 ) const ``` Calls a function on the given object. This function invokes the member function identified by `functionName` on `object`, passing up to sixteen arguments (`t0`-`t15`). If fewer arguments are needed, the remaining arguments are ignored. **Parameters:** - `object` The `SBCMetaValue` representing the object on which the function is called. - `functionName` Name of the function to invoke. - `t0` Argument 0 to pass to the function. - `t1` Argument 1 to pass to the function. - `t2` Argument 2 to pass to the function. - `t3` Argument 3 to pass to the function. - `t4` Argument 4 to pass to the function. - `t5` Argument 5 to pass to the function. - `t6` Argument 6 to pass to the function. - `t7` Argument 7 to pass to the function. - `t8` Argument 8 to pass to the function. - `t9` Argument 9 to pass to the function. - `t10` Argument 10 to pass to the function. - `t11` Argument 11 to pass to the function. - `t12` Argument 12 to pass to the function. - `t13` Argument 13 to pass to the function. - `t14` Argument 14 to pass to the function. - `t15` Argument 15 to pass to the function. **Returns:** Pointer to a `SBCMetaValueBase` representing the result of the call, or `nullptr` if the call fails. ______________________________________________________________________ ### function clear *Clears attribute* `attributeName` *from the value when possible.* ```C++ virtual void SBCMetaValueBase::clear ( const SBCMetaValue & object, const std::string & attributeName ) const ``` Clears the specified attribute from the given object, if possible. This function removes the attribute identified by `attributeName` from `object` when the operation is supported. **Parameters:** - `object` The object from which to clear the attribute. - `attributeName` Name of the attribute to clear. ______________________________________________________________________ ### function clone *Clones the value.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::clone () const ``` Creates a clone of this value. The returned object is a new heap-allocated instance that is a copy of the current object. Ownership of the returned pointer is transferred to the caller. **Returns:** Pointer to a new `SBCMetaValueBase` that is a clone of this object. ______________________________________________________________________ ### function constCall *Calls the const function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::constCall ( const SBCMetaValue & object, const std::string & functionName, const SBCMetaValue & t0, const SBCMetaValue & t1, const SBCMetaValue & t2, const SBCMetaValue & t3, const SBCMetaValue & t4, const SBCMetaValue & t5, const SBCMetaValue & t6, const SBCMetaValue & t7, const SBCMetaValue & t8, const SBCMetaValue & t9, const SBCMetaValue & t10, const SBCMetaValue & t11, const SBCMetaValue & t12, const SBCMetaValue & t13, const SBCMetaValue & t14, const SBCMetaValue & t15 ) const ``` Calls a const member function on the given object. This function invokes the const member function identified by `functionName` on `object`, passing up to sixteen arguments (`t0`-`t15`). The called function does not modify the object. **Parameters:** - `object` The `SBCMetaValue` representing the object on which the const function is called. - `functionName` Name of the const function to invoke. - `t0` Argument 0 to pass to the function. - `t1` Argument 1 to pass to the function. - `t2` Argument 2 to pass to the function. - `t3` Argument 3 to pass to the function. - `t4` Argument 4 to pass to the function. - `t5` Argument 5 to pass to the function. - `t6` Argument 6 to pass to the function. - `t7` Argument 7 to pass to the function. - `t8` Argument 8 to pass to the function. - `t9` Argument 9 to pass to the function. - `t10` Argument 10 to pass to the function. - `t11` Argument 11 to pass to the function. - `t12` Argument 12 to pass to the function. - `t13` Argument 13 to pass to the function. - `t14` Argument 14 to pass to the function. - `t15` Argument 15 to pass to the function. **Returns:** Pointer to a `SBCMetaValueBase` representing the result of the const call, or `nullptr` if the call fails. ______________________________________________________________________ ### function get *Returns the value of attribute* `attributeName` *for this value.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::get ( const SBCMetaValue & object, const std::string & attributeName ) const ``` Retrieves the value of an attribute from the given object. This function obtains the value of the attribute identified by `attributeName` from `object`. **Parameters:** - `object` The object from which to retrieve the attribute. - `attributeName` Name of the attribute to retrieve. **Returns:** Pointer to a `SBCMetaValueBase` containing the attribute's value, or `nullptr` if the attribute does not exist or cannot be retrieved. ______________________________________________________________________ ### function getBaseType *Returns the base type.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::getBaseType () const ``` Returns the base type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the base type of this type. For example, the base type of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is [**SBMStructuralModelNode**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNode/index.md). Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueBase::getBaseTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetypename). **Returns:** Pointer to the base type, or `nullptr` if not applicable. **See also:** [**SBCMetaValueBase::getBaseTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetypename) ______________________________________________________________________ ### function getBaseTypeName *Returns the base type name.* ```C++ virtual std::string SBCMetaValueBase::getBaseTypeName () const ``` This function returns the type name of the base type of `T`. For example, the base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBMStructuralModelNode". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueBase::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype). **Returns:** the base type name as a string. **See also:** [**SBCMetaValueBase::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype) ______________________________________________________________________ ### function getClassType *Returns the class type.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::getClassType () const ``` Returns the class type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the class type of this type, when the type is a pointer to a member or a pointer to a member function. For example, the class type name of `& SBMStructuralModelNodeAtom::clearName` is `SBMStructuralModelNodeAtom`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueBase::getClassTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstypename). **Returns:** Pointer to the class type, or `nullptr` if not applicable. **See also:** [**SBCMetaValueBase::getClassTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstypename) ______________________________________________________________________ ### function getClassTypeName *Returns the class type name.* ```C++ virtual std::string SBCMetaValueBase::getClassTypeName () const ``` This function returns the type name of the class associated to `T`, when `T` is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBMStructuralModelNodeAtom". Note that this function returns a string. If a [**SBCMetaValueBase::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype) is needed, use [**SBCMetaValueBase::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype). **Returns:** the class type name as a string. **See also:** [**SBCMetaValueBase::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype) ______________________________________________________________________ ### function getNumberOfParameters *Returns the number of parameters of a function type.* ```C++ virtual unsigned int SBCMetaValueBase::getNumberOfParameters () const ``` **Returns:** the number of parameters. ______________________________________________________________________ ### function getOutputType *Returns the output type.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::getOutputType () const ``` Returns the output type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the output type of this type, when the type is a function. For example, the output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md). Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueBase::getOutputTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtypename). **Returns:** Pointer to the output type, or `nullptr` if not applicable. **See also:** [**SBCMetaValueBase::getOutputTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtypename) ______________________________________________________________________ ### function getOutputTypeName *Returns the output type name.* ```C++ virtual std::string SBCMetaValueBase::getOutputTypeName () const ``` This function returns the type name of the output type of `T`, when `T` is a function. For example, the output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBMStructuralModelNodeAtom\*". Note that this function returns a string. If a [**SBCMetaValueBase::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype) is needed, use [**SBCMetaValueBase::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype). **Returns:** the output type name as a string. **See also:** [**SBCMetaValueBase::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype) ______________________________________________________________________ ### function getParameterType *Returns the type of parameter* `i` *.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::getParameterType ( unsigned int i ) const ``` This function returns the type of parameter `i`, , i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the type of parameter `i`, when the type is a function. For example, the type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is `const SBMStructuralModelNodeAtom*`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueBase::getParameterTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertypename). **Parameters:** - `i` Index of the parameter whose type is requested. **Returns:** Pointer to the parameter type, or `nullptr` if not applicable. **See also:** [**SBCMetaValueBase::getParameterTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertypename) ______________________________________________________________________ ### function getParameterTypeName *Returns the type name of parameter* `i` *.* ```C++ virtual std::string SBCMetaValueBase::getParameterTypeName ( unsigned int i ) const ``` This function returns the type name of parameter `i` of type `T`, when `T` is a function ("void" otherwise). For example, the type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBMStructuralModelNodeAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueBase::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertype). **Parameters:** - `i` Index of the parameter. **Returns:** the type name of the specified parameter as a string. **See also:** [**SBCMetaValueBase::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertype) ______________________________________________________________________ ### function getParentType *Returns the parent type.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::getParentType () const ``` Returns the parent type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the parent type of this type. For example, the parent type of `int*` is `int`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueBase::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttypename). **Returns:** Pointer to the parent type, or `nullptr` if not applicable. **See also:** [**SBCMetaValueBase::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttypename) ______________________________________________________________________ ### function getParentTypeName *Returns the parent type name.* ```C++ virtual std::string SBCMetaValueBase::getParentTypeName () const ``` This function returns the type name of the parent type of `T`. For example, the parent type name of `int*` is "int". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueBase::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype). **Returns:** the parent type name as a string. **See also:** [**SBCMetaValueBase::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype) **See also:** [**SBCMetaValueBase::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottypename) ______________________________________________________________________ ### function getProxy *Returns the proxy of the value.* ```C++ virtual SBCClassProxy * SBCMetaValueBase::getProxy () const ``` Retrieves the proxy associated with this value. The proxy provides access to class-specific operations. If no proxy is associated, `nullptr` is returned. **Returns:** Pointer to the `SBCClassProxy` for this value, or `nullptr` if none. ______________________________________________________________________ ### function getRootType *Returns the root type.* ```C++ virtual SBCMetaValueBase * SBCMetaValueBase::getRootType () const ``` Returns the root type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the root type of this type. For example, the root type of `const std::string&` is `std::string`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueBase::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottypename). **Returns:** Pointer to the root type, or `nullptr` if not applicable. **See also:** [**SBCMetaValueBase::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottypename) ______________________________________________________________________ ### function getRootTypeName *Returns the root type name.* ```C++ virtual std::string SBCMetaValueBase::getRootTypeName () const ``` This function returns the type name of the root type of `T`. For example, the root type name of `const std::string&` is "std::string". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueBase::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype). **Returns:** the root type name as a string. **See also:** [**SBCMetaValueBase::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype) **See also:** [**SBCMetaValueBase::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttypename) ______________________________________________________________________ ### function getShortBaseTypeName *Returns the short base type name.* ```C++ virtual std::string SBCMetaValueBase::getShortBaseTypeName () const ``` This function returns the short type name of the base type of `T`. For example, the short base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBNode". Note that this function returns a string. If a [**SBCMetaValueBase::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype) is needed, use [**SBCMetaValueBase::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype). **Returns:** the short base type name as a string. **See also:** [**SBCMetaValueBase::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype) ______________________________________________________________________ ### function getShortClassTypeName *Returns the short class type name.* ```C++ virtual std::string SBCMetaValueBase::getShortClassTypeName () const ``` This function returns the short type name of the class associated to `T`, when `T` is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the short class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBAtom\*". Note that this function returns a string. If a [**SBCMetaValueBase::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype) is needed, use [**SBCMetaValueBase::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype). **Returns:** the short class type name as a string. **See also:** [**SBCMetaValueBase::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype) ______________________________________________________________________ ### function getShortOutputTypeName *Returns the short output type name.* ```C++ virtual std::string SBCMetaValueBase::getShortOutputTypeName () const ``` This function returns the short type name of the output type of `T`, when `T` is a function. For example, the short output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBAtom". Note that this function returns a string. If a [**SBCMetaValueBase::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype) is needed, use [**SBCMetaValueBase::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype). **Returns:** the short output type name as a string. **See also:** [**SBCMetaValueBase::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype) ______________________________________________________________________ ### function getShortParameterTypeName *Returns the short type name of parameter* `i` *.* ```C++ virtual std::string SBCMetaValueBase::getShortParameterTypeName ( unsigned int i ) const ``` Returns the short type name of parameter `i` of type `T`, when `T` is a function ("void" otherwise). For example, the short type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueBase::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertype). **Parameters:** - `i` Index of the parameter whose short type name is requested. **Returns:** The short type name as a `std::string`. **See also:** [**SBCMetaValueBase::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertype) ______________________________________________________________________ ### function getShortParentTypeName *Returns the short parent type name.* ```C++ virtual std::string SBCMetaValueBase::getShortParentTypeName () const ``` This function returns the short type name of the parent type of `T`. For example, the short parent type name of `SBMStructuralModelNodeAtom*` is "SBAtom". Note that this function returns a string. If a [**SBCMetaValueBase::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype) is needed, use [**SBCMetaValueBase::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype). **Returns:** the short parent type name as a string. **See also:** [**SBCMetaValueBase::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype) **See also:** [**SBCMetaValueBase::getShortRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortroottypename) ______________________________________________________________________ ### function getShortRootTypeName *Returns the short root type name.* ```C++ virtual std::string SBCMetaValueBase::getShortRootTypeName () const ``` This function returns the short type name of the root type of `T`. For example, the short root type name of `const SBMStructuralModelNodeAtom &` is "SBAtom". Note that this function returns a string. If a [**SBCMetaValueBase::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype) is needed, use [**SBCMetaValueBase::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype). **Returns:** the short root type name as a string. **See also:** [**SBCMetaValueBase::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype) **See also:** [**SBCMetaValueBase::getShortParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortparenttypename) ______________________________________________________________________ ### function getShortTypeName *Returns the short type name.* ```C++ virtual std::string SBCMetaValueBase::getShortTypeName () const ``` When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its short type name. Else, this function recursively decomposes the type in order to provide a string describing it, but using short names (e.g. "const SBAtom\*"). **Returns:** the short type name as a string. ______________________________________________________________________ ### function getSize *Returns the size of attribute* `attributeName` *in the value when relevant.* ```C++ virtual unsigned int SBCMetaValueBase::getSize ( const SBCMetaValue & object, const std::string & attributeName ) const ``` Retrieves the size of a specified attribute in the given object. This function returns the size (e.g., number of elements) of the attribute identified by `attributeName` in `object`, when such a size is relevant. **Parameters:** - `object` The object containing the attribute. - `attributeName` Name of the attribute whose size is queried. **Returns:** The size of the attribute, or `0` if the size is not applicable. ______________________________________________________________________ ### function getTypeName *Returns the type name.* ```C++ virtual std::string SBCMetaValueBase::getTypeName () const ``` When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its type name. Else, this function recursively decomposes the type in order to provide a string describing it (e.g. "const SBMStructuralModelNodeAtom\*"). **Returns:** the type name as a string. ______________________________________________________________________ ### function getTypeUUID *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* ```C++ virtual SBCContainerUUID SBCMetaValueBase::getTypeUUID () const ``` Retrieves the UUID of the type if it is registered. If the type is registered (via `SB_REGISTER_TYPE`), this function returns the associated [**UUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md). Else, the function returns an invalid [**UUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md). **Returns:** The type's `SBCContainerUUID`, or an invalid UUID if the type is not registered. ______________________________________________________________________ ### function has *Returns whether attribute* `attributeName` *exists in the value and has a value.* ```C++ virtual bool SBCMetaValueBase::has ( const SBCMetaValue & object, const std::string & attributeName ) const ``` Checks whether the given object has a specified attribute. This function determines if `attributeName` exists in `object` and has a value. **Parameters:** - `object` The object to query. - `attributeName` Name of the attribute to check. **Returns:** `true` if the attribute exists and has a value; otherwise `false`. ______________________________________________________________________ ### function hasBaseType *Returns* `true` *if the value is of a type that has a base type.* ```C++ virtual bool SBCMetaValueBase::hasBaseType () const ``` Returns true if the value is of a type that has a base type. **Returns:** `true` if the value has a base type, `false` otherwise. ______________________________________________________________________ ### function isArrayType *Returns* `true` *if the value is of an array type.* ```C++ virtual bool SBCMetaValueBase::isArrayType () const ``` Returns true if the value is of an array type. **Returns:** `true` if the value is of an array type, `false` otherwise. ______________________________________________________________________ ### function isClassType *Returns* `true` *if the value is of a class type.* ```C++ virtual bool SBCMetaValueBase::isClassType () const ``` Returns true if the value is of a class type. **Returns:** `true` if the value is of a class type, `false` otherwise. ______________________________________________________________________ ### function isConstType *Returns* `true` *if the value is of a const type.* ```C++ virtual bool SBCMetaValueBase::isConstType () const ``` Returns true if the value is of a const type. **Returns:** `true` if the value is of a const type, `false` otherwise. ______________________________________________________________________ ### function isEnumType *Returns* `true` *if the value is of an enum type.* ```C++ virtual bool SBCMetaValueBase::isEnumType () const ``` Returns true if the value is of an enum type. **Returns:** `true` if the value is of an enum type, `false` otherwise. ______________________________________________________________________ ### function isFunctionType *Returns* `true` *if the value is of a function type.* ```C++ virtual bool SBCMetaValueBase::isFunctionType () const ``` Returns true if the value is of a function type. **Returns:** `true` if the value is of a function type, `false` otherwise. ______________________________________________________________________ ### function isFundamentalType *Returns* `true` *if the value is of a fundamental type.* ```C++ virtual bool SBCMetaValueBase::isFundamentalType () const ``` Returns true if the value is of a fundamental type (void, bool, char, signed char, unsigned char, wchar_t, short, unsigned short, int, unsigned int, long, unsigned long, float, double or long double). **Returns:** `true` if the value is of a fundamental type, `false` otherwise. ______________________________________________________________________ ### function isPointerToFunctionType *Returns* `true` *if the value is of a pointer to function type.* ```C++ virtual bool SBCMetaValueBase::isPointerToFunctionType () const ``` Returns true if the value is of a pointer to function type. **Returns:** `true` if the value is of a pointer to function type, `false` otherwise. ______________________________________________________________________ ### function isPointerToMemberFunctionType *Returns* `true` *if the value is of a pointer to member function type.* ```C++ virtual bool SBCMetaValueBase::isPointerToMemberFunctionType () const ``` Returns true if the value is of a pointer to member function type. **Returns:** `true` if the value is of a pointer to member function type, `false` otherwise. ______________________________________________________________________ ### function isPointerToMemberType *Returns* `true` *if the value is of a pointer to member type.* ```C++ virtual bool SBCMetaValueBase::isPointerToMemberType () const ``` Returns true if the value is of a pointer to member type. **Returns:** `true` if the value is of a pointer to member type, `false` otherwise. ______________________________________________________________________ ### function isPointerType *Returns* `true` *if the value is of a pointer type.* ```C++ virtual bool SBCMetaValueBase::isPointerType () const ``` Returns true if the value is of a pointer type. **Returns:** `true` if the value is of a pointer type, `false` otherwise. ______________________________________________________________________ ### function isReferenceType *Returns* `true` *if the value is of a reference type.* ```C++ virtual bool SBCMetaValueBase::isReferenceType () const ``` Returns true if the value is of a reference type. **Returns:** `true` if the value is of a reference type, `false` otherwise. ______________________________________________________________________ ### function isRegisteredType *Returns* `true` *if the value is of a registered type.* ```C++ virtual bool SBCMetaValueBase::isRegisteredType () const ``` Returns true if the value is of a registered type. **Returns:** `true` if the value is of a registered type, `false` otherwise. ______________________________________________________________________ ### function isVolatileType *Returns* `true` *if the value is of a volatile type.* ```C++ virtual bool SBCMetaValueBase::isVolatileType () const ``` Returns true if the value is of a volatile type. **Returns:** `true` if the value is of a volatile type, `false` otherwise. ______________________________________________________________________ ### function set *Sets the value of attribute* `attributeName` *for this value to*`value` *.* ```C++ virtual void SBCMetaValueBase::set ( const SBCMetaValue & object, const std::string & attributeName, const SBCMetaValue & value, const SBCMetaValue & size ) const ``` Sets the value of an attribute on the given object. This function assigns `value` to the attribute identified by `attributeName` on `object`. The optional `size` parameter may be used to specify the size for array-like attributes. **Parameters:** - `object` The object on which to set the attribute. - `attributeName` Name of the attribute to set. - `value` The new value to assign to the attribute. - `size` Optional size information for the attribute (e.g., for arrays). May be ignored if not applicable. ______________________________________________________________________ ### function ~SBCMetaValueBase *Destructs the value.* ```C++ virtual SBCMetaValueBase::~SBCMetaValueBase () ``` Destructor. Destructs the value. ______________________________________________________________________ ## Protected Functions Documentation ### function SBCMetaValueBase *Constructs a value.* ```C++ SBCMetaValueBase::SBCMetaValueBase () ``` ______________________________________________________________________ # SBValueHolder # Class SBCMetaValueHolder **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) *This template class describes a value holder.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCMetaValueType](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) Inherited by the following classes: [SBCClassObjectHolder::ProxyGetter< true, U >](https://documentation.samson-connect.net/developers/latest/api/classSBCClassObjectHolder_1_1ProxyGetter_3_01true_00_01U_01_4/index.md), [SBCClassObjectHolder](https://documentation.samson-connect.net/developers/latest/api/classSBCClassObjectHolder/index.md) ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------- | | | [**SBCMetaValueHolder**](#function-sbcmetavalueholder) (const T & v) *Constructs a value holder that holds value* `v` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**clone**](#function-clone) () const *Clones the value.* | | T const & | [**getConstReference**](#function-getconstreference) () const *Returns a const reference to the hold value.* | | T & | [**getReference**](#function-getreference) () *Returns a reference to the hold value.* | | T | [**getValue**](#function-getvalue-12) () const *Returns the hold value.* | | virtual | [**~SBCMetaValueHolder**](#function-sbcmetavalueholder) () *Destructs the value holder.* | ## Public Functions inherited from SBCMetaValueType See [SBCMetaValueType](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-sbcmetavaluetype) () *Constructs a type.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-clone) () const *Clones the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getBaseType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetype) () const *Returns the base type.* | | virtual std::string | [**getBaseTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetypename) () const *Returns the base type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getClassType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstype) () const *Returns the class type.* | | virtual std::string | [**getClassTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstypename) () const *Returns the class type name.* | | virtual unsigned int | [**getNumberOfParameters**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getnumberofparameters) () const *Returns the number of parameters of a function type.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getOutputType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtype) () const *Returns the output type.* | | virtual std::string | [**getOutputTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtypename) () const *Returns the output type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParameterType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertype) (unsigned int i) const *Returns the type of parameter* `i` *.* | | virtual std::string | [**getParameterTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertypename) (unsigned int i) const *Returns the type name of parameter* `i` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParentType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttype) () const *Returns the parent type.* | | virtual std::string | [**getParentTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttypename) () const *Returns the parent type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getRootType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottype) () const *Returns the root type.* | | virtual std::string | [**getRootTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottypename) () const *Returns the root type name.* | | virtual std::string | [**getShortBaseTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortbasetypename) () const *Returns the short base type name.* | | virtual std::string | [**getShortClassTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortclasstypename) () const *Returns the short class type name.* | | virtual std::string | [**getShortOutputTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortoutputtypename) () const *Returns the short output type name.* | | virtual std::string | [**getShortParameterTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortparametertypename) (unsigned int i) const *Returns the short type name of parameter* `i` *.* | | virtual std::string | [**getShortParentTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortparenttypename) () const *Returns the short parent type name.* | | virtual std::string | [**getShortRootTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortroottypename) () const *Returns the short root type name.* | | virtual std::string | [**getShortTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshorttypename) () const *Returns the short type name.* | | virtual std::string | [**getTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-gettypename) () const *Returns the type name.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getTypeUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-gettypeuuid) () const *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* | | virtual bool | [**hasBaseType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-hasbasetype) () const *Returns true if the value is of a type that has a base type.* | | virtual bool | [**isArrayType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isarraytype) () const *Returns true if the value is of an array type.* | | virtual bool | [**isClassType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isclasstype) () const *Returns true if the value is of a class type.* | | virtual bool | [**isConstType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isconsttype) () const *Returns true if the value is of a const type.* | | virtual bool | [**isEnumType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isenumtype) () const *Returns true if the value is of an enum type.* | | virtual bool | [**isFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isfunctiontype) () const *Returns true if the value is of a function type.* | | virtual bool | [**isFundamentalType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isfundamentaltype) () const *Returns true if the value is of a fundamental type.* | | virtual bool | [**isPointerToFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-ispointertofunctiontype) () const *Returns true if the value is of a pointer to function type.* | | virtual bool | [**isPointerToMemberFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-ispointertomemberfunctiontype) () const *Returns true if the value is of a pointer to member function type.* | | virtual bool | [**isPointerToMemberType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-ispointertomembertype) () const *Returns true if the value is of a pointer to member type.* | | virtual bool | [**isPointerType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-ispointertype) () const *Returns true if the value is of a pointer type.* | | virtual bool | [**isReferenceType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isreferencetype) () const *Returns true if the value is of a reference type.* | | virtual bool | [**isRegisteredType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isregisteredtype) () const *Returns true if the value is of a registered type.* | | virtual bool | [**isVolatileType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-isvolatiletype) () const *Returns true if the value is of a volatile type.* | | virtual | [**~SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-sbcmetavaluetype) () *Destructs the type.* | ## Public Functions inherited from SBCMetaValueBase See [SBCMetaValueBase](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**call**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-call) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15) const *Calls the function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual void | [**clear**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-clear) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Clears attribute* `attributeName` *from the value when possible.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-clone) () const *Clones the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**constCall**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-constcall) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15) const *Calls the const function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**get**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-get) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the value of attribute* `attributeName` *for this value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getBaseType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype) () const *Returns the base type.* | | virtual std::string | [**getBaseTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetypename) () const *Returns the base type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getClassType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype) () const *Returns the class type.* | | virtual std::string | [**getClassTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstypename) () const *Returns the class type name.* | | virtual unsigned int | [**getNumberOfParameters**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getnumberofparameters) () const *Returns the number of parameters of a function type.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getOutputType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype) () const *Returns the output type.* | | virtual std::string | [**getOutputTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtypename) () const *Returns the output type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParameterType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertype) (unsigned int i) const *Returns the type of parameter* `i` *.* | | virtual std::string | [**getParameterTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertypename) (unsigned int i) const *Returns the type name of parameter* `i` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParentType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype) () const *Returns the parent type.* | | virtual std::string | [**getParentTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttypename) () const *Returns the parent type name.* | | virtual [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \* | [**getProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getproxy) () const *Returns the proxy of the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getRootType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype) () const *Returns the root type.* | | virtual std::string | [**getRootTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottypename) () const *Returns the root type name.* | | virtual std::string | [**getShortBaseTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortbasetypename) () const *Returns the short base type name.* | | virtual std::string | [**getShortClassTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortclasstypename) () const *Returns the short class type name.* | | virtual std::string | [**getShortOutputTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortoutputtypename) () const *Returns the short output type name.* | | virtual std::string | [**getShortParameterTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortparametertypename) (unsigned int i) const *Returns the short type name of parameter* `i` *.* | | virtual std::string | [**getShortParentTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortparenttypename) () const *Returns the short parent type name.* | | virtual std::string | [**getShortRootTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortroottypename) () const *Returns the short root type name.* | | virtual std::string | [**getShortTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshorttypename) () const *Returns the short type name.* | | virtual unsigned int | [**getSize**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getsize) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the size of attribute* `attributeName` *in the value when relevant.* | | virtual std::string | [**getTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-gettypename) () const *Returns the type name.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getTypeUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-gettypeuuid) () const *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* | | virtual bool | [**has**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-has) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns whether attribute* `attributeName` *exists in the value and has a value.* | | virtual bool | [**hasBaseType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-hasbasetype) () const *Returns* `true` *if the value is of a type that has a base type.* | | virtual bool | [**isArrayType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isarraytype) () const *Returns* `true` *if the value is of an array type.* | | virtual bool | [**isClassType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isclasstype) () const *Returns* `true` *if the value is of a class type.* | | virtual bool | [**isConstType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isconsttype) () const *Returns* `true` *if the value is of a const type.* | | virtual bool | [**isEnumType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isenumtype) () const *Returns* `true` *if the value is of an enum type.* | | virtual bool | [**isFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isfunctiontype) () const *Returns* `true` *if the value is of a function type.* | | virtual bool | [**isFundamentalType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isfundamentaltype) () const *Returns* `true` *if the value is of a fundamental type.* | | virtual bool | [**isPointerToFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertofunctiontype) () const *Returns* `true` *if the value is of a pointer to function type.* | | virtual bool | [**isPointerToMemberFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertomemberfunctiontype) () const *Returns* `true` *if the value is of a pointer to member function type.* | | virtual bool | [**isPointerToMemberType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertomembertype) () const *Returns* `true` *if the value is of a pointer to member type.* | | virtual bool | [**isPointerType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertype) () const *Returns* `true` *if the value is of a pointer type.* | | virtual bool | [**isReferenceType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isreferencetype) () const *Returns* `true` *if the value is of a reference type.* | | virtual bool | [**isRegisteredType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isregisteredtype) () const *Returns* `true` *if the value is of a registered type.* | | virtual bool | [**isVolatileType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isvolatiletype) () const *Returns* `true` *if the value is of a volatile type.* | | virtual void | [**set**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-set) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & size) const *Sets the value of attribute* `attributeName` *for this value to*`value` *.* | | virtual | [**~SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-sbcmetavaluebase) () *Destructs the value.* | ## Public Static Functions | Type | Name | | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | T const & | [**getValue**](#function-getvalue-22) ([**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) * container) *Returns the value held in the* `container` *.* | ## Protected Attributes | Type | Name | | ---- | ---------------------------------------------- | | T | [**value**](#variable-value) *The hold value.* | ## Protected Functions inherited from SBCMetaValueBase See [SBCMetaValueBase](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-sbcmetavaluebase) () *Constructs a value.* | ## Detailed Description **Parameters:** - `T` The type described This template class holds a value. It derives from the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), used to hold type information, which derives from [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md), the base class of value holders. Assume a SAMSON Extension called `SEElement` defines a class `A`, and another Extension called `SEOtherElement` wants to use it. If the Extension called `SEOtherElement` does not have access to the declaration of class `A` (typically provided in a header file included in `SEElement`), it cannot use the symbol `A` in its source code. For example, if the source code of `SEOtherElement` contained the line: ```C++ A* a = new A(); ``` the compiler would complain that the symbol `A` is not defined. In order to provide access to exposed classes, SAMSON uses a mechanism to *hold values* (for example, pointers to objects) in a uniform way. In the example above, the constructor exposed in the Extension `SEElement` returns a [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) that stores a pointer to the new instance of class `A`: ```C++ return new SBValueHolder(new A()); ``` and the Extension `SEOtherElement` sees it as an SBValue that stores this [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) as a pointer to a [**SBValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) (the base class of `SBValueHolder`): ```C++ SBValue classInstance = classProxy->createInstance(); ``` Unlike the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md), which only holds information about the type `T` of the value, the template class [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) does hold the value: ```C++ SBValueHolder* intHolder = new SBValueHolder(2); int i = intHolder->getValue(); // i = 2 std::string typeName = intHolder->getTypeName(); // typeName = "int" ``` **Short name**: SBValueHolder **See also:** [**SBCMetaType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaType/index.md), [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md), [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) ## Public Functions Documentation ### function SBCMetaValueHolder *Constructs a value holder that holds value* `v` *.* ```C++ inline SBCMetaValueHolder::SBCMetaValueHolder ( const T & v ) ``` ______________________________________________________________________ ### function clone *Clones the value.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueHolder::clone () const ``` Implements [*SBCMetaValueType::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-clone) ______________________________________________________________________ ### function getConstReference *Returns a const reference to the hold value.* ```C++ inline T const & SBCMetaValueHolder::getConstReference () const ``` ______________________________________________________________________ ### function getReference *Returns a reference to the hold value.* ```C++ inline T & SBCMetaValueHolder::getReference () ``` ______________________________________________________________________ ### function getValue [1/2] *Returns the hold value.* ```C++ inline T SBCMetaValueHolder::getValue () const ``` ______________________________________________________________________ ### function ~SBCMetaValueHolder *Destructs the value holder.* ```C++ inline virtual SBCMetaValueHolder::~SBCMetaValueHolder () ``` ______________________________________________________________________ ## Public Static Functions Documentation ### function getValue [2/2] *Returns the value held in the* `container` *.* ```C++ static inline T const & SBCMetaValueHolder::getValue ( SBCMetaValueBase * container ) ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable value *The hold value.* ```C++ T SBCMetaValueHolder< T >::value; ``` ______________________________________________________________________ # SBValueMap # Class SBCMetaValueMap [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) *This class describes a value map.* [More...](#detailed-description) - `#include ` ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-18) () noexcept *Creates an empty map; no allocation.* | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-28) (unsigned int nElements) *Creates a new map.* | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-38) (const [**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) & other) *Copy constructor.* | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-48) ([**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) && other) noexcept *Move constructor.* | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-58) (const SBHashMap< std::string, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) > & hashMap) *Creates a new map from the given hash map.* | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-68) (const std::map< std::string, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) > & map) *Creates a new map from the given std::map.* | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-78) (const std::unordered_map< std::string, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) > & map) *Creates a new map from the given std::unordered_map.* | | | [**SBCMetaValueMap**](#function-sbcmetavaluemap-88) (std::initializer_list< std::pair< std::string, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) > > init) *Creates a new map from the given initializer list.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & | [**at**](#function-at-12) (const std::string & key) *Access a value by key; throws* `std::out_of_range` *if missing.* | | const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & | [**at**](#function-at-22) (const std::string & key) const *Access a value by key; throws* `std::out_of_range` *if missing.* | | void | [**clear**](#function-clear) () *Erases all entries in the map.* | | bool | [**contains**](#function-contains) (const std::string & key) const *Returns* `true` *if the*`key` *has an associated value.* | | SBHashMap< std::string, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) > & | [**data**](#function-data-12) () noexcept *Access the underlying map pointer (may be* `nullptr` *only in moved-from state).* | | const SBHashMap< std::string, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) > & | [**data**](#function-data-22) () noexcept const *Access the underlying map pointer (may be* `nullptr` *only in moved-from state).* | | bool | [**empty**](#function-empty) () const *Returns* `true` *when the map contains no entry.* | | bool | [**erase**](#function-erase) (const std::string & key) *Attempts to erase an entry with a specific* `key` *and returns*`true` *if successful.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) | [**get**](#function-get) (const std::string & key) const *Returns value if present, else returns* `SBValue()` \_\_ | | [**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) | [**getValueMap**](#function-getvaluemap) (const std::string & key) const *A convenience getter, that returns a value map stored at the* `key` *if present, else returns*`SBValueMap()` \_\_ | | bool | [**insert**](#function-insert-12) (const std::string & key, const [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value) *Inserts only if missing; returns* `true` *if inserted,*`false` *if*`key` *already existed.* | | bool | [**insert**](#function-insert-22) (const std::pair< std::string, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) > & keyValuePair) *Inserts only if missing; returns* `true` *if inserted,*`false` *if the*`key` *already existed.* | | [**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) & | [**operator=**](#function-operator) (const [**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) & other) *Copy assignment.* | | [**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) & | [**operator=**](#function-operator_1) ([**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) && other) noexcept *Move assignment.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & | [**operator[]**](#function-operator_2) (const std::string & key) *Access/insertion; inserts a default-constructed SBValue if* `key` *doesn't exist.* | | [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & | [**operator[]**](#function-operator_3) (std::string && key) *Access/insertion; inserts a default-constructed SBValue if* `key` *doesn't exist.* | | void | [**set**](#function-set) (std::string key, [**SBValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) value) *Sets (overwrites) a value.* | | unsigned int | [**size**](#function-size) () const *The number of entries in the map.* | | void | [**swap**](#function-swap) ([**SBCMetaValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) & other) noexcept *Swaps maps in O(1)* | | virtual | [**~SBCMetaValueMap**](#function-sbcmetavaluemap) () *Destructor.* | ## Protected Attributes | Type | Name | | ---------------------- | ------------------------------------------------------------------------- | | SBCMetaValueMapData \* | [**dataPointer**](#variable-datapointer) *A pointer to the private data.* | ## Detailed Description This is a convenience class that contains a map from `std::string` to SBValue, and can be used, for example, to pass into a function a map of parameters, or another data. ## Public Functions Documentation ### function SBCMetaValueMap [1/8] *Creates an empty map; no allocation.* ```C++ SBCMetaValueMap::SBCMetaValueMap () noexcept ``` ______________________________________________________________________ ### function SBCMetaValueMap [2/8] *Creates a new map.* ```C++ explicit SBCMetaValueMap::SBCMetaValueMap ( unsigned int nElements ) ``` Constructs a map reserving space for the given number of elements. The map is initially empty but preallocates storage for the specified number of entries. **Parameters:** - `nElements` The number of elements to reserve space for. ______________________________________________________________________ ### function SBCMetaValueMap [3/8] *Copy constructor.* ```C++ SBCMetaValueMap::SBCMetaValueMap ( const SBCMetaValueMap & other ) ``` Constructs a new map as a copy of *other*. All key-value pairs from *other* are copied into the new map. **Parameters:** - `other` The source map to copy from. ______________________________________________________________________ ### function SBCMetaValueMap [4/8] *Move constructor.* ```C++ SBCMetaValueMap::SBCMetaValueMap ( SBCMetaValueMap && other ) noexcept ``` Constructs a new map by moving the contents of *other*. After the move, *other* is left in a valid but unspecified state. **Parameters:** - `other` The source map to move from. ______________________________________________________________________ ### function SBCMetaValueMap [5/8] *Creates a new map from the given hash map.* ```C++ explicit SBCMetaValueMap::SBCMetaValueMap ( const SBHashMap< std::string, SBValue > & hashMap ) ``` Constructs a map from the given hash map. The resulting map contains all key-value pairs from *hashMap*. **Parameters:** - `hashMap` The source hash map. ______________________________________________________________________ ### function SBCMetaValueMap [6/8] *Creates a new map from the given std::map.* ```C++ explicit SBCMetaValueMap::SBCMetaValueMap ( const std::map< std::string, SBValue > & map ) ``` Constructs a map from the given std::map. All entries from *map* are inserted into the new map. **Parameters:** - `map` The source std::map of key-value pairs. ______________________________________________________________________ ### function SBCMetaValueMap [7/8] *Creates a new map from the given std::unordered_map.* ```C++ explicit SBCMetaValueMap::SBCMetaValueMap ( const std::unordered_map< std::string, SBValue > & map ) ``` Constructs a map from the given std::unordered_map. All entries from *map* are inserted into the new map. **Parameters:** - `map` The source std::unordered_map of key-value pairs. ______________________________________________________________________ ### function SBCMetaValueMap [8/8] *Creates a new map from the given initializer list.* ```C++ SBCMetaValueMap::SBCMetaValueMap ( std::initializer_list< std::pair< std::string, SBValue > > init ) ``` Constructs a map from an initializer list of key-value pairs. If the initializer list contains duplicate keys, the last occurrence overwrites previous ones. **Parameters:** - `init` Initializer list containing pairs of keys and values. ______________________________________________________________________ ### function at [1/2] *Access a value by key; throws* `std::out_of_range` *if missing.* ```C++ SBValue & SBCMetaValueMap::at ( const std::string & key ) ``` Returns a reference to the value associated with *key*. Throws `std::out_of_range` if the map is not allocated or the key is not present. **Parameters:** - `key` The key whose value to access. **Returns:** Reference to the value associated with *key*. ______________________________________________________________________ ### function at [2/2] *Access a value by key; throws* `std::out_of_range` *if missing.* ```C++ const SBValue & SBCMetaValueMap::at ( const std::string & key ) const ``` Returns a const reference to the value associated with *key*. Throws `std::out_of_range` if the map is not allocated or the key is not present. **Parameters:** - `key` The key whose value to access. **Returns:** Const reference to the value associated with *key*. ______________________________________________________________________ ### function clear *Erases all entries in the map.* ```C++ void SBCMetaValueMap::clear () ``` Removes all entries from the map, leaving it empty. ______________________________________________________________________ ### function contains *Returns* `true` *if the*`key` *has an associated value.* ```C++ bool SBCMetaValueMap::contains ( const std::string & key ) const ``` Checks whether the map contains an entry with the given *key*. **Parameters:** - `key` The key to look for. **Returns:** *true* if the map contains the key; otherwise *false*. ______________________________________________________________________ ### function data [1/2] *Access the underlying map pointer (may be* `nullptr` *only in moved-from state).* ```C++ SBHashMap< std::string, SBValue > & SBCMetaValueMap::data () noexcept ``` Returns a mutable reference to the underlying hash map. The map is allocated if it does not already exist. **Returns:** Reference to the underlying hash map. ______________________________________________________________________ ### function data [2/2] *Access the underlying map pointer (may be* `nullptr` *only in moved-from state).* ```C++ const SBHashMap< std::string, SBValue > & SBCMetaValueMap::data () noexcept const ``` Returns a const reference to the underlying hash map. If the map has not been allocated, an empty map is returned. **Returns:** Const reference to the underlying hash map. ______________________________________________________________________ ### function empty *Returns* `true` *when the map contains no entry.* ```C++ bool SBCMetaValueMap::empty () const ``` Checks whether the map contains any entries. **Returns:** *true* if the map is empty; otherwise *false*. ______________________________________________________________________ ### function erase *Attempts to erase an entry with a specific* `key` *and returns*`true` *if successful.* ```C++ bool SBCMetaValueMap::erase ( const std::string & key ) ``` Erases the entry with the specified *key*. If an entry with *key* exists, it is removed. **Parameters:** - `key` The key of the entry to erase. **Returns:** *true* if an entry was erased; otherwise *false*. ______________________________________________________________________ ### function get *Returns value if present, else returns* `SBValue()` \_\_ ```C++ SBValue SBCMetaValueMap::get ( const std::string & key ) const ``` Retrieves the value associated with *key*. If *key* is not present, an empty value is returned. **Parameters:** - `key` The key whose value to retrieve. **Returns:** The value associated with *key*, or an empty value if the key is absent. ______________________________________________________________________ ### function getValueMap *A convenience getter, that returns a value map stored at the* `key` *if present, else returns*`SBValueMap()` \_\_ ```C++ SBCMetaValueMap SBCMetaValueMap::getValueMap ( const std::string & key ) const ``` Retrieves a nested value map stored at *key*. If *key* does not exist or does not contain a value map, an empty map is returned. **Parameters:** - `key` The key whose associated value map to retrieve. **Returns:** The value map associated with *key*, or an empty map if unavailable. ______________________________________________________________________ ### function insert [1/2] *Inserts only if missing; returns* `true` *if inserted,*`false` *if*`key` *already existed.* ```C++ bool SBCMetaValueMap::insert ( const std::string & key, const SBValue & value ) ``` Inserts a new entry with *key* and *value* only if the key does not already exist. Returns *true* if the entry was inserted; otherwise *false*. **Parameters:** - `key` The key for the new entry. - `value` The value for the new entry. **Returns:** *true* if insertion succeeded; *false* if the key already existed. ______________________________________________________________________ ### function insert [2/2] *Inserts only if missing; returns* `true` *if inserted,*`false` *if the*`key` *already existed.* ```C++ bool SBCMetaValueMap::insert ( const std::pair< std::string, SBValue > & keyValuePair ) ``` Inserts a new entry from the given key-value pair only if the key does not already exist. Returns *true* if the entry was inserted; otherwise *false*. **Parameters:** - `keyValuePair` Pair containing the key and value to insert. **Returns:** *true* if insertion succeeded; *false* if the key already existed. ______________________________________________________________________ ### function operator= *Copy assignment.* ```C++ SBCMetaValueMap & SBCMetaValueMap::operator= ( const SBCMetaValueMap & other ) ``` Assigns the contents of *other* to this map. All existing entries in this map are replaced with copies of the entries from *other*. **Parameters:** - `other` The source map to copy from. **Returns:** Reference to this map. ______________________________________________________________________ ### function operator= *Move assignment.* ```C++ SBCMetaValueMap & SBCMetaValueMap::operator= ( SBCMetaValueMap && other ) noexcept ``` Moves the contents of *other* into this map. After the move, *other* is left in a valid but unspecified state. **Parameters:** - `other` The source map to move from. **Returns:** Reference to this map. ______________________________________________________________________ ### function operator[] *Access/insertion; inserts a default-constructed SBValue if* `key` *doesn't exist.* ```C++ SBValue & SBCMetaValueMap::operator[] ( const std::string & key ) ``` Provides access to the value for *key*, inserting a default-constructed value if the key is not present. **Parameters:** - `key` The key to access. **Returns:** Reference to the value associated with *key*. ______________________________________________________________________ ### function operator[] *Access/insertion; inserts a default-constructed SBValue if* `key` *doesn't exist.* ```C++ SBValue & SBCMetaValueMap::operator[] ( std::string && key ) ``` Provides access to the value for *key* (rvalue), inserting a default-constructed value if the key is not present. **Parameters:** - `key` The key to access (rvalue reference). **Returns:** Reference to the value associated with *key*. ______________________________________________________________________ ### function set *Sets (overwrites) a value.* ```C++ void SBCMetaValueMap::set ( std::string key, SBValue value ) ``` Sets the value for *key*, overwriting any existing entry. If the map does not exist, it is created. **Parameters:** - `key` The key to set. - `value` The value to associate with *key*. ______________________________________________________________________ ### function size *The number of entries in the map.* ```C++ unsigned int SBCMetaValueMap::size () const ``` Returns the number of entries in the map. **Returns:** The number of key-value pairs stored. ______________________________________________________________________ ### function swap *Swaps maps in O(1)* ```C++ void SBCMetaValueMap::swap ( SBCMetaValueMap & other ) noexcept ``` Swaps the contents of this map with *other* in constant time. **Parameters:** - `other` The map to swap with. ______________________________________________________________________ ### function ~SBCMetaValueMap *Destructor.* ```C++ virtual SBCMetaValueMap::~SBCMetaValueMap () ``` Destroys the map and releases all associated resources. ______________________________________________________________________ ## Protected Attributes Documentation ### variable dataPointer *A pointer to the private data.* ```C++ SBCMetaValueMapData* SBCMetaValueMap::dataPointer; ``` ______________________________________________________________________ # SBValueType # Class SBCMetaValueType **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) *This template class describes a value type.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCMetaValueBase](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) Inherited by the following classes: [SBCMetaValueHolder](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCMetaValueType**](#function-sbcmetavaluetype) () *Constructs a type.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**clone**](#function-clone) () const *Clones the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getBaseType**](#function-getbasetype) () const *Returns the base type.* | | virtual std::string | [**getBaseTypeName**](#function-getbasetypename) () const *Returns the base type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getClassType**](#function-getclasstype) () const *Returns the class type.* | | virtual std::string | [**getClassTypeName**](#function-getclasstypename) () const *Returns the class type name.* | | virtual unsigned int | [**getNumberOfParameters**](#function-getnumberofparameters) () const *Returns the number of parameters of a function type.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getOutputType**](#function-getoutputtype) () const *Returns the output type.* | | virtual std::string | [**getOutputTypeName**](#function-getoutputtypename) () const *Returns the output type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParameterType**](#function-getparametertype) (unsigned int i) const *Returns the type of parameter* `i` *.* | | virtual std::string | [**getParameterTypeName**](#function-getparametertypename) (unsigned int i) const *Returns the type name of parameter* `i` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParentType**](#function-getparenttype) () const *Returns the parent type.* | | virtual std::string | [**getParentTypeName**](#function-getparenttypename) () const *Returns the parent type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getRootType**](#function-getroottype) () const *Returns the root type.* | | virtual std::string | [**getRootTypeName**](#function-getroottypename) () const *Returns the root type name.* | | virtual std::string | [**getShortBaseTypeName**](#function-getshortbasetypename) () const *Returns the short base type name.* | | virtual std::string | [**getShortClassTypeName**](#function-getshortclasstypename) () const *Returns the short class type name.* | | virtual std::string | [**getShortOutputTypeName**](#function-getshortoutputtypename) () const *Returns the short output type name.* | | virtual std::string | [**getShortParameterTypeName**](#function-getshortparametertypename) (unsigned int i) const *Returns the short type name of parameter* `i` *.* | | virtual std::string | [**getShortParentTypeName**](#function-getshortparenttypename) () const *Returns the short parent type name.* | | virtual std::string | [**getShortRootTypeName**](#function-getshortroottypename) () const *Returns the short root type name.* | | virtual std::string | [**getShortTypeName**](#function-getshorttypename) () const *Returns the short type name.* | | virtual std::string | [**getTypeName**](#function-gettypename) () const *Returns the type name.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getTypeUUID**](#function-gettypeuuid) () const *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* | | virtual bool | [**hasBaseType**](#function-hasbasetype) () const *Returns true if the value is of a type that has a base type.* | | virtual bool | [**isArrayType**](#function-isarraytype) () const *Returns true if the value is of an array type.* | | virtual bool | [**isClassType**](#function-isclasstype) () const *Returns true if the value is of a class type.* | | virtual bool | [**isConstType**](#function-isconsttype) () const *Returns true if the value is of a const type.* | | virtual bool | [**isEnumType**](#function-isenumtype) () const *Returns true if the value is of an enum type.* | | virtual bool | [**isFunctionType**](#function-isfunctiontype) () const *Returns true if the value is of a function type.* | | virtual bool | [**isFundamentalType**](#function-isfundamentaltype) () const *Returns true if the value is of a fundamental type.* | | virtual bool | [**isPointerToFunctionType**](#function-ispointertofunctiontype) () const *Returns true if the value is of a pointer to function type.* | | virtual bool | [**isPointerToMemberFunctionType**](#function-ispointertomemberfunctiontype) () const *Returns true if the value is of a pointer to member function type.* | | virtual bool | [**isPointerToMemberType**](#function-ispointertomembertype) () const *Returns true if the value is of a pointer to member type.* | | virtual bool | [**isPointerType**](#function-ispointertype) () const *Returns true if the value is of a pointer type.* | | virtual bool | [**isReferenceType**](#function-isreferencetype) () const *Returns true if the value is of a reference type.* | | virtual bool | [**isRegisteredType**](#function-isregisteredtype) () const *Returns true if the value is of a registered type.* | | virtual bool | [**isVolatileType**](#function-isvolatiletype) () const *Returns true if the value is of a volatile type.* | | virtual | [**~SBCMetaValueType**](#function-sbcmetavaluetype) () *Destructs the type.* | ## Public Functions inherited from SBCMetaValueBase See [SBCMetaValueBase](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**call**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-call) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15) const *Calls the function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual void | [**clear**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-clear) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Clears attribute* `attributeName` *from the value when possible.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-clone) () const *Clones the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**constCall**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-constcall) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & functionName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t0, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t1, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t2, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t3, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t4, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t5, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t6, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t7, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t8, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t9, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t10, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t11, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t12, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t13, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t14, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & t15) const *Calls the const function* `functionName` *of the value with arguments*`t0` *,*`t1` *, ...,*`t15` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**get**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-get) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the value of attribute* `attributeName` *for this value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getBaseType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype) () const *Returns the base type.* | | virtual std::string | [**getBaseTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetypename) () const *Returns the base type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getClassType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype) () const *Returns the class type.* | | virtual std::string | [**getClassTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstypename) () const *Returns the class type name.* | | virtual unsigned int | [**getNumberOfParameters**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getnumberofparameters) () const *Returns the number of parameters of a function type.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getOutputType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype) () const *Returns the output type.* | | virtual std::string | [**getOutputTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtypename) () const *Returns the output type name.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParameterType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertype) (unsigned int i) const *Returns the type of parameter* `i` *.* | | virtual std::string | [**getParameterTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertypename) (unsigned int i) const *Returns the type name of parameter* `i` *.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getParentType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype) () const *Returns the parent type.* | | virtual std::string | [**getParentTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttypename) () const *Returns the parent type name.* | | virtual [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \* | [**getProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getproxy) () const *Returns the proxy of the value.* | | virtual [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) \* | [**getRootType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype) () const *Returns the root type.* | | virtual std::string | [**getRootTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottypename) () const *Returns the root type name.* | | virtual std::string | [**getShortBaseTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortbasetypename) () const *Returns the short base type name.* | | virtual std::string | [**getShortClassTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortclasstypename) () const *Returns the short class type name.* | | virtual std::string | [**getShortOutputTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortoutputtypename) () const *Returns the short output type name.* | | virtual std::string | [**getShortParameterTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortparametertypename) (unsigned int i) const *Returns the short type name of parameter* `i` *.* | | virtual std::string | [**getShortParentTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortparenttypename) () const *Returns the short parent type name.* | | virtual std::string | [**getShortRootTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortroottypename) () const *Returns the short root type name.* | | virtual std::string | [**getShortTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshorttypename) () const *Returns the short type name.* | | virtual unsigned int | [**getSize**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getsize) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns the size of attribute* `attributeName` *in the value when relevant.* | | virtual std::string | [**getTypeName**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-gettypename) () const *Returns the type name.* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getTypeUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-gettypeuuid) () const *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* | | virtual bool | [**has**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-has) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName) const *Returns whether attribute* `attributeName` *exists in the value and has a value.* | | virtual bool | [**hasBaseType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-hasbasetype) () const *Returns* `true` *if the value is of a type that has a base type.* | | virtual bool | [**isArrayType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isarraytype) () const *Returns* `true` *if the value is of an array type.* | | virtual bool | [**isClassType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isclasstype) () const *Returns* `true` *if the value is of a class type.* | | virtual bool | [**isConstType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isconsttype) () const *Returns* `true` *if the value is of a const type.* | | virtual bool | [**isEnumType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isenumtype) () const *Returns* `true` *if the value is of an enum type.* | | virtual bool | [**isFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isfunctiontype) () const *Returns* `true` *if the value is of a function type.* | | virtual bool | [**isFundamentalType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isfundamentaltype) () const *Returns* `true` *if the value is of a fundamental type.* | | virtual bool | [**isPointerToFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertofunctiontype) () const *Returns* `true` *if the value is of a pointer to function type.* | | virtual bool | [**isPointerToMemberFunctionType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertomemberfunctiontype) () const *Returns* `true` *if the value is of a pointer to member function type.* | | virtual bool | [**isPointerToMemberType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertomembertype) () const *Returns* `true` *if the value is of a pointer to member type.* | | virtual bool | [**isPointerType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertype) () const *Returns* `true` *if the value is of a pointer type.* | | virtual bool | [**isReferenceType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isreferencetype) () const *Returns* `true` *if the value is of a reference type.* | | virtual bool | [**isRegisteredType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isregisteredtype) () const *Returns* `true` *if the value is of a registered type.* | | virtual bool | [**isVolatileType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isvolatiletype) () const *Returns* `true` *if the value is of a volatile type.* | | virtual void | [**set**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-set) (const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & object, const std::string & attributeName, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & value, const [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md) & size) const *Sets the value of attribute* `attributeName` *for this value to*`value` *.* | | virtual | [**~SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-sbcmetavaluebase) () *Destructs the value.* | ## Protected Functions inherited from SBCMetaValueBase See [SBCMetaValueBase](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCMetaValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-sbcmetavaluebase) () *Constructs a value.* | ## Detailed Description **Parameters:** - `T` The type described This template class holds information about a type. It is also the direct base class of the template class [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md), used to hold values. Assume a SAMSON Extension called `SEElement` defines a class `A`, and another Extension called `SEOtherElement` wants to use it. If the Extension called `SEOtherElement` does not have access to the declaration of class `A` (typically provided in a header file included in `SEElement`), it cannot use the symbol `A` in its source code. For example, if the source code of `SEOtherElement` contained the line: ```C++ A* a = new A(); ``` the compiler would complain that the symbol `A` is not defined. In order to provide access to exposed classes, SAMSON uses a mechanism to *hold values* (for example, pointers to objects) in a uniform way. In the example above, the constructor exposed in the Extension `SEElement` returns a [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) that stores a pointer to the new instance of class `A`: ```C++ return new SBValueHolder(new A()); ``` and the Extension `SEOtherElement` sees it as an SBValue that stores this [**value holder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) as a pointer to a [**SBValueBase**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/index.md) (the base class of `SBValueHolder`): ```C++ SBValue classInstance = classProxy->createInstance(); ``` The template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) does not hold a value (this is the role of [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md), which derives from [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md)), but provides information about a type `T`. For example, the short name of a registered type (see `SB_REGISTER_TYPE`) may be retrieved using this class: ```C++ // shortName = "SBAtom"; std::string shortName = SBType::getShortTypeName(); ``` **Short name**: SBValueType **See also:** [**SBCMetaType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaType/index.md), [**SBCMetaValue**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValue/index.md), [**SBCMetaValueHolder**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueHolder/index.md) **See also:** [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md) ## Public Functions Documentation ### function SBCMetaValueType *Constructs a type.* ```C++ inline SBCMetaValueType::SBCMetaValueType () ``` ______________________________________________________________________ ### function clone *Clones the value.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueType::clone () const ``` Implements [*SBCMetaValueBase::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-clone) ______________________________________________________________________ ### function getBaseType *Returns the base type.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueType::getBaseType () const ``` This function returns the base type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the base type of this type. For example, the base type of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is [**SBMStructuralModelNode**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNode/index.md). Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueType::getBaseTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetypename). **See also:** [**SBCMetaValueType::getBaseTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetypename) Implements [*SBCMetaValueBase::getBaseType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetype) ______________________________________________________________________ ### function getBaseTypeName *Returns the base type name.* ```C++ inline virtual std::string SBCMetaValueType::getBaseTypeName () const ``` This function returns the type name of the base type of `T`. For example, the base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBMStructuralModelNode". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetype). **See also:** [**SBCMetaValueType::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetype) Implements [*SBCMetaValueBase::getBaseTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getbasetypename) ______________________________________________________________________ ### function getClassType *Returns the class type.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueType::getClassType () const ``` This function returns the class type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the class type of this type, when the type is a pointer to a member or a pointer to a member function. For example, the class type name of `& SBMStructuralModelNodeAtom::clearName` is `SBMStructuralModelNodeAtom`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueType::getClassTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstypename). **See also:** [**SBCMetaValueType::getClassTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstypename) Implements [*SBCMetaValueBase::getClassType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstype) ______________________________________________________________________ ### function getClassTypeName *Returns the class type name.* ```C++ inline virtual std::string SBCMetaValueType::getClassTypeName () const ``` This function returns the type name of the class associated to `T`, when `T` is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBMStructuralModelNodeAtom". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstype). **See also:** [**SBCMetaValueType::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstype) Implements [*SBCMetaValueBase::getClassTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getclasstypename) ______________________________________________________________________ ### function getNumberOfParameters *Returns the number of parameters of a function type.* ```C++ inline virtual unsigned int SBCMetaValueType::getNumberOfParameters () const ``` Implements [*SBCMetaValueBase::getNumberOfParameters*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getnumberofparameters) ______________________________________________________________________ ### function getOutputType *Returns the output type.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueType::getOutputType () const ``` This function returns the output type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the output type of this type, when the type is a function. For example, the output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md). Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueType::getOutputTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtypename). **See also:** [**SBCMetaValueType::getOutputTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtypename) Implements [*SBCMetaValueBase::getOutputType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtype) ______________________________________________________________________ ### function getOutputTypeName *Returns the output type name.* ```C++ inline virtual std::string SBCMetaValueType::getOutputTypeName () const ``` This function returns the type name of the output type of `T`, when `T` is a function. For example, the output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBMStructuralModelNodeAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtype). **See also:** [**SBCMetaValueType::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtype) Implements [*SBCMetaValueBase::getOutputTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getoutputtypename) ______________________________________________________________________ ### function getParameterType *Returns the type of parameter* `i` *.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueType::getParameterType ( unsigned int i ) const ``` This function returns the type of parameter `i`, , i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the type of parameter `i`, when the type is a function. For example, the type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is `const SBMStructuralModelNodeAtom*`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueType::getParameterTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertypename). **See also:** [**SBCMetaValueType::getParameterTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertypename) Implements [*SBCMetaValueBase::getParameterType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertype) ______________________________________________________________________ ### function getParameterTypeName *Returns the type name of parameter* `i` *.* ```C++ inline virtual std::string SBCMetaValueType::getParameterTypeName ( unsigned int i ) const ``` This function returns the type name of parameter `i` of type `T`, when `T` is a function ("void" otherwise). For example, the type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBMStructuralModelNodeAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertype). **See also:** [**SBCMetaValueType::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertype) Implements [*SBCMetaValueBase::getParameterTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparametertypename) ______________________________________________________________________ ### function getParentType *Returns the parent type.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueType::getParentType () const ``` This function returns the parent type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the parent type of this type. For example, the parent type of `int*` is `int`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueType::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttypename). **See also:** [**SBCMetaValueType::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttypename) Implements [*SBCMetaValueBase::getParentType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttype) ______________________________________________________________________ ### function getParentTypeName *Returns the parent type name.* ```C++ inline virtual std::string SBCMetaValueType::getParentTypeName () const ``` This function returns the type name of the parent type of `T`. For example, the parent type name of `int*` is "int". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttype). **See also:** [**SBCMetaValueType::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttype), [**SBCMetaValueType::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottypename) Implements [*SBCMetaValueBase::getParentTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getparenttypename) ______________________________________________________________________ ### function getRootType *Returns the root type.* ```C++ inline virtual SBCMetaValueBase * SBCMetaValueType::getRootType () const ``` This function returns the root type, i.e. an instance of the template class [**SBCMetaValueType**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) which contains type information about the root type of this type. For example, the root type of `const std::string&` is `std::string`. Note that this function returns a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md). If a string is needed, use [**SBCMetaValueType::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottypename). **See also:** [**SBCMetaValueType::getRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottypename) Implements [*SBCMetaValueBase::getRootType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottype) ______________________________________________________________________ ### function getRootTypeName *Returns the root type name.* ```C++ inline virtual std::string SBCMetaValueType::getRootTypeName () const ``` This function returns the type name of the root type of `T`. For example, the root type name of `const std::string&` is "std::string". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottype). **See also:** [**SBCMetaValueType::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottype), [**SBCMetaValueType::getParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttypename) Implements [*SBCMetaValueBase::getRootTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getroottypename) ______________________________________________________________________ ### function getShortBaseTypeName *Returns the short base type name.* ```C++ inline virtual std::string SBCMetaValueType::getShortBaseTypeName () const ``` This function returns the short type name of the base type of `T`. For example, the short base type name of [**SBMStructuralModelNodeAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) is "SBNode". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetype). **See also:** [**SBCMetaValueType::getBaseType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getbasetype) Implements [*SBCMetaValueBase::getShortBaseTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortbasetypename) ______________________________________________________________________ ### function getShortClassTypeName *Returns the short class type name.* ```C++ inline virtual std::string SBCMetaValueType::getShortClassTypeName () const ``` This function returns the short type name of the class associated to `T`, when `T` is a pointer to a member or a pointer to a member function ("void" otherwise). For example, the short class type name of `& SBMStructuralModelNodeAtom::clearName` is "SBAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstype). **See also:** [**SBCMetaValueType::getClassType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getclasstype) Implements [*SBCMetaValueBase::getShortClassTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortclasstypename) ______________________________________________________________________ ### function getShortOutputTypeName *Returns the short output type name.* ```C++ inline virtual std::string SBCMetaValueType::getShortOutputTypeName () const ``` This function returns the short type name of the output type of `T`, when `T` is a function. For example, the short output type name of `SBMStructuralModelNodeAtom* getFirstAtom()` is "SBAtom". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtype). **See also:** [**SBCMetaValueType::getOutputType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getoutputtype) Implements [*SBCMetaValueBase::getShortOutputTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortoutputtypename) ______________________________________________________________________ ### function getShortParameterTypeName *Returns the short type name of parameter* `i` *.* ```C++ inline virtual std::string SBCMetaValueType::getShortParameterTypeName ( unsigned int i ) const ``` This function returns the short type name of parameter `i` of type `T`, when `T` is a function ("void" otherwise). For example, the short type name of parameter 2 of `myFunction(int, double, const SBMStructuralModelNodeAtom*)` is "const SBAtom\*". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertype). **See also:** [**SBCMetaValueType::getParameterType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparametertype) Implements [*SBCMetaValueBase::getShortParameterTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortparametertypename) ______________________________________________________________________ ### function getShortParentTypeName *Returns the short parent type name.* ```C++ inline virtual std::string SBCMetaValueType::getShortParentTypeName () const ``` This function returns the short type name of the parent type of `T`. For example, the short parent type name of `SBMStructuralModelNodeAtom*` is "SBAtom". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttype). **See also:** [**SBCMetaValueType::getParentType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getparenttype), [**SBCMetaValueType::getShortRootTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortroottypename) Implements [*SBCMetaValueBase::getShortParentTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortparenttypename) ______________________________________________________________________ ### function getShortRootTypeName *Returns the short root type name.* ```C++ inline virtual std::string SBCMetaValueType::getShortRootTypeName () const ``` This function returns the type name of the root type of `T`. For example, the short root type name of `const SBMStructuralModelNodeAtom &` is "SBAtom". Note that this function returns a string. If a [**type**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/index.md) is needed, use [**SBCMetaValueType::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottype). **See also:** [**SBCMetaValueType::getRootType()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getroottype), [**SBCMetaValueType::getShortParentTypeName()**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueType/#function-getshortparenttypename) Implements [*SBCMetaValueBase::getShortRootTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshortroottypename) ______________________________________________________________________ ### function getShortTypeName *Returns the short type name.* ```C++ inline virtual std::string SBCMetaValueType::getShortTypeName () const ``` When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its short type name. Else, this function recursively decomposes the type in order to provide a string describing it, but using short names (e.g. "const SBAtom\*"). Implements [*SBCMetaValueBase::getShortTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-getshorttypename) ______________________________________________________________________ ### function getTypeName *Returns the type name.* ```C++ inline virtual std::string SBCMetaValueType::getTypeName () const ``` When the type `T` is fundamental, this function returns a string containing the fundamental type (e.g. "unsigned int"). When `T` is registered (via `SB_REGISTER_TYPE`), this function returns its type name. Else, this function recursively decomposes the type in order to provide a string describing it (e.g. "const SBMStructuralModelNodeAtom\*"). Implements [*SBCMetaValueBase::getTypeName*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-gettypename) ______________________________________________________________________ ### function getTypeUUID *Returns the type* [***UUID***](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) *.* ```C++ inline virtual SBCContainerUUID SBCMetaValueType::getTypeUUID () const ``` Implements [*SBCMetaValueBase::getTypeUUID*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-gettypeuuid) ______________________________________________________________________ ### function hasBaseType *Returns true if the value is of a type that has a base type.* ```C++ inline virtual bool SBCMetaValueType::hasBaseType () const ``` Implements [*SBCMetaValueBase::hasBaseType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-hasbasetype) ______________________________________________________________________ ### function isArrayType *Returns true if the value is of an array type.* ```C++ inline virtual bool SBCMetaValueType::isArrayType () const ``` Implements [*SBCMetaValueBase::isArrayType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isarraytype) ______________________________________________________________________ ### function isClassType *Returns true if the value is of a class type.* ```C++ inline virtual bool SBCMetaValueType::isClassType () const ``` Implements [*SBCMetaValueBase::isClassType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isclasstype) ______________________________________________________________________ ### function isConstType *Returns true if the value is of a const type.* ```C++ inline virtual bool SBCMetaValueType::isConstType () const ``` Implements [*SBCMetaValueBase::isConstType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isconsttype) ______________________________________________________________________ ### function isEnumType *Returns true if the value is of an enum type.* ```C++ inline virtual bool SBCMetaValueType::isEnumType () const ``` Implements [*SBCMetaValueBase::isEnumType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isenumtype) ______________________________________________________________________ ### function isFunctionType *Returns true if the value is of a function type.* ```C++ inline virtual bool SBCMetaValueType::isFunctionType () const ``` Implements [*SBCMetaValueBase::isFunctionType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isfunctiontype) ______________________________________________________________________ ### function isFundamentalType *Returns true if the value is of a fundamental type.* ```C++ inline virtual bool SBCMetaValueType::isFundamentalType () const ``` Returns true if the value is of a fundamental type (void, bool, char, signed char, unsigned char, wchar_t, short, unsigned short, int, unsigned int, long, unsigned long, float, double or long double). Implements [*SBCMetaValueBase::isFundamentalType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isfundamentaltype) ______________________________________________________________________ ### function isPointerToFunctionType *Returns true if the value is of a pointer to function type.* ```C++ inline virtual bool SBCMetaValueType::isPointerToFunctionType () const ``` Implements [*SBCMetaValueBase::isPointerToFunctionType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertofunctiontype) ______________________________________________________________________ ### function isPointerToMemberFunctionType *Returns true if the value is of a pointer to member function type.* ```C++ inline virtual bool SBCMetaValueType::isPointerToMemberFunctionType () const ``` Implements [*SBCMetaValueBase::isPointerToMemberFunctionType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertomemberfunctiontype) ______________________________________________________________________ ### function isPointerToMemberType *Returns true if the value is of a pointer to member type.* ```C++ inline virtual bool SBCMetaValueType::isPointerToMemberType () const ``` Implements [*SBCMetaValueBase::isPointerToMemberType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertomembertype) ______________________________________________________________________ ### function isPointerType *Returns true if the value is of a pointer type.* ```C++ inline virtual bool SBCMetaValueType::isPointerType () const ``` Implements [*SBCMetaValueBase::isPointerType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-ispointertype) ______________________________________________________________________ ### function isReferenceType *Returns true if the value is of a reference type.* ```C++ inline virtual bool SBCMetaValueType::isReferenceType () const ``` Implements [*SBCMetaValueBase::isReferenceType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isreferencetype) ______________________________________________________________________ ### function isRegisteredType *Returns true if the value is of a registered type.* ```C++ inline virtual bool SBCMetaValueType::isRegisteredType () const ``` Implements [*SBCMetaValueBase::isRegisteredType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isregisteredtype) ______________________________________________________________________ ### function isVolatileType *Returns true if the value is of a volatile type.* ```C++ inline virtual bool SBCMetaValueType::isVolatileType () const ``` Implements [*SBCMetaValueBase::isVolatileType*](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueBase/#function-isvolatiletype) ______________________________________________________________________ ### function ~SBCMetaValueType *Destructs the type.* ```C++ inline virtual SBCMetaValueType::~SBCMetaValueType () ``` ______________________________________________________________________ # SBPointer # Class SBCReferencePointer **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCReferencePointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) *This class describes a pointer to a reference target.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceOwnerSingleton](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/index.md) ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCReferencePointer**](#function-sbcreferencepointer-13) () *Builds a SAMSON pointer.* | | | [**SBCReferencePointer**](#function-sbcreferencepointer-23) (ReferenceTargetType * t) *Builds a SAMSON pointer to the reference target* `t` *.* | | | [**SBCReferencePointer**](#function-sbcreferencepointer-33) (const [**SBCReferencePointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md)< ReferenceTargetType > & p) *Copy constructor.* | | ReferenceTargetType \* | [**getPointer**](#function-getpointer) () const *Returns a pointer to the reference target.* | | bool | [**operator!=**](#function-operator) (const [**SBCReferencePointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) & p) const *Inequality operator: returns* `true` *if both SAMSON pointers refer to different targets.* | | bool | [**operator!=**](#function-operator_1) (ReferenceTargetType * t) noexcept const *Inequality operator: returns* `true` *if this SAMSON pointer does not refer to the given target*`t` \_\_ | | ReferenceTargetType \* | [**operator()**](#function-operator_2) () const *Returns a pointer to the reference target.* | | ReferenceTargetType & | [**operator\***](#function-operator_3) () *Returns a reference to the reference target.* | | ReferenceTargetType \* | [**operator->**](#function-operator-) () const *Returns a pointer to the reference target.* | | [**SBCReferencePointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) & | [**operator=**](#function-operator_4) (ReferenceTargetType * t) *Assignment operator.* | | [**SBCReferencePointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) & | [**operator=**](#function-operator_5) (const [**SBCReferencePointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) & p) *Copy assignment operator.* | | bool | [**operator==**](#function-operator_6) (const [**SBCReferencePointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) & p) const *Equality operator: returns* `true` *if both SAMSON pointers refer to the same target.* | | bool | [**operator==**](#function-operator_7) (ReferenceTargetType * t) noexcept const *Equality operator: returns* `true` *if this SAMSON pointer refers to the given target*`t` \_\_ | | virtual | [**~SBCReferencePointer**](#function-sbcreferencepointer) () *Destructor.* | ## Public Functions inherited from SBCReferenceOwnerSingleton See [SBCReferenceOwnerSingleton](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceOwnerSingleton**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-sbcreferenceownersingleton-13) () *Default constructor.* | | | [**SBCReferenceOwnerSingleton**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-sbcreferenceownersingleton-23) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget) *Builds a reference owner referencing the target* `referenceTarget` *.* | | | [**SBCReferenceOwnerSingleton**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-sbcreferenceownersingleton-33) (const [**SBCReferenceOwnerSingleton**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/index.md) & p) *Copy constructor.* | | virtual void | [**deleteReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-deletereferencetarget) () *Deletes the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) \* | [**getReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-getreferencetarget) () const *Returns the reference target.* | | bool | [**isValid**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-isvalid) () noexcept const *Returns* `true` *if and only if the reference target is non null.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-print-12) (std::ostream & os) const *Prints debugging information.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-print-22) () const *Prints debugging information.* | | void | [**setReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-setreferencetarget) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget) *Sets the reference target.* | | virtual | [**~SBCReferenceOwnerSingleton**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-sbcreferenceownersingleton) () *Destructor.* | ## Public Static Functions | Type | Name | | ------- | ----------------------------------------------------------------------------------------------------- | | void | [**operator delete**](#function-operator-delete) (void * p, std::size_t size) *The* `new` *operator.* | | void \* | [**operator new**](#function-operator-new) (std::size_t size) | ## Protected Attributes inherited from SBCReferenceOwnerSingleton See [SBCReferenceOwnerSingleton](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/index.md) | Type | Name | | -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceToTarget | [**referenceToTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#variable-referencetotarget) *The reference to the target.* | ## Protected Functions inherited from SBCReferenceOwnerSingleton See [SBCReferenceOwnerSingleton](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/index.md) | Type | Name | | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | virtual void | [**detachReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-detachreferencetarget) () *Detaches the reference target.* | ## Protected Functions inherited from SBCReferenceOwner See [SBCReferenceOwner](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) | Type | Name | | ------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/#function-sbcreferenceowner) () noexcept *Constructs a reference owner.* | | virtual | [**~SBCReferenceOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/#function-sbcreferenceowner) () *Destructs the reference owner.* | ## Detailed Description This class defines [**SAMSON pointers**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md), used to maintain references to a [**pointer target**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md), i.e. objects of classes which derive from [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md). Each SAMSON pointer may hold one reference at most. With [**SAMSON pointer indexes**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) and [**SAMSON pointer lists**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md), SAMSON pointers collectively form [**reference owners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md). Unlike traditional C++ pointers, [**SAMSON pointers**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointer/index.md) have two main characteristics: - they (collectively) own the [**reference target**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) they point to: when the last [**reference owner**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwner/index.md) is destructed, the [**reference target**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) is deleted. In the data graph of SAMSON, objects may be created and deleted by some objects, SAMSON Extensions, etc. A SAMSON pointer will be automatically set to zero when the referenced object is deleted. **Short name**: SBPointer ## Public Functions Documentation ### function SBCReferencePointer [1/3] *Builds a SAMSON pointer.* ```C++ inline SBCReferencePointer::SBCReferencePointer () ``` ______________________________________________________________________ ### function SBCReferencePointer [2/3] *Builds a SAMSON pointer to the reference target* `t` *.* ```C++ inline SBCReferencePointer::SBCReferencePointer ( ReferenceTargetType * t ) ``` ______________________________________________________________________ ### function SBCReferencePointer [3/3] *Copy constructor.* ```C++ inline SBCReferencePointer::SBCReferencePointer ( const SBCReferencePointer < ReferenceTargetType > & p ) ``` ______________________________________________________________________ ### function getPointer *Returns a pointer to the reference target.* ```C++ inline ReferenceTargetType * SBCReferencePointer::getPointer () const ``` ______________________________________________________________________ ### function operator!= *Inequality operator: returns* `true` *if both SAMSON pointers refer to different targets.* ```C++ inline bool SBCReferencePointer::operator!= ( const SBCReferencePointer & p ) const ``` ______________________________________________________________________ ### function operator!= *Inequality operator: returns* `true` *if this SAMSON pointer does not refer to the given target*`t` \_\_ ```C++ inline bool SBCReferencePointer::operator!= ( ReferenceTargetType * t ) noexcept const ``` ______________________________________________________________________ ### function operator() *Returns a pointer to the reference target.* ```C++ inline ReferenceTargetType * SBCReferencePointer::operator() () const ``` ______________________________________________________________________ ### function operator\* *Returns a reference to the reference target.* ```C++ inline ReferenceTargetType & SBCReferencePointer::operator* () ``` ______________________________________________________________________ ### function operator-> *Returns a pointer to the reference target.* ```C++ inline ReferenceTargetType * SBCReferencePointer::operator-> () const ``` ______________________________________________________________________ ### function operator= *Assignment operator.* ```C++ inline SBCReferencePointer & SBCReferencePointer::operator= ( ReferenceTargetType * t ) ``` ______________________________________________________________________ ### function operator= *Copy assignment operator.* ```C++ inline SBCReferencePointer & SBCReferencePointer::operator= ( const SBCReferencePointer & p ) ``` ______________________________________________________________________ ### function operator== *Equality operator: returns* `true` *if both SAMSON pointers refer to the same target.* ```C++ inline bool SBCReferencePointer::operator== ( const SBCReferencePointer & p ) const ``` ______________________________________________________________________ ### function operator== *Equality operator: returns* `true` *if this SAMSON pointer refers to the given target*`t` \_\_ ```C++ inline bool SBCReferencePointer::operator== ( ReferenceTargetType * t ) noexcept const ``` ______________________________________________________________________ ### function ~SBCReferencePointer *Destructor.* ```C++ inline virtual SBCReferencePointer::~SBCReferencePointer () ``` ______________________________________________________________________ ## Public Static Functions Documentation ### function operator delete *The* `new` *operator.* ```C++ static inline void SBCReferencePointer::operator delete ( void * p, std::size_t size ) ``` ______________________________________________________________________ ### function operator new ```C++ static inline void * SBCReferencePointer::operator new ( std::size_t size ) ``` ______________________________________________________________________ # SBPointerIndexer # Class SBCReferencePointerIndexer **template \** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCReferencePointerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) *The class SBCReferenceOwnerIndexer implements an owner which references targets (or references to targets) through an indexer.* [More...](#detailed-description) - `#include ` Inherits the following classes: SBCReferenceOwnerIndexer ## Classes | Type | Name | | ----- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**const_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer_1_1const__iterator/index.md) | | class | [**const_reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer_1_1const__reverse__iterator/index.md) | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer_1_1reverse__iterator/index.md) | ## Public Functions | Type | Name | | ------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferencePointerIndexer**](#function-sbcreferencepointerindexer-13) () *Builds a SAMSON pointer indexer.* | | | [**SBCReferencePointerIndexer**](#function-sbcreferencepointerindexer-23) (unsigned int initialSize) *Builds a SAMSON pointer indexer of size* `initialSize` *.* | | | [**SBCReferencePointerIndexer**](#function-sbcreferencepointerindexer-33) (const [**SBCReferencePointerIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerIndexer/index.md) & pointerIndex) *Copy constructor.* | | iterator | [**begin**](#function-begin-12) () *Returns an iterator that points to the beginning of the pointer indexer.* | | const_iterator | [**begin**](#function-begin-22) () const *Returns a const iterator that points to the beginning of the pointer indexer.* | | iterator | [**end**](#function-end-12) () *Returns an iterator that points to the end of the pointer indexer.* | | const_iterator | [**end**](#function-end-22) () const *Returns a const iterator that points to the end of the pointer indexer.* | | ReferenceTargetType \* | [**getReferenceTarget**](#function-getreferencetarget) (unsigned int referenceTargetIndex) const | | ReferenceToTargetType \* | [**getReferenceToTarget**](#function-getreferencetotarget) (unsigned int referenceToTargetIndex) const | | ReferenceTargetType \* | [**operator[]**](#function-operator) (unsigned int referenceTargetIndex) const | | reverse_iterator | [**rbegin**](#function-rbegin-12) () *Returns a reverse iterator that points to the reverse beginning of the pointer indexer.* | | const_reverse_iterator | [**rbegin**](#function-rbegin-22) () const *Returns a const reverse iterator that points to the reverse beginning of the pointer indexer.* | | reverse_iterator | [**rend**](#function-rend-12) () *Returns a reverse iterator that points to the reverse end of the pointer indexer.* | | const_reverse_iterator | [**rend**](#function-rend-22) () const *Returns a const reverse iterator that points to the reverse end of the pointer indexer.* | | virtual | [**~SBCReferencePointerIndexer**](#function-sbcreferencepointerindexer) () *Destructor.* | ## Public Static Functions | Type | Name | | ------- | ----------------------------------------------------------------------------------------------------- | | void | [**operator delete**](#function-operator-delete) (void * p, std::size_t size) *The* `new` *operator.* | | void \* | [**operator new**](#function-operator-new) (std::size_t size) | ## Detailed Description Finding the index associated to a target takes an almost constant time, while accessing a target given its index takes constant time. **Short name**: SBPointerIndexer ## Public Functions Documentation ### function SBCReferencePointerIndexer [1/3] *Builds a SAMSON pointer indexer.* ```C++ inline SBCReferencePointerIndexer::SBCReferencePointerIndexer () ``` ______________________________________________________________________ ### function SBCReferencePointerIndexer [2/3] *Builds a SAMSON pointer indexer of size* `initialSize` *.* ```C++ inline explicit SBCReferencePointerIndexer::SBCReferencePointerIndexer ( unsigned int initialSize ) ``` ______________________________________________________________________ ### function SBCReferencePointerIndexer [3/3] *Copy constructor.* ```C++ inline SBCReferencePointerIndexer::SBCReferencePointerIndexer ( const SBCReferencePointerIndexer & pointerIndex ) ``` ______________________________________________________________________ ### function begin [1/2] *Returns an iterator that points to the beginning of the pointer indexer.* ```C++ inline iterator SBCReferencePointerIndexer::begin () ``` ______________________________________________________________________ ### function begin [2/2] *Returns a const iterator that points to the beginning of the pointer indexer.* ```C++ inline const_iterator SBCReferencePointerIndexer::begin () const ``` ______________________________________________________________________ ### function end [1/2] *Returns an iterator that points to the end of the pointer indexer.* ```C++ inline iterator SBCReferencePointerIndexer::end () ``` ______________________________________________________________________ ### function end [2/2] *Returns a const iterator that points to the end of the pointer indexer.* ```C++ inline const_iterator SBCReferencePointerIndexer::end () const ``` ______________________________________________________________________ ### function getReferenceTarget ```C++ inline ReferenceTargetType * SBCReferencePointerIndexer::getReferenceTarget ( unsigned int referenceTargetIndex ) const ``` ______________________________________________________________________ ### function getReferenceToTarget ```C++ inline ReferenceToTargetType * SBCReferencePointerIndexer::getReferenceToTarget ( unsigned int referenceToTargetIndex ) const ``` ______________________________________________________________________ ### function operator[] ```C++ inline ReferenceTargetType * SBCReferencePointerIndexer::operator[] ( unsigned int referenceTargetIndex ) const ``` ______________________________________________________________________ ### function rbegin [1/2] *Returns a reverse iterator that points to the reverse beginning of the pointer indexer.* ```C++ inline reverse_iterator SBCReferencePointerIndexer::rbegin () ``` ______________________________________________________________________ ### function rbegin [2/2] *Returns a const reverse iterator that points to the reverse beginning of the pointer indexer.* ```C++ inline const_reverse_iterator SBCReferencePointerIndexer::rbegin () const ``` ______________________________________________________________________ ### function rend [1/2] *Returns a reverse iterator that points to the reverse end of the pointer indexer.* ```C++ inline reverse_iterator SBCReferencePointerIndexer::rend () ``` ______________________________________________________________________ ### function rend [2/2] *Returns a const reverse iterator that points to the reverse end of the pointer indexer.* ```C++ inline const_reverse_iterator SBCReferencePointerIndexer::rend () const ``` ______________________________________________________________________ ### function ~SBCReferencePointerIndexer *Destructor.* ```C++ inline virtual SBCReferencePointerIndexer::~SBCReferencePointerIndexer () ``` ______________________________________________________________________ ## Public Static Functions Documentation ### function operator delete *The* `new` *operator.* ```C++ static inline void SBCReferencePointerIndexer::operator delete ( void * p, std::size_t size ) ``` ______________________________________________________________________ ### function operator new ```C++ static inline void * SBCReferencePointerIndexer::operator new ( std::size_t size ) ``` ______________________________________________________________________ # SBPointerList # Class SBCReferencePointerList **template \** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCReferencePointerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md) *The class* [***SBCReferencePointerList***](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md) *is a convenience class used to reference a list of targets of a given type that derives from*[***SBCReferenceTarget***](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) *.*[More...](#detailed-description) - `#include ` Inherits the following classes: SBCReferenceOwnerList ## Classes | Type | Name | | ----- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**const_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList_1_1const__iterator/index.md) | | class | [**const_reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList_1_1const__reverse__iterator/index.md) | | class | [**iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList_1_1iterator/index.md) | | class | [**reverse_iterator**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList_1_1reverse__iterator/index.md) | ## Public Types | Type | Name | | --------------------------- | ------------------------------------- | | typedef ReferenceTargetType | [**TargetType**](#typedef-targettype) | ## Public Functions | Type | Name | | ---------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferencePointerList**](#function-sbcreferencepointerlist-12) () *Builds a SAMSON pointer list.* | | | [**SBCReferencePointerList**](#function-sbcreferencepointerlist-22) (const [**SBCReferencePointerList**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferencePointerList/index.md) & pointerList) *Copy constructor.* | | iterator | [**begin**](#function-begin-12) () *Returns an iterator that points to the beginning of the pointer list.* | | const_iterator | [**begin**](#function-begin-22) () const *Returns a const iterator that points to the beginning of the pointer list.* | | iterator | [**end**](#function-end-12) () *Returns an iterator that points to the end of the pointer list.* | | const_iterator | [**end**](#function-end-22) () const *Returns a const iterator that points to the end of the pointer list.* | | iterator | [**erase**](#function-erase-12) (iterator position) | | iterator | [**erase**](#function-erase-22) (iterator first, iterator last) | | iterator | [**find**](#function-find-12) (ReferenceTargetType * referenceTarget) | | const_iterator | [**find**](#function-find-22) (ReferenceTargetType * referenceTarget) const | | ReferenceTargetType \* | [**first**](#function-first) () const | | ReferenceTargetType \* | [**last**](#function-last) () const | | reverse_iterator | [**rbegin**](#function-rbegin-12) () *Returns a reverse iterator that points to the reverse beginning of the pointer list.* | | const_reverse_iterator | [**rbegin**](#function-rbegin-22) () const *Returns a const reverse iterator that points to the reverse beginning of the pointer list.* | | reverse_iterator | [**rend**](#function-rend-12) () *Returns a reverse iterator that points to the reverse end of the pointer list.* | | const_reverse_iterator | [**rend**](#function-rend-22) () const *Returns a const reverse iterator that points to the reverse end of the pointer list.* | | virtual | [**~SBCReferencePointerList**](#function-sbcreferencepointerlist) () *Destructor.* | ## Detailed Description Convenience functions are provided to cast both to the target type and to the target reference type. **Short name**: SBPointerList ## Public Types Documentation ### typedef TargetType ```C++ typedef ReferenceTargetType SBCReferencePointerList< ReferenceTargetType, ReferenceToTargetType >::TargetType; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBCReferencePointerList [1/2] *Builds a SAMSON pointer list.* ```C++ inline SBCReferencePointerList::SBCReferencePointerList () ``` ______________________________________________________________________ ### function SBCReferencePointerList [2/2] *Copy constructor.* ```C++ inline SBCReferencePointerList::SBCReferencePointerList ( const SBCReferencePointerList & pointerList ) ``` ______________________________________________________________________ ### function begin [1/2] *Returns an iterator that points to the beginning of the pointer list.* ```C++ inline iterator SBCReferencePointerList::begin () ``` ______________________________________________________________________ ### function begin [2/2] *Returns a const iterator that points to the beginning of the pointer list.* ```C++ inline const_iterator SBCReferencePointerList::begin () const ``` ______________________________________________________________________ ### function end [1/2] *Returns an iterator that points to the end of the pointer list.* ```C++ inline iterator SBCReferencePointerList::end () ``` ______________________________________________________________________ ### function end [2/2] *Returns a const iterator that points to the end of the pointer list.* ```C++ inline const_iterator SBCReferencePointerList::end () const ``` ______________________________________________________________________ ### function erase [1/2] ```C++ inline iterator SBCReferencePointerList::erase ( iterator position ) ``` ______________________________________________________________________ ### function erase [2/2] ```C++ inline iterator SBCReferencePointerList::erase ( iterator first, iterator last ) ``` ______________________________________________________________________ ### function find [1/2] ```C++ inline iterator SBCReferencePointerList::find ( ReferenceTargetType * referenceTarget ) ``` ______________________________________________________________________ ### function find [2/2] ```C++ inline const_iterator SBCReferencePointerList::find ( ReferenceTargetType * referenceTarget ) const ``` ______________________________________________________________________ ### function first ```C++ inline ReferenceTargetType * SBCReferencePointerList::first () const ``` ______________________________________________________________________ ### function last ```C++ inline ReferenceTargetType * SBCReferencePointerList::last () const ``` ______________________________________________________________________ ### function rbegin [1/2] *Returns a reverse iterator that points to the reverse beginning of the pointer list.* ```C++ inline reverse_iterator SBCReferencePointerList::rbegin () ``` ______________________________________________________________________ ### function rbegin [2/2] *Returns a const reverse iterator that points to the reverse beginning of the pointer list.* ```C++ inline const_reverse_iterator SBCReferencePointerList::rbegin () const ``` ______________________________________________________________________ ### function rend [1/2] *Returns a reverse iterator that points to the reverse end of the pointer list.* ```C++ inline reverse_iterator SBCReferencePointerList::rend () ``` ______________________________________________________________________ ### function rend [2/2] *Returns a const reverse iterator that points to the reverse end of the pointer list.* ```C++ inline const_reverse_iterator SBCReferencePointerList::rend () const ``` ______________________________________________________________________ ### function ~SBCReferencePointerList *Destructor.* ```C++ inline virtual SBCReferencePointerList::~SBCReferencePointerList () ``` ______________________________________________________________________ # SBSerializer # Class SBCSerializer [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) *This class is the base class for serializers.* [More...](#detailed-description) - `#include ` Inherited by the following classes: [SBCSerializerBinary](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerBinary/index.md), [SBCSerializerMemory](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerMemory/index.md), [SBCSerializerXML](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerXML/index.md) ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCSerializer**](#function-sbcserializer) () *Constructor.* | | virtual bool | [**readBoolElement**](#function-readboolelement) () *Reads an element of boolean type.* | | virtual char \* | [**readCharArrayElement**](#function-readchararrayelement) (unsigned int & arraySize) *Reads an element of char array type of size* `arraySize` *.* | | virtual char | [**readCharElement**](#function-readcharelement) () *Reads an element of char type.* | | virtual double | [**readDoubleElement**](#function-readdoubleelement) () *Reads an element of double type.* | | virtual void | [**readEndElement**](#function-readendelement) () *Reads the end element.* | | virtual float | [**readFloatElement**](#function-readfloatelement) () *Reads an element of float type.* | | virtual int | [**readIntElement**](#function-readintelement) () *Reads an element of integer type.* | | virtual long | [**readLongElement**](#function-readlongelement) () *Reads an element of long integer type.* | | virtual long long | [**readLongLongElement**](#function-readlonglongelement) () *Reads an element of long long integer type.* | | virtual short | [**readShortElement**](#function-readshortelement) () *Reads an element of short integer type.* | | virtual void | [**readStartElement**](#function-readstartelement) () *Reads the start element.* | | virtual std::string | [**readStringElement**](#function-readstringelement) () *Reads an element of string type.* | | virtual std::string | [**readStringElementFromBase64**](#function-readstringelementfrombase64) () *Reads an element of string type in Base64 (supports html)* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**readUUIDElement**](#function-readuuidelement) () *Reads an element of UUID type.* | | virtual unsigned char | [**readUnsignedCharElement**](#function-readunsignedcharelement) () *Reads an element of unsigned char type.* | | virtual unsigned int | [**readUnsignedIntElement**](#function-readunsignedintelement) () *Reads an element of unsigned integer type.* | | virtual unsigned long | [**readUnsignedLongElement**](#function-readunsignedlongelement) () *Reads an element of unsigned long integer type.* | | virtual unsigned long long | [**readUnsignedLongLongElement**](#function-readunsignedlonglongelement) () *Reads an element of unsigned long long integer type.* | | virtual unsigned short | [**readUnsignedShortElement**](#function-readunsignedshortelement) () *Reads an element of unsigned short integer type.* | | virtual void | [**writeBoolElement**](#function-writeboolelement) (const std::string & elementName, bool element) *Writes an element of boolean type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeCharArrayElement**](#function-writechararrayelement) (const std::string & elementName, const char * elementArray, unsigned int arraySize) *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* | | virtual void | [**writeCharElement**](#function-writecharelement) (const std::string & elementName, char element) *Writes an element of char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeDoubleElement**](#function-writedoubleelement) (const std::string & elementName, double element) *Writes an element of double type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeEndElement**](#function-writeendelement) () *Writes the end element.* | | virtual void | [**writeFloatElement**](#function-writefloatelement) (const std::string & elementName, float element) *Writes an element of float type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeIntElement**](#function-writeintelement) (const std::string & elementName, int element) *Writes an element of integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongElement**](#function-writelongelement) (const std::string & elementName, long element) *Writes an element of long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongLongElement**](#function-writelonglongelement) (const std::string & elementName, long long element) *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeShortElement**](#function-writeshortelement) (const std::string & elementName, short element) *Writes an element of short integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStartElement**](#function-writestartelement) (const std::string & elementName) *Writes the start element with* `elementName` *name.* | | virtual void | [**writeStringElement**](#function-writestringelement) (const std::string & elementName, const std::string & element) *Writes an element of string type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStringElementInBase64**](#function-writestringelementinbase64) (const std::string & elementName, const std::string & element) *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUUIDElement**](#function-writeuuidelement) (const std::string & elementName, const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & element) *Writes an element of UUID type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedCharElement**](#function-writeunsignedcharelement) (const std::string & elementName, unsigned char element) *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedIntElement**](#function-writeunsignedintelement) (const std::string & elementName, unsigned int element) *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongElement**](#function-writeunsignedlongelement) (const std::string & elementName, unsigned long element) *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongLongElement**](#function-writeunsignedlonglongelement) (const std::string & elementName, unsigned long long element) *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedShortElement**](#function-writeunsignedshortelement) (const std::string & elementName, unsigned short element) *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* | | virtual | [**~SBCSerializer**](#function-sbcserializer) () *Destructor.* | ## Detailed Description **Short name**: SBSerializer ## Public Functions Documentation ### function SBCSerializer *Constructor.* ```C++ SBCSerializer::SBCSerializer () ``` Default constructor. ______________________________________________________________________ ### function readBoolElement *Reads an element of boolean type.* ```C++ virtual bool SBCSerializer::readBoolElement () ``` Reads a boolean element. **Returns:** The value of the boolean element. ______________________________________________________________________ ### function readCharArrayElement *Reads an element of char array type of size* `arraySize` *.* ```C++ virtual char * SBCSerializer::readCharArrayElement ( unsigned int & arraySize ) ``` Reads a character array element. **Parameters:** - `arraySize` Reference that receives the size of the returned array. **Returns:** Pointer to a character array containing the element data. ______________________________________________________________________ ### function readCharElement *Reads an element of char type.* ```C++ virtual char SBCSerializer::readCharElement () ``` Reads a character element. **Returns:** The value of the character element. ______________________________________________________________________ ### function readDoubleElement *Reads an element of double type.* ```C++ virtual double SBCSerializer::readDoubleElement () ``` Reads a double element. **Returns:** The value of the double element. ______________________________________________________________________ ### function readEndElement *Reads the end element.* ```C++ virtual void SBCSerializer::readEndElement () ``` ______________________________________________________________________ ### function readFloatElement *Reads an element of float type.* ```C++ virtual float SBCSerializer::readFloatElement () ``` Reads a float element. **Returns:** The value of the float element. ______________________________________________________________________ ### function readIntElement *Reads an element of integer type.* ```C++ virtual int SBCSerializer::readIntElement () ``` Reads an integer element. **Returns:** The value of the integer element. ______________________________________________________________________ ### function readLongElement *Reads an element of long integer type.* ```C++ virtual long SBCSerializer::readLongElement () ``` Reads a long integer element. **Returns:** The value of the long integer element. ______________________________________________________________________ ### function readLongLongElement *Reads an element of long long integer type.* ```C++ virtual long long SBCSerializer::readLongLongElement () ``` Reads a long long integer element. **Returns:** The value of the long long integer element. ______________________________________________________________________ ### function readShortElement *Reads an element of short integer type.* ```C++ virtual short SBCSerializer::readShortElement () ``` Reads a short integer element. **Returns:** The value of the short integer element. ______________________________________________________________________ ### function readStartElement *Reads the start element.* ```C++ virtual void SBCSerializer::readStartElement () ``` ______________________________________________________________________ ### function readStringElement *Reads an element of string type.* ```C++ virtual std::string SBCSerializer::readStringElement () ``` Reads a string element. **Returns:** The value of the string element. ______________________________________________________________________ ### function readStringElementFromBase64 *Reads an element of string type in Base64 (supports html)* ```C++ virtual std::string SBCSerializer::readStringElementFromBase64 () ``` Reads a Base64-encoded string element and decodes it. **Returns:** The decoded string value. ______________________________________________________________________ ### function readUUIDElement *Reads an element of UUID type.* ```C++ virtual SBCContainerUUID SBCSerializer::readUUIDElement () ``` Reads a UUID element. **Returns:** The value of the UUID element. ______________________________________________________________________ ### function readUnsignedCharElement *Reads an element of unsigned char type.* ```C++ virtual unsigned char SBCSerializer::readUnsignedCharElement () ``` Reads an unsigned character element. **Returns:** The value of the unsigned character element. ______________________________________________________________________ ### function readUnsignedIntElement *Reads an element of unsigned integer type.* ```C++ virtual unsigned int SBCSerializer::readUnsignedIntElement () ``` Reads an unsigned integer element. **Returns:** The value of the unsigned integer element. ______________________________________________________________________ ### function readUnsignedLongElement *Reads an element of unsigned long integer type.* ```C++ virtual unsigned long SBCSerializer::readUnsignedLongElement () ``` Reads an unsigned long integer element. **Returns:** The value of the unsigned long integer element. ______________________________________________________________________ ### function readUnsignedLongLongElement *Reads an element of unsigned long long integer type.* ```C++ virtual unsigned long long SBCSerializer::readUnsignedLongLongElement () ``` Reads an unsigned long long integer element. **Returns:** The value of the unsigned long long integer element. ______________________________________________________________________ ### function readUnsignedShortElement *Reads an element of unsigned short integer type.* ```C++ virtual unsigned short SBCSerializer::readUnsignedShortElement () ``` Reads an unsigned short integer element. **Returns:** The value of the unsigned short integer element. ______________________________________________________________________ ### function writeBoolElement *Writes an element of boolean type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeBoolElement ( const std::string & elementName, bool element ) ``` Writes a boolean element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the boolean element. ______________________________________________________________________ ### function writeCharArrayElement *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* ```C++ virtual void SBCSerializer::writeCharArrayElement ( const std::string & elementName, const char * elementArray, unsigned int arraySize ) ``` Writes a character array element with the given name, data, and size. **Parameters:** - `elementName` Name of the element. - `elementArray` Pointer to the character array data. - `arraySize` Number of characters in the array. ______________________________________________________________________ ### function writeCharElement *Writes an element of char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeCharElement ( const std::string & elementName, char element ) ``` Writes a character element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the character element. ______________________________________________________________________ ### function writeDoubleElement *Writes an element of double type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeDoubleElement ( const std::string & elementName, double element ) ``` Writes a double element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the double element. ______________________________________________________________________ ### function writeEndElement *Writes the end element.* ```C++ virtual void SBCSerializer::writeEndElement () ``` ______________________________________________________________________ ### function writeFloatElement *Writes an element of float type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeFloatElement ( const std::string & elementName, float element ) ``` Writes a float element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the float element. ______________________________________________________________________ ### function writeIntElement *Writes an element of integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeIntElement ( const std::string & elementName, int element ) ``` Writes an integer element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the integer element. ______________________________________________________________________ ### function writeLongElement *Writes an element of long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeLongElement ( const std::string & elementName, long element ) ``` Writes a long integer element with the given name and value. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. **Parameters:** - `elementName` Name of the element. - `element` Value of the long integer element. ______________________________________________________________________ ### function writeLongLongElement *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeLongLongElement ( const std::string & elementName, long long element ) ``` Writes a long long integer element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the long long integer element. ______________________________________________________________________ ### function writeShortElement *Writes an element of short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeShortElement ( const std::string & elementName, short element ) ``` Writes a short integer element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the short integer element. ______________________________________________________________________ ### function writeStartElement *Writes the start element with* `elementName` *name.* ```C++ virtual void SBCSerializer::writeStartElement ( const std::string & elementName ) ``` Writes the start element with the specified name. **Parameters:** - `elementName` Name of the element to start. ______________________________________________________________________ ### function writeStringElement *Writes an element of string type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeStringElement ( const std::string & elementName, const std::string & element ) ``` Writes a string element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the string element. ______________________________________________________________________ ### function writeStringElementInBase64 *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeStringElementInBase64 ( const std::string & elementName, const std::string & element ) ``` Writes a string element in Base64 encoding with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the string element to be encoded in Base64. ______________________________________________________________________ ### function writeUUIDElement *Writes an element of UUID type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeUUIDElement ( const std::string & elementName, const SBCContainerUUID & element ) ``` Writes a UUID element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the UUID element. ______________________________________________________________________ ### function writeUnsignedCharElement *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeUnsignedCharElement ( const std::string & elementName, unsigned char element ) ``` Writes an unsigned character element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the unsigned character element. ______________________________________________________________________ ### function writeUnsignedIntElement *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeUnsignedIntElement ( const std::string & elementName, unsigned int element ) ``` Writes an unsigned integer element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the unsigned integer element. ______________________________________________________________________ ### function writeUnsignedLongElement *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeUnsignedLongElement ( const std::string & elementName, unsigned long element ) ``` Writes an unsigned long integer element with the given name and value. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. **Parameters:** - `elementName` Name of the element. - `element` Value of the unsigned long integer element. ______________________________________________________________________ ### function writeUnsignedLongLongElement *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeUnsignedLongLongElement ( const std::string & elementName, unsigned long long element ) ``` Writes an unsigned long long integer element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the unsigned long long integer element. ______________________________________________________________________ ### function writeUnsignedShortElement *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializer::writeUnsignedShortElement ( const std::string & elementName, unsigned short element ) ``` Writes an unsigned short integer element with the given name and value. **Parameters:** - `elementName` Name of the element. - `element` Value of the unsigned short integer element. ______________________________________________________________________ ### function ~SBCSerializer *Destructor.* ```C++ virtual SBCSerializer::~SBCSerializer () ``` Virtual destructor. ______________________________________________________________________ # SBSerializerBinary # Class SBCSerializerBinary [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCSerializerBinary**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerBinary/index.md) *This class describes a binary serializer.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCSerializer](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCSerializerBinary**](#function-sbcserializerbinary) (const std::string & fileName, bool write) *Constructor.* | | virtual bool | [**readBoolElement**](#function-readboolelement) () *Reads an element of boolean type.* | | virtual char \* | [**readCharArrayElement**](#function-readchararrayelement) (unsigned int & arraySize) *Reads an element of char array type of size* `arraySize` *.* | | virtual char | [**readCharElement**](#function-readcharelement) () *Reads an element of char type.* | | virtual double | [**readDoubleElement**](#function-readdoubleelement) () *Reads an element of double type.* | | virtual void | [**readEndElement**](#function-readendelement) () *Reads the end element.* | | virtual float | [**readFloatElement**](#function-readfloatelement) () *Reads an element of float type.* | | virtual int | [**readIntElement**](#function-readintelement) () *Reads an element of integer type.* | | virtual long | [**readLongElement**](#function-readlongelement) () *Reads an element of long integer type.* | | virtual long long | [**readLongLongElement**](#function-readlonglongelement) () *Reads an element of long long integer type.* | | virtual short | [**readShortElement**](#function-readshortelement) () *Reads an element of short integer type.* | | virtual void | [**readStartElement**](#function-readstartelement) () *Reads the start element.* | | virtual std::string | [**readStringElement**](#function-readstringelement) () *Reads an element of string type.* | | virtual std::string | [**readStringElementFromBase64**](#function-readstringelementfrombase64) () *Reads an element of string type in Base64 (supports html)* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**readUUIDElement**](#function-readuuidelement) () *Reads an element of UUID type.* | | virtual unsigned char | [**readUnsignedCharElement**](#function-readunsignedcharelement) () *Reads an element of unsigned char type.* | | virtual unsigned int | [**readUnsignedIntElement**](#function-readunsignedintelement) () *Reads an element of unsigned integer type.* | | virtual unsigned long | [**readUnsignedLongElement**](#function-readunsignedlongelement) () *Reads an element of unsigned long integer type.* | | virtual unsigned long long | [**readUnsignedLongLongElement**](#function-readunsignedlonglongelement) () *Reads an element of unsigned long long integer type.* | | virtual unsigned short | [**readUnsignedShortElement**](#function-readunsignedshortelement) () *Reads an element of unsigned short integer type.* | | virtual void | [**writeBoolElement**](#function-writeboolelement) (const std::string & elementName, bool element) *Writes an element of boolean type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeCharArrayElement**](#function-writechararrayelement) (const std::string & elementName, const char * elementArray, unsigned int arraySize) *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* | | virtual void | [**writeCharElement**](#function-writecharelement) (const std::string & elementName, char element) *Writes an element of char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeDoubleElement**](#function-writedoubleelement) (const std::string & elementName, double element) *Writes an element of double type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeEndElement**](#function-writeendelement) () *Writes the end element.* | | virtual void | [**writeFloatElement**](#function-writefloatelement) (const std::string & elementName, float element) *Writes an element of float type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeIntElement**](#function-writeintelement) (const std::string & elementName, int element) *Writes an element of integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongElement**](#function-writelongelement) (const std::string & elementName, long element) *Writes an element of long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongLongElement**](#function-writelonglongelement) (const std::string & elementName, long long element) *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeShortElement**](#function-writeshortelement) (const std::string & elementName, short element) *Writes an element of short integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStartElement**](#function-writestartelement) (const std::string & elementName) *Writes the start element with* `elementName` *name.* | | virtual void | [**writeStringElement**](#function-writestringelement) (const std::string & elementName, const std::string & element) *Writes an element of string type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStringElementInBase64**](#function-writestringelementinbase64) (const std::string & elementName, const std::string & element) *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUUIDElement**](#function-writeuuidelement) (const std::string & elementName, const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & element) *Writes an element of UUID type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedCharElement**](#function-writeunsignedcharelement) (const std::string & elementName, unsigned char element) *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedIntElement**](#function-writeunsignedintelement) (const std::string & elementName, unsigned int element) *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongElement**](#function-writeunsignedlongelement) (const std::string & elementName, unsigned long element) *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongLongElement**](#function-writeunsignedlonglongelement) (const std::string & elementName, unsigned long long element) *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedShortElement**](#function-writeunsignedshortelement) (const std::string & elementName, unsigned short element) *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* | | virtual | [**~SBCSerializerBinary**](#function-sbcserializerbinary) () *Destructor.* | ## Public Functions inherited from SBCSerializer See [SBCSerializer](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-sbcserializer) () *Constructor.* | | virtual bool | [**readBoolElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readboolelement) () *Reads an element of boolean type.* | | virtual char \* | [**readCharArrayElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readchararrayelement) (unsigned int & arraySize) *Reads an element of char array type of size* `arraySize` *.* | | virtual char | [**readCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readcharelement) () *Reads an element of char type.* | | virtual double | [**readDoubleElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readdoubleelement) () *Reads an element of double type.* | | virtual void | [**readEndElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readendelement) () *Reads the end element.* | | virtual float | [**readFloatElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readfloatelement) () *Reads an element of float type.* | | virtual int | [**readIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readintelement) () *Reads an element of integer type.* | | virtual long | [**readLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlongelement) () *Reads an element of long integer type.* | | virtual long long | [**readLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlonglongelement) () *Reads an element of long long integer type.* | | virtual short | [**readShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readshortelement) () *Reads an element of short integer type.* | | virtual void | [**readStartElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstartelement) () *Reads the start element.* | | virtual std::string | [**readStringElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelement) () *Reads an element of string type.* | | virtual std::string | [**readStringElementFromBase64**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelementfrombase64) () *Reads an element of string type in Base64 (supports html)* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**readUUIDElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readuuidelement) () *Reads an element of UUID type.* | | virtual unsigned char | [**readUnsignedCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedcharelement) () *Reads an element of unsigned char type.* | | virtual unsigned int | [**readUnsignedIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedintelement) () *Reads an element of unsigned integer type.* | | virtual unsigned long | [**readUnsignedLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlongelement) () *Reads an element of unsigned long integer type.* | | virtual unsigned long long | [**readUnsignedLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlonglongelement) () *Reads an element of unsigned long long integer type.* | | virtual unsigned short | [**readUnsignedShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedshortelement) () *Reads an element of unsigned short integer type.* | | virtual void | [**writeBoolElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeboolelement) (const std::string & elementName, bool element) *Writes an element of boolean type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeCharArrayElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writechararrayelement) (const std::string & elementName, const char * elementArray, unsigned int arraySize) *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* | | virtual void | [**writeCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writecharelement) (const std::string & elementName, char element) *Writes an element of char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeDoubleElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writedoubleelement) (const std::string & elementName, double element) *Writes an element of double type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeEndElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeendelement) () *Writes the end element.* | | virtual void | [**writeFloatElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writefloatelement) (const std::string & elementName, float element) *Writes an element of float type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeintelement) (const std::string & elementName, int element) *Writes an element of integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelongelement) (const std::string & elementName, long element) *Writes an element of long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelonglongelement) (const std::string & elementName, long long element) *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeshortelement) (const std::string & elementName, short element) *Writes an element of short integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStartElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestartelement) (const std::string & elementName) *Writes the start element with* `elementName` *name.* | | virtual void | [**writeStringElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelement) (const std::string & elementName, const std::string & element) *Writes an element of string type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStringElementInBase64**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelementinbase64) (const std::string & elementName, const std::string & element) *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUUIDElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeuuidelement) (const std::string & elementName, const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & element) *Writes an element of UUID type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedcharelement) (const std::string & elementName, unsigned char element) *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedintelement) (const std::string & elementName, unsigned int element) *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlongelement) (const std::string & elementName, unsigned long element) *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlonglongelement) (const std::string & elementName, unsigned long long element) *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedshortelement) (const std::string & elementName, unsigned short element) *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* | | virtual | [**~SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-sbcserializer) () *Destructor.* | ## Protected Attributes | Type | Name | | --------------- | ---------------------------------------------------------- | | std::fstream \* | [**file**](#variable-file) *A pointer to the file stream.* | ## Detailed Description **Short name**: SBSerializerBinary ## Public Functions Documentation ### function SBCSerializerBinary *Constructor.* ```C++ SBCSerializerBinary::SBCSerializerBinary ( const std::string & fileName, bool write ) ``` Constructs a binary serializer for the specified file. Opens the file in binary mode for reading or writing based on the `write` flag. **Parameters:** - `fileName` The path to the file to open. - `write` True to open the file for writing; false to open for reading. ______________________________________________________________________ ### function readBoolElement *Reads an element of boolean type.* ```C++ virtual bool SBCSerializerBinary::readBoolElement () ``` Reads a boolean element and returns its value. **Returns:** The boolean value read from the element. Implements [*SBCSerializer::readBoolElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readboolelement) ______________________________________________________________________ ### function readCharArrayElement *Reads an element of char array type of size* `arraySize` *.* ```C++ virtual char * SBCSerializerBinary::readCharArrayElement ( unsigned int & arraySize ) ``` Reads a character array element, allocating memory for the data. **Parameters:** - `arraySize` Reference that receives the number of characters in the array. **Returns:** Pointer to a newly allocated character array containing the read data. The caller is responsible for deleting the array. Implements [*SBCSerializer::readCharArrayElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readchararrayelement) ______________________________________________________________________ ### function readCharElement *Reads an element of char type.* ```C++ virtual char SBCSerializerBinary::readCharElement () ``` Reads a character element and returns its value. **Returns:** The character value read from the element. Implements [*SBCSerializer::readCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readcharelement) ______________________________________________________________________ ### function readDoubleElement *Reads an element of double type.* ```C++ virtual double SBCSerializerBinary::readDoubleElement () ``` Reads a double-precision floating-point element and returns its value. **Returns:** The double value read from the element. Implements [*SBCSerializer::readDoubleElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readdoubleelement) ______________________________________________________________________ ### function readEndElement *Reads the end element.* ```C++ virtual void SBCSerializerBinary::readEndElement () ``` Reads the end of an element. Implements [*SBCSerializer::readEndElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readendelement) ______________________________________________________________________ ### function readFloatElement *Reads an element of float type.* ```C++ virtual float SBCSerializerBinary::readFloatElement () ``` Reads a floating-point element and returns its value. **Returns:** The float value read from the element. Implements [*SBCSerializer::readFloatElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readfloatelement) ______________________________________________________________________ ### function readIntElement *Reads an element of integer type.* ```C++ virtual int SBCSerializerBinary::readIntElement () ``` Reads an integer element and returns its value. **Returns:** The integer value read from the element. Implements [*SBCSerializer::readIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readintelement) ______________________________________________________________________ ### function readLongElement *Reads an element of long integer type.* ```C++ virtual long SBCSerializerBinary::readLongElement () ``` Reads a long integer element and returns its value. **Returns:** The long integer value read from the element. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::readLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlongelement) ______________________________________________________________________ ### function readLongLongElement *Reads an element of long long integer type.* ```C++ virtual long long SBCSerializerBinary::readLongLongElement () ``` Reads a long long integer element and returns its value. **Returns:** The long long integer value read from the element. Implements [*SBCSerializer::readLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlonglongelement) ______________________________________________________________________ ### function readShortElement *Reads an element of short integer type.* ```C++ virtual short SBCSerializerBinary::readShortElement () ``` Reads a short integer element and returns its value. **Returns:** The short integer value read from the element. Implements [*SBCSerializer::readShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readshortelement) ______________________________________________________________________ ### function readStartElement *Reads the start element.* ```C++ virtual void SBCSerializerBinary::readStartElement () ``` Reads the start of an element. Implements [*SBCSerializer::readStartElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstartelement) ______________________________________________________________________ ### function readStringElement *Reads an element of string type.* ```C++ virtual std::string SBCSerializerBinary::readStringElement () ``` Reads a string element and returns its value. **Returns:** The string value read from the element. Implements [*SBCSerializer::readStringElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelement) ______________________________________________________________________ ### function readStringElementFromBase64 *Reads an element of string type in Base64 (supports html)* ```C++ virtual std::string SBCSerializerBinary::readStringElementFromBase64 () ``` Reads a Base64-encoded string element, decodes it, and returns the original string. **Returns:** The decoded string value. Implements [*SBCSerializer::readStringElementFromBase64*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelementfrombase64) ______________________________________________________________________ ### function readUUIDElement *Reads an element of UUID type.* ```C++ virtual SBCContainerUUID SBCSerializerBinary::readUUIDElement () ``` Reads a UUID element and returns its value. **Returns:** The UUID value read from the element. Implements [*SBCSerializer::readUUIDElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readuuidelement) ______________________________________________________________________ ### function readUnsignedCharElement *Reads an element of unsigned char type.* ```C++ virtual unsigned char SBCSerializerBinary::readUnsignedCharElement () ``` Reads an unsigned character element and returns its value. **Returns:** The unsigned character value read from the element. Implements [*SBCSerializer::readUnsignedCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedcharelement) ______________________________________________________________________ ### function readUnsignedIntElement *Reads an element of unsigned integer type.* ```C++ virtual unsigned int SBCSerializerBinary::readUnsignedIntElement () ``` Reads an unsigned integer element and returns its value. **Returns:** The unsigned integer value read from the element. Implements [*SBCSerializer::readUnsignedIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedintelement) ______________________________________________________________________ ### function readUnsignedLongElement *Reads an element of unsigned long integer type.* ```C++ virtual unsigned long SBCSerializerBinary::readUnsignedLongElement () ``` Reads an unsigned long integer element and returns its value. **Returns:** The unsigned long integer value read from the element. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::readUnsignedLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlongelement) ______________________________________________________________________ ### function readUnsignedLongLongElement *Reads an element of unsigned long long integer type.* ```C++ virtual unsigned long long SBCSerializerBinary::readUnsignedLongLongElement () ``` Reads an unsigned long long integer element and returns its value. **Returns:** The unsigned long long integer value read from the element. Implements [*SBCSerializer::readUnsignedLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlonglongelement) ______________________________________________________________________ ### function readUnsignedShortElement *Reads an element of unsigned short integer type.* ```C++ virtual unsigned short SBCSerializerBinary::readUnsignedShortElement () ``` Reads an unsigned short integer element and returns its value. **Returns:** The unsigned short integer value read from the element. Implements [*SBCSerializer::readUnsignedShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedshortelement) ______________________________________________________________________ ### function writeBoolElement *Writes an element of boolean type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeBoolElement ( const std::string & elementName, bool element ) ``` Writes a boolean element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The boolean value to write. Implements [*SBCSerializer::writeBoolElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeboolelement) ______________________________________________________________________ ### function writeCharArrayElement *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* ```C++ virtual void SBCSerializerBinary::writeCharArrayElement ( const std::string & elementName, const char * elementArray, unsigned int arraySize ) ``` Writes a character array element with the specified name, data pointer, and size. **Parameters:** - `elementName` The name of the element. - `elementArray` Pointer to the character array data. - `arraySize` Number of characters in the array. Implements [*SBCSerializer::writeCharArrayElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writechararrayelement) ______________________________________________________________________ ### function writeCharElement *Writes an element of char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeCharElement ( const std::string & elementName, char element ) ``` Writes a character element with the specified name and value. **Parameters:** - `elementName` The name of the element. - `element` The character value to write. Implements [*SBCSerializer::writeCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writecharelement) ______________________________________________________________________ ### function writeDoubleElement *Writes an element of double type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeDoubleElement ( const std::string & elementName, double element ) ``` Writes a double-precision floating-point element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The double value to write. Implements [*SBCSerializer::writeDoubleElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writedoubleelement) ______________________________________________________________________ ### function writeEndElement *Writes the end element.* ```C++ virtual void SBCSerializerBinary::writeEndElement () ``` Writes the end of the current element. Implements [*SBCSerializer::writeEndElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeendelement) ______________________________________________________________________ ### function writeFloatElement *Writes an element of float type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeFloatElement ( const std::string & elementName, float element ) ``` Writes a floating-point element with the specified name and value. **Parameters:** - `elementName` The name of the element. - `element` The float value to write. Implements [*SBCSerializer::writeFloatElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writefloatelement) ______________________________________________________________________ ### function writeIntElement *Writes an element of integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeIntElement ( const std::string & elementName, int element ) ``` Writes an integer element with the specified name and value. **Parameters:** - `elementName` The name of the element. - `element` The integer value to write. Implements [*SBCSerializer::writeIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeintelement) ______________________________________________________________________ ### function writeLongElement *Writes an element of long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeLongElement ( const std::string & elementName, long element ) ``` Writes a long integer element with the specified name and value. **Parameters:** - `elementName` The name of the element. - `element` The long integer value to write. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::writeLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelongelement) ______________________________________________________________________ ### function writeLongLongElement *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeLongLongElement ( const std::string & elementName, long long element ) ``` Writes a long long integer element with the specified name and value. **Parameters:** - `elementName` The name of the element. - `element` The long long integer value to write. Implements [*SBCSerializer::writeLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelonglongelement) ______________________________________________________________________ ### function writeShortElement *Writes an element of short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeShortElement ( const std::string & elementName, short element ) ``` Writes a short integer element with the specified name and value. **Parameters:** - `elementName` The name of the element. - `element` The short integer value to write. Implements [*SBCSerializer::writeShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeshortelement) ______________________________________________________________________ ### function writeStartElement *Writes the start element with* `elementName` *name.* ```C++ virtual void SBCSerializerBinary::writeStartElement ( const std::string & elementName ) ``` Writes the start of an element with the given name. **Parameters:** - `elementName` The name of the element to start. Implements [*SBCSerializer::writeStartElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestartelement) ______________________________________________________________________ ### function writeStringElement *Writes an element of string type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeStringElement ( const std::string & elementName, const std::string & element ) ``` Writes a string element with the specified name and value. **Parameters:** - `elementName` The name of the element. - `element` The string value to write. Implements [*SBCSerializer::writeStringElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelement) ______________________________________________________________________ ### function writeStringElementInBase64 *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeStringElementInBase64 ( const std::string & elementName, const std::string & element ) ``` Writes a string element with the specified name and value, encoding the value in Base64. **Parameters:** - `elementName` The name of the element. - `element` The string value to encode and write. Implements [*SBCSerializer::writeStringElementInBase64*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelementinbase64) ______________________________________________________________________ ### function writeUUIDElement *Writes an element of UUID type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeUUIDElement ( const std::string & elementName, const SBCContainerUUID & element ) ``` Writes a UUID element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The UUID value to write. Implements [*SBCSerializer::writeUUIDElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeuuidelement) ______________________________________________________________________ ### function writeUnsignedCharElement *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeUnsignedCharElement ( const std::string & elementName, unsigned char element ) ``` Writes an unsigned character element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned character value to write. Implements [*SBCSerializer::writeUnsignedCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedcharelement) ______________________________________________________________________ ### function writeUnsignedIntElement *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeUnsignedIntElement ( const std::string & elementName, unsigned int element ) ``` Writes an unsigned integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned integer value to write. Implements [*SBCSerializer::writeUnsignedIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedintelement) ______________________________________________________________________ ### function writeUnsignedLongElement *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeUnsignedLongElement ( const std::string & elementName, unsigned long element ) ``` Writes an unsigned long integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned long integer value to write. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::writeUnsignedLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlongelement) ______________________________________________________________________ ### function writeUnsignedLongLongElement *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeUnsignedLongLongElement ( const std::string & elementName, unsigned long long element ) ``` Writes an unsigned long long integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned long long integer value to write. Implements [*SBCSerializer::writeUnsignedLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlonglongelement) ______________________________________________________________________ ### function writeUnsignedShortElement *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerBinary::writeUnsignedShortElement ( const std::string & elementName, unsigned short element ) ``` Writes an unsigned short integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned short integer value to write. Implements [*SBCSerializer::writeUnsignedShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedshortelement) ______________________________________________________________________ ### function ~SBCSerializerBinary *Destructor.* ```C++ virtual SBCSerializerBinary::~SBCSerializerBinary () ``` Destroys the binary serializer and releases any associated resources. ______________________________________________________________________ ## Protected Attributes Documentation ### variable file *A pointer to the file stream.* ```C++ std::fstream* SBCSerializerBinary::file; ``` ______________________________________________________________________ # SBSerializerMemory # Class SBCSerializerMemory [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCSerializerMemory**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerMemory/index.md) *This class describes a serializer in memory.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCSerializer](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCSerializerMemory**](#function-sbcserializermemory) () *Constructor.* | | void | [**clear**](#function-clear) () *Clears the internal data buffer.* | | char \* | [**getData**](#function-getdata) () const *Retrieves a pointer to the internal serialized data buffer.* | | unsigned int | [**getDataSize**](#function-getdatasize) () const *Retrieves the size of the internal serialized data buffer.* | | virtual bool | [**readBoolElement**](#function-readboolelement) () *Reads an element of boolean type.* | | virtual char \* | [**readCharArrayElement**](#function-readchararrayelement) (unsigned int & arraySize) *Reads an element of char array type of size* `arraySize` *.* | | virtual char | [**readCharElement**](#function-readcharelement) () *Reads an element of char type.* | | virtual double | [**readDoubleElement**](#function-readdoubleelement) () *Reads an element of double type.* | | virtual void | [**readEndElement**](#function-readendelement) () *Reads the end element.* | | virtual float | [**readFloatElement**](#function-readfloatelement) () *Reads an element of float type.* | | virtual int | [**readIntElement**](#function-readintelement) () *Reads an element of integer type.* | | virtual long | [**readLongElement**](#function-readlongelement) () *Reads an element of long integer type.* | | virtual long long | [**readLongLongElement**](#function-readlonglongelement) () *Reads an element of long long integer type.* | | virtual short | [**readShortElement**](#function-readshortelement) () *Reads an element of short integer type.* | | virtual void | [**readStartElement**](#function-readstartelement) () *Reads the start element.* | | virtual std::string | [**readStringElement**](#function-readstringelement) () *Reads an element of string type.* | | virtual std::string | [**readStringElementFromBase64**](#function-readstringelementfrombase64) () *Reads an element of string type in Base64 (supports html)* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**readUUIDElement**](#function-readuuidelement) () *Reads an element of UUID type.* | | virtual unsigned char | [**readUnsignedCharElement**](#function-readunsignedcharelement) () *Reads an element of unsigned char type.* | | virtual unsigned int | [**readUnsignedIntElement**](#function-readunsignedintelement) () *Reads an element of unsigned integer type.* | | virtual unsigned long | [**readUnsignedLongElement**](#function-readunsignedlongelement) () *Reads an element of unsigned long integer type.* | | virtual unsigned long long | [**readUnsignedLongLongElement**](#function-readunsignedlonglongelement) () *Reads an element of unsigned long long integer type.* | | virtual unsigned short | [**readUnsignedShortElement**](#function-readunsignedshortelement) () *Reads an element of unsigned short integer type.* | | void | [**rewind**](#function-rewind) () *Resets the read/write position to the beginning of the buffer.* | | virtual void | [**writeBoolElement**](#function-writeboolelement) (const std::string & elementName, bool element) *Writes an element of boolean type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeCharArrayElement**](#function-writechararrayelement) (const std::string & elementName, const char * elementArray, unsigned int arraySize) *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* | | virtual void | [**writeCharElement**](#function-writecharelement) (const std::string & elementName, char element) *Writes an element of char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeDoubleElement**](#function-writedoubleelement) (const std::string & elementName, double element) *Writes an element of double type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeEndElement**](#function-writeendelement) () *Writes the end element.* | | virtual void | [**writeFloatElement**](#function-writefloatelement) (const std::string & elementName, float element) *Writes an element of float type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeIntElement**](#function-writeintelement) (const std::string & elementName, int element) *Writes an element of integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongElement**](#function-writelongelement) (const std::string & elementName, long element) *Writes an element of long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongLongElement**](#function-writelonglongelement) (const std::string & elementName, long long element) *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeShortElement**](#function-writeshortelement) (const std::string & elementName, short element) *Writes an element of short integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStartElement**](#function-writestartelement) (const std::string & elementName) *Writes the start element with* `elementName` *name.* | | virtual void | [**writeStringElement**](#function-writestringelement) (const std::string & elementName, const std::string & element) *Writes an element of string type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStringElementInBase64**](#function-writestringelementinbase64) (const std::string & elementName, const std::string & element) *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUUIDElement**](#function-writeuuidelement) (const std::string & elementName, const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & element) *Writes an element of UUID type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedCharElement**](#function-writeunsignedcharelement) (const std::string & elementName, unsigned char element) *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedIntElement**](#function-writeunsignedintelement) (const std::string & elementName, unsigned int element) *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongElement**](#function-writeunsignedlongelement) (const std::string & elementName, unsigned long element) *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongLongElement**](#function-writeunsignedlonglongelement) (const std::string & elementName, unsigned long long element) *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedShortElement**](#function-writeunsignedshortelement) (const std::string & elementName, unsigned short element) *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* | | virtual | [**~SBCSerializerMemory**](#function-sbcserializermemory) () *Destructor.* | ## Public Functions inherited from SBCSerializer See [SBCSerializer](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-sbcserializer) () *Constructor.* | | virtual bool | [**readBoolElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readboolelement) () *Reads an element of boolean type.* | | virtual char \* | [**readCharArrayElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readchararrayelement) (unsigned int & arraySize) *Reads an element of char array type of size* `arraySize` *.* | | virtual char | [**readCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readcharelement) () *Reads an element of char type.* | | virtual double | [**readDoubleElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readdoubleelement) () *Reads an element of double type.* | | virtual void | [**readEndElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readendelement) () *Reads the end element.* | | virtual float | [**readFloatElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readfloatelement) () *Reads an element of float type.* | | virtual int | [**readIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readintelement) () *Reads an element of integer type.* | | virtual long | [**readLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlongelement) () *Reads an element of long integer type.* | | virtual long long | [**readLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlonglongelement) () *Reads an element of long long integer type.* | | virtual short | [**readShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readshortelement) () *Reads an element of short integer type.* | | virtual void | [**readStartElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstartelement) () *Reads the start element.* | | virtual std::string | [**readStringElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelement) () *Reads an element of string type.* | | virtual std::string | [**readStringElementFromBase64**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelementfrombase64) () *Reads an element of string type in Base64 (supports html)* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**readUUIDElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readuuidelement) () *Reads an element of UUID type.* | | virtual unsigned char | [**readUnsignedCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedcharelement) () *Reads an element of unsigned char type.* | | virtual unsigned int | [**readUnsignedIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedintelement) () *Reads an element of unsigned integer type.* | | virtual unsigned long | [**readUnsignedLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlongelement) () *Reads an element of unsigned long integer type.* | | virtual unsigned long long | [**readUnsignedLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlonglongelement) () *Reads an element of unsigned long long integer type.* | | virtual unsigned short | [**readUnsignedShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedshortelement) () *Reads an element of unsigned short integer type.* | | virtual void | [**writeBoolElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeboolelement) (const std::string & elementName, bool element) *Writes an element of boolean type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeCharArrayElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writechararrayelement) (const std::string & elementName, const char * elementArray, unsigned int arraySize) *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* | | virtual void | [**writeCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writecharelement) (const std::string & elementName, char element) *Writes an element of char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeDoubleElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writedoubleelement) (const std::string & elementName, double element) *Writes an element of double type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeEndElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeendelement) () *Writes the end element.* | | virtual void | [**writeFloatElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writefloatelement) (const std::string & elementName, float element) *Writes an element of float type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeintelement) (const std::string & elementName, int element) *Writes an element of integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelongelement) (const std::string & elementName, long element) *Writes an element of long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelonglongelement) (const std::string & elementName, long long element) *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeshortelement) (const std::string & elementName, short element) *Writes an element of short integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStartElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestartelement) (const std::string & elementName) *Writes the start element with* `elementName` *name.* | | virtual void | [**writeStringElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelement) (const std::string & elementName, const std::string & element) *Writes an element of string type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStringElementInBase64**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelementinbase64) (const std::string & elementName, const std::string & element) *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUUIDElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeuuidelement) (const std::string & elementName, const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & element) *Writes an element of UUID type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedcharelement) (const std::string & elementName, unsigned char element) *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedintelement) (const std::string & elementName, unsigned int element) *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlongelement) (const std::string & elementName, unsigned long element) *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlonglongelement) (const std::string & elementName, unsigned long long element) *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedshortelement) (const std::string & elementName, unsigned short element) *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* | | virtual | [**~SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-sbcserializer) () *Destructor.* | ## Protected Attributes | Type | Name | | ------------------- | -------------------------------------- | | SBVector< char > \* | [**dataVector**](#variable-datavector) | | unsigned int | [**position**](#variable-position) | ## Protected Functions | Type | Name | | ---- | -------------------------------------------------------------------------------------------------------------------------------------------------- | | void | [**readCharArray**](#function-readchararray) (char * charArray, unsigned int arraySize) *Reads raw data bytes from the internal buffer.* | | void | [**writeCharArray**](#function-writechararray) (const char * elementArray, unsigned int arraySize) *Writes raw data bytes to the internal buffer.* | ## Detailed Description **Short name**: SBSerializerMemory ## Public Functions Documentation ### function SBCSerializerMemory *Constructor.* ```C++ SBCSerializerMemory::SBCSerializerMemory () ``` Constructs an [**SBCSerializerMemory**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerMemory/index.md) object. Initializes the internal buffer and sets the position to zero. ______________________________________________________________________ ### function clear *Clears the internal data buffer.* ```C++ void SBCSerializerMemory::clear () ``` ______________________________________________________________________ ### function getData *Retrieves a pointer to the internal serialized data buffer.* ```C++ char * SBCSerializerMemory::getData () const ``` **Returns:** Pointer to the data buffer, or null if the buffer is empty. ______________________________________________________________________ ### function getDataSize *Retrieves the size of the internal serialized data buffer.* ```C++ unsigned int SBCSerializerMemory::getDataSize () const ``` **Returns:** Number of bytes stored in the buffer. ______________________________________________________________________ ### function readBoolElement *Reads an element of boolean type.* ```C++ virtual bool SBCSerializerMemory::readBoolElement () ``` Reads a boolean element from the memory buffer. Deserializes the boolean value from the memory buffer. **Returns:** The boolean value that was read. Implements [*SBCSerializer::readBoolElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readboolelement) ______________________________________________________________________ ### function readCharArrayElement *Reads an element of char array type of size* `arraySize` *.* ```C++ virtual char * SBCSerializerMemory::readCharArrayElement ( unsigned int & arraySize ) ``` Reads a character array element from the memory buffer. **Parameters:** - `arraySize` Reference that receives the size of the array. **Returns:** Pointer to a newly allocated character array containing the data. Implements [*SBCSerializer::readCharArrayElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readchararrayelement) ______________________________________________________________________ ### function readCharElement *Reads an element of char type.* ```C++ virtual char SBCSerializerMemory::readCharElement () ``` Reads a character element from the memory buffer. Deserializes the character value from the memory buffer. **Returns:** The character value that was read. Implements [*SBCSerializer::readCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readcharelement) ______________________________________________________________________ ### function readDoubleElement *Reads an element of double type.* ```C++ virtual double SBCSerializerMemory::readDoubleElement () ``` Reads a double element from the memory buffer. **Returns:** The double value that was read. Implements [*SBCSerializer::readDoubleElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readdoubleelement) ______________________________________________________________________ ### function readEndElement *Reads the end element.* ```C++ virtual void SBCSerializerMemory::readEndElement () ``` Reads the end element marker. Implements [*SBCSerializer::readEndElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readendelement) ______________________________________________________________________ ### function readFloatElement *Reads an element of float type.* ```C++ virtual float SBCSerializerMemory::readFloatElement () ``` Reads a float element from the memory buffer. **Returns:** The float value that was read. Implements [*SBCSerializer::readFloatElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readfloatelement) ______________________________________________________________________ ### function readIntElement *Reads an element of integer type.* ```C++ virtual int SBCSerializerMemory::readIntElement () ``` Reads an integer element from the memory buffer. Deserializes the integer value from the memory buffer. **Returns:** The integer value that was read. Implements [*SBCSerializer::readIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readintelement) ______________________________________________________________________ ### function readLongElement *Reads an element of long integer type.* ```C++ virtual long SBCSerializerMemory::readLongElement () ``` Reads a long integer element from the memory buffer. **Returns:** The long integer value that was read. **Note**: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::readLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlongelement) ______________________________________________________________________ ### function readLongLongElement *Reads an element of long long integer type.* ```C++ virtual long long SBCSerializerMemory::readLongLongElement () ``` Reads a long long integer element from the memory buffer. **Returns:** The long long integer value that was read. Implements [*SBCSerializer::readLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlonglongelement) ______________________________________________________________________ ### function readShortElement *Reads an element of short integer type.* ```C++ virtual short SBCSerializerMemory::readShortElement () ``` Reads a short integer element from the memory buffer. Deserializes the short integer value from the memory buffer. **Returns:** The short integer value that was read. Implements [*SBCSerializer::readShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readshortelement) ______________________________________________________________________ ### function readStartElement *Reads the start element.* ```C++ virtual void SBCSerializerMemory::readStartElement () ``` Reads the start element marker. Implements [*SBCSerializer::readStartElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstartelement) ______________________________________________________________________ ### function readStringElement *Reads an element of string type.* ```C++ virtual std::string SBCSerializerMemory::readStringElement () ``` Reads a string element from the memory buffer. Deserializes the string by reading its length and characters from the memory buffer. **Returns:** The string value that was read. Implements [*SBCSerializer::readStringElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelement) ______________________________________________________________________ ### function readStringElementFromBase64 *Reads an element of string type in Base64 (supports html)* ```C++ virtual std::string SBCSerializerMemory::readStringElementFromBase64 () ``` Reads a Base64-encoded string element and decodes it. **Returns:** The decoded string value. Implements [*SBCSerializer::readStringElementFromBase64*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelementfrombase64) ______________________________________________________________________ ### function readUUIDElement *Reads an element of UUID type.* ```C++ virtual SBCContainerUUID SBCSerializerMemory::readUUIDElement () ``` Reads a UUID element from the memory buffer. **Returns:** The UUID value that was read. Implements [*SBCSerializer::readUUIDElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readuuidelement) ______________________________________________________________________ ### function readUnsignedCharElement *Reads an element of unsigned char type.* ```C++ virtual unsigned char SBCSerializerMemory::readUnsignedCharElement () ``` Reads an unsigned character element from the memory buffer. Deserializes the unsigned character value from the memory buffer. **Returns:** The unsigned character value that was read. Implements [*SBCSerializer::readUnsignedCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedcharelement) ______________________________________________________________________ ### function readUnsignedIntElement *Reads an element of unsigned integer type.* ```C++ virtual unsigned int SBCSerializerMemory::readUnsignedIntElement () ``` Reads an unsigned integer element from the memory buffer. Deserializes the unsigned integer value from the memory buffer. **Returns:** The unsigned integer value that was read. Implements [*SBCSerializer::readUnsignedIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedintelement) ______________________________________________________________________ ### function readUnsignedLongElement *Reads an element of unsigned long integer type.* ```C++ virtual unsigned long SBCSerializerMemory::readUnsignedLongElement () ``` Reads an unsigned long integer element from the memory buffer. **Returns:** The unsigned long integer value that was read. **Note**: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::readUnsignedLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlongelement) ______________________________________________________________________ ### function readUnsignedLongLongElement *Reads an element of unsigned long long integer type.* ```C++ virtual unsigned long long SBCSerializerMemory::readUnsignedLongLongElement () ``` Reads an unsigned long long integer element from the memory buffer. **Returns:** The unsigned long long integer value that was read. Implements [*SBCSerializer::readUnsignedLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlonglongelement) ______________________________________________________________________ ### function readUnsignedShortElement *Reads an element of unsigned short integer type.* ```C++ virtual unsigned short SBCSerializerMemory::readUnsignedShortElement () ``` Reads an unsigned short integer element from the memory buffer. Deserializes the unsigned short integer value from the memory buffer. **Returns:** The unsigned short integer value that was read. Implements [*SBCSerializer::readUnsignedShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedshortelement) ______________________________________________________________________ ### function rewind *Resets the read/write position to the beginning of the buffer.* ```C++ void SBCSerializerMemory::rewind () ``` ______________________________________________________________________ ### function writeBoolElement *Writes an element of boolean type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeBoolElement ( const std::string & elementName, bool element ) ``` Writes a boolean element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The boolean value to write. Implements [*SBCSerializer::writeBoolElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeboolelement) ______________________________________________________________________ ### function writeCharArrayElement *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* ```C++ virtual void SBCSerializerMemory::writeCharArrayElement ( const std::string & elementName, const char * elementArray, unsigned int arraySize ) ``` Writes a character array element with the given name and size. Serializes the size and contents of the character array into the memory buffer. **Parameters:** - `elementName` The name of the element. - `elementArray` Pointer to the character array data. - `arraySize` Number of characters in the array. Implements [*SBCSerializer::writeCharArrayElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writechararrayelement) ______________________________________________________________________ ### function writeCharElement *Writes an element of char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeCharElement ( const std::string & elementName, char element ) ``` Writes a character element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The character value to write. Implements [*SBCSerializer::writeCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writecharelement) ______________________________________________________________________ ### function writeDoubleElement *Writes an element of double type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeDoubleElement ( const std::string & elementName, double element ) ``` Writes a double element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The double value to write. Implements [*SBCSerializer::writeDoubleElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writedoubleelement) ______________________________________________________________________ ### function writeEndElement *Writes the end element.* ```C++ virtual void SBCSerializerMemory::writeEndElement () ``` Writes the end element marker. Implements [*SBCSerializer::writeEndElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeendelement) ______________________________________________________________________ ### function writeFloatElement *Writes an element of float type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeFloatElement ( const std::string & elementName, float element ) ``` Writes a float element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The float value to write. Implements [*SBCSerializer::writeFloatElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writefloatelement) ______________________________________________________________________ ### function writeIntElement *Writes an element of integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeIntElement ( const std::string & elementName, int element ) ``` Writes an integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The integer value to write. Implements [*SBCSerializer::writeIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeintelement) ______________________________________________________________________ ### function writeLongElement *Writes an element of long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeLongElement ( const std::string & elementName, long element ) ``` Writes a long integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The long integer value to write. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::writeLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelongelement) ______________________________________________________________________ ### function writeLongLongElement *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeLongLongElement ( const std::string & elementName, long long element ) ``` Writes a long long integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The long long integer value to write. Implements [*SBCSerializer::writeLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelonglongelement) ______________________________________________________________________ ### function writeShortElement *Writes an element of short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeShortElement ( const std::string & elementName, short element ) ``` Writes a short integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The short integer value to write. Implements [*SBCSerializer::writeShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeshortelement) ______________________________________________________________________ ### function writeStartElement *Writes the start element with* `elementName` *name.* ```C++ virtual void SBCSerializerMemory::writeStartElement ( const std::string & elementName ) ``` Writes the start element with the specified name. **Parameters:** - `elementName` The name of the start element. Implements [*SBCSerializer::writeStartElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestartelement) ______________________________________________________________________ ### function writeStringElement *Writes an element of string type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeStringElement ( const std::string & elementName, const std::string & element ) ``` Writes a string element with the given name and value to the memory buffer. Serializes the string's length and contents into the internal memory buffer. **Parameters:** - `elementName` The name of the element. - `element` The string value to write. Implements [*SBCSerializer::writeStringElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelement) ______________________________________________________________________ ### function writeStringElementInBase64 *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeStringElementInBase64 ( const std::string & elementName, const std::string & element ) ``` Writes a string element encoded in Base64 with the given name. Encodes the string value in Base64 and writes it as a string element. **Parameters:** - `elementName` The name of the element. - `element` The string value to encode and write. Implements [*SBCSerializer::writeStringElementInBase64*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelementinbase64) ______________________________________________________________________ ### function writeUUIDElement *Writes an element of UUID type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeUUIDElement ( const std::string & elementName, const SBCContainerUUID & element ) ``` Writes a UUID element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The UUID value to write. Implements [*SBCSerializer::writeUUIDElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeuuidelement) ______________________________________________________________________ ### function writeUnsignedCharElement *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeUnsignedCharElement ( const std::string & elementName, unsigned char element ) ``` Writes an unsigned character element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned character value to write. Implements [*SBCSerializer::writeUnsignedCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedcharelement) ______________________________________________________________________ ### function writeUnsignedIntElement *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeUnsignedIntElement ( const std::string & elementName, unsigned int element ) ``` Writes an unsigned integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned integer value to write. Implements [*SBCSerializer::writeUnsignedIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedintelement) ______________________________________________________________________ ### function writeUnsignedLongElement *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeUnsignedLongElement ( const std::string & elementName, unsigned long element ) ``` Writes an unsigned long integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned long integer value to write. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::writeUnsignedLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlongelement) ______________________________________________________________________ ### function writeUnsignedLongLongElement *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeUnsignedLongLongElement ( const std::string & elementName, unsigned long long element ) ``` Writes an unsigned long long integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned long long integer value to write. Implements [*SBCSerializer::writeUnsignedLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlonglongelement) ______________________________________________________________________ ### function writeUnsignedShortElement *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerMemory::writeUnsignedShortElement ( const std::string & elementName, unsigned short element ) ``` Writes an unsigned short integer element with the given name and value. **Parameters:** - `elementName` The name of the element. - `element` The unsigned short integer value to write. Implements [*SBCSerializer::writeUnsignedShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedshortelement) ______________________________________________________________________ ### function ~SBCSerializerMemory *Destructor.* ```C++ virtual SBCSerializerMemory::~SBCSerializerMemory () ``` Destroys the [**SBCSerializerMemory**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerMemory/index.md) object and releases allocated resources. ______________________________________________________________________ ## Protected Attributes Documentation ### variable dataVector ```C++ SBVector* SBCSerializerMemory::dataVector; ``` ______________________________________________________________________ ### variable position ```C++ unsigned int SBCSerializerMemory::position; ``` ______________________________________________________________________ ## Protected Functions Documentation ### function readCharArray *Reads raw data bytes from the internal buffer.* ```C++ void SBCSerializerMemory::readCharArray ( char * charArray, unsigned int arraySize ) ``` **Parameters:** - `elementArray` Pointer to a buffer that will receive the data. - `arraySize` Number of bytes to read. ______________________________________________________________________ ### function writeCharArray *Writes raw data bytes to the internal buffer.* ```C++ void SBCSerializerMemory::writeCharArray ( const char * elementArray, unsigned int arraySize ) ``` **Parameters:** - `elementArray` Pointer to the data to write. - `arraySize` Number of bytes to write. ______________________________________________________________________ # SBSerializerXML # Class SBCSerializerXML [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCSerializerXML**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerXML/index.md) *This class describes an XML serializer.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCSerializer](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCSerializerXML**](#function-sbcserializerxml) (const std::string & fileName, bool write) *Constructor.* | | virtual bool | [**readBoolElement**](#function-readboolelement) () *Reads an element of boolean type.* | | virtual char \* | [**readCharArrayElement**](#function-readchararrayelement) (unsigned int & arraySize) *Reads an element of char array type of size* `arraySize` *.* | | virtual char | [**readCharElement**](#function-readcharelement) () *Reads an element of char type.* | | virtual double | [**readDoubleElement**](#function-readdoubleelement) () *Reads an element of double type.* | | virtual void | [**readEndElement**](#function-readendelement) () *Reads the end element.* | | virtual float | [**readFloatElement**](#function-readfloatelement) () *Reads an element of float type.* | | virtual int | [**readIntElement**](#function-readintelement) () *Reads an element of integer type.* | | virtual long | [**readLongElement**](#function-readlongelement) () *Reads an element of long integer type.* | | virtual long long | [**readLongLongElement**](#function-readlonglongelement) () *Reads an element of long long integer type.* | | virtual short | [**readShortElement**](#function-readshortelement) () *Reads an element of short integer type.* | | virtual void | [**readStartElement**](#function-readstartelement) () *Reads the start element.* | | virtual std::string | [**readStringElement**](#function-readstringelement) () *Reads an element of string type.* | | virtual std::string | [**readStringElementFromBase64**](#function-readstringelementfrombase64) () *Reads an element of string type in Base64 (supports html)* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**readUUIDElement**](#function-readuuidelement) () *Reads an element of UUID type.* | | virtual unsigned char | [**readUnsignedCharElement**](#function-readunsignedcharelement) () *Reads an element of unsigned char type.* | | virtual unsigned int | [**readUnsignedIntElement**](#function-readunsignedintelement) () *Reads an element of unsigned integer type.* | | virtual unsigned long | [**readUnsignedLongElement**](#function-readunsignedlongelement) () *Reads an element of unsigned long integer type.* | | virtual unsigned long long | [**readUnsignedLongLongElement**](#function-readunsignedlonglongelement) () *Reads an element of unsigned long long integer type.* | | virtual unsigned short | [**readUnsignedShortElement**](#function-readunsignedshortelement) () *Reads an element of unsigned short integer type.* | | virtual void | [**writeBoolElement**](#function-writeboolelement) (const std::string & elementName, bool element) *Writes an element of boolean type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeCharArrayElement**](#function-writechararrayelement) (const std::string & elementName, const char * elementArray, unsigned int arraySize) *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* | | virtual void | [**writeCharElement**](#function-writecharelement) (const std::string & elementName, char element) *Writes an element of char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeDoubleElement**](#function-writedoubleelement) (const std::string & elementName, double element) *Writes an element of double type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeEndElement**](#function-writeendelement) () *Writes the end element.* | | virtual void | [**writeFloatElement**](#function-writefloatelement) (const std::string & elementName, float element) *Writes an element of float type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeIntElement**](#function-writeintelement) (const std::string & elementName, int element) *Writes an element of integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongElement**](#function-writelongelement) (const std::string & elementName, long element) *Writes an element of long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongLongElement**](#function-writelonglongelement) (const std::string & elementName, long long element) *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeShortElement**](#function-writeshortelement) (const std::string & elementName, short element) *Writes an element of short integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStartElement**](#function-writestartelement) (const std::string & elementName) *Writes the start element with* `elementName` *name.* | | virtual void | [**writeStringElement**](#function-writestringelement) (const std::string & elementName, const std::string & element) *Writes an element of string type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStringElementInBase64**](#function-writestringelementinbase64) (const std::string & elementName, const std::string & element) *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUUIDElement**](#function-writeuuidelement) (const std::string & elementName, const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & element) *Writes an element of UUID type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedCharElement**](#function-writeunsignedcharelement) (const std::string & elementName, unsigned char element) *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedIntElement**](#function-writeunsignedintelement) (const std::string & elementName, unsigned int element) *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongElement**](#function-writeunsignedlongelement) (const std::string & elementName, unsigned long element) *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongLongElement**](#function-writeunsignedlonglongelement) (const std::string & elementName, unsigned long long element) *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedShortElement**](#function-writeunsignedshortelement) (const std::string & elementName, unsigned short element) *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* | | virtual | [**~SBCSerializerXML**](#function-sbcserializerxml) () *Destructor.* | ## Public Functions inherited from SBCSerializer See [SBCSerializer](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) | Type | Name | | ----------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-sbcserializer) () *Constructor.* | | virtual bool | [**readBoolElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readboolelement) () *Reads an element of boolean type.* | | virtual char \* | [**readCharArrayElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readchararrayelement) (unsigned int & arraySize) *Reads an element of char array type of size* `arraySize` *.* | | virtual char | [**readCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readcharelement) () *Reads an element of char type.* | | virtual double | [**readDoubleElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readdoubleelement) () *Reads an element of double type.* | | virtual void | [**readEndElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readendelement) () *Reads the end element.* | | virtual float | [**readFloatElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readfloatelement) () *Reads an element of float type.* | | virtual int | [**readIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readintelement) () *Reads an element of integer type.* | | virtual long | [**readLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlongelement) () *Reads an element of long integer type.* | | virtual long long | [**readLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlonglongelement) () *Reads an element of long long integer type.* | | virtual short | [**readShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readshortelement) () *Reads an element of short integer type.* | | virtual void | [**readStartElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstartelement) () *Reads the start element.* | | virtual std::string | [**readStringElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelement) () *Reads an element of string type.* | | virtual std::string | [**readStringElementFromBase64**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelementfrombase64) () *Reads an element of string type in Base64 (supports html)* | | virtual [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**readUUIDElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readuuidelement) () *Reads an element of UUID type.* | | virtual unsigned char | [**readUnsignedCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedcharelement) () *Reads an element of unsigned char type.* | | virtual unsigned int | [**readUnsignedIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedintelement) () *Reads an element of unsigned integer type.* | | virtual unsigned long | [**readUnsignedLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlongelement) () *Reads an element of unsigned long integer type.* | | virtual unsigned long long | [**readUnsignedLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlonglongelement) () *Reads an element of unsigned long long integer type.* | | virtual unsigned short | [**readUnsignedShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedshortelement) () *Reads an element of unsigned short integer type.* | | virtual void | [**writeBoolElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeboolelement) (const std::string & elementName, bool element) *Writes an element of boolean type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeCharArrayElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writechararrayelement) (const std::string & elementName, const char * elementArray, unsigned int arraySize) *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* | | virtual void | [**writeCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writecharelement) (const std::string & elementName, char element) *Writes an element of char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeDoubleElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writedoubleelement) (const std::string & elementName, double element) *Writes an element of double type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeEndElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeendelement) () *Writes the end element.* | | virtual void | [**writeFloatElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writefloatelement) (const std::string & elementName, float element) *Writes an element of float type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeintelement) (const std::string & elementName, int element) *Writes an element of integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelongelement) (const std::string & elementName, long element) *Writes an element of long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelonglongelement) (const std::string & elementName, long long element) *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeshortelement) (const std::string & elementName, short element) *Writes an element of short integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStartElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestartelement) (const std::string & elementName) *Writes the start element with* `elementName` *name.* | | virtual void | [**writeStringElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelement) (const std::string & elementName, const std::string & element) *Writes an element of string type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeStringElementInBase64**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelementinbase64) (const std::string & elementName, const std::string & element) *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUUIDElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeuuidelement) (const std::string & elementName, const [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & element) *Writes an element of UUID type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedCharElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedcharelement) (const std::string & elementName, unsigned char element) *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedIntElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedintelement) (const std::string & elementName, unsigned int element) *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlongelement) (const std::string & elementName, unsigned long element) *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedLongLongElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlonglongelement) (const std::string & elementName, unsigned long long element) *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* | | virtual void | [**writeUnsignedShortElement**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedshortelement) (const std::string & elementName, unsigned short element) *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* | | virtual | [**~SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-sbcserializer) () *Destructor.* | ## Detailed Description **Short name**: SBSerializerXML ## Public Functions Documentation ### function SBCSerializerXML *Constructor.* ```C++ SBCSerializerXML::SBCSerializerXML ( const std::string & fileName, bool write ) ``` Constructs an [**SBCSerializerXML**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerXML/index.md) object. Opens the specified file for reading or writing, initializes internal data structures, and prepares the XML serializer. **Parameters:** - `fileName` Path to the XML file. - `write` If true, opens the file for writing; otherwise opens for reading. ______________________________________________________________________ ### function readBoolElement *Reads an element of boolean type.* ```C++ virtual bool SBCSerializerXML::readBoolElement () ``` Reads a boolean element from the XML file. **Returns:** The boolean value read from the element. Implements [*SBCSerializer::readBoolElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readboolelement) ______________________________________________________________________ ### function readCharArrayElement *Reads an element of char array type of size* `arraySize` *.* ```C++ virtual char * SBCSerializerXML::readCharArrayElement ( unsigned int & arraySize ) ``` Reads a char array element from the XML file. **Parameters:** - `arraySize` Reference to an unsigned int that will receive the size of the returned array. **Returns:** Pointer to a newly allocated char array containing the element data. Implements [*SBCSerializer::readCharArrayElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readchararrayelement) ______________________________________________________________________ ### function readCharElement *Reads an element of char type.* ```C++ virtual char SBCSerializerXML::readCharElement () ``` Reads a character element from the XML file. **Returns:** The character value read from the element. Implements [*SBCSerializer::readCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readcharelement) ______________________________________________________________________ ### function readDoubleElement *Reads an element of double type.* ```C++ virtual double SBCSerializerXML::readDoubleElement () ``` Reads a double element from the XML file. **Returns:** The double value extracted from the current element. Implements [*SBCSerializer::readDoubleElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readdoubleelement) ______________________________________________________________________ ### function readEndElement *Reads the end element.* ```C++ virtual void SBCSerializerXML::readEndElement () ``` Reads the end element from the XML file. Consumes a line containing the closing tag of the current element. Implements [*SBCSerializer::readEndElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readendelement) ______________________________________________________________________ ### function readFloatElement *Reads an element of float type.* ```C++ virtual float SBCSerializerXML::readFloatElement () ``` Reads a float element from the XML file. **Returns:** The float value extracted from the current element. Implements [*SBCSerializer::readFloatElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readfloatelement) ______________________________________________________________________ ### function readIntElement *Reads an element of integer type.* ```C++ virtual int SBCSerializerXML::readIntElement () ``` Reads an integer element from the XML file. **Returns:** The integer value extracted from the current element. Implements [*SBCSerializer::readIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readintelement) ______________________________________________________________________ ### function readLongElement *Reads an element of long integer type.* ```C++ virtual long SBCSerializerXML::readLongElement () ``` Reads a long element from the XML file. **Returns:** The long value extracted from the current element. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::readLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlongelement) ______________________________________________________________________ ### function readLongLongElement *Reads an element of long long integer type.* ```C++ virtual long long SBCSerializerXML::readLongLongElement () ``` Reads a long long element from the XML file. **Returns:** The long long value extracted from the current element. Implements [*SBCSerializer::readLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readlonglongelement) ______________________________________________________________________ ### function readShortElement *Reads an element of short integer type.* ```C++ virtual short SBCSerializerXML::readShortElement () ``` Reads a short integer element from the XML file. **Returns:** The short integer value read from the element. Implements [*SBCSerializer::readShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readshortelement) ______________________________________________________________________ ### function readStartElement *Reads the start element.* ```C++ virtual void SBCSerializerXML::readStartElement () ``` Reads the start element from the XML file. Consumes a line containing the opening tag of the next element. Implements [*SBCSerializer::readStartElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstartelement) ______________________________________________________________________ ### function readStringElement *Reads an element of string type.* ```C++ virtual std::string SBCSerializerXML::readStringElement () ``` Reads a string element from the XML file. Extracts the text between the opening and closing tags. **Returns:** The string value read from the element. Implements [*SBCSerializer::readStringElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelement) ______________________________________________________________________ ### function readStringElementFromBase64 *Reads an element of string type in Base64 (supports html)* ```C++ virtual std::string SBCSerializerXML::readStringElementFromBase64 () ``` Reads a Base64-encoded string element and decodes it. **Returns:** The decoded string value. Implements [*SBCSerializer::readStringElementFromBase64*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readstringelementfrombase64) ______________________________________________________________________ ### function readUUIDElement *Reads an element of UUID type.* ```C++ virtual SBCContainerUUID SBCSerializerXML::readUUIDElement () ``` Reads a UUID element from the XML file. **Returns:** The UUID value extracted from the element. Implements [*SBCSerializer::readUUIDElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readuuidelement) ______________________________________________________________________ ### function readUnsignedCharElement *Reads an element of unsigned char type.* ```C++ virtual unsigned char SBCSerializerXML::readUnsignedCharElement () ``` Reads an unsigned character element from the XML file. **Returns:** The unsigned character value read from the element. Implements [*SBCSerializer::readUnsignedCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedcharelement) ______________________________________________________________________ ### function readUnsignedIntElement *Reads an element of unsigned integer type.* ```C++ virtual unsigned int SBCSerializerXML::readUnsignedIntElement () ``` Reads an unsigned integer element from the XML file. **Returns:** The unsigned integer value extracted from the current element. Implements [*SBCSerializer::readUnsignedIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedintelement) ______________________________________________________________________ ### function readUnsignedLongElement *Reads an element of unsigned long integer type.* ```C++ virtual unsigned long SBCSerializerXML::readUnsignedLongElement () ``` Reads an unsigned long element from the XML file. **Returns:** The unsigned long value extracted from the current element. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::readUnsignedLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlongelement) ______________________________________________________________________ ### function readUnsignedLongLongElement *Reads an element of unsigned long long integer type.* ```C++ virtual unsigned long long SBCSerializerXML::readUnsignedLongLongElement () ``` Reads an unsigned long long element from the XML file. **Returns:** The unsigned long long value extracted from the current element. Implements [*SBCSerializer::readUnsignedLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedlonglongelement) ______________________________________________________________________ ### function readUnsignedShortElement *Reads an element of unsigned short integer type.* ```C++ virtual unsigned short SBCSerializerXML::readUnsignedShortElement () ``` Reads an unsigned short element from the XML file. **Returns:** The unsigned short value extracted from the current element. Implements [*SBCSerializer::readUnsignedShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-readunsignedshortelement) ______________________________________________________________________ ### function writeBoolElement *Writes an element of boolean type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeBoolElement ( const std::string & elementName, bool element ) ``` Writes an XML element that contains a boolean value. **Parameters:** - `elementName` Name of the XML element. - `element` Boolean value to write. Implements [*SBCSerializer::writeBoolElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeboolelement) ______________________________________________________________________ ### function writeCharArrayElement *Writes an element of char array type with* `elementName` *name of size*`arraySize` *and values*`elementArray` *.* ```C++ virtual void SBCSerializerXML::writeCharArrayElement ( const std::string & elementName, const char * elementArray, unsigned int arraySize ) ``` Writes an XML element that contains a character array. **Parameters:** - `elementName` Name of the XML element. - `elementArray` Pointer to the character array to write. - `arraySize` Number of characters in the array. Implements [*SBCSerializer::writeCharArrayElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writechararrayelement) ______________________________________________________________________ ### function writeCharElement *Writes an element of char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeCharElement ( const std::string & elementName, char element ) ``` Writes an XML element that contains a character value. **Parameters:** - `elementName` Name of the XML element. - `element` Character value to write. Implements [*SBCSerializer::writeCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writecharelement) ______________________________________________________________________ ### function writeDoubleElement *Writes an element of double type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeDoubleElement ( const std::string & elementName, double element ) ``` Writes an XML element that contains a double value. **Parameters:** - `elementName` Name of the XML element. - `element` Double value to write. Implements [*SBCSerializer::writeDoubleElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writedoubleelement) ______________________________________________________________________ ### function writeEndElement *Writes the end element.* ```C++ virtual void SBCSerializerXML::writeEndElement () ``` Writes the end tag for the most recently opened XML element. The end tag matches the element name at the top of the internal element stack. Implements [*SBCSerializer::writeEndElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeendelement) ______________________________________________________________________ ### function writeFloatElement *Writes an element of float type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeFloatElement ( const std::string & elementName, float element ) ``` Writes an XML element that contains a float value. **Parameters:** - `elementName` Name of the XML element. - `element` Float value to write. Implements [*SBCSerializer::writeFloatElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writefloatelement) ______________________________________________________________________ ### function writeIntElement *Writes an element of integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeIntElement ( const std::string & elementName, int element ) ``` Writes an XML element that contains an integer value. **Parameters:** - `elementName` Name of the XML element. - `element` Integer value to write. Implements [*SBCSerializer::writeIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeintelement) ______________________________________________________________________ ### function writeLongElement *Writes an element of long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeLongElement ( const std::string & elementName, long element ) ``` Writes an XML element that contains a long integer value. The size of a long may differ across platforms; consider using a fixed-size type for portable data. **Parameters:** - `elementName` Name of the XML element. - `element` Long integer value to write. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::writeLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelongelement) ______________________________________________________________________ ### function writeLongLongElement *Writes an element of long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeLongLongElement ( const std::string & elementName, long long element ) ``` Writes an XML element that contains a long long integer value. **Parameters:** - `elementName` Name of the XML element. - `element` Long long integer value to write. Implements [*SBCSerializer::writeLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writelonglongelement) ______________________________________________________________________ ### function writeShortElement *Writes an element of short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeShortElement ( const std::string & elementName, short element ) ``` Writes an XML element that contains a short integer value. **Parameters:** - `elementName` Name of the XML element. - `element` Short integer value to write. Implements [*SBCSerializer::writeShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeshortelement) ______________________________________________________________________ ### function writeStartElement *Writes the start element with* `elementName` *name.* ```C++ virtual void SBCSerializerXML::writeStartElement ( const std::string & elementName ) ``` Writes the start tag of an XML element. The element name is written with appropriate indentation based on the current nesting level. **Parameters:** - `elementName` Name of the XML element to start. Implements [*SBCSerializer::writeStartElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestartelement) ______________________________________________________________________ ### function writeStringElement *Writes an element of string type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeStringElement ( const std::string & elementName, const std::string & element ) ``` Writes an XML element that contains a string value. **Parameters:** - `elementName` Name of the XML element. - `element` String value to write inside the element. Implements [*SBCSerializer::writeStringElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelement) ______________________________________________________________________ ### function writeStringElementInBase64 *Writes an element of string type in Base64 (supports html) with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeStringElementInBase64 ( const std::string & elementName, const std::string & element ) ``` Writes an XML element that contains a Base64-encoded string. **Parameters:** - `elementName` Name of the XML element. - `element` String value to encode in Base64 and write. Implements [*SBCSerializer::writeStringElementInBase64*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writestringelementinbase64) ______________________________________________________________________ ### function writeUUIDElement *Writes an element of UUID type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeUUIDElement ( const std::string & elementName, const SBCContainerUUID & element ) ``` Writes an XML element that contains a UUID value. **Parameters:** - `elementName` Name of the XML element. - `element` UUID value to write. Implements [*SBCSerializer::writeUUIDElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeuuidelement) ______________________________________________________________________ ### function writeUnsignedCharElement *Writes an element of unsigned char type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeUnsignedCharElement ( const std::string & elementName, unsigned char element ) ``` Writes an XML element that contains an unsigned character value. **Parameters:** - `elementName` Name of the XML element. - `element` Unsigned character value to write. Implements [*SBCSerializer::writeUnsignedCharElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedcharelement) ______________________________________________________________________ ### function writeUnsignedIntElement *Writes an element of unsigned integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeUnsignedIntElement ( const std::string & elementName, unsigned int element ) ``` Writes an XML element that contains an unsigned integer value. **Parameters:** - `elementName` Name of the XML element. - `element` Unsigned integer value to write. Implements [*SBCSerializer::writeUnsignedIntElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedintelement) ______________________________________________________________________ ### function writeUnsignedLongElement *Writes an element of unsigned long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeUnsignedLongElement ( const std::string & elementName, unsigned long element ) ``` Writes an XML element that contains an unsigned long integer value. The size of an unsigned long may differ across platforms; consider using a fixed-size type for portable data. **Parameters:** - `elementName` Name of the XML element. - `element` Unsigned long integer value to write. Note: because the size of longs may vary between platforms (e.g. 4 bytes on Windows and 8 bytes on OS X), it is advised not to use this function when portability is required. Implements [*SBCSerializer::writeUnsignedLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlongelement) ______________________________________________________________________ ### function writeUnsignedLongLongElement *Writes an element of unsigned long long integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeUnsignedLongLongElement ( const std::string & elementName, unsigned long long element ) ``` Writes an XML element that contains an unsigned long long integer value. **Parameters:** - `elementName` Name of the XML element. - `element` Unsigned long long integer value to write. Implements [*SBCSerializer::writeUnsignedLongLongElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedlonglongelement) ______________________________________________________________________ ### function writeUnsignedShortElement *Writes an element of unsigned short integer type with* `elementName` *name and value*`element` *.* ```C++ virtual void SBCSerializerXML::writeUnsignedShortElement ( const std::string & elementName, unsigned short element ) ``` Writes an XML element that contains an unsigned short integer value. **Parameters:** - `elementName` Name of the XML element. - `element` Unsigned short integer value to write. Implements [*SBCSerializer::writeUnsignedShortElement*](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/#function-writeunsignedshortelement) ______________________________________________________________________ ### function ~SBCSerializerXML *Destructor.* ```C++ virtual SBCSerializerXML::~SBCSerializerXML () ``` Destroys the [**SBCSerializerXML**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializerXML/index.md) object. Writes any pending end elements, closes the file, and releases allocated resources. ______________________________________________________________________ # SBUndoCommand # Class SBCUndoCommand [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) *This class is the base class of all commands that can undergo undo and redo operations.* [More...](#detailed-description) - `#include ` Inherited by the following classes: [SBCUndoCommandGroup](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommandGroup/index.md) ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------- | | virtual std::string | [**getName**](#function-getname) () const *Returns the undo command's name.* | | [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) \* | [**getParent**](#function-getparent) () const *Returns the undo command's parent.* | | virtual bool | [**isCommand**](#function-iscommand) () const *Returns whether it is an undo command - returns* `true` \_\_ | | virtual bool | [**isCommandGroup**](#function-iscommandgroup) () const *Returns whether it is an undo command group - returns* `false` \_\_ | | bool | [**isDone**](#function-isdone) () const *Returns whether the undo command is done.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) const *Prints debugging information.* | | virtual | [**~SBCUndoCommand**](#function-sbcundocommand) () *Destructs the undo command.* | ## Protected Attributes | Type | Name | | --------------------- | ------------------------------------------------------------------------- | | SBCUndoCommandData \* | [**dataPointer**](#variable-datapointer) *A pointer to the private data.* | ## Protected Functions | Type | Name | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCUndoCommand**](#function-sbcundocommand-12) () *Protected constructor.* | | | [**SBCUndoCommand**](#function-sbcundocommand-22) (SBCUndoCommandData * dataPointer) *Protected constructor.* | | virtual void | [**addChild**](#function-addchild) ([**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) * undoCommand) *Adds a child undo command to an undo command group, does nothing for an undo command.* | | virtual unsigned int | [**getNumberOfCommands**](#function-getnumberofcommands) () const *Returns the number of undo commands in an undo command group or 1 for an undo command.* | | virtual void | [**redo**](#function-redo) () *Redo the operation.* | | virtual void | [**undo**](#function-undo) () *Undo the operation.* | ## Detailed Description **Short name**: SBUndoCommand ## Public Functions Documentation ### function getName *Returns the undo command's name.* ```C++ virtual std::string SBCUndoCommand::getName () const ``` Returns the name of this command. **Returns:** The name of the command as a string. ______________________________________________________________________ ### function getParent *Returns the undo command's parent.* ```C++ SBCUndoCommand * SBCUndoCommand::getParent () const ``` Returns the parent command of this command, or nullptr if none. **Returns:** Pointer to the parent [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md), or nullptr. ______________________________________________________________________ ### function isCommand *Returns whether it is an undo command - returns* `true` \_\_ ```C++ virtual bool SBCUndoCommand::isCommand () const ``` Indicates whether this object represents an undo command. **Returns:** `true` if it is an undo command. ______________________________________________________________________ ### function isCommandGroup *Returns whether it is an undo command group - returns* `false` \_\_ ```C++ virtual bool SBCUndoCommand::isCommandGroup () const ``` Indicates whether this command is a command group. **Returns:** `true` if it is a command group, `false` otherwise. ______________________________________________________________________ ### function isDone *Returns whether the undo command is done.* ```C++ bool SBCUndoCommand::isDone () const ``` Returns whether this command has been executed (done). **Returns:** `true` if the command is done, otherwise `false`. ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ virtual void SBCUndoCommand::print ( unsigned int offset=0 ) const ``` Prints debugging information for this command with the given indentation offset. **Parameters:** - `offset` Number of tabs to indent before printing. ______________________________________________________________________ ### function ~SBCUndoCommand *Destructs the undo command.* ```C++ virtual SBCUndoCommand::~SBCUndoCommand () ``` Destroys the [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) object and releases its resources. ______________________________________________________________________ ## Protected Attributes Documentation ### variable dataPointer *A pointer to the private data.* ```C++ SBCUndoCommandData* SBCUndoCommand::dataPointer; ``` ______________________________________________________________________ ## Protected Functions Documentation ### function SBCUndoCommand [1/2] *Protected constructor.* ```C++ SBCUndoCommand::SBCUndoCommand () ``` Constructs a new [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) object. Initializes the command and its private data. ______________________________________________________________________ ### function SBCUndoCommand [2/2] *Protected constructor.* ```C++ SBCUndoCommand::SBCUndoCommand ( SBCUndoCommandData * dataPointer ) ``` Constructs a new [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) object with the given private data pointer. **Parameters:** - `dataPointer` Pointer to the private data structure for the command. ______________________________________________________________________ ### function addChild *Adds a child undo command to an undo command group, does nothing for an undo command.* ```C++ virtual void SBCUndoCommand::addChild ( SBCUndoCommand * undoCommand ) ``` Adds a child command to this command group. **Parameters:** - `undoCommand` Pointer to the child command to add. Does nothing for a simple command. ______________________________________________________________________ ### function getNumberOfCommands *Returns the number of undo commands in an undo command group or 1 for an undo command.* ```C++ virtual unsigned int SBCUndoCommand::getNumberOfCommands () const ``` Returns the number of commands represented by this command. **Returns:** The number of commands. For a simple command this is 1. ______________________________________________________________________ ### function redo *Redo the operation.* ```C++ virtual void SBCUndoCommand::redo () ``` Performs the redo operation of this command. ______________________________________________________________________ ### function undo *Undo the operation.* ```C++ virtual void SBCUndoCommand::undo () ``` Performs the undo operation of this command. ______________________________________________________________________ # SBUndoCommandGroup # Class SBCUndoCommandGroup [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBCUndoCommandGroup**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommandGroup/index.md) *This class describes a group of undo commands.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCUndoCommand](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) ## Public Functions | Type | Name | | ------------------- | ------------------------------------------------------------------------------------------------------------------------------------ | | virtual std::string | [**getName**](#function-getname) () override const *Returns the undo command group's name.* | | virtual bool | [**isCommand**](#function-iscommand) () override const *Returns whether it is an undo command - returns* `false` \_\_ | | virtual bool | [**isCommandGroup**](#function-iscommandgroup) () override const *Returns whether it is an undo command group - returns* `true` \_\_ | | virtual void | [**print**](#function-print) (unsigned int offset=0) override const *Prints debugging information.* | ## Public Functions inherited from SBCUndoCommand See [SBCUndoCommand](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | virtual std::string | [**getName**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-getname) () const *Returns the undo command's name.* | | [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) \* | [**getParent**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-getparent) () const *Returns the undo command's parent.* | | virtual bool | [**isCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-iscommand) () const *Returns whether it is an undo command - returns* `true` \_\_ | | virtual bool | [**isCommandGroup**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-iscommandgroup) () const *Returns whether it is an undo command group - returns* `false` \_\_ | | bool | [**isDone**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-isdone) () const *Returns whether the undo command is done.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-print) (unsigned int offset=0) const *Prints debugging information.* | | virtual | [**~SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-sbcundocommand) () *Destructs the undo command.* | ## Protected Attributes inherited from SBCUndoCommand See [SBCUndoCommand](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) | Type | Name | | --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | SBCUndoCommandData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions | Type | Name | | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBCUndoCommandGroup**](#function-sbcundocommandgroup) (const std::string & n) *Protected constructor.* | | virtual void | [**addChild**](#function-addchild) ([**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) * undoCommand) override *Adds a child undo command to the undo command group.* | | virtual unsigned int | [**getNumberOfCommands**](#function-getnumberofcommands) () override const *Returns the number of commands in the undo command group.* | | virtual void | [**redo**](#function-redo) () override *Redo the operation.* | | virtual void | [**undo**](#function-undo) () override *Undo the operation.* | | virtual | [**~SBCUndoCommandGroup**](#function-sbcundocommandgroup) () *Destructor.* | ## Protected Functions inherited from SBCUndoCommand See [SBCUndoCommand](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) | Type | Name | | -------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-sbcundocommand-12) () *Protected constructor.* | | | [**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-sbcundocommand-22) (SBCUndoCommandData * dataPointer) *Protected constructor.* | | virtual void | [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-addchild) ([**SBCUndoCommand**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/index.md) * undoCommand) *Adds a child undo command to an undo command group, does nothing for an undo command.* | | virtual unsigned int | [**getNumberOfCommands**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-getnumberofcommands) () const *Returns the number of undo commands in an undo command group or 1 for an undo command.* | | virtual void | [**redo**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-redo) () *Redo the operation.* | | virtual void | [**undo**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-undo) () *Undo the operation.* | ## Detailed Description **Short name**: SBUndoCommandGroup ## Public Functions Documentation ### function getName *Returns the undo command group's name.* ```C++ virtual std::string SBCUndoCommandGroup::getName () override const ``` Retrieves the name of the command group. Returns the identifier that was assigned to this group at construction. **Returns:** The name of the command group. Implements [*SBCUndoCommand::getName*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-getname) ______________________________________________________________________ ### function isCommand *Returns whether it is an undo command - returns* `false` \_\_ ```C++ virtual bool SBCUndoCommandGroup::isCommand () override const ``` Indicates whether this object represents a single undo command. Always returns false for command groups. **Returns:** false, indicating this is not a single command. Implements [*SBCUndoCommand::isCommand*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-iscommand) ______________________________________________________________________ ### function isCommandGroup *Returns whether it is an undo command group - returns* `true` \_\_ ```C++ virtual bool SBCUndoCommandGroup::isCommandGroup () override const ``` Indicates whether this object represents a command group. Always returns true for command groups. **Returns:** `true`, indicating this is a command group. Implements [*SBCUndoCommand::isCommandGroup*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-iscommandgroup) ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ virtual void SBCUndoCommandGroup::print ( unsigned int offset=0 ) override const ``` Prints debugging information for the command group. Outputs the group's name with indentation based on the offset, then recursively prints its children. **Parameters:** - `offset` Number of indentation levels to apply before printing. Implements [*SBCUndoCommand::print*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-print) ______________________________________________________________________ ## Protected Functions Documentation ### function SBCUndoCommandGroup *Protected constructor.* ```C++ explicit SBCUndoCommandGroup::SBCUndoCommandGroup ( const std::string & n ) ``` Constructs a command group with the given name. Creates a new undo command group identified by the supplied name. **Parameters:** - `n` The name of the command group. ______________________________________________________________________ ### function addChild *Adds a child undo command to the undo command group.* ```C++ virtual void SBCUndoCommandGroup::addChild ( SBCUndoCommand * undoCommand ) override ``` Adds a child undo command to this group. The specified command becomes a member of the group and will be processed together with other commands. **Parameters:** - `undoCommand` Pointer to the command to be added. Must not be null. Implements [*SBCUndoCommand::addChild*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-addchild) ______________________________________________________________________ ### function getNumberOfCommands *Returns the number of commands in the undo command group.* ```C++ virtual unsigned int SBCUndoCommandGroup::getNumberOfCommands () override const ``` Returns the total number of commands contained in the group. The count includes all nested commands within child groups. **Returns:** The number of commands in the group. Implements [*SBCUndoCommand::getNumberOfCommands*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-getnumberofcommands) ______________________________________________________________________ ### function redo *Redo the operation.* ```C++ virtual void SBCUndoCommandGroup::redo () override ``` Redoes all commands in the group in order. Executes the redo operation of each child command from the first to the last. Implements [*SBCUndoCommand::redo*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-redo) ______________________________________________________________________ ### function undo *Undo the operation.* ```C++ virtual void SBCUndoCommandGroup::undo () override ``` Undoes all commands in the group in reverse order. Executes the undo operation of each child command from the last to the first. Implements [*SBCUndoCommand::undo*](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommand/#function-undo) ______________________________________________________________________ ### function ~SBCUndoCommandGroup *Destructor.* ```C++ virtual SBCUndoCommandGroup::~SBCUndoCommandGroup () ``` Destroys the command group. Releases any resources held by the [**SBCUndoCommandGroup**](https://documentation.samson-connect.net/developers/latest/api/classSBCUndoCommandGroup/index.md) instance. ______________________________________________________________________ # SBApp # Class SBDApp [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDApp**](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) *This class is the base class for apps.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDApp**](#function-sbdapp) () *Constructs an app.* | | virtual void | [**display**](#function-display) ([**SBNode::RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) renderingPass) *To display elements related to the app.* | | [**SBGApp**](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) \* | [**getGUI**](#function-getgui) () const *Returns a pointer to the GUI of the app.* | | virtual void | [**onDocumentEvent**](#function-ondocumentevent) ([**SBDocumentEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentEvent/index.md) * event) *Handles document events.* | | void | [**setGUI**](#function-setgui) ([**SBGApp**](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) * gui) *Sets the pointer to the GUI of the app.* | | virtual | [**~SBDApp**](#function-sbdapp) () *Destructs the app.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class is the base class for all apps in SAMSON. Apps are classes that may provide any type of functionality to SAMSON users. An app may be e.g. a connector to an external executable or web service, may wrap previously developed code to integrate its functionality with SAMSON and other [SAMSON Extensions](https://documentation.samson-connect.net/developers/latest/extensions/index.md), or provide entirely new functionality based on the SAMSON Application Programming Interface (API). When SAMSON loads an app during startup, it includes it in the app menu and the app toolbar. When users open an app from the app menu or app toolbar, the Graphical User Interface (GUI) of the app appears, and the user may start using it. You can overload the display function to have your app render things in the viewport. You can also overload the onDocumentEvent function to handle document events, including when the active document changes, or when nodes are added and removed from a document. An app is typically implemented by writing two classes: - one that derives from the [**SBDApp**](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) class, to implement the core functionality of the app (i.e. the functions that may be exposed to SAMSON and [SAMSON Extensions](https://documentation.samson-connect.net/developers/latest/extensions/index.md) through the [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md)) - one that derives from the [**SBGApp**](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) class, to implement the GUI of the App (i.e. the widgets used to visually interact with the app). Please refer to the documentation about the [SAMSON Extension Generator](https://documentation.samson-connect.net/developers/latest/extension-generator/index.md) and the [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md) for more information about writing new apps for SAMSON. **Short name**: SBApp **See also:** [SAMSON Extensions](https://documentation.samson-connect.net/developers/latest/extensions/index.md), [Tutorials](https://documentation.samson-connect.net/developers/latest/tutorials/index.md), [**SBGApp**](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) ## Public Functions Documentation ### function SBDApp *Constructs an app.* ```C++ SBDApp::SBDApp () ``` Constructs a new [**SBDApp**](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) instance. Initializes the app and its internal data structures. ______________________________________________________________________ ### function display *To display elements related to the app.* ```C++ virtual void SBDApp::display ( SBNode::RenderingPass renderingPass ) ``` Displays elements related to the app for a given rendering pass. Called by the rendering engine to draw the app's visual elements in the viewport. **Parameters:** - `renderingPass` The rendering pass for which the display is performed. ______________________________________________________________________ ### function getGUI *Returns a pointer to the GUI of the app.* ```C++ SBGApp * SBDApp::getGUI () const ``` Retrieves the GUI associated with the app. Returns a pointer to the [**SBGApp**](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) instance that represents the app's graphical user interface. **Returns:** Pointer to the app's GUI, or nullptr if none is set. ______________________________________________________________________ ### function onDocumentEvent *Handles document events.* ```C++ virtual void SBDApp::onDocumentEvent ( SBDocumentEvent * event ) ``` Handles a document event. Called when a document event occurs, allowing the app to respond accordingly. **Parameters:** - `event` Pointer to the document event. ______________________________________________________________________ ### function setGUI *Sets the pointer to the GUI of the app.* ```C++ void SBDApp::setGUI ( SBGApp * gui ) ``` Sets the GUI for the app. Associates the given [**SBGApp**](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) instance with this app as its graphical user interface. **Parameters:** - `g` Pointer to the [**SBGApp**](https://documentation.samson-connect.net/developers/latest/api/classSBGApp/index.md) instance to set as the GUI. ______________________________________________________________________ ### function ~SBDApp *Destructs the app.* ```C++ virtual SBDApp::~SBDApp () ``` Destroys the [**SBDApp**](https://documentation.samson-connect.net/developers/latest/api/classSBDApp/index.md) instance. Releases resources associated with the app. ______________________________________________________________________ # SBAsset # Class SBDAsset [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDAsset**](https://documentation.samson-connect.net/developers/latest/api/classSBDAsset/index.md) *This class describes an asset.* - `#include ` Inherits the following classes: [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) ## Public Types inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | enum | [**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) *The rendering pass.* | | enum | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) *The type of the data graph node.* | ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDAsset**](#function-sbdasset-12) () *Constructs an asset.* | | | [**SBDAsset**](#function-sbdasset-22) (const std::string & assetName, const std::string & assetFileName, const std::string & thumbnailFileName) *Constructs an asset.* | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0) (SB_SBDASSET_EXPORT, std::string, GetName) | | bool | [**assetSignalIsConnectedToSlot**](#function-assetsignalisconnectedtoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBAssetEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md) \*) functionPointer) const *Returns* `true` *if and only if the Asset signal is connected to the slot.* | | virtual [**SBDAsset**](https://documentation.samson-connect.net/developers/latest/api/classSBDAsset/index.md) \* | [**clone**](#function-clone) () override *Returns a copy of the asset and its descendants.* | | void | [**connectAssetSignalToSlot**](#function-connectassetsignaltoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBAssetEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md) \*) functionPointer, [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * nextReferenceTarget=0, void(SBCReferenceTarget::\*)([**SBAssetEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md) \*) nextFunctionPointer=0) *Connects the Asset signal to a slot.* | | void | [**disconnectAssetSignalFromSlot**](#function-disconnectassetsignalfromslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBAssetEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md) \*) functionPointer) *Disconnects the Asset signal from a slot.* | | std::string const & | [**getAssetFileName**](#function-getassetfilename) () const *Returns the name of the file associated to the asset.* | | virtual std::string const & | [**getName**](#function-getname) () override const *Returns the name of the asset.* | | [**SBDAsset**](https://documentation.samson-connect.net/developers/latest/api/classSBDAsset/index.md) \* | [**getNextAsset**](#function-getnextasset) () const *Returns the next asset.* | | [**SBDAsset**](https://documentation.samson-connect.net/developers/latest/api/classSBDAsset/index.md) \* | [**getPreviousAsset**](#function-getpreviousasset) () const *Returns the previous asset.* | | std::string const & | [**getThumbnailFileName**](#function-getthumbnailfilename) () const *Returns the name of the file associated to the asset thumbnail.* | | virtual [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](#function-gettype) () override const *Returns the type of the data graph node.* | | virtual bool | [**initializeAsset**](#function-initializeasset) () *Prepares the asset file.* | | virtual bool | [**initializeThumbnail**](#function-initializethumbnail) () *Prepares the asset thumbnail.* | | virtual bool | [**isLocked**](#function-islocked) () override const *Returns whether the asset is locked.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` *when the class is serializable.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) override const *Prints the asset.* | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the asset.* | | void | [**setAssetFileName**](#function-setassetfilename) (const std::string & assetFileName) *Sets the name of the file associated to the asset.* | | virtual void | [**setName**](#function-setname) (const std::string & name) override *Sets the name of the asset.* | | void | [**setThumbnailFileName**](#function-setthumbnailfilename) (const std::string & thumbnailFileName) *Sets the name of the file associated to the asset thumbnail.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the asset.* | | virtual | [**~SBDAsset**](#function-sbdasset) () *Destructs the asset.* | ## Public Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-119) (SB_SBDDATAGRAPH_EXPORT, [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \*, GetProxy) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-219) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, This) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-319) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetParent) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-419) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetThis) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-519) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetNextNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-619) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetPreviousNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-719) (SB_SBDDATAGRAPH_EXPORT, [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \*, GetDocument) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-819) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetRoot) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-919) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1019) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type), GetType) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1119) (SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1219) (SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1319) (SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1419) (SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1519) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1619) (SB_SBDDATAGRAPH_EXPORT, std::string, GetName) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1719) (SB_SBDDATAGRAPH_EXPORT, std::string, GetClass) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1819) (SB_SBDDATAGRAPH_EXPORT, std::string, GetElement) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1919) (SB_SBDDATAGRAPH_EXPORT, [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md), GetElementUUID) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-132) (SB_SBDDATAGRAPH_EXPORT, All) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-232) (SB_SBDDATAGRAPH_EXPORT, None) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-332) (SB_SBDDATAGRAPH_EXPORT, IsModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-432) (SB_SBDDATAGRAPH_EXPORT, IsAtom) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-532) (SB_SBDDATAGRAPH_EXPORT, IsBond) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-632) (SB_SBDDATAGRAPH_EXPORT, IsStructuralNode) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-732) (SB_SBDDATAGRAPH_EXPORT, IsStructuralModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-832) (SB_SBDDATAGRAPH_EXPORT, IsVisualModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-932) (SB_SBDDATAGRAPH_EXPORT, IsMesh) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1032) (SB_SBDDATAGRAPH_EXPORT, IsLight) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1132) (SB_SBDDATAGRAPH_EXPORT, IsInteractionModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1232) (SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1332) (SB_SBDDATAGRAPH_EXPORT, IsPropertyModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1432) (SB_SBDDATAGRAPH_EXPORT, IsSimulator) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1532) (SB_SBDDATAGRAPH_EXPORT, IsBallAndStick) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1632) (SB_SBDDATAGRAPH_EXPORT, IsLicorice) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1732) (SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1832) (SB_SBDDATAGRAPH_EXPORT, IsCartoon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1932) (SB_SBDDATAGRAPH_EXPORT, IsRibbon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2032) (SB_SBDDATAGRAPH_EXPORT, IsTube) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2132) (SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2232) (SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2332) (SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2432) (SB_SBDDATAGRAPH_EXPORT, HasMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2532) (SB_SBDDATAGRAPH_EXPORT, OwnsMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2632) (SB_SBDDATAGRAPH_EXPORT, IsLocked) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2732) (SB_SBDDATAGRAPH_EXPORT, IsSerializable) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2832) (SB_SBDDATAGRAPH_EXPORT, IsCreated) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2932) (SB_SBDDATAGRAPH_EXPORT, IsErased) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3032) (SB_SBDDATAGRAPH_EXPORT, IsSelected) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3132) (SB_SBDDATAGRAPH_EXPORT, IsVisible) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3232) (SB_SBDDATAGRAPH_EXPORT, IsHighlighted) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-12) (SB_SBDDATAGRAPH_EXPORT, IsType, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type)) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-22) (SB_SBDDATAGRAPH_EXPORT, HasOneOf, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md)) | | virtual bool | [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) *Adds a child to the node.* | | bool | [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial) ([**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) * material) *Adds a material.* | | bool | [**baseSignalIsConnectedToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-basesignalisconnectedtoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) const *Returns* `true` *when the base signal is connected to a slot.* | | virtual bool | [**canAddChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchild) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) const *Returns whether this node can add* `node` *as a child.* | | virtual bool | [**canAddChildType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchildtype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can add a node with type* `nodeType` *as a child.* | | bool | [**canAddMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddmaterial-12) () const *Returns whether can add a material to the node based on its type.* | | virtual bool | [**canHaveDescendantType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canhavedescendanttype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can have a node with type* `nodeType` *as a descendant.* | | virtual [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) () *Returns a copy of the node and its descendants.* | | void | [**connectBaseSignalToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-connectbasesignaltoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer, [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * nextReferenceTarget=0, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) nextFunctionPointer=0) *Connects the base signal to a slot.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | void | [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create) () *Creates the node.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them.* | | void | [**disconnectBaseSignalFromSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-disconnectbasesignalfromslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) *Disconnects the base signal from a slot.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) ([**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) renderingPass) *Displays the node.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-22) () *Displays the node (deprecated)* | | virtual void | [**displayForSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforselection) () *Displays the node for selection purposes (deprecated)* | | virtual void | [**displayForShadow**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforshadow) () *Displays the node for shadowing purposes (deprecated)* | | void | [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) () *Erases the node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-12) (void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *on this node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *on this node.* | | unsigned int | [**getDefaultOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaultopacity) () const *Returns the default opacity.* | | unsigned int | [**getDefaultTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaulttransparency) () const *Returns the default transparency.* | | [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \* | [**getDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdocument) () const *Returns the document the node belongs to.* | | virtual unsigned int | [**getFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getflags) () const *Returns the flags.* | | virtual std::string | [**getHierarchyString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethierarchystring) (const std::string & separator=" / ", bool includeNodeType=false) const *Returns a string with hierarchical information on the node and its parents names.* | | bool | [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) () const *Returns the highlighting flag.* | | virtual unsigned int | [**getInheritedFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedflags) () const *Returns the inherited flags.* | | float | [**getInheritedOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedopacity) () const *Returns the cumulative opacity, when taking into account the ascendants.* | | float | [**getInheritedTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedtransparency) () const *Returns the cumulative transparency, when taking into account the ascendants.* | | virtual bool | [**getLockedFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getlockedflag) () const *Returns the locked flag.* | | [**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) \* | [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial) () const *Returns the material.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) () const *Returns the node whose material is inherited.* | | unsigned int | [**getMaximumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumopacity) () const *Returns the maximum opacity.* | | unsigned int | [**getMaximumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumtransparency) () const *Returns the maximum transparency.* | | unsigned int | [**getMinimumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumopacity) () const *Returns the minimum opacity.* | | unsigned int | [**getMinimumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumtransparency) () const *Returns the minimum transparency.* | | virtual [**SBQuantity::mass**](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-mass) | [**getMolecularWeight**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmolecularweight) () *Returns the molecular weight.* | | virtual std::string const & | [**getName**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getname) () const *Returns the name of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnextnode-12) () const *Returns the pointer to the next node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnextnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the next node with type* `nodeType` *in the children of the node's parent.* | | unsigned int | [**getNodeIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeindex) () const *Returns the node index (unique in the whole data graph, but non-persistent)* | | [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getNodeUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeuuid) () const *Returns the node UUID.* | | virtual void | [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual void | [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual unsigned int | [**getNumberOfAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofatoms) () *Returns the number of atoms.* | | virtual unsigned int | [**getNumberOfCarbons**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofcarbons) () *Returns the number of carbons.* | | virtual unsigned int | [**getNumberOfChains**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofchains) () *Returns the number of chains.* | | virtual unsigned int | [**getNumberOfCoarseGrainedAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofcoarsegrainedatoms) () *Returns the number of coarse-grained atoms.* | | virtual unsigned int | [**getNumberOfHydrogens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofhydrogens) () *Returns the number of hydrogens.* | | virtual unsigned int | [**getNumberOfMolecules**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofmolecules) () *Returns the number of molecules.* | | virtual unsigned int | [**getNumberOfNitrogens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofnitrogens) () *Returns the number of nitrogens.* | | virtual unsigned int | [**getNumberOfOtherAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofotheratoms) () *Returns the number of other atoms.* | | virtual unsigned int | [**getNumberOfOxygens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofoxygens) () *Returns the number of oxygens.* | | virtual unsigned int | [**getNumberOfResidues**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofresidues) () *Returns the number of residues.* | | virtual unsigned int | [**getNumberOfSegments**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofsegments) () *Returns the number of segments.* | | virtual unsigned int | [**getNumberOfStructuralGroups**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofstructuralgroups) () *Returns the number of structural groups.* | | virtual unsigned int | [**getNumberOfStructuralModels**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofstructuralmodels) () *Returns the number of structural models.* | | virtual unsigned int | [**getNumberOfSulfurs**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofsulfurs) () *Returns the number of sulfurs.* | | virtual unsigned int | [**getOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacity) () const *Returns the opacity.* | | unsigned int | [**getOpacitySingleStep**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacitysinglestep) () const *Returns the opacity single step.* | | std::string | [**getOpacitySuffix**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacitysuffix) () const *Returns the opacity suffix.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getParent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getparent) () const *Returns the parent of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getpreviousnode-12) () const *Returns the pointer to the previous node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getpreviousnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the previous node with type* `nodeType` *in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getRoot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getroot) () const *Returns the root of the hierarchy the node belongs to.* | | bool | [**getSelected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselected) () const *Returns whether the node is selected.* | | bool | [**getSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) () const *Returns the selection flag.* | | virtual int | [**getSumOfFormalCharges**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getsumofformalcharges) () *Returns the sum of formal charges.* | | virtual float | [**getSumOfPartialCharges**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getsumofpartialcharges) () *Returns the sum of partial charges.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getThisNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getthisnode) () const *Returns the pointer to this node.* | | virtual unsigned int | [**getTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparency) () const *Returns the transparency.* | | unsigned int | [**getTransparencySingleStep**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparencysinglestep) () const *Returns the transparency single step.* | | std::string | [**getTransparencySuffix**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparencysuffix) () const *Returns the transparency suffix.* | | virtual [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) () const *Returns the type of the data graph node.* | | std::string | [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-12) (bool humanReadable=false) const *Returns a string describing the type of the data graph node.* | | bool | [**getVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag) () const *Returns the visibility flag.* | | bool | [**getVisible**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisible) () const *Returns whether the node is visible.* | | bool | [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial) () const *Returns whether the node has a material (by itself, or inherited)* | | virtual bool | [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | bool | [**hasOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasoneof) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or is the ancestor of one of them, or is a group that stores one of them.* | | bool | [**hasOpacityRange**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasopacityrange) () const *Returns whether the node has the opacity range.* | | bool | [**hasTransparencyRange**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hastransparencyrange) () const *Returns whether the node has the transparency range.* | | bool | [**isAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isatom) () const *Returns* `true` *when the node is an atom.* | | bool | [**isBallAndStick**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isballandstick) () const *Returns* `true` *when the node is the default ball-and-stick visual model.* | | bool | [**isBond**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isbond) () const *Returns* `true` *when the node is a bond.* | | bool | [**isCartoon**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscartoon) () const *Returns* `true` *when the node is the default cartoon visual model.* | | bool | [**isCreated**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated) () const *Returns* `true` *if and only if the node is created.* | | bool | [**isDynamicalModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isdynamicalmodel) () const *Returns* `true` *when the node is a dynamical model.* | | bool | [**isErased**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iserased) () const *Returns* `true` *if and only if the node is erased.* | | bool | [**isGaussianSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isgaussiansurface) () const *Returns* `true` *when the node is the default Gaussian surface visual model.* | | bool | [**isHighlighted**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ishighlighted) () const *Returns whether the node is highlighted.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it, or belongs to a group stored in*`node` *.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them, or belongs to a group stored in one of the nodes of the*`nodeIndexer` *.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them, or belongs to a group stored in of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isInteractionModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isinteractionmodel) () const *Returns* `true` *when the node is a interaction model.* | | bool | [**isLicorice**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islicorice) () const *Returns* `true` *when the node is the default licorice visual model.* | | bool | [**isLight**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islight) () const *Returns* `true` *when the node is a light.* | | virtual bool | [**isLocked**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islocked) () const *Returns whether the node is locked.* | | bool | [**isMesh**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ismesh) () const *Returns* `true` *when the node is a mesh.* | | bool | [**isModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ismodel) () const *Returns* `true` *when the node is a model.* | | bool | [**isOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isoneof-12) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *.* | | bool | [**isOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isoneof-22) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isPropertyModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ispropertymodel) () const *Returns* `true` *when the node is a property model.* | | bool | [**isRibbon**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isribbon) () const *Returns* `true` *when the node is the default ribbon visual model.* | | bool | [**isSelected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isselected) () const *Returns whether the node is selected.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | bool | [**isSimulator**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issimulator) () const *Returns* `true` *when the node is a simulator.* | | bool | [**isSolventAccessibleSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issolventaccessiblesurface) () const *Returns* `true` *when the node is the default solvent accessible surface visual model.* | | bool | [**isSolventExcludedSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issolventexcludedsurface) () const *Returns* `true` *when the node is the default solvent excluded surface visual model.* | | bool | [**isStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isstructuralmodel) () const *Returns* `true` *when the node is a structural model.* | | bool | [**isStructuralNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isstructuralnode) () const *Returns* `true` *when the node is a structural node.* | | bool | [**isTube**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-istube) () const *Returns* `true` *when the node is the default tube visual model.* | | bool | [**isType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-istype) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type) const *Returns* `true` *when the type of the node corresponds to*`type` *.* | | bool | [**isVanDerWaals**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvanderwaals) () const *Returns* `true` *when the node is the default van der Waals visual model.* | | bool | [**isVisible**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvisible) () const *Returns whether the node is visible.* | | bool | [**isVisualModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvisualmodel) () const *Returns* `true` *when the node is a visual model.* | | bool | [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial) () const *Returns whether the node owns a material.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-print) (unsigned int offset=0) const *Prints some debugging information.* | | virtual bool | [**removeChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removechild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) *Removes a child from the node.* | | bool | [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial) () *Removes the material.* | | void | [**removeMaterialsFromDescendants**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerialsfromdescendants) () *Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the node.* | | void | [**setHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sethighlightingflag) (bool flag) *Sets the highlighting flag.* | | virtual void | [**setLockedFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setlockedflag) (bool flag) *Sets the locked flag.* | | virtual void | [**setName**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setname) (const std::string & name) *Sets the name of the node.* | | virtual void | [**setOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setopacity) (unsigned int opacity) *Sets the opacity.* | | void | [**setSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setselectionflag) (bool flag) *Sets the selection flag.* | | virtual void | [**setTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-settransparency) (unsigned int transparency) *Sets the transparency.* | | void | [**setVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setvisibilityflag) (bool flag) *Sets the visibility flag.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the node.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Public Static Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | bool | [**canAddMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddmaterial-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) *Returns whether can add a material to a node of type* `nodeType` *.* | | void | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & sourceNodeIndexer, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & destinationNodeIndexer) *Clones the nodes in* `sourceNodeIndexer` *(treated as a whole) and places the clones in*`destinationNodeIndexer` *.* | | void | [**forEachNodeInSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodeinselection-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *for each node in*`nodeIndexer` \_\_ | | void | [**forEachNodeInSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodeinselection-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *for each node in*`nodeIndexer` \_\_ | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnode) (unsigned int nodeIndex) *Returns the unique node corresponding to the node index* `nodeIndex` *.* | | std::string | [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-22) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type, bool humanReadable=false) *Returns a string describing the type of the data graph node.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode-12) () *Builds a data graph node.* | | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode-22) (SBDDataGraphNodeData * dataPointer) *Builds a data graph node.* | | virtual | [**~SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode) () *Destroys the node.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Public Functions Documentation ### function SBDAsset [1/2] *Constructs an asset.* ```C++ SBDAsset::SBDAsset () ``` Constructs an empty asset. Initializes a new `SBDAsset` instance with default values. ______________________________________________________________________ ### function SBDAsset [2/2] *Constructs an asset.* ```C++ SBDAsset::SBDAsset ( const std::string & assetName, const std::string & assetFileName, const std::string & thumbnailFileName ) ``` Constructs an asset with the given name and file names. Initializes a new `SBDAsset` instance and sets its name, asset file name, and thumbnail file name. **Parameters:** - `assetName` Name of the asset. - `assetFileName` Path to the asset file. - `thumbnailFileName` Path to the thumbnail file. ______________________________________________________________________ ### function SB_NODE_GETTER_0 ```C++ SBDAsset::SB_NODE_GETTER_0 ( SB_SBDASSET_EXPORT, std::string, GetName ) ``` ______________________________________________________________________ ### function assetSignalIsConnectedToSlot *Returns* `true` *if and only if the Asset signal is connected to the slot.* ```C++ bool SBDAsset::assetSignalIsConnectedToSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBAssetEvent *) functionPointer ) const ``` Checks whether a slot is connected to the asset signal. Determines if the specified target and function pointer are currently connected. **Parameters:** - `referenceTarget` Pointer to the target object to check. - `functionPointer` Pointer to the member function to check. **Returns:** `true` if the slot is connected; otherwise `false`. ______________________________________________________________________ ### function clone *Returns a copy of the asset and its descendants.* ```C++ virtual SBDAsset * SBDAsset::clone () override ``` Creates a copy of the asset and its descendants. **Returns:** Pointer to the cloned `SBDAsset`. Implements [*SBDDataGraphNode::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) ______________________________________________________________________ ### function connectAssetSignalToSlot *Connects the Asset signal to a slot.* ```C++ void SBDAsset::connectAssetSignalToSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBAssetEvent *) functionPointer, SBCReferenceTarget * nextReferenceTarget=0, void(SBCReferenceTarget::*)( SBAssetEvent *) nextFunctionPointer=0 ) ``` Connects the asset signal to a slot. Registers a slot to receive `SBAssetEvent` notifications. Optionally, a next slot can be specified to control the order of notifications. **Parameters:** - `referenceTarget` Pointer to the target object that will receive the signal. - `functionPointer` Pointer to the member function of the target to be invoked when the signal is emitted. - `nextReferenceTarget` Pointer to the target object for the next slot in the chain (optional, may be `nullptr`). - `nextFunctionPointer` Pointer to the member function for the next slot (optional, may be `nullptr`). ______________________________________________________________________ ### function disconnectAssetSignalFromSlot *Disconnects the Asset signal from a slot.* ```C++ void SBDAsset::disconnectAssetSignalFromSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBAssetEvent *) functionPointer ) ``` Disconnects a slot from the asset signal. Removes the connection between the asset signal and the specified target function. **Parameters:** - `referenceTarget` Pointer to the target object to disconnect. - `functionPointer` Pointer to the member function to disconnect. ______________________________________________________________________ ### function getAssetFileName *Returns the name of the file associated to the asset.* ```C++ std::string const & SBDAsset::getAssetFileName () const ``` Returns the file name associated with the asset. **Returns:** Constant reference to the asset file name, or an empty string if not set. ______________________________________________________________________ ### function getName *Returns the name of the asset.* ```C++ virtual std::string const & SBDAsset::getName () override const ``` **Returns:** Constant reference to the asset's name, or an empty string if not set. Implements [*SBDDataGraphNode::getName*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getname) ______________________________________________________________________ ### function getNextAsset *Returns the next asset.* ```C++ SBDAsset * SBDAsset::getNextAsset () const ``` Returns the next asset in the graph. Traverses following nodes until an asset node is found. **Returns:** Pointer to the next `SBDAsset` or `nullptr` if there is no subsequent asset. ______________________________________________________________________ ### function getPreviousAsset *Returns the previous asset.* ```C++ SBDAsset * SBDAsset::getPreviousAsset () const ``` Returns the previous asset in the graph. Traverses preceding nodes until an asset node is found. **Returns:** Pointer to the previous `SBDAsset` or `nullptr` if there is no preceding asset. ______________________________________________________________________ ### function getThumbnailFileName *Returns the name of the file associated to the asset thumbnail.* ```C++ std::string const & SBDAsset::getThumbnailFileName () const ``` Returns the thumbnail file name associated with the asset. **Returns:** Constant reference to the thumbnail file name, or an empty string if not set. ______________________________________________________________________ ### function getType *Returns the type of the data graph node.* ```C++ virtual Type SBDAsset::getType () override const ``` Returns the node type of the asset. **Returns:** `SBNode::Asset`. Implements [*SBDDataGraphNode::getType*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) ______________________________________________________________________ ### function initializeAsset *Prepares the asset file.* ```C++ virtual bool SBDAsset::initializeAsset () ``` Initializes the asset. This function is called before `getAssetFileName` and `getThumbnailFileName`. It can be used, for example, to prefetch and cache remote assets. **Returns:** `true` if initialization was successful. ______________________________________________________________________ ### function initializeThumbnail *Prepares the asset thumbnail.* ```C++ virtual bool SBDAsset::initializeThumbnail () ``` Initializes the asset thumbnail. Called before `getThumbnailFileName` and can be used to prepare or cache the thumbnail. **Returns:** `true` if initialization was successful. ______________________________________________________________________ ### function isLocked *Returns whether the asset is locked.* ```C++ virtual bool SBDAsset::isLocked () override const ``` **Returns:** `true` if the asset is locked; otherwise `false`. Implements [*SBDDataGraphNode::isLocked*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islocked) ______________________________________________________________________ ### function isSerializable *Returns* `true` *when the class is serializable.* ```C++ virtual bool SBDAsset::isSerializable () override const ``` Returns whether the asset is serializable. **Returns:** `true` if the asset can be serialized. Implements [*SBDDataGraphNode::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable) ______________________________________________________________________ ### function print *Prints the asset.* ```C++ virtual void SBDAsset::print ( unsigned int offset=0 ) override const ``` Prints the asset's information. Outputs the asset's name, file name, and thumbnail file name with indentation specified by `offset`. **Parameters:** - `offset` Number of tab characters to indent each line. Implements [*SBDDataGraphNode::print*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-print) ______________________________________________________________________ ### function serialize *Serializes the asset.* ```C++ virtual void SBDAsset::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the asset's properties to the provided serializer, including name, file names, and UUID for older SDK versions. **Parameters:** - `serializer` Serializer used to write the asset data. - `nodeIndexer` Indexer for node references during serialization. - `sdkVersionNumber` SDK version number used for compatibility checks. - `classVersionNumber` Class version number used for compatibility checks. Implements [*SBDDataGraphNode::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) ______________________________________________________________________ ### function setAssetFileName *Sets the name of the file associated to the asset.* ```C++ void SBDAsset::setAssetFileName ( const std::string & assetFileName ) ``` Sets the file name associated with the asset. Updates the asset file name and emits a change event. **Parameters:** - `n` New asset file name. ______________________________________________________________________ ### function setName *Sets the name of the asset.* ```C++ virtual void SBDAsset::setName ( const std::string & name ) override ``` Updates the asset's name and notifies listeners of the change. **Parameters:** - `n` New name for the asset. Implements [*SBDDataGraphNode::setName*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setname) ______________________________________________________________________ ### function setThumbnailFileName *Sets the name of the file associated to the asset thumbnail.* ```C++ void SBDAsset::setThumbnailFileName ( const std::string & thumbnailFileName ) ``` Sets the thumbnail file name associated with the asset. Updates the asset's thumbnail file name and emits a change event. **Parameters:** - `n` New thumbnail file name. ______________________________________________________________________ ### function unserialize *Unserializes the asset.* ```C++ virtual void SBDAsset::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Deserializes the asset. Reads the asset's properties from the provided serializer, restoring name, file names, and UUID for older SDK versions. **Parameters:** - `serializer` Serializer used to read the asset data. - `nodeIndexer` Indexer for node references during deserialization. - `sdkVersionNumber` SDK version number used for compatibility checks. - `classVersionNumber` Class version number used for compatibility checks. Implements [*SBDDataGraphNode::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ______________________________________________________________________ ### function ~SBDAsset *Destructs the asset.* ```C++ virtual SBDAsset::~SBDAsset () ``` Destroys the asset. The private data is deleted by the base class. ______________________________________________________________________ # SBAssetEvent # Class SBDAssetEvent [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDAssetEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md) *This class describes an asset event.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) ## Public Types | Type | Name | | ---- | --------------------------------------------------------------- | | enum | [**Type**](#enum-type) *The type of the dynamical model event.* | ## Public Types inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | enum | [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) *The category of the data graph event.* | ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDAssetEvent**](#function-sbdassetevent) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * sender, [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/#enum-type) type, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * auxiliaryNode=nullptr) *Builds an asset event.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getAuxiliaryNode**](#function-getauxiliarynode) () const *Returns a pointer to the auxiliary node.* | | virtual [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) | [**getCategory**](#function-getcategory) () override const *Returns the category of the data graph event.* | | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/#enum-type) | [**getType**](#function-gettype) () const *Returns the asset event type.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) override const *Prints debugging information.* | | virtual | [**~SBDAssetEvent**](#function-sbdassetevent) () *Deletes the asset event.* | ## Public Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent-22) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * sender) *Build a data graph event for the sender* `sender` *.* | | virtual [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) | [**getCategory**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategory) () const *Returns the category of the data graph event.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getSender**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getsender) () const *Returns the sender of the event.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-print) (unsigned int offset=0) const *Prints debugging information.* | | virtual | [**~SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent) () *Destructor.* | ## Public Static Functions | Type | Name | | ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getTypeString**](#function-gettypestring) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/#enum-type) type) *Returns the asset event type as a string.* | ## Public Static Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getCategoryString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategorystring) ([**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) category) *Returns a string representation of the category of the data graph event.* | ## Protected Attributes inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBDDataGraphEventData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent-12) (SBDDataGraphEventData * dataPointer) *Protected constructor.* | ## Detailed Description **Short name**: SBAssetEvent ## Public Types Documentation ### enum Type *The type of the dynamical model event.* ```C++ enum SBDAssetEvent::Type { AssetFileNameChanged = 1, ThumbnailFileNameChanged = 2 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBDAssetEvent *Builds an asset event.* ```C++ SBDAssetEvent::SBDAssetEvent ( SBDDataGraphNode * sender, Type type, SBDDataGraphNode * auxiliaryNode=nullptr ) ``` Constructs an [**SBDAssetEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md). Creates a new asset event with the given sender node, event type, and optional auxiliary node. **Parameters:** - `sender` The node that sends the event. - `type` The type of the asset event. - `auxiliaryNode` An optional auxiliary node associated with the event (may be nullptr). ______________________________________________________________________ ### function getAuxiliaryNode *Returns a pointer to the auxiliary node.* ```C++ SBDDataGraphNode * SBDAssetEvent::getAuxiliaryNode () const ``` Returns the auxiliary node associated with this asset event. **Returns:** A pointer to the auxiliary node, or nullptr if none is set. ______________________________________________________________________ ### function getCategory *Returns the category of the data graph event.* ```C++ virtual Category SBDAssetEvent::getCategory () override const ``` Returns the category of the asset event. **Returns:** The category identifier for asset events. Implements [*SBDDataGraphEvent::getCategory*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategory) ______________________________________________________________________ ### function getType *Returns the asset event type.* ```C++ Type SBDAssetEvent::getType () const ``` Returns the type of the asset event. **Returns:** The type of the asset event. ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ virtual void SBDAssetEvent::print ( unsigned int offset=0 ) override const ``` Prints debugging information for the asset event. **Parameters:** - `offset` Number of tab characters to indent the output. Implements [*SBDDataGraphEvent::print*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-print) ______________________________________________________________________ ### function ~SBDAssetEvent *Deletes the asset event.* ```C++ virtual SBDAssetEvent::~SBDAssetEvent () ``` Destroys the [**SBDAssetEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md). ______________________________________________________________________ ## Public Static Functions Documentation ### function getTypeString *Returns the asset event type as a string.* ```C++ static std::string SBDAssetEvent::getTypeString ( Type type ) ``` Returns a string representation of the given asset event type. **Parameters:** - `type` The asset event type to convert. **Returns:** A string describing the asset event type. ______________________________________________________________________ # SBAssistant # Class SBDAssistant [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDAssistant**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistant/index.md) *This class is the base class for assistants.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDAssistant**](#function-sbdassistant) () *Constructs an assistant.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**act**](#function-act) (const std::wstring & question, const std::wstring & translation) *Executes an action.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**getAnswer**](#function-getanswer) (const std::wstring & question, const std::wstring & translation) *Returns an answer to a question.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**getCompletion**](#function-getcompletion) (const std::wstring & question, const std::wstring & translation, const std::wstring & system, const std::wstring & queryType) *Returns a completion to a single question.* | | const [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & | [**getConversationUUID**](#function-getconversationuuid) () const *Returns the conversation UUID.* | | [**SBGAssistant**](https://documentation.samson-connect.net/developers/latest/api/classSBGAssistant/index.md) \* | [**getGUI**](#function-getgui) () const *Returns a pointer to the GUI of the assistant.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**getNSLExpression**](#function-getnslexpression) (const std::wstring & question, const std::wstring & translation) *Returns an NSL expression.* | | virtual std::wstring | [**getTranscription**](#function-gettranscription) (const std::wstring & fileName, std::wstring & language) *Returns a transcription for an audio file with file name* `fileName` *and the detected*`language` *.* | | virtual std::wstring | [**getTranslation**](#function-gettranslation) (const std::wstring & text, const std::wstring & language) *Returns the translation of* `text` *in*`language` *into English.* | | const [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & | [**getUserUUID**](#function-getuseruuid) () const *Returns the user UUID.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**memorize**](#function-memorize-12) (const std::wstring & fileName) *Memorizes a document.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**memorize**](#function-memorize-22) (const std::wstring & url, const std::wstring & include=L"", const std::wstring & exclude=L"") *Memorizes a webpage.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**search**](#function-search) (const std::wstring & question, const std::wstring & translation) *Performs a search.* | | virtual [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) \* | [**select**](#function-select) (const std::wstring & question, const std::wstring & translation) *Selects nodes in the document.* | | void | [**setConversationUUID**](#function-setconversationuuid) (const [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & conversationUUID) *Sets the conversation UUID.* | | void | [**setGUI**](#function-setgui) ([**SBGAssistant**](https://documentation.samson-connect.net/developers/latest/api/classSBGAssistant/index.md) * gui) *Sets the pointer to the GUI of the assistant.* | | void | [**setUserUUID**](#function-setuseruuid) (const [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) & userUUID) *Sets the user UUID.* | | virtual | [**~SBDAssistant**](#function-sbdassistant) () *Destructs the assistant.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description **Short name**: SBAssistant ## Public Functions Documentation ### function SBDAssistant *Constructs an assistant.* ```C++ SBDAssistant::SBDAssistant () ``` Constructs an [**SBDAssistant**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistant/index.md) object. ______________________________________________________________________ ### function act *Executes an action.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::act ( const std::wstring & question, const std::wstring & translation ) ``` Executes an action based on the given question and its translation. **Parameters:** - `question` The original question in the user's language. - `translation` The translation of the question into English. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object representing the result of the action, or nullptr if no action is performed. ______________________________________________________________________ ### function getAnswer *Returns an answer to a question.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::getAnswer ( const std::wstring & question, const std::wstring & translation ) ``` Retrieves an answer to the given question. **Parameters:** - `question` The original question in the user's language. - `translation` The translation of the question into English. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object representing the answer, or nullptr if no answer is available. ______________________________________________________________________ ### function getCompletion *Returns a completion to a single question.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::getCompletion ( const std::wstring & question, const std::wstring & translation, const std::wstring & system, const std::wstring & queryType ) ``` Retrieves a completion for a single question using additional context. **Parameters:** - `question` The original question in the user's language. - `translation` The translation of the question into English. - `system` System prompt providing additional context or instructions. - `queryType` [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantityProduct2/index.md) of query to influence the completion behavior. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object representing the completion, or nullptr if unavailable. ______________________________________________________________________ ### function getConversationUUID *Returns the conversation UUID.* ```C++ const SBUUID & SBDAssistant::getConversationUUID () const ``` Returns the conversation UUID associated with the assistant. **Returns:** Constant reference to the conversation UUID. ______________________________________________________________________ ### function getGUI *Returns a pointer to the GUI of the assistant.* ```C++ SBGAssistant * SBDAssistant::getGUI () const ``` **Returns:** Pointer to the [**SBGAssistant**](https://documentation.samson-connect.net/developers/latest/api/classSBGAssistant/index.md) instance associated with this assistant. ______________________________________________________________________ ### function getNSLExpression *Returns an NSL expression.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::getNSLExpression ( const std::wstring & question, const std::wstring & translation ) ``` Generates an NSL expression based on the given question. **Parameters:** - `question` The original question in the user's language. - `translation` The translation of the question into English. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object containing the NSL expression, or nullptr if none is generated. ______________________________________________________________________ ### function getTranscription *Returns a transcription for an audio file with file name* `fileName` *and the detected*`language` *.* ```C++ virtual std::wstring SBDAssistant::getTranscription ( const std::wstring & fileName, std::wstring & language ) ``` Retrieves a transcription for the specified audio file and detects its language. **Parameters:** - `fileName` Path to the audio file to transcribe. - `language` Output parameter that receives the detected language of the audio file. **Returns:** The transcription text of the audio file. Returns an empty string if transcription fails. ______________________________________________________________________ ### function getTranslation *Returns the translation of* `text` *in*`language` *into English.* ```C++ virtual std::wstring SBDAssistant::getTranslation ( const std::wstring & text, const std::wstring & language ) ``` Translates the given text from the specified language into English. **Parameters:** - `text` The text to translate. - `language` The language of the source text. **Returns:** The translated text in English. ______________________________________________________________________ ### function getUserUUID *Returns the user UUID.* ```C++ const SBUUID & SBDAssistant::getUserUUID () const ``` Returns the user UUID associated with the assistant. **Returns:** Constant reference to the user UUID. ______________________________________________________________________ ### function memorize [1/2] *Memorizes a document.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::memorize ( const std::wstring & fileName ) ``` Memorizes the content of a document specified by a file name. **Parameters:** - `fileName` Path to the file to be memorized. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object indicating the result, or nullptr on failure. ______________________________________________________________________ ### function memorize [2/2] *Memorizes a webpage.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::memorize ( const std::wstring & url, const std::wstring & include=L"", const std::wstring & exclude=L"" ) ``` Memorizes a webpage, optionally including or excluding specific content. **Parameters:** - `url` URL of the webpage to memorize. - `include` Optional filter to include specific parts of the page. - `exclude` Optional filter to exclude specific parts of the page. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object indicating the result, or nullptr on failure. ______________________________________________________________________ ### function search *Performs a search.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::search ( const std::wstring & question, const std::wstring & translation ) ``` Performs a search based on the given question and its translation. **Parameters:** - `question` The original question in the user's language. - `translation` The translation of the question into English. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object containing the search results, or nullptr if no results are found. ______________________________________________________________________ ### function select *Selects nodes in the document.* ```C++ virtual SBDAssistantAnswer * SBDAssistant::select ( const std::wstring & question, const std::wstring & translation ) ``` Selects nodes in the document based on the given question and its translation. **Parameters:** - `question` The original question in the user's language. - `translation` The translation of the question into English. **Returns:** Pointer to an [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object representing the selected nodes, or nullptr if selection fails. ______________________________________________________________________ ### function setConversationUUID *Sets the conversation UUID.* ```C++ void SBDAssistant::setConversationUUID ( const SBUUID & conversationUUID ) ``` Sets the conversation UUID for the assistant. **Parameters:** - `conversationUUID` The UUID to assign to the current conversation. ______________________________________________________________________ ### function setGUI *Sets the pointer to the GUI of the assistant.* ```C++ void SBDAssistant::setGUI ( SBGAssistant * gui ) ``` **Parameters:** - `g` Pointer to the [**SBGAssistant**](https://documentation.samson-connect.net/developers/latest/api/classSBGAssistant/index.md) instance to associate with this assistant. ______________________________________________________________________ ### function setUserUUID *Sets the user UUID.* ```C++ void SBDAssistant::setUserUUID ( const SBUUID & userUUID ) ``` Sets the user UUID for the assistant. **Parameters:** - `userUUID` The UUID to assign to the user. ______________________________________________________________________ ### function ~SBDAssistant *Destructs the assistant.* ```C++ virtual SBDAssistant::~SBDAssistant () ``` Destroys the [**SBDAssistant**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistant/index.md) object. ______________________________________________________________________ # SBAssistantAnswer # Class SBDAssistantAnswer [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) *This class is the base class for assistant answers.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) ## Public Types | Type | Name | | ---- | ----------------------------------------------- | | enum | [**Status**](#enum-status) *The answer status.* | ## Public Functions | Type | Name | | ----------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDAssistantAnswer**](#function-sbdassistantanswer-12) () *Constructs an assistant answer.* | | | [**SBDAssistantAnswer**](#function-sbdassistantanswer-22) (const std::wstring & answer, [**Status**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/#enum-status) status=Status::Success) *Constructs an assistant answer.* | | const std::wstring & | [**getAnswer**](#function-getanswer) () const *Returns the answer.* | | const [**Status**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/#enum-status) | [**getStatus**](#function-getstatus) () const *Returns the status.* | | void | [**setAnswer**](#function-setanswer) (const std::wstring & answer) *Sets the answer.* | | void | [**setStatus**](#function-setstatus) ([**Status**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/#enum-status) status) *Sets the status.* | | virtual | [**~SBDAssistantAnswer**](#function-sbdassistantanswer) () *Destructs the assistant answer.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description **Short name**: SBAssistantAnswer ## Public Types Documentation ### enum Status *The answer status.* ```C++ enum SBDAssistantAnswer::Status { Error = 0, Success = 1 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBDAssistantAnswer [1/2] *Constructs an assistant answer.* ```C++ SBDAssistantAnswer::SBDAssistantAnswer () ``` Constructs a default assistant answer. Initializes a new [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object with default values. ______________________________________________________________________ ### function SBDAssistantAnswer [2/2] *Constructs an assistant answer.* ```C++ SBDAssistantAnswer::SBDAssistantAnswer ( const std::wstring & answer, Status status=Status::Success ) ``` Constructs an assistant answer with the specified answer and status. **Parameters:** - `answer` The answer text. - `status` The status indicating success or error of the answer. ______________________________________________________________________ ### function getAnswer *Returns the answer.* ```C++ const std::wstring & SBDAssistantAnswer::getAnswer () const ``` Retrieves the answer text. **Returns:** A constant reference to the answer string. ______________________________________________________________________ ### function getStatus *Returns the status.* ```C++ const Status SBDAssistantAnswer::getStatus () const ``` Retrieves the status of the answer. **Returns:** The current status of the answer. ______________________________________________________________________ ### function setAnswer *Sets the answer.* ```C++ void SBDAssistantAnswer::setAnswer ( const std::wstring & answer ) ``` Sets the answer text. **Parameters:** - `answer` The new answer string. ______________________________________________________________________ ### function setStatus *Sets the status.* ```C++ void SBDAssistantAnswer::setStatus ( Status status ) ``` Sets the status of the answer. **Parameters:** - `status` The new status to set. ______________________________________________________________________ ### function ~SBDAssistantAnswer *Destructs the assistant answer.* ```C++ virtual SBDAssistantAnswer::~SBDAssistantAnswer () ``` Destroys the assistant answer. Releases resources associated with the [**SBDAssistantAnswer**](https://documentation.samson-connect.net/developers/latest/api/classSBDAssistantAnswer/index.md) object. ______________________________________________________________________ # SBColorSchemeConstant # Class SBDColorSchemeConstant [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemeConstant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/index.md) *This class describes a constant color scheme.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) Inherited by the following classes: [SBDColorSchemeConstantIllustrate](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstantIllustrate/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemeConstant**](#function-sbdcolorschemeconstant-15) () *Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)* | | | [**SBDColorSchemeConstant**](#function-sbdcolorschemeconstant-25) (float red, float green, float blue, float alpha=1.0f) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeConstant**](#function-sbdcolorschemeconstant-35) (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeConstant**](#function-sbdcolorschemeconstant-45) (float * color) *Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])* | | | [**SBDColorSchemeConstant**](#function-sbdcolorschemeconstant-55) (const [**SBColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDTypeColor/index.md) & color) *Constructs a color scheme with the given color* `color` *.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemeConstant**](#function-sbdcolorschemeconstant) () *Destructs the color scheme.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemeConstant **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemeConstant [1/5] *Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)* ```C++ SBDColorSchemeConstant::SBDColorSchemeConstant () ``` Constructs a constant color scheme with the default white color. This constructor initializes the color to white (1.0f, 1.0f, 1.0f, 1.0f). ______________________________________________________________________ ### function SBDColorSchemeConstant [2/5] *Constructs a color scheme with the given color (red, green, blue, alpha)* ```C++ SBDColorSchemeConstant::SBDColorSchemeConstant ( float red, float green, float blue, float alpha=1.0f ) ``` Constructs a constant color scheme with the specified RGBA components. **Parameters:** - `red` Red component of the color in the range [0.0, 1.0]. - `green` Green component of the color in the range [0.0, 1.0]. - `blue` Blue component of the color in the range [0.0, 1.0]. - `alpha` Alpha component of the color in the range [0.0, 1.0]. Defaults to 1.0. ______________________________________________________________________ ### function SBDColorSchemeConstant [3/5] *Constructs a color scheme with the given color (red, green, blue, alpha)* ```C++ SBDColorSchemeConstant::SBDColorSchemeConstant ( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255 ) ``` Constructs a constant color scheme with the specified RGBA components as 8-bit values. **Parameters:** - `red` Red component (0-255). - `green` Green component (0-255). - `blue` Blue component (0-255). - `alpha` Alpha component (0-255). Defaults to 255. ______________________________________________________________________ ### function SBDColorSchemeConstant [4/5] *Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])* ```C++ SBDColorSchemeConstant::SBDColorSchemeConstant ( float * color ) ``` Constructs a constant color scheme with the given color array. **Parameters:** - `color` Pointer to an array of four floats representing RGBA components. ______________________________________________________________________ ### function SBDColorSchemeConstant [5/5] *Constructs a color scheme with the given color* `color` *.* ```C++ SBDColorSchemeConstant::SBDColorSchemeConstant ( const SBColor & color ) ``` Constructs a constant color scheme with the given SBColor object. **Parameters:** - `color` The SBColor instance that defines the RGBA color. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemeConstant::clone () override const ``` Creates a copy of this constant color scheme. **Returns:** A pointer to a new [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) that is a copy of this scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemeConstant::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Retrieves the constant color. **Parameters:** - `color` Output array to receive the RGBA components (must have space for four floats). - `node` Optional node parameter (unused in this implementation). - `position` Optional position parameter (unused in this implementation). Implements [*SBDDataGraphNodeColorScheme::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemeConstant::isSerializable () override const ``` Checks whether the color scheme can be serialized. **Returns:** `true`, indicating that this scheme supports serialization. Implements [*SBDDataGraphNodeColorScheme::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the document.* ```C++ virtual void SBDColorSchemeConstant::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Serializes the color scheme to the provided serializer. **Parameters:** - `serializer` The serializer used to write the color data. - `nodeIndexer` Indexer for node references (unused in this implementation). - `sdkVersionNumber` SDK version number (unused in this implementation). - `classVersionNumber` Class version number (unused in this implementation). Implements [*SBDDataGraphNodeColorScheme::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the document.* ```C++ virtual void SBDColorSchemeConstant::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Deserializes the color scheme from the provided serializer. **Parameters:** - `serializer` The serializer used to read the color data. - `nodeIndexer` Indexer for node references (unused in this implementation). - `sdkVersionNumber` SDK version number (unused in this implementation). - `classVersionNumber` Class version number (unused in this implementation). Implements [*SBDDataGraphNodeColorScheme::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemeConstant *Destructs the color scheme.* ```C++ virtual SBDColorSchemeConstant::~SBDColorSchemeConstant () ``` Destroys the constant color scheme. ______________________________________________________________________ # SBColorSchemeConstantIllustrate # Class SBDColorSchemeConstantIllustrate [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemeConstantIllustrate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstantIllustrate/index.md) *This class describes an illustrative constant color scheme inspired by the "Molecule of the Month" style of the Protein Data Bank.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemeConstant](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemeConstantIllustrate**](#function-sbdcolorschemeconstantillustrate-15) () *Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)* | | | [**SBDColorSchemeConstantIllustrate**](#function-sbdcolorschemeconstantillustrate-25) (float red, float green, float blue, float alpha=1.0f) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeConstantIllustrate**](#function-sbdcolorschemeconstantillustrate-35) (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeConstantIllustrate**](#function-sbdcolorschemeconstantillustrate-45) (float * color) *Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])* | | | [**SBDColorSchemeConstantIllustrate**](#function-sbdcolorschemeconstantillustrate-55) (const [**SBColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDTypeColor/index.md) & color) *Constructs a color scheme with the given color* `color` *.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemeConstantIllustrate**](#function-sbdcolorschemeconstantillustrate) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemeConstant See [SBDColorSchemeConstant](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemeConstant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-sbdcolorschemeconstant-15) () *Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)* | | | [**SBDColorSchemeConstant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-sbdcolorschemeconstant-25) (float red, float green, float blue, float alpha=1.0f) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeConstant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-sbdcolorschemeconstant-35) (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeConstant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-sbdcolorschemeconstant-45) (float * color) *Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])* | | | [**SBDColorSchemeConstant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-sbdcolorschemeconstant-55) (const [**SBColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDTypeColor/index.md) & color) *Constructs a color scheme with the given color* `color` *.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemeConstant**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-sbdcolorschemeconstant) () *Destructs the color scheme.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemeConstantIllustrate **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemeConstantIllustrate [1/5] *Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)* ```C++ SBDColorSchemeConstantIllustrate::SBDColorSchemeConstantIllustrate () ``` Constructs a constant color scheme with the default white color (1.0, 1.0, 1.0, 1.0). ______________________________________________________________________ ### function SBDColorSchemeConstantIllustrate [2/5] *Constructs a color scheme with the given color (red, green, blue, alpha)* ```C++ SBDColorSchemeConstantIllustrate::SBDColorSchemeConstantIllustrate ( float red, float green, float blue, float alpha=1.0f ) ``` Constructs a constant color scheme with the specified RGBA values. **Parameters:** - `red` Red component of the color (0.0‑1.0). - `green` Green component of the color (0.0‑1.0). - `blue` Blue component of the color (0.0‑1.0). - `alpha` Alpha component of the color (0.0‑1.0). Defaults to 1.0. ______________________________________________________________________ ### function SBDColorSchemeConstantIllustrate [3/5] *Constructs a color scheme with the given color (red, green, blue, alpha)* ```C++ SBDColorSchemeConstantIllustrate::SBDColorSchemeConstantIllustrate ( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255 ) ``` Constructs a constant color scheme with the specified RGBA values (0‑255). **Parameters:** - `red` Red component (0‑255). - `green` Green component (0‑255). - `blue` Blue component (0‑255). - `alpha` Alpha component (0‑255). Defaults to 255. ______________________________________________________________________ ### function SBDColorSchemeConstantIllustrate [4/5] *Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])* ```C++ SBDColorSchemeConstantIllustrate::SBDColorSchemeConstantIllustrate ( float * color ) ``` Constructs a constant color scheme with the given color array. **Parameters:** - `color` Pointer to an array of four floats representing RGBA values. ______________________________________________________________________ ### function SBDColorSchemeConstantIllustrate [5/5] *Constructs a color scheme with the given color* `color` *.* ```C++ SBDColorSchemeConstantIllustrate::SBDColorSchemeConstantIllustrate ( const SBColor & color ) ``` Constructs a constant color scheme with the given SBColor object. **Parameters:** - `color` The SBColor defining the constant color. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemeConstantIllustrate::clone () override const ``` Creates a copy of the constant color scheme. **Returns:** Pointer to a new [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) instance representing the cloned color scheme. Implements [*SBDColorSchemeConstant::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemeConstantIllustrate::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Retrieves the constant color for the specified node and position. **Parameters:** - `color` Pointer to an array of four floats that will receive the RGBA color. - `node` Pointer to the node for which the color is requested. May be null. - `position` The position in space for which the color is requested. Not used in this scheme. If the node is an atom of element carbon or phosphorus, the color is lightened. Implements [*SBDColorSchemeConstant::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-getcolor) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemeConstantIllustrate::isSerializable () override const ``` Returns whether the color scheme supports serialization. **Returns:** `true`, indicating the color scheme is serializable. Implements [*SBDColorSchemeConstant::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the document.* ```C++ virtual void SBDColorSchemeConstantIllustrate::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Serializes the color scheme using the provided serializer. **Parameters:** - `serializer` Pointer to the serializer object. - `nodeIndexer` Indexer for node identification. - `sdkVersionNumber` SDK version number used for serialization. - `classVersionNumber` Version number of the class for serialization. Implements [*SBDColorSchemeConstant::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the document.* ```C++ virtual void SBDColorSchemeConstantIllustrate::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Deserializes the color scheme from the provided serializer. **Parameters:** - `serializer` Pointer to the serializer object. - `nodeIndexer` Indexer for node identification. - `sdkVersionNumber` SDK version number used for deserialization. - `classVersionNumber` Version number of the class for deserialization. Implements [*SBDColorSchemeConstant::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemeConstantIllustrate *Destructs the color scheme.* ```C++ virtual SBDColorSchemeConstantIllustrate::~SBDColorSchemeConstantIllustrate () ``` Destroys the constant color scheme. ______________________________________________________________________ # SBColorSchemeCPK # Class SBDColorSchemeCPK [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemeCPK**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPK/index.md) *This class describes a CPK color scheme.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemeCPK**](#function-sbdcolorschemecpk-12) () *Constructs a CPK color scheme.* | | | [**SBDColorSchemeCPK**](#function-sbdcolorschemecpk-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) *Constructs a CPK color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the color scheme.* | | virtual | [**~SBDColorSchemeCPK**](#function-sbdcolorschemecpk) () *Destructs the color scheme.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemeCPK **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemeCPK [1/2] *Constructs a CPK color scheme.* ```C++ SBDColorSchemeCPK::SBDColorSchemeCPK () ``` Initializes a new instance of the [**SBDColorSchemeCPK**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPK/index.md) class with default settings. ______________________________________________________________________ ### function SBDColorSchemeCPK [2/2] *Constructs a CPK color scheme.* ```C++ SBDColorSchemeCPK::SBDColorSchemeCPK ( const SBNodeIndexer & nodeIndexer ) ``` Constructs a CPK color scheme with a node indexer. Initializes a new instance of the [**SBDColorSchemeCPK**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPK/index.md) class using the provided SBNodeIndexer. **Parameters:** - `nodeIndexer` The node indexer to associate with the color scheme. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemeCPK::clone () override const ``` Creates a copy of the color scheme. Returns a new instance that is a copy of this color scheme. **Returns:** A pointer to a new [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) that is a copy of this instance. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemeCPK::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Retrieves the color for a given node and position. Computes the color based on the provided node and position. If no node is supplied, the color is set to black. **Parameters:** - `color` Output array of four floats (RGBA) to receive the color. - `node` The node for which to retrieve the color; may be null. - `position` The position associated with the node; defaults to zero if not used. Implements [*SBDDataGraphNodeColorScheme::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemeCPK::isSerializable () override const ``` Checks whether the color scheme supports serialization. Returns true if the color scheme can be serialized, `false` otherwise. **Returns:** `true` if the color scheme is serializable; otherwise `false`. Implements [*SBDDataGraphNodeColorScheme::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme.* ```C++ virtual void SBDColorSchemeCPK::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color scheme data to the provided serializer. **Parameters:** - `serializer` The serializer used to write the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The SDK version number. - `classVersionNumber` The class version number. Implements [*SBDDataGraphNodeColorScheme::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the color scheme.* ```C++ virtual void SBDColorSchemeCPK::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Deserializes the color scheme. Reads the color scheme data from the provided serializer. **Parameters:** - `serializer` The serializer used to read the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The SDK version number. - `classVersionNumber` The class version number. Implements [*SBDDataGraphNodeColorScheme::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemeCPK *Destructs the color scheme.* ```C++ virtual SBDColorSchemeCPK::~SBDColorSchemeCPK () ``` Destroys the CPK color scheme. Releases any resources held by the [**SBDColorSchemeCPK**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPK/index.md) instance. ______________________________________________________________________ # SBColorSchemeCPKConstantCarbons # Class SBDColorSchemeCPKConstantCarbons [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemeCPKConstantCarbons**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKConstantCarbons/index.md) *This class describes a color scheme that sets a specified color for carbons and CPK colors for other atom element types.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemeCPKConstantCarbons**](#function-sbdcolorschemecpkconstantcarbons-15) () *Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)* | | | [**SBDColorSchemeCPKConstantCarbons**](#function-sbdcolorschemecpkconstantcarbons-25) (float red, float green, float blue, float alpha=1.0f) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeCPKConstantCarbons**](#function-sbdcolorschemecpkconstantcarbons-35) (unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255) *Constructs a color scheme with the given color (red, green, blue, alpha)* | | | [**SBDColorSchemeCPKConstantCarbons**](#function-sbdcolorschemecpkconstantcarbons-45) (float * color) *Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])* | | | [**SBDColorSchemeCPKConstantCarbons**](#function-sbdcolorschemecpkconstantcarbons-55) (const [**SBColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDTypeColor/index.md) & color) *Constructs a color scheme with the given color* `color` *.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the color scheme.* | | virtual | [**~SBDColorSchemeCPKConstantCarbons**](#function-sbdcolorschemecpkconstantcarbons) () *Destructs the color scheme.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Color scheme that uses a constant color for carbon atoms and CPK colors for other atom types. This class describes a color scheme that sets a specified color for carbons and CPK colors for other atom element types. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemeCPKConstantCarbons **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemeCPKConstantCarbons [1/5] *Constructs a color scheme with the white color (1.0f, 1.0f, 1.0f, 1.0f)* ```C++ SBDColorSchemeCPKConstantCarbons::SBDColorSchemeCPKConstantCarbons () ``` Constructs a color scheme with the default white color (1.0f, 1.0f, 1.0f, 1.0f). ______________________________________________________________________ ### function SBDColorSchemeCPKConstantCarbons [2/5] *Constructs a color scheme with the given color (red, green, blue, alpha)* ```C++ SBDColorSchemeCPKConstantCarbons::SBDColorSchemeCPKConstantCarbons ( float red, float green, float blue, float alpha=1.0f ) ``` Constructs a color scheme with the given RGBA color components. **Parameters:** - `red` Red component in the range [0.0, 1.0]. - `green` Green component in the range [0.0, 1.0]. - `blue` Blue component in the range [0.0, 1.0]. - `alpha` Alpha component in the range [0.0, 1.0]; defaults to 1.0. ______________________________________________________________________ ### function SBDColorSchemeCPKConstantCarbons [3/5] *Constructs a color scheme with the given color (red, green, blue, alpha)* ```C++ SBDColorSchemeCPKConstantCarbons::SBDColorSchemeCPKConstantCarbons ( unsigned char red, unsigned char green, unsigned char blue, unsigned char alpha=255 ) ``` Constructs a color scheme with the given RGBA color components as unsigned bytes. **Parameters:** - `red` Red component in the range [0, 255]. - `green` Green component in the range [0, 255]. - `blue` Blue component in the range [0, 255]. - `alpha` Alpha component in the range [0, 255]; defaults to 255. ______________________________________________________________________ ### function SBDColorSchemeCPKConstantCarbons [4/5] *Constructs a color scheme with the given color (color[0], color[1], color[2], color[3])* ```C++ SBDColorSchemeCPKConstantCarbons::SBDColorSchemeCPKConstantCarbons ( float * color ) ``` Constructs a color scheme with the given RGBA color array. **Parameters:** - `color` Pointer to an array of four floats representing red, green, blue, and alpha. ______________________________________________________________________ ### function SBDColorSchemeCPKConstantCarbons [5/5] *Constructs a color scheme with the given color* `color` *.* ```C++ SBDColorSchemeCPKConstantCarbons::SBDColorSchemeCPKConstantCarbons ( const SBColor & color ) ``` Constructs a color scheme with the given SBColor instance. **Parameters:** - `color` SBColor object specifying the RGBA color. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemeCPKConstantCarbons::clone () override const ``` Creates a new instance of the color scheme with the same color settings. **Returns:** Pointer to a newly allocated copy of the color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemeCPKConstantCarbons::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Retrieves the RGBA color for a given node and position. **Parameters:** - `color` Output array of four floats that receives the color (red, green, blue, alpha). - `node` Node for which the color is requested; may be null. - `position` Position of the node; not used in this implementation. Implements [*SBDDataGraphNodeColorScheme::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemeCPKConstantCarbons::isSerializable () override const ``` Indicates whether the color scheme supports serialization. **Returns:** `true`, indicating the scheme can be serialized. Implements [*SBDDataGraphNodeColorScheme::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme.* ```C++ virtual void SBDColorSchemeCPKConstantCarbons::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Serializes the color scheme's RGBA color components. **Parameters:** - `serializer` Serializer object used to write data. - `nodeIndexer` Indexer that maps nodes to identifiers (unused in this implementation). - `sdkVersionNumber` Version number of the SDK (unused in this implementation). - `classVersionNumber` Version number of the class (unused in this implementation). Implements [*SBDDataGraphNodeColorScheme::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the color scheme.* ```C++ virtual void SBDColorSchemeCPKConstantCarbons::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Deserializes the color scheme's RGBA color components. **Parameters:** - `serializer` Serializer object used to read data. - `nodeIndexer` Indexer that maps nodes to identifiers (unused in this implementation). - `sdkVersionNumber` Version number of the SDK (unused in this implementation). - `classVersionNumber` Version number of the class (unused in this implementation). Implements [*SBDDataGraphNodeColorScheme::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemeCPKConstantCarbons *Destructs the color scheme.* ```C++ virtual SBDColorSchemeCPKConstantCarbons::~SBDColorSchemeCPKConstantCarbons () ``` Destroys the color scheme and releases any allocated resources. ______________________________________________________________________ # SBColorSchemeCPKPerChainCarbons # Class SBDColorSchemeCPKPerChainCarbons [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemeCPKPerChainCarbons**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKPerChainCarbons/index.md) *This class describes a color scheme that sets colors for carbons based on their chain ID and CPK colors for other atom element types.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBDColorSchemeCPKPerChainCarbons**](#function-sbdcolorschemecpkperchaincarbons-12) () *Constructs a color scheme.* | | | [**SBDColorSchemeCPKPerChainCarbons**](#function-sbdcolorschemecpkperchaincarbons-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Retrieves the color for a specified node.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme's state to the provided serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme's state from the provided serializer.* | | virtual | [**~SBDColorSchemeCPKPerChainCarbons**](#function-sbdcolorschemecpkperchaincarbons) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemeCPKPerChainCarbons **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemeCPKPerChainCarbons [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemeCPKPerChainCarbons::SBDColorSchemeCPKPerChainCarbons () ``` Constructs a default color scheme for CPK per chain carbons. Initializes internal values, node predicate and getter, and sets the color palette to the default one. ______________________________________________________________________ ### function SBDColorSchemeCPKPerChainCarbons [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemeCPKPerChainCarbons::SBDColorSchemeCPKPerChainCarbons ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a color scheme with a specified node indexer and optional palette. If the palette is null, the default palette is used. **Parameters:** - `nodeIndexer` Indexer that identifies nodes for the color scheme. - `palette` Optional palette to use; when nullptr, the default palette is assigned. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemeCPKPerChainCarbons::clone () override const ``` Creates a copy of this color scheme. The copy retains the same node indexer, palette, and value ranges. **Returns:** Pointer to a newly allocated clone of the color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getColor *Retrieves the color for a specified node.* ```C++ virtual void SBDColorSchemeCPKPerChainCarbons::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Determines the appropriate color based on the node's type and attributes, using CPK colors for non‑carbon atoms and a palette for carbon atoms. **Parameters:** - `color` Output buffer (RGBA) where the resulting color will be stored. - `node` Node for which the color is requested; may be null. - `position` Position of the point (unused in this scheme). Implements [*SBDColorSchemePerAttribute::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemeCPKPerChainCarbons::getDefaultPalette () override const ``` Returns a clone of the default palette for this color scheme. The default palette is a flexible diverging HCL spectral palette. **Returns:** Pointer to a new palette instance. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemeCPKPerChainCarbons::isSerializable () override const ``` Indicates whether the color scheme supports serialization. **Returns:** Always true. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme's state to the provided serializer.* ```C++ virtual void SBDColorSchemeCPKPerChainCarbons::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` The serialization includes palette information and value ranges. **Parameters:** - `serializer` Serializer object used to write data. - `nodeIndexer` Node indexer used for serialization context. - `sdkVersionNumber` SDK version number for compatibility handling. - `classVersionNumber` Class version number for compatibility handling. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme's state from the provided serializer.* ```C++ virtual void SBDColorSchemeCPKPerChainCarbons::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Reads palette information and value ranges, restoring the object's state. **Parameters:** - `serializer` Serializer object used to read data. - `nodeIndexer` Node indexer used for deserialization context. - `sdkVersionNumber` SDK version number for compatibility handling. - `classVersionNumber` Class version number for compatibility handling. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemeCPKPerChainCarbons *Destructs the color scheme.* ```C++ virtual SBDColorSchemeCPKPerChainCarbons::~SBDColorSchemeCPKPerChainCarbons () ``` Destroys the color scheme and releases resources. ______________________________________________________________________ # SBColorSchemeCPKPerStructuralModelCarbons # Class SBDColorSchemeCPKPerStructuralModelCarbons [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemeCPKPerStructuralModelCarbons**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKPerStructuralModelCarbons/index.md) *This class describes a color scheme that sets colors for carbons based on their structural model and CPK colors for other atom element types.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerStructuralModel](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemeCPKPerStructuralModelCarbons**](#function-sbdcolorschemecpkperstructuralmodelcarbons-12) () *Constructs a color scheme.* | | | [**SBDColorSchemeCPKPerStructuralModelCarbons**](#function-sbdcolorschemecpkperstructuralmodelcarbons-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemeCPKPerStructuralModelCarbons**](#function-sbdcolorschemecpkperstructuralmodelcarbons) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerStructuralModel See [SBDColorSchemePerStructuralModel](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBDColorSchemePerStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-sbdcolorschemeperstructuralmodel-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-sbdcolorschemeperstructuralmodel-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemePerStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-sbdcolorschemeperstructuralmodel) () *Destructs the color scheme.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemeCPKPerStructuralModelCarbons **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemeCPKPerStructuralModelCarbons [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemeCPKPerStructuralModelCarbons::SBDColorSchemeCPKPerStructuralModelCarbons () ``` Constructs a color scheme with default settings. ______________________________________________________________________ ### function SBDColorSchemeCPKPerStructuralModelCarbons [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemeCPKPerStructuralModelCarbons::SBDColorSchemeCPKPerStructuralModelCarbons ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a color scheme with a given node indexer and optional palette. **Parameters:** - `nodeIndexer` Indexer used to identify nodes in the structural model. - `palette` Optional pointer to a palette; if nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemeCPKPerStructuralModelCarbons::clone () override const ``` Creates a copy of the color scheme. **Returns:** Pointer to a newly allocated copy of the color scheme. Implements [*SBDColorSchemePerStructuralModel::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemeCPKPerStructuralModelCarbons::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Retrieves the color for a given node and position. **Parameters:** - `color` Output array of four floats to receive the RGBA color. Must not be null. - `node` Optional pointer to a data graph node; if null, only the position is considered. - `position` Position in 3D space; defaults to the origin. The method determines the appropriate color based on the node type and position, applying CPK colors for non‑carbon atoms and structural model colors for carbon atoms. Implements [*SBDColorSchemePerStructuralModel::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getcolor) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemeCPKPerStructuralModelCarbons::getDefaultPalette () override const ``` Retrieves the default color palette for this color scheme. **Returns:** Pointer to a newly cloned default palette. Implements [*SBDColorSchemePerStructuralModel::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemeCPKPerStructuralModelCarbons::isSerializable () override const ``` Returns whether the color scheme supports serialization. **Returns:** `true`, indicating the color scheme is serializable. Implements [*SBDColorSchemePerStructuralModel::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the document.* ```C++ virtual void SBDColorSchemeCPKPerStructuralModelCarbons::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Serializes the color scheme. **Parameters:** - `serializer` Serializer used for writing the data. - `nodeIndexer` Node indexer for the structural model. - `sdkVersionNumber` SDK version number. - `classVersionNumber` Class version number. Implements [*SBDColorSchemePerStructuralModel::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the document.* ```C++ virtual void SBDColorSchemeCPKPerStructuralModelCarbons::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Deserializes the color scheme. **Parameters:** - `serializer` Serializer used for reading the data. - `nodeIndexer` Node indexer for the structural model. - `sdkVersionNumber` SDK version number. - `classVersionNumber` Class version number. Implements [*SBDColorSchemePerStructuralModel::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemeCPKPerStructuralModelCarbons *Destructs the color scheme.* ```C++ virtual SBDColorSchemeCPKPerStructuralModelCarbons::~SBDColorSchemeCPKPerStructuralModelCarbons () ``` Destroys the color scheme and releases resources. ______________________________________________________________________ # SBColorSchemePerAttribute # Class SBDColorSchemePerAttribute **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) *This class describes a color scheme based on node attributes.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | Output \* | [**defaultMaxValue**](#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description **Short name**: SBColorSchemePerAttribute ## Public Functions Documentation ### function SBDColorSchemePerAttribute [1/2] *Default constructor.* ```C++ inline SBDColorSchemePerAttribute::SBDColorSchemePerAttribute () ``` ______________________________________________________________________ ### function SBDColorSchemePerAttribute [2/2] *Constructs a color scheme based on node attributes.* ```C++ inline SBDColorSchemePerAttribute::SBDColorSchemePerAttribute ( const SBNodeIndexer & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const SBDDataGraphNodeGetter < Output > & nodeGetter ) ``` **Parameters:** - `nodeIndexer` An indexer of nodes based on which the color scheme is constructed. The color scheme stores a copy of this node indexer. - `nodePredicate` A predicate based on which nodes will be collected from `nodeIndexer`. The color scheme stores a copy of this node predicate. - `nodeGetter` A predicate that returns the attribute for nodes obtained from `nodeIndexer` using the give node predicate `nodePredicate`. The color scheme stores a copy of this node getter. For example, to colorize atoms per chain ID the node predicate can be set to `SBNode::IsAtom() && SBAtom::HasChainID()` and the node getter to `SBAtom::GetChainID()`. ______________________________________________________________________ ### function canHavePalette *Returns whether the color scheme requires and therefore can have a color palette.* ```C++ inline virtual bool SBDColorSchemePerAttribute::canHavePalette () override const ``` Implements [*SBDDataGraphNodeColorScheme::canHavePalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ inline virtual void SBDColorSchemePerAttribute::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` The latter one is usually not used in the per attribute color schemes, since the color is determined based on some attribute of the given node `node`. **Parameters:** - `color` The output color. It should be a pointer to an array of floats of size 4. - `node` The node for which color should be returned. - `position` The position for which color should be returned. Usually, not used in the per attribute color schemes. Implements [*SBDDataGraphNodeColorScheme::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) ______________________________________________________________________ ### function getDefaultMaximumValue *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* ```C++ inline Output SBDColorSchemePerAttribute::getDefaultMaximumValue () const ``` ______________________________________________________________________ ### function getDefaultMinimumValue *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* ```C++ inline Output SBDColorSchemePerAttribute::getDefaultMinimumValue () const ``` ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ inline virtual SBDPalette * SBDColorSchemePerAttribute::getDefaultPalette () override const ``` Implements [*SBDDataGraphNodeColorScheme::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) ______________________________________________________________________ ### function getMaximumValue *Returns the maximum value for the attribute bounds used for colorization.* ```C++ inline Output SBDColorSchemePerAttribute::getMaximumValue () const ``` ______________________________________________________________________ ### function getMinimumValue *Returns the minimum value for the attribute bounds used for colorization.* ```C++ inline Output SBDColorSchemePerAttribute::getMinimumValue () const ``` ______________________________________________________________________ ### function isSerializable *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* ```C++ inline virtual bool SBDColorSchemePerAttribute::isSerializable () override const ``` Implements [*SBDDataGraphNodeColorScheme::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) ______________________________________________________________________ ### function serialize *A virtual function function for the serialization - should be implemented in the derived classes.* ```C++ inline virtual void SBDColorSchemePerAttribute::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Implements [*SBDDataGraphNodeColorScheme::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ______________________________________________________________________ ### function setMaximumValue *Sets the maximum value for the attribute bounds used for colorization.* ```C++ inline void SBDColorSchemePerAttribute::setMaximumValue ( Output value ) ``` **Parameters:** - `value` The new maximum value ______________________________________________________________________ ### function setMinimumValue *Sets the minimum value for the attribute bounds used for colorization.* ```C++ inline void SBDColorSchemePerAttribute::setMinimumValue ( Output value ) ``` **Parameters:** - `value` The new minimum value ______________________________________________________________________ ### function unserialize *A virtual function function for the unserialization - should be implemented in the derived classes.* ```C++ inline virtual void SBDColorSchemePerAttribute::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Implements [*SBDDataGraphNodeColorScheme::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerAttribute *Destructor.* ```C++ inline virtual SBDColorSchemePerAttribute::~SBDColorSchemePerAttribute () ``` ______________________________________________________________________ ## Protected Attributes Documentation ### variable defaultMaxValue *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* ```C++ Output* SBDColorSchemePerAttribute< Output >::defaultMaxValue; ``` ______________________________________________________________________ ### variable defaultMinValue *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* ```C++ Output* SBDColorSchemePerAttribute< Output >::defaultMinValue; ``` ______________________________________________________________________ ### variable maxValue *The current maximum value for the attribute bounds used for colorization.* ```C++ Output* SBDColorSchemePerAttribute< Output >::maxValue; ``` ______________________________________________________________________ ### variable minValue *The current minimum value for the attribute bounds used for colorization.* ```C++ Output* SBDColorSchemePerAttribute< Output >::minValue; ``` ______________________________________________________________________ ### variable nodeGetter *The node getter.* ```C++ SBDDataGraphNodeGetter* SBDColorSchemePerAttribute< Output >::nodeGetter; ``` ______________________________________________________________________ ### variable nodeIndexer *The node indexer.* ```C++ SBNodeIndexer SBDColorSchemePerAttribute< Output >::nodeIndexer; ``` ______________________________________________________________________ ### variable nodePredicate *The node predicate.* ```C++ SBDDataGraphNodePredicate* SBDColorSchemePerAttribute< Output >::nodePredicate; ``` ______________________________________________________________________ # SBColorSchemePerChainID # Class SBDColorSchemePerChainID [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerChainID**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerChainID/index.md) *This class describes a color scheme based on chain ID.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerChainID**](#function-sbdcolorschemeperchainid-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerChainID**](#function-sbdcolorschemeperchainid-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to the given serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from the given serializer.* | | virtual | [**~SBDColorSchemePerChainID**](#function-sbdcolorschemeperchainid) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per chain ID color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerChainID **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerChainID [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerChainID::SBDColorSchemePerChainID () ``` Constructs a per-chain ID color scheme with default settings. Initializes internal data structures, sets up the node predicate and getter for atom chain IDs, and assigns the default color palette. ______________________________________________________________________ ### function SBDColorSchemePerChainID [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerChainID::SBDColorSchemePerChainID ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a per-chain ID color scheme with a specific node indexer and optional palette. The constructor initializes the base class with the provided node indexer and configures the predicate and getter for atoms with chain IDs. If a palette is provided, it is cloned and set; otherwise the default palette is used. **Parameters:** - `nodeIndexer` The node indexer used for indexing nodes in the color scheme. - `palette` Optional color palette to use; if `nullptr`, the default palette is applied. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerChainID::clone () override const ``` Creates a copy of this color scheme. The returned object is a newly allocated instance that copies the palette and value ranges of this scheme. **Returns:** A pointer to a new `SBDDataGraphNodeColorScheme` that is a copy of this instance. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerChainID::getDefaultPalette () override const ``` Returns a new default palette for the color scheme. The caller takes ownership of the returned palette. **Returns:** A pointer to a newly allocated default `SBPalette`. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerChainID::isSerializable () override const ``` Indicates whether the color scheme supports serialization. **Returns:** `true` because this color scheme can be serialized. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to the given serializer.* ```C++ virtual void SBDColorSchemePerChainID::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the palette information (if present) and the minimum and maximum chain ID values to the serializer. Handles version-specific serialization logic. **Parameters:** - `serializer` The serializer used to write the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version number of the SDK for which serialization is performed. - `classVersionNumber` The version number of the class being serialized. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from the given serializer.* ```C++ virtual void SBDColorSchemePerChainID::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Restores the palette (if serialized) and the minimum and maximum chain ID values, handling version-specific deserialization logic. **Parameters:** - `serializer` The serializer used to read the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version number of the SDK for which deserialization is performed. - `classVersionNumber` The version number of the class being deserialized. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerChainID *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerChainID::~SBDColorSchemePerChainID () ``` Destroys the per-chain ID color scheme. ______________________________________________________________________ # SBColorSchemePerChainIllustrate # Class SBDColorSchemePerChainIllustrate [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerChainIllustrate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerChainIllustrate/index.md) *This class describes an illustrative color scheme, based on chain ID, inspired by the "Molecule of the Month" style of the Protein Data Bank.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerChainIllustrate**](#function-sbdcolorschemeperchainillustrate-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerChainIllustrate**](#function-sbdcolorschemeperchainillustrate-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to the given serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from the given serializer.* | | virtual | [**~SBDColorSchemePerChainIllustrate**](#function-sbdcolorschemeperchainillustrate) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes an illustrative per chain ID color scheme inspired by the "Molecule of the Month" style of the Protein Data Bank. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerChainIllustrate **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerChainIllustrate [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerChainIllustrate::SBDColorSchemePerChainIllustrate () ``` Constructs a default color scheme. ______________________________________________________________________ ### function SBDColorSchemePerChainIllustrate [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerChainIllustrate::SBDColorSchemePerChainIllustrate ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a color scheme with the given node indexer and optional palette. **Parameters:** - `nodeIndexer` The node indexer used to identify nodes. - `palette` Optional color palette; if nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerChainIllustrate::clone () override const ``` Creates a copy of the color scheme. **Returns:** A pointer to a new color scheme that is a copy of this instance. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemePerChainIllustrate::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Computes the color for a given node and position. **Parameters:** - `color` Output array to receive the RGB(A) color values. - `node` The data graph node for which to compute the color; may be nullptr. - `position` The position in 3D space. Implements [*SBDColorSchemePerAttribute::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerChainIllustrate::getDefaultPalette () override const ``` Retrieves the default color palette for this color scheme. **Returns:** A clone of the default color palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerChainIllustrate::isSerializable () override const ``` Indicates whether the color scheme can be serialized. **Returns:** `true` if the color scheme is serializable. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to the given serializer.* ```C++ virtual void SBDColorSchemePerChainIllustrate::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` **Parameters:** - `serializer` Serializer to write the data to. - `nodeIndexer` Node indexer associated with the color scheme. - `sdkVersionNumber` SDK version number used for compatibility checks. - `classVersionNumber` Version number of this class. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from the given serializer.* ```C++ virtual void SBDColorSchemePerChainIllustrate::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` **Parameters:** - `serializer` Serializer to read the data from. - `nodeIndexer` Node indexer associated with the color scheme. - `sdkVersionNumber` SDK version number used for compatibility checks. - `classVersionNumber` Version number of this class. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerChainIllustrate *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerChainIllustrate::~SBDColorSchemePerChainIllustrate () ``` Destroys the color scheme. ______________________________________________________________________ # SBColorSchemePerFormalCharge # Class SBDColorSchemePerFormalCharge [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerFormalCharge**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerFormalCharge/index.md) *This class describes a color scheme based on atom's formal charge.* - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerFormalCharge**](#function-sbdcolorschemeperformalcharge-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerFormalCharge**](#function-sbdcolorschemeperformalcharge-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to a serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from a serializer.* | | virtual | [**~SBDColorSchemePerFormalCharge**](#function-sbdcolorschemeperformalcharge) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Public Functions Documentation ### function SBDColorSchemePerFormalCharge [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerFormalCharge::SBDColorSchemePerFormalCharge () ``` Color scheme based on atom's formal charge. This class describes a per formal charge color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerFormalCharge **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) Constructs a per-formal-charge color scheme with default settings. Initializes the internal value range and sets the node predicate and getter for atom formal charges. Uses the default color palette. ______________________________________________________________________ ### function SBDColorSchemePerFormalCharge [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerFormalCharge::SBDColorSchemePerFormalCharge ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a per-formal-charge color scheme for a given node indexer and optional palette. The color scheme is initialized with the provided node indexer. If a palette is supplied, it is used; otherwise the default palette is applied. **Parameters:** - `nodeIndexer` Indexer that maps nodes to data. - `palette` Optional pointer to a palette to use; if null, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerFormalCharge::clone () override const ``` Creates a copy of this color scheme. The new instance has the same node indexer, palette, and value range as this scheme. **Returns:** Pointer to a newly allocated copy of the color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerFormalCharge::getDefaultPalette () override const ``` Retrieves a clone of the default palette for this color scheme. **Returns:** Pointer to a newly allocated default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerFormalCharge::isSerializable () override const ``` Indicates whether the color scheme supports serialization. **Returns:** `true` if the color scheme can be serialized; otherwise `false`. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to a serializer.* ```C++ virtual void SBDColorSchemePerFormalCharge::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color palette (if present and serializable) and the minimum and maximum values to the serializer. Handles version-specific behavior. **Parameters:** - `serializer` Pointer to the serializer object used for writing data. - `nodeIndexer` Indexer of the nodes to which the color scheme applies. - `sdkVersionNumber` SDK version number for compatibility checks. - `classVersionNumber` Class version number for compatibility checks. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from a serializer.* ```C++ virtual void SBDColorSchemePerFormalCharge::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Reads the color palette (if present) and the minimum and maximum values from the serializer. Handles version-specific behavior. **Parameters:** - `serializer` Pointer to the serializer object used for reading data. - `nodeIndexer` Indexer of the nodes to which the color scheme applies. - `sdkVersionNumber` SDK version number for compatibility checks. - `classVersionNumber` Class version number for compatibility checks. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerFormalCharge *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerFormalCharge::~SBDColorSchemePerFormalCharge () ``` Destroys the per-formal-charge color scheme and releases allocated resources. ______________________________________________________________________ # SBColorSchemePerOccupancy # Class SBDColorSchemePerOccupancy [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerOccupancy**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerOccupancy/index.md) *This class describes a color scheme based on atom's occupancy.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerOccupancy**](#function-sbdcolorschemeperoccupancy-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerOccupancy**](#function-sbdcolorschemeperoccupancy-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to the given serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from the given serializer.* | | virtual | [**~SBDColorSchemePerOccupancy**](#function-sbdcolorschemeperoccupancy) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per occupancy color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerOccupancy **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerOccupancy [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerOccupancy::SBDColorSchemePerOccupancy () ``` Constructs a per-occupancy color scheme with default range and palette. Initializes the minimum and maximum occupancy values to 0.0 and 1.0, respectively, and sets the color palette to the default palette for this scheme. ______________________________________________________________________ ### function SBDColorSchemePerOccupancy [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerOccupancy::SBDColorSchemePerOccupancy ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a per-occupancy color scheme for a given node indexer and optional palette. Initializes the color scheme with the specified node indexer. If a palette is provided, it is used as the color palette; otherwise, the default palette is assigned. **Parameters:** - `nodeIndexer` The indexer used to identify nodes for which the color scheme is applied. - `palette` Optional pointer to a palette to be used. If nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerOccupancy::clone () override const ``` Creates a copy of this color scheme. Returns a new instance that is a clone of the current per-occupancy color scheme, including its range and palette settings. **Returns:** A pointer to the newly created copy of the color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerOccupancy::getDefaultPalette () override const ``` Retrieves the default palette for this color scheme. Returns a clone of the standard diverging HCL blue-to-red palette used as the default for per-occupancy color schemes. **Returns:** A pointer to a newly cloned default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerOccupancy::isSerializable () override const ``` Indicates whether the color scheme supports serialization. This method always returns true for per-occupancy color schemes. **Returns:** `true`, indicating that the object can be serialized. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to the given serializer.* ```C++ virtual void SBDColorSchemePerOccupancy::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color palette (if any) and the minimum and maximum occupancy values to the provided serializer, using the specified SDK and class version numbers. **Parameters:** - `serializer` The serializer object used to write the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version number of the SDK for compatibility checks. - `classVersionNumber` The version number of this class for compatibility checks. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from the given serializer.* ```C++ virtual void SBDColorSchemePerOccupancy::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Restores the color palette (if serialized) and the minimum and maximum occupancy values from the provided serializer, using the specified SDK and class version numbers. **Parameters:** - `serializer` The serializer object used to read the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version number of the SDK for compatibility checks. - `classVersionNumber` The version number of this class for compatibility checks. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerOccupancy *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerOccupancy::~SBDColorSchemePerOccupancy () ``` Destructs the per-occupancy color scheme. ______________________________________________________________________ # SBColorSchemePerPartialCharge # Class SBDColorSchemePerPartialCharge [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerPartialCharge**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerPartialCharge/index.md) *This class describes a color scheme based on atom's partial charge.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerPartialCharge**](#function-sbdcolorschemeperpartialcharge-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerPartialCharge**](#function-sbdcolorschemeperpartialcharge-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to the provided serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from the provided serializer.* | | virtual | [**~SBDColorSchemePerPartialCharge**](#function-sbdcolorschemeperpartialcharge) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per partial charge color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerPartialCharge **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerPartialCharge [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerPartialCharge::SBDColorSchemePerPartialCharge () ``` Constructs a default per-partial-charge color scheme. Initializes internal data structures and sets the default color palette. ______________________________________________________________________ ### function SBDColorSchemePerPartialCharge [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerPartialCharge::SBDColorSchemePerPartialCharge ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a per-partial-charge color scheme for the specified node indexer and optional palette. The constructor initializes the color scheme, symmetrizes the value range, and sets the provided palette or the default palette if none is supplied. **Parameters:** - `nodeIndexer` The node indexer specifying the nodes for which the color scheme is applied. - `palette` Optional initial color palette; if nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerPartialCharge::clone () override const ``` Creates a deep copy of this color scheme. The cloned color scheme retains the same node indexer, palette, and value ranges. **Returns:** Pointer to a new [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) object that is a copy of this instance. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerPartialCharge::getDefaultPalette () override const ``` The default palette is a diverging HCL palette from blue to red. **Returns:** Pointer to a newly allocated palette object representing the default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerPartialCharge::isSerializable () override const ``` Determines whether the color scheme supports serialization. **Returns:** `true`, indicating that the color scheme can be serialized. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to the provided serializer.* ```C++ virtual void SBDColorSchemePerPartialCharge::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` The method writes the color palette (if any) and the minimum and maximum values, handling different SDK version compatibility. **Parameters:** - `serializer` Serializer object used to write the color scheme data. - `nodeIndexer` Node indexer used for node-specific serialization context. - `sdkVersionNumber` SDK version number used for versioned serialization. - `classVersionNumber` Class version number used for versioned serialization. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from the provided serializer.* ```C++ virtual void SBDColorSchemePerPartialCharge::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` The method reads the color palette (if present) and the minimum and maximum values, handling different SDK version compatibility. **Parameters:** - `serializer` Serializer object used to read the color scheme data. - `nodeIndexer` Node indexer used for node-specific deserialization context. - `sdkVersionNumber` SDK version number used for versioned deserialization. - `classVersionNumber` Class version number used for versioned deserialization. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerPartialCharge *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerPartialCharge::~SBDColorSchemePerPartialCharge () ``` Destroys the per-partial-charge color scheme and releases allocated resources. ______________________________________________________________________ # SBColorSchemePerResidueHydrophobicity # Class SBDColorSchemePerResidueHydrophobicity [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerResidueHydrophobicity**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueHydrophobicity/index.md) *This class describes a color scheme based on residue's hydrophobicity.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerResidueHydrophobicity**](#function-sbdcolorschemeperresiduehydrophobicity-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerResidueHydrophobicity**](#function-sbdcolorschemeperresiduehydrophobicity-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to the provided serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from the provided serializer.* | | virtual | [**~SBDColorSchemePerResidueHydrophobicity**](#function-sbdcolorschemeperresiduehydrophobicity) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per residue hydrophobicity color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerResidueHydrophobicity **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerResidueHydrophobicity [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerResidueHydrophobicity::SBDColorSchemePerResidueHydrophobicity () ``` Constructs a [**SBDColorSchemePerResidueHydrophobicity**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueHydrophobicity/index.md) instance. Initializes the color scheme with default settings and the default color palette. ______________________________________________________________________ ### function SBDColorSchemePerResidueHydrophobicity [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerResidueHydrophobicity::SBDColorSchemePerResidueHydrophobicity ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a [**SBDColorSchemePerResidueHydrophobicity**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueHydrophobicity/index.md) with a specific node indexer and optional palette. **Parameters:** - `nodeIndexer` The node indexer that defines the set of nodes to which the color scheme applies. - `palette` Optional pointer to a palette to use; if null, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerResidueHydrophobicity::clone () override const ``` Creates a deep copy of the color scheme. **Returns:** Pointer to a newly allocated [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) that is a copy of this instance. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerResidueHydrophobicity::getDefaultPalette () override const ``` Retrieves the default color palette for this color scheme. **Returns:** Pointer to a new [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) instance representing the default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerResidueHydrophobicity::isSerializable () override const ``` Checks whether the color scheme supports serialization. **Returns:** `true`, indicating that the color scheme can be serialized. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to the provided serializer.* ```C++ virtual void SBDColorSchemePerResidueHydrophobicity::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` **Parameters:** - `serializer` Pointer to the serializer used to write the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The SDK version number for compatibility checks. - `classVersionNumber` The version number of this class. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from the provided serializer.* ```C++ virtual void SBDColorSchemePerResidueHydrophobicity::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` **Parameters:** - `serializer` Pointer to the serializer used to read the data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The SDK version number for compatibility checks. - `classVersionNumber` The version number of this class. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerResidueHydrophobicity *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerResidueHydrophobicity::~SBDColorSchemePerResidueHydrophobicity () ``` Destroys the [**SBDColorSchemePerResidueHydrophobicity**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueHydrophobicity/index.md) and releases any allocated resources. ______________________________________________________________________ # SBColorSchemePerResidueSequenceNumber # Class SBDColorSchemePerResidueSequenceNumber [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerResidueSequenceNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueSequenceNumber/index.md) *This class describes a color scheme based on residue sequence number.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerResidueSequenceNumber**](#function-sbdcolorschemeperresiduesequencenumber-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerResidueSequenceNumber**](#function-sbdcolorschemeperresiduesequencenumber-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to a serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from a serializer.* | | virtual | [**~SBDColorSchemePerResidueSequenceNumber**](#function-sbdcolorschemeperresiduesequencenumber) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per residue sequence number color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerResidueSequenceNumber **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerResidueSequenceNumber [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerResidueSequenceNumber::SBDColorSchemePerResidueSequenceNumber () ``` Constructs a per-residue sequence number color scheme with default settings. Initializes the internal value range and sets the color palette to the default palette. ______________________________________________________________________ ### function SBDColorSchemePerResidueSequenceNumber [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerResidueSequenceNumber::SBDColorSchemePerResidueSequenceNumber ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a per-residue sequence number color scheme with a specific node indexer and optional palette. Initializes the scheme using the provided node indexer and, if a palette is given, clones it; otherwise, uses the default palette. **Parameters:** - `nodeIndexer` The node indexer used to identify nodes for the color scheme. - `palette` Optional pointer to a palette to use; if nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerResidueSequenceNumber::clone () override const ``` Creates a deep copy of this color scheme. The cloned scheme contains the same node indexer, palette, and value range as this instance. **Returns:** Pointer to a newly allocated copy of the color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerResidueSequenceNumber::getDefaultPalette () override const ``` Retrieves the default color palette for this color scheme. Returns a newly allocated default palette instance. **Returns:** Pointer to a new default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerResidueSequenceNumber::isSerializable () override const ``` Indicates whether this color scheme can be serialized. Returns true, as the color scheme supports serialization. **Returns:** `true` if the color scheme can be serialized; otherwise `false`. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to a serializer.* ```C++ virtual void SBDColorSchemePerResidueSequenceNumber::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color palette (if present) and the minimum and maximum residue sequence numbers to the serializer. **Parameters:** - `serializer` Pointer to the serializer used to write data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version of the SDK for which serialization is performed. - `classVersionNumber` The version of the class being serialized. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from a serializer.* ```C++ virtual void SBDColorSchemePerResidueSequenceNumber::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Reads the color palette (if present) and the minimum and maximum residue sequence numbers from the serializer, restoring the state of the color scheme. **Parameters:** - `serializer` Pointer to the serializer used to read data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version of the SDK for which deserialization is performed. - `classVersionNumber` The version of the class being deserialized. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerResidueSequenceNumber *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerResidueSequenceNumber::~SBDColorSchemePerResidueSequenceNumber () ``` Destroys the color scheme and releases associated resources. ______________________________________________________________________ # SBColorSchemePerResidueType # Class SBDColorSchemePerResidueType [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerResidueType**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerResidueType/index.md) *This class describes a color scheme based on residue type.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerResidueType**](#function-sbdcolorschemeperresiduetype-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerResidueType**](#function-sbdcolorschemeperresiduetype-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to the given serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from the given serializer.* | | virtual | [**~SBDColorSchemePerResidueType**](#function-sbdcolorschemeperresiduetype) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per residue type color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerResidueType **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerResidueType [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerResidueType::SBDColorSchemePerResidueType () ``` Constructs a color scheme with default settings. Initializes the scheme with default residue type ranges and the default color palette. ______________________________________________________________________ ### function SBDColorSchemePerResidueType [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerResidueType::SBDColorSchemePerResidueType ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a color scheme with the given node indexer and optional palette. Initializes the residue type range to default values. If a palette is provided, it is used as the scheme's color palette; otherwise the default palette is used. **Parameters:** - `nodeIndexer` The node indexer used to map nodes to indices. - `palette` Optional initial color palette. If nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerResidueType::clone () override const ``` Creates a copy of this color scheme. Returns a new color scheme instance with the same range values and palette as this one. **Returns:** Pointer to the newly created color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerResidueType::getDefaultPalette () override const ``` Returns the default color palette for this color scheme. Creates and returns a new [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) instance representing the default palette. **Returns:** Pointer to a new [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) object. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerResidueType::isSerializable () override const ``` Returns true indicating that the color scheme supports serialization. **Returns:** `true`. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to the given serializer.* ```C++ virtual void SBDColorSchemePerResidueType::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color palette (if present and serializable) and the minimum and maximum residue type values. **Parameters:** - `serializer` Serializer used to write the data. - `nodeIndexer` Node indexer for mapping nodes (currently unused). - `sdkVersionNumber` SDK version number for compatibility checks. - `classVersionNumber` Class version number for compatibility checks. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from the given serializer.* ```C++ virtual void SBDColorSchemePerResidueType::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Reads the color palette (if present) and restores the minimum and maximum residue type values. **Parameters:** - `serializer` Serializer used to read the data. - `nodeIndexer` Node indexer for mapping nodes (currently unused). - `sdkVersionNumber` SDK version number for compatibility checks. - `classVersionNumber` Class version number for compatibility checks. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerResidueType *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerResidueType::~SBDColorSchemePerResidueType () ``` Destroys the color scheme. ______________________________________________________________________ # SBColorSchemePerSecondaryStructureType # Class SBDColorSchemePerSecondaryStructureType [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerSecondaryStructureType**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerSecondaryStructureType/index.md) *This class describes a color scheme based on residue's secondary structure type.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerSecondaryStructureType**](#function-sbdcolorschemepersecondarystructuretype-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerSecondaryStructureType**](#function-sbdcolorschemepersecondarystructuretype-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to a serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from a serializer.* | | virtual | [**~SBDColorSchemePerSecondaryStructureType**](#function-sbdcolorschemepersecondarystructuretype) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per secondary structure type color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerSecondaryStructureType **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerSecondaryStructureType [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerSecondaryStructureType::SBDColorSchemePerSecondaryStructureType () ``` Default constructor. Constructs a color scheme with default settings. ______________________________________________________________________ ### function SBDColorSchemePerSecondaryStructureType [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerSecondaryStructureType::SBDColorSchemePerSecondaryStructureType ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a color scheme with a given node indexer and optional palette. Initializes the color scheme using the provided node indexer and sets the color palette to the given one or the default if none is provided. **Parameters:** - `nodeIndexer` The node indexer defining the node range for the color scheme. - `palette` Optional color palette to use; if `nullptr`, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerSecondaryStructureType::clone () override const ``` Creates a copy of the color scheme. Returns a new instance of the color scheme with the same settings as this one. **Returns:** Pointer to the newly created color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerSecondaryStructureType::getDefaultPalette () override const ``` Returns the default color palette for this color scheme. Provides a new instance of the default palette used by this color scheme. **Returns:** Pointer to a newly allocated default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerSecondaryStructureType::isSerializable () override const ``` Checks if the color scheme is serializable. Returns whether the color scheme can be serialized. **Returns:** `true` if the color scheme supports serialization; otherwise `false`. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to a serializer.* ```C++ virtual void SBDColorSchemePerSecondaryStructureType::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color scheme's data, including the color palette (if present) and the minimum and maximum secondary structure type values, to the provided serializer. **Parameters:** - `serializer` Serializer used to write the data. - `nodeIndexer` Indexer used to identify nodes associated with the color scheme. - `sdkVersionNumber` Version of the SDK for which serialization is performed. - `classVersionNumber` Version of the class for which serialization is performed. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from a serializer.* ```C++ virtual void SBDColorSchemePerSecondaryStructureType::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Reads the color scheme's data, including the color palette (if present) and the minimum and maximum secondary structure type values, from the provided serializer. **Parameters:** - `serializer` Serializer used to read the data. - `nodeIndexer` Indexer used to identify nodes associated with the color scheme. - `sdkVersionNumber` Version of the SDK for which deserialization is performed. - `classVersionNumber` Version of the class for which deserialization is performed. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerSecondaryStructureType *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerSecondaryStructureType::~SBDColorSchemePerSecondaryStructureType () ``` Destructor. Cleans up resources used by the color scheme. ______________________________________________________________________ # SBColorSchemePerSideChainCharge # Class SBDColorSchemePerSideChainCharge [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerSideChainCharge**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerSideChainCharge/index.md) *This class describes a color scheme based on side chain charge.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerSideChainCharge**](#function-sbdcolorschemepersidechaincharge-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerSideChainCharge**](#function-sbdcolorschemepersidechaincharge-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to a serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from a serializer.* | | virtual | [**~SBDColorSchemePerSideChainCharge**](#function-sbdcolorschemepersidechaincharge) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per side chain charge color scheme for residues. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerSideChainCharge **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerSideChainCharge [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerSideChainCharge::SBDColorSchemePerSideChainCharge () ``` Constructs a color scheme for side chain charge. Initializes the scheme with default value ranges and the default palette. ______________________________________________________________________ ### function SBDColorSchemePerSideChainCharge [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerSideChainCharge::SBDColorSchemePerSideChainCharge ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a color scheme for side chain charge with a specific node indexer and optional palette. **Parameters:** - `nodeIndexer` The node indexer that defines the set of nodes to which the scheme applies. - `palette` Optional color palette to use; if nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerSideChainCharge::clone () override const ``` Creates a deep copy of this color scheme. **Returns:** A pointer to a new instance that is a copy of this color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerSideChainCharge::getDefaultPalette () override const ``` Retrieves the default color palette for this scheme. **Returns:** A clone of the default color palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerSideChainCharge::isSerializable () override const ``` Indicates whether this color scheme supports serialization. **Returns:** `true`, indicating that the scheme can be serialized. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to a serializer.* ```C++ virtual void SBDColorSchemePerSideChainCharge::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` **Parameters:** - `serializer` The serializer used to write the color scheme data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version number of the SDK for compatibility. - `classVersionNumber` The version number of this class for compatibility. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from a serializer.* ```C++ virtual void SBDColorSchemePerSideChainCharge::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` **Parameters:** - `serializer` The serializer used to read the color scheme data. - `nodeIndexer` The node indexer associated with the color scheme. - `sdkVersionNumber` The version number of the SDK for compatibility. - `classVersionNumber` The version number of this class for compatibility. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerSideChainCharge *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerSideChainCharge::~SBDColorSchemePerSideChainCharge () ``` Destroys the color scheme and releases any allocated resources. ______________________________________________________________________ # SBColorSchemePerSideChainPolarity # Class SBDColorSchemePerSideChainPolarity [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerSideChainPolarity**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerSideChainPolarity/index.md) *This class describes a color scheme based on side chain polarity.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerSideChainPolarity**](#function-sbdcolorschemepersidechainpolarity-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerSideChainPolarity**](#function-sbdcolorschemepersidechainpolarity-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to the given serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from the given serializer.* | | virtual | [**~SBDColorSchemePerSideChainPolarity**](#function-sbdcolorschemepersidechainpolarity) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per side chain polarity color scheme for residues. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerSideChainPolarity **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerSideChainPolarity [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerSideChainPolarity::SBDColorSchemePerSideChainPolarity () ``` Constructs a side chain polarity color scheme with default settings. Initializes the color scheme with default value ranges and the default palette. ______________________________________________________________________ ### function SBDColorSchemePerSideChainPolarity [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerSideChainPolarity::SBDColorSchemePerSideChainPolarity ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a side chain polarity color scheme with a specific node indexer and optional palette. Sets up the minimum and maximum side chain polarity values and uses the provided palette, or the default palette if none is given. **Parameters:** - `nodeIndexer` The node indexer used to identify nodes for which the color scheme applies. - `palette` Optional palette to use for coloring; if null, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerSideChainPolarity::clone () override const ``` Creates a copy of this color scheme. The returned object is a new instance with the same settings as this color scheme. **Returns:** A pointer to a newly allocated copy of the color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerSideChainPolarity::getDefaultPalette () override const ``` Retrieves the default color palette for this color scheme. The returned palette is a clone of the default palette and can be modified independently. **Returns:** A pointer to a new palette object representing the default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerSideChainPolarity::isSerializable () override const ``` Returns whether this color scheme supports serialization. **Returns:** True, indicating that the color scheme can be serialized. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to the given serializer.* ```C++ virtual void SBDColorSchemePerSideChainPolarity::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color palette and value range to the serializer, handling version differences. **Parameters:** - `serializer` The serializer used to write the data. - `nodeIndexer` Indexer of the nodes to which this color scheme applies. - `sdkVersionNumber` The version number of the SDK used for serialization. - `classVersionNumber` The version number of this class used for serialization. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from the given serializer.* ```C++ virtual void SBDColorSchemePerSideChainPolarity::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Restores the color palette and value range, handling version differences. **Parameters:** - `serializer` The serializer used to read the data. - `nodeIndexer` Indexer of the nodes to which this color scheme applies. - `sdkVersionNumber` The version number of the SDK used for deserialization. - `classVersionNumber` The version number of this class used for deserialization. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerSideChainPolarity *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerSideChainPolarity::~SBDColorSchemePerSideChainPolarity () ``` Destroys the side chain polarity color scheme. ______________________________________________________________________ # SBColorSchemePerStructuralModel # Class SBDColorSchemePerStructuralModel [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/index.md) *This class describes a per structural model color scheme.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) Inherited by the following classes: [SBDColorSchemeCPKPerStructuralModelCarbons](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKPerStructuralModelCarbons/index.md), [SBDColorSchemePerStructuralModelIllustrate](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModelIllustrate/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerStructuralModel**](#function-sbdcolorschemeperstructuralmodel-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerStructuralModel**](#function-sbdcolorschemeperstructuralmodel-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemePerStructuralModel**](#function-sbdcolorschemeperstructuralmodel) () *Destructs the color scheme.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerStructuralModel **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerStructuralModel [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerStructuralModel::SBDColorSchemePerStructuralModel () ``` Constructs a per structural model color scheme with default settings. Initializes the color scheme and sets the color palette to the default palette. ______________________________________________________________________ ### function SBDColorSchemePerStructuralModel [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerStructuralModel::SBDColorSchemePerStructuralModel ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a per structural model color scheme with a specific node indexer and optional palette. Initializes the color scheme, sets the provided palette if non-null, otherwise uses the default palette, and stores structural models from the given node indexer. **Parameters:** - `nodeIndexer` The node indexer containing nodes to be considered for the color scheme. - `palette` Optional pointer to a palette to use; if nullptr, the default palette is used. ______________________________________________________________________ ### function canHavePalette *Returns whether the color scheme requires and therefore can have a color palette.* ```C++ virtual bool SBDColorSchemePerStructuralModel::canHavePalette () override const ``` Indicates whether the color scheme can have a color palette. **Returns:** `true` indicating that the color scheme can have a palette. Implements [*SBDDataGraphNodeColorScheme::canHavePalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerStructuralModel::clone () override const ``` Creates a copy of the color scheme. **Returns:** A pointer to a new `SBDDataGraphNodeColorScheme` instance that is a copy of this color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemePerStructuralModel::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Retrieves the color for a given data graph node and position. Computes the color based on the structural model associated with the node or returns the atom's element color if applicable. **Parameters:** - `color` Output array of four floats (RGBA) to receive the color. - `node` Optional pointer to a data graph node; may be `nullptr`. - `position` The position in 3D space; currently not used for color computation. Implements [*SBDDataGraphNodeColorScheme::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerStructuralModel::getDefaultPalette () override const ``` Retrieves the default color palette for the color scheme. **Returns:** A pointer to a new `SBPalette` instance representing the default palette. Implements [*SBDDataGraphNodeColorScheme::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerStructuralModel::isSerializable () override const ``` Indicates whether the color scheme can be serialized. **Returns:** `true` indicating that the color scheme supports serialization. Implements [*SBDDataGraphNodeColorScheme::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the document.* ```C++ virtual void SBDColorSchemePerStructuralModel::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Serializes the color scheme to the given serializer. Writes the color palette and structural model indexer information to the serializer. **Parameters:** - `serializer` The serializer to write the data to. - `nodeIndexer` The node indexer used to map nodes to indices during serialization. - `sdkVersionNumber` The SDK version number for compatibility. - `classVersionNumber` The class version number for compatibility. Implements [*SBDDataGraphNodeColorScheme::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the document.* ```C++ virtual void SBDColorSchemePerStructuralModel::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Deserializes the color scheme from the given serializer. Restores the color palette and structural model indexer information from the serializer. **Parameters:** - `serializer` The serializer to read the data from. - `nodeIndexer` The node indexer used to map indices back to nodes during deserialization. - `sdkVersionNumber` The SDK version number for compatibility. - `classVersionNumber` The class version number for compatibility. Implements [*SBDDataGraphNodeColorScheme::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerStructuralModel *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerStructuralModel::~SBDColorSchemePerStructuralModel () ``` Destructs the per structural model color scheme. ______________________________________________________________________ # SBColorSchemePerStructuralModelIllustrate # Class SBDColorSchemePerStructuralModelIllustrate [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerStructuralModelIllustrate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModelIllustrate/index.md) *This class describes an illustrative per structural model color scheme inspired by the "Molecule of the Month" style of the Protein Data Bank.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerStructuralModel](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerStructuralModelIllustrate**](#function-sbdcolorschemeperstructuralmodelillustrate-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerStructuralModelIllustrate**](#function-sbdcolorschemeperstructuralmodelillustrate-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemePerStructuralModelIllustrate**](#function-sbdcolorschemeperstructuralmodelillustrate) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerStructuralModel See [SBDColorSchemePerStructuralModel](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBDColorSchemePerStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-sbdcolorschemeperstructuralmodel-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-sbdcolorschemeperstructuralmodel-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-clone) () override const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the document.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the document.* | | virtual | [**~SBDColorSchemePerStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-sbdcolorschemeperstructuralmodel) () *Destructs the color scheme.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerStructuralModelIllustrate **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerStructuralModelIllustrate [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerStructuralModelIllustrate::SBDColorSchemePerStructuralModelIllustrate () ``` Constructs a default [**SBDColorSchemePerStructuralModelIllustrate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModelIllustrate/index.md) instance. ______________________________________________________________________ ### function SBDColorSchemePerStructuralModelIllustrate [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerStructuralModelIllustrate::SBDColorSchemePerStructuralModelIllustrate ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a [**SBDColorSchemePerStructuralModelIllustrate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModelIllustrate/index.md) with the given node indexer and optional palette. **Parameters:** - `nodeIndexer` Indexer used to map nodes to the color scheme. - `palette` Optional palette to use for coloring; if null, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerStructuralModelIllustrate::clone () override const ``` Creates a deep copy of this color scheme. **Returns:** Pointer to a new [**SBDColorSchemePerStructuralModelIllustrate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModelIllustrate/index.md) instance that is a copy of this object. Implements [*SBDColorSchemePerStructuralModel::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-clone) ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDColorSchemePerStructuralModelIllustrate::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) override const ``` Computes the color for a given node and position. **Parameters:** - `color` Output buffer (array of 4 floats) that receives the RGBA color values. - `node` Optional data graph node for which the color is computed; may be null. - `position` Optional 3D position associated with the node; defaults to zero. The method determines the base color and applies any special handling, such as lightening for certain atom types. Implements [*SBDColorSchemePerStructuralModel::getColor*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getcolor) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerStructuralModelIllustrate::getDefaultPalette () override const ``` Retrieves the default palette for this color scheme. **Returns:** A cloned instance of the default palette. Implements [*SBDColorSchemePerStructuralModel::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerStructuralModelIllustrate::isSerializable () override const ``` Indicates whether the color scheme supports serialization. **Returns:** True, as this color scheme can be serialized. Implements [*SBDColorSchemePerStructuralModel::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the document.* ```C++ virtual void SBDColorSchemePerStructuralModelIllustrate::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Serializes the color scheme to a serializer. **Parameters:** - `serializer` Serializer object used to write the color scheme data. - `nodeIndexer` Indexer providing node mapping information for serialization. - `sdkVersionNumber` Version number of the SDK used during serialization. - `classVersionNumber` Version number of the class being serialized. Implements [*SBDColorSchemePerStructuralModel::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the document.* ```C++ virtual void SBDColorSchemePerStructuralModelIllustrate::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Unserializes the color scheme from a serializer. **Parameters:** - `serializer` Serializer object used to read the color scheme data. - `nodeIndexer` Indexer providing node mapping information for deserialization. - `sdkVersionNumber` Version number of the SDK used during deserialization. - `classVersionNumber` Version number of the class being deserialized. Implements [*SBDColorSchemePerStructuralModel::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerStructuralModelIllustrate *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerStructuralModelIllustrate::~SBDColorSchemePerStructuralModelIllustrate () ``` Destroys the [**SBDColorSchemePerStructuralModelIllustrate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModelIllustrate/index.md) and releases any associated resources. ______________________________________________________________________ # SBColorSchemePerTemperatureFactor # Class SBDColorSchemePerTemperatureFactor [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDColorSchemePerTemperatureFactor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerTemperatureFactor/index.md) *This class describes a color scheme based on atom's temperature factor.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerTemperatureFactor**](#function-sbdcolorschemepertemperaturefactor-12) () *Constructs a color scheme.* | | | [**SBDColorSchemePerTemperatureFactor**](#function-sbdcolorschemepertemperaturefactor-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette=nullptr) *Constructs a color scheme.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () override const *Returns a copy of the color scheme.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the color scheme to a serializer.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Deserializes the color scheme from a serializer.* | | virtual | [**~SBDColorSchemePerTemperatureFactor**](#function-sbdcolorschemepertemperaturefactor) () *Destructs the color scheme.* | ## Public Functions inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | -------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-12) () *Default constructor.* | | | [**SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBDDataGraphNodePredicate & nodePredicate, const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > & nodeGetter) *Constructs a color scheme based on node attributes.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-canhavepalette) () override const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) override const *Returns a color given a* `node` *and / or a*`position` *.* | | Output | [**getDefaultMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultmaximumvalue) () const *Returns the default maximum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | Output | [**getDefaultMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultminimumvalue) () const *Returns the default minimum value for the attribute bounds used for colorization. It is computed during the color scheme construction based on the given node indexer and predicates.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) () override const *Returns a clone of the default color palette for this color scheme.* | | Output | [**getMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getmaximumvalue) () const *Returns the maximum value for the attribute bounds used for colorization.* | | Output | [**getMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getminimumvalue) () const *Returns the minimum value for the attribute bounds used for colorization.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) () override const *Returns false - this base class is not serializable and the serialization should be implemented in the derived classes.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *A virtual function function for the serialization - should be implemented in the derived classes.* | | void | [**setMaximumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setmaximumvalue) (Output value) *Sets the maximum value for the attribute bounds used for colorization.* | | void | [**setMinimumValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-setminimumvalue) (Output value) *Sets the minimum value for the attribute bounds used for colorization.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *A virtual function function for the unserialization - should be implemented in the derived classes.* | | virtual | [**~SBDColorSchemePerAttribute**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-sbdcolorschemeperattribute) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBDColorSchemePerAttribute See [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | Output \* | [**defaultMaxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultmaxvalue) *The default maximum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**defaultMinValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-defaultminvalue) *The default minimum value for the attribute bounds determined when constructing the color scheme based on the input node indexer.* | | Output \* | [**maxValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-maxvalue) *The current maximum value for the attribute bounds used for colorization.* | | Output \* | [**minValue**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-minvalue) *The current minimum value for the attribute bounds used for colorization.* | | [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > \* | [**nodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodegetter) *The node getter.* | | [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) | [**nodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodeindexer) *The node indexer.* | | SBDDataGraphNodePredicate \* | [**nodePredicate**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#variable-nodepredicate) *The node predicate.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNodeColorScheme See [SBDDataGraphNodeColorScheme](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a per temperature color scheme. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBColorSchemePerTemperatureFactor **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDColorSchemePerTemperatureFactor [1/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerTemperatureFactor::SBDColorSchemePerTemperatureFactor () ``` Constructs a [**SBDColorSchemePerTemperatureFactor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerTemperatureFactor/index.md) with default settings. Initializes the color scheme with default minimum and maximum values, configures the node predicate and getter for atom temperature factors, and sets the palette to the default. ______________________________________________________________________ ### function SBDColorSchemePerTemperatureFactor [2/2] *Constructs a color scheme.* ```C++ SBDColorSchemePerTemperatureFactor::SBDColorSchemePerTemperatureFactor ( const SBNodeIndexer & nodeIndexer, const SBDPalette * palette=nullptr ) ``` Constructs a [**SBDColorSchemePerTemperatureFactor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerTemperatureFactor/index.md) with a specific node indexer and optional palette. **Parameters:** - `nodeIndexer` Indexer describing which nodes the color scheme applies to. - `palette` Optional palette to use; if nullptr, the default palette is used. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDColorSchemePerTemperatureFactor::clone () override const ``` Creates a copy of this color scheme. The returned object is a new instance with the same settings and palette as this one. **Returns:** A pointer to a newly allocated copy of the color scheme. Implements [*SBDDataGraphNodeColorScheme::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/#function-clone) ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDColorSchemePerTemperatureFactor::getDefaultPalette () override const ``` Retrieves the default palette for this color scheme. Returns a newly cloned palette that represents the default color mapping for temperature factors. **Returns:** A pointer to a newly allocated default palette. Implements [*SBDColorSchemePerAttribute::getDefaultPalette*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-getdefaultpalette) ______________________________________________________________________ ### function isSerializable *Returns* `true` \_\_ ```C++ virtual bool SBDColorSchemePerTemperatureFactor::isSerializable () override const ``` Indicates whether the color scheme supports serialization. **Returns:** `true`, indicating that this color scheme can be serialized. Implements [*SBDColorSchemePerAttribute::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-isserializable) ______________________________________________________________________ ### function serialize *Serializes the color scheme to a serializer.* ```C++ virtual void SBDColorSchemePerTemperatureFactor::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Writes the color palette (if present) and the minimum and maximum values to the serializer. **Parameters:** - `serializer` Serializer object used for writing data. - `nodeIndexer` Indexer used for node mapping during serialization. - `sdkVersionNumber` SDK version number used to determine the serialization format. - `classVersionNumber` Class version number used for serialization compatibility. Implements [*SBDColorSchemePerAttribute::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-serialize) ______________________________________________________________________ ### function unserialize *Deserializes the color scheme from a serializer.* ```C++ virtual void SBDColorSchemePerTemperatureFactor::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Reads the color palette (if present) and the minimum and maximum values from the serializer, restoring the state of the color scheme. **Parameters:** - `serializer` Serializer object used for reading data. - `nodeIndexer` Indexer used for node mapping during deserialization. - `sdkVersionNumber` SDK version number used to interpret the serialization format. - `classVersionNumber` Class version number used for deserialization compatibility. Implements [*SBDColorSchemePerAttribute::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/#function-unserialize) ______________________________________________________________________ ### function ~SBDColorSchemePerTemperatureFactor *Destructs the color scheme.* ```C++ virtual SBDColorSchemePerTemperatureFactor::~SBDColorSchemePerTemperatureFactor () ``` Destroys the [**SBDColorSchemePerTemperatureFactor**](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerTemperatureFactor/index.md). ______________________________________________________________________ # SBController # Class SBDController [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) *This class is the base class of controllers.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) ## Public Types inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | enum | [**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) *The rendering pass.* | | enum | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) *The type of the data graph node.* | ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDController**](#function-sbdcontroller-23) () *Constructs a controller.* | | | [**SBDController**](#function-sbdcontroller-33) (const [**SBValueMap**](https://documentation.samson-connect.net/developers/latest/api/classSBCMetaValueMap/index.md) & parameterMap) *Constructs a controller.* | | virtual bool | [**addChild**](#function-addchild) ([**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, [**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) override *Adds a child to the controller.* | | virtual bool | [**canAddChild**](#function-canaddchild) (const [**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, const [**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) override const *Returns whether this node can add* `node` *as a child.* | | virtual bool | [**canAddChildType**](#function-canaddchildtype) ([**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) override const *Returns whether this node can add a node with type* `nodeType` *as a child.* | | virtual bool | [**canHaveDescendantType**](#function-canhavedescendanttype) ([**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) override const *Returns whether this node can have a node with type* `nodeType` *as a descendant.* | | virtual void | [**changed**](#function-changed) () *Emits the ControllerStateChanged event.* | | virtual [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) \* | [**clone**](#function-clone) () override *Returns a copy of the node and its descendants.* | | void | [**connectControllerSignalToSlot**](#function-connectcontrollersignaltoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBControllerEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/index.md) \*) functionPointer, [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * nextReferenceTarget=0, void(SBCReferenceTarget::\*)([**SBControllerEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/index.md) \*) nextFunctionPointer=0) *Connects the controller signal to a slot.* | | bool | [**controllerSignalIsConnectedToSlot**](#function-controllersignalisconnectedtoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBControllerEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/index.md) \*) functionPointer) const *Returns* `true` *if and only if the controller signal is connected to the slot.* | | void | [**disconnectControllerSignalFromSlot**](#function-disconnectcontrollersignalfromslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBControllerEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/index.md) \*) functionPointer) *Disconnects the controller signal from a slot.* | | virtual void | [**display**](#function-display) ([**SBNode::RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) renderingPass) override *Displays the controller.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-12) (void(\*)([**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) override *Performs the* `action` *on each node of this controller (the controller itself and its children), depth-first.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) override *Performs the* `object` *'s*`action` *on each node of this controller (the controller itself and its children), depth-first.* | | SBPointerList< [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) > const \* | [**getChildren**](#function-getchildren) () const *Returns the list of children of the controller.* | | [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) \* | [**getNextController**](#function-getnextcontroller) () const *Returns the next controller in the document.* | | virtual void | [**getNodes**](#function-getnodes-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual void | [**getNodes**](#function-getnodes-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) \* | [**getPreviousController**](#function-getpreviouscontroller) () const *Returns the previous controller in the document.* | | virtual [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](#function-gettype) () override const *Returns the type of the data graph node.* | | virtual bool | [**hasNode**](#function-hasnode-12) ([**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Checks for nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**hasNode**](#function-hasnode-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Checks for nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` *when the class is serializable.* | | virtual void | [**pressed**](#function-pressed) ([**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) * auxiliaryNode=nullptr) *Emits the ControllerPressed event.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) override const *Prints debugging information.* | | virtual void | [**released**](#function-released) ([**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) * auxiliaryNode=nullptr) *Emits the ControllerReleased event.* | | virtual bool | [**removeChild**](#function-removechild) ([**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) override *Removes a child from the controller.* | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the node.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the node.* | | virtual | [**~SBDController**](#function-sbdcontroller) () *Destructs the controller.* | ## Public Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-119) (SB_SBDDATAGRAPH_EXPORT, [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \*, GetProxy) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-219) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, This) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-319) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetParent) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-419) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetThis) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-519) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetNextNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-619) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetPreviousNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-719) (SB_SBDDATAGRAPH_EXPORT, [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \*, GetDocument) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-819) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetRoot) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-919) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1019) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type), GetType) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1119) (SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1219) (SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1319) (SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1419) (SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1519) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1619) (SB_SBDDATAGRAPH_EXPORT, std::string, GetName) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1719) (SB_SBDDATAGRAPH_EXPORT, std::string, GetClass) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1819) (SB_SBDDATAGRAPH_EXPORT, std::string, GetElement) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1919) (SB_SBDDATAGRAPH_EXPORT, [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md), GetElementUUID) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-132) (SB_SBDDATAGRAPH_EXPORT, All) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-232) (SB_SBDDATAGRAPH_EXPORT, None) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-332) (SB_SBDDATAGRAPH_EXPORT, IsModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-432) (SB_SBDDATAGRAPH_EXPORT, IsAtom) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-532) (SB_SBDDATAGRAPH_EXPORT, IsBond) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-632) (SB_SBDDATAGRAPH_EXPORT, IsStructuralNode) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-732) (SB_SBDDATAGRAPH_EXPORT, IsStructuralModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-832) (SB_SBDDATAGRAPH_EXPORT, IsVisualModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-932) (SB_SBDDATAGRAPH_EXPORT, IsMesh) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1032) (SB_SBDDATAGRAPH_EXPORT, IsLight) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1132) (SB_SBDDATAGRAPH_EXPORT, IsInteractionModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1232) (SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1332) (SB_SBDDATAGRAPH_EXPORT, IsPropertyModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1432) (SB_SBDDATAGRAPH_EXPORT, IsSimulator) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1532) (SB_SBDDATAGRAPH_EXPORT, IsBallAndStick) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1632) (SB_SBDDATAGRAPH_EXPORT, IsLicorice) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1732) (SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1832) (SB_SBDDATAGRAPH_EXPORT, IsCartoon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1932) (SB_SBDDATAGRAPH_EXPORT, IsRibbon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2032) (SB_SBDDATAGRAPH_EXPORT, IsTube) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2132) (SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2232) (SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2332) (SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2432) (SB_SBDDATAGRAPH_EXPORT, HasMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2532) (SB_SBDDATAGRAPH_EXPORT, OwnsMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2632) (SB_SBDDATAGRAPH_EXPORT, IsLocked) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2732) (SB_SBDDATAGRAPH_EXPORT, IsSerializable) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2832) (SB_SBDDATAGRAPH_EXPORT, IsCreated) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2932) (SB_SBDDATAGRAPH_EXPORT, IsErased) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3032) (SB_SBDDATAGRAPH_EXPORT, IsSelected) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3132) (SB_SBDDATAGRAPH_EXPORT, IsVisible) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3232) (SB_SBDDATAGRAPH_EXPORT, IsHighlighted) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-12) (SB_SBDDATAGRAPH_EXPORT, IsType, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type)) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-22) (SB_SBDDATAGRAPH_EXPORT, HasOneOf, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md)) | | virtual bool | [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) *Adds a child to the node.* | | bool | [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial) ([**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) * material) *Adds a material.* | | bool | [**baseSignalIsConnectedToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-basesignalisconnectedtoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) const *Returns* `true` *when the base signal is connected to a slot.* | | virtual bool | [**canAddChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchild) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) const *Returns whether this node can add* `node` *as a child.* | | virtual bool | [**canAddChildType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchildtype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can add a node with type* `nodeType` *as a child.* | | bool | [**canAddMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddmaterial-12) () const *Returns whether can add a material to the node based on its type.* | | virtual bool | [**canHaveDescendantType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canhavedescendanttype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can have a node with type* `nodeType` *as a descendant.* | | virtual [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) () *Returns a copy of the node and its descendants.* | | void | [**connectBaseSignalToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-connectbasesignaltoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer, [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * nextReferenceTarget=0, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) nextFunctionPointer=0) *Connects the base signal to a slot.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | void | [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create) () *Creates the node.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them.* | | void | [**disconnectBaseSignalFromSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-disconnectbasesignalfromslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) *Disconnects the base signal from a slot.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) ([**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) renderingPass) *Displays the node.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-22) () *Displays the node (deprecated)* | | virtual void | [**displayForSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforselection) () *Displays the node for selection purposes (deprecated)* | | virtual void | [**displayForShadow**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforshadow) () *Displays the node for shadowing purposes (deprecated)* | | void | [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) () *Erases the node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-12) (void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *on this node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *on this node.* | | unsigned int | [**getDefaultOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaultopacity) () const *Returns the default opacity.* | | unsigned int | [**getDefaultTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaulttransparency) () const *Returns the default transparency.* | | [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \* | [**getDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdocument) () const *Returns the document the node belongs to.* | | virtual unsigned int | [**getFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getflags) () const *Returns the flags.* | | virtual std::string | [**getHierarchyString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethierarchystring) (const std::string & separator=" / ", bool includeNodeType=false) const *Returns a string with hierarchical information on the node and its parents names.* | | bool | [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) () const *Returns the highlighting flag.* | | virtual unsigned int | [**getInheritedFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedflags) () const *Returns the inherited flags.* | | float | [**getInheritedOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedopacity) () const *Returns the cumulative opacity, when taking into account the ascendants.* | | float | [**getInheritedTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedtransparency) () const *Returns the cumulative transparency, when taking into account the ascendants.* | | virtual bool | [**getLockedFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getlockedflag) () const *Returns the locked flag.* | | [**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) \* | [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial) () const *Returns the material.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) () const *Returns the node whose material is inherited.* | | unsigned int | [**getMaximumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumopacity) () const *Returns the maximum opacity.* | | unsigned int | [**getMaximumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumtransparency) () const *Returns the maximum transparency.* | | unsigned int | [**getMinimumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumopacity) () const *Returns the minimum opacity.* | | unsigned int | [**getMinimumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumtransparency) () const *Returns the minimum transparency.* | | virtual [**SBQuantity::mass**](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-mass) | [**getMolecularWeight**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmolecularweight) () *Returns the molecular weight.* | | virtual std::string const & | [**getName**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getname) () const *Returns the name of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnextnode-12) () const *Returns the pointer to the next node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnextnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the next node with type* `nodeType` *in the children of the node's parent.* | | unsigned int | [**getNodeIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeindex) () const *Returns the node index (unique in the whole data graph, but non-persistent)* | | [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getNodeUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeuuid) () const *Returns the node UUID.* | | virtual void | [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual void | [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual unsigned int | [**getNumberOfAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofatoms) () *Returns the number of atoms.* | | virtual unsigned int | [**getNumberOfCarbons**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofcarbons) () *Returns the number of carbons.* | | virtual unsigned int | [**getNumberOfChains**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofchains) () *Returns the number of chains.* | | virtual unsigned int | [**getNumberOfCoarseGrainedAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofcoarsegrainedatoms) () *Returns the number of coarse-grained atoms.* | | virtual unsigned int | [**getNumberOfHydrogens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofhydrogens) () *Returns the number of hydrogens.* | | virtual unsigned int | [**getNumberOfMolecules**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofmolecules) () *Returns the number of molecules.* | | virtual unsigned int | [**getNumberOfNitrogens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofnitrogens) () *Returns the number of nitrogens.* | | virtual unsigned int | [**getNumberOfOtherAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofotheratoms) () *Returns the number of other atoms.* | | virtual unsigned int | [**getNumberOfOxygens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofoxygens) () *Returns the number of oxygens.* | | virtual unsigned int | [**getNumberOfResidues**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofresidues) () *Returns the number of residues.* | | virtual unsigned int | [**getNumberOfSegments**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofsegments) () *Returns the number of segments.* | | virtual unsigned int | [**getNumberOfStructuralGroups**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofstructuralgroups) () *Returns the number of structural groups.* | | virtual unsigned int | [**getNumberOfStructuralModels**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofstructuralmodels) () *Returns the number of structural models.* | | virtual unsigned int | [**getNumberOfSulfurs**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofsulfurs) () *Returns the number of sulfurs.* | | virtual unsigned int | [**getOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacity) () const *Returns the opacity.* | | unsigned int | [**getOpacitySingleStep**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacitysinglestep) () const *Returns the opacity single step.* | | std::string | [**getOpacitySuffix**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacitysuffix) () const *Returns the opacity suffix.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getParent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getparent) () const *Returns the parent of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getpreviousnode-12) () const *Returns the pointer to the previous node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getpreviousnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the previous node with type* `nodeType` *in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getRoot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getroot) () const *Returns the root of the hierarchy the node belongs to.* | | bool | [**getSelected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselected) () const *Returns whether the node is selected.* | | bool | [**getSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) () const *Returns the selection flag.* | | virtual int | [**getSumOfFormalCharges**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getsumofformalcharges) () *Returns the sum of formal charges.* | | virtual float | [**getSumOfPartialCharges**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getsumofpartialcharges) () *Returns the sum of partial charges.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getThisNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getthisnode) () const *Returns the pointer to this node.* | | virtual unsigned int | [**getTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparency) () const *Returns the transparency.* | | unsigned int | [**getTransparencySingleStep**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparencysinglestep) () const *Returns the transparency single step.* | | std::string | [**getTransparencySuffix**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparencysuffix) () const *Returns the transparency suffix.* | | virtual [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) () const *Returns the type of the data graph node.* | | std::string | [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-12) (bool humanReadable=false) const *Returns a string describing the type of the data graph node.* | | bool | [**getVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag) () const *Returns the visibility flag.* | | bool | [**getVisible**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisible) () const *Returns whether the node is visible.* | | bool | [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial) () const *Returns whether the node has a material (by itself, or inherited)* | | virtual bool | [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | bool | [**hasOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasoneof) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or is the ancestor of one of them, or is a group that stores one of them.* | | bool | [**hasOpacityRange**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasopacityrange) () const *Returns whether the node has the opacity range.* | | bool | [**hasTransparencyRange**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hastransparencyrange) () const *Returns whether the node has the transparency range.* | | bool | [**isAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isatom) () const *Returns* `true` *when the node is an atom.* | | bool | [**isBallAndStick**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isballandstick) () const *Returns* `true` *when the node is the default ball-and-stick visual model.* | | bool | [**isBond**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isbond) () const *Returns* `true` *when the node is a bond.* | | bool | [**isCartoon**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscartoon) () const *Returns* `true` *when the node is the default cartoon visual model.* | | bool | [**isCreated**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated) () const *Returns* `true` *if and only if the node is created.* | | bool | [**isDynamicalModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isdynamicalmodel) () const *Returns* `true` *when the node is a dynamical model.* | | bool | [**isErased**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iserased) () const *Returns* `true` *if and only if the node is erased.* | | bool | [**isGaussianSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isgaussiansurface) () const *Returns* `true` *when the node is the default Gaussian surface visual model.* | | bool | [**isHighlighted**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ishighlighted) () const *Returns whether the node is highlighted.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it, or belongs to a group stored in*`node` *.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them, or belongs to a group stored in one of the nodes of the*`nodeIndexer` *.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them, or belongs to a group stored in of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isInteractionModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isinteractionmodel) () const *Returns* `true` *when the node is a interaction model.* | | bool | [**isLicorice**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islicorice) () const *Returns* `true` *when the node is the default licorice visual model.* | | bool | [**isLight**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islight) () const *Returns* `true` *when the node is a light.* | | virtual bool | [**isLocked**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islocked) () const *Returns whether the node is locked.* | | bool | [**isMesh**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ismesh) () const *Returns* `true` *when the node is a mesh.* | | bool | [**isModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ismodel) () const *Returns* `true` *when the node is a model.* | | bool | [**isOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isoneof-12) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *.* | | bool | [**isOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isoneof-22) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isPropertyModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ispropertymodel) () const *Returns* `true` *when the node is a property model.* | | bool | [**isRibbon**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isribbon) () const *Returns* `true` *when the node is the default ribbon visual model.* | | bool | [**isSelected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isselected) () const *Returns whether the node is selected.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | bool | [**isSimulator**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issimulator) () const *Returns* `true` *when the node is a simulator.* | | bool | [**isSolventAccessibleSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issolventaccessiblesurface) () const *Returns* `true` *when the node is the default solvent accessible surface visual model.* | | bool | [**isSolventExcludedSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issolventexcludedsurface) () const *Returns* `true` *when the node is the default solvent excluded surface visual model.* | | bool | [**isStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isstructuralmodel) () const *Returns* `true` *when the node is a structural model.* | | bool | [**isStructuralNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isstructuralnode) () const *Returns* `true` *when the node is a structural node.* | | bool | [**isTube**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-istube) () const *Returns* `true` *when the node is the default tube visual model.* | | bool | [**isType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-istype) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type) const *Returns* `true` *when the type of the node corresponds to*`type` *.* | | bool | [**isVanDerWaals**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvanderwaals) () const *Returns* `true` *when the node is the default van der Waals visual model.* | | bool | [**isVisible**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvisible) () const *Returns whether the node is visible.* | | bool | [**isVisualModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvisualmodel) () const *Returns* `true` *when the node is a visual model.* | | bool | [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial) () const *Returns whether the node owns a material.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-print) (unsigned int offset=0) const *Prints some debugging information.* | | virtual bool | [**removeChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removechild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) *Removes a child from the node.* | | bool | [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial) () *Removes the material.* | | void | [**removeMaterialsFromDescendants**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerialsfromdescendants) () *Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the node.* | | void | [**setHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sethighlightingflag) (bool flag) *Sets the highlighting flag.* | | virtual void | [**setLockedFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setlockedflag) (bool flag) *Sets the locked flag.* | | virtual void | [**setName**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setname) (const std::string & name) *Sets the name of the node.* | | virtual void | [**setOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setopacity) (unsigned int opacity) *Sets the opacity.* | | void | [**setSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setselectionflag) (bool flag) *Sets the selection flag.* | | virtual void | [**setTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-settransparency) (unsigned int transparency) *Sets the transparency.* | | void | [**setVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setvisibilityflag) (bool flag) *Sets the visibility flag.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the node.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Public Static Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | bool | [**canAddMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddmaterial-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) *Returns whether can add a material to a node of type* `nodeType` *.* | | void | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & sourceNodeIndexer, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & destinationNodeIndexer) *Clones the nodes in* `sourceNodeIndexer` *(treated as a whole) and places the clones in*`destinationNodeIndexer` *.* | | void | [**forEachNodeInSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodeinselection-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *for each node in*`nodeIndexer` \_\_ | | void | [**forEachNodeInSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodeinselection-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *for each node in*`nodeIndexer` \_\_ | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnode) (unsigned int nodeIndex) *Returns the unique node corresponding to the node index* `nodeIndex` *.* | | std::string | [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-22) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type, bool humanReadable=false) *Returns a string describing the type of the data graph node.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions | Type | Name | | ---- | -------------------------------------------------------------------------------------------------------- | | | [**SBDController**](#function-sbdcontroller-13) (SBDControllerData * dataPointer) *Builds a controller.* | ## Protected Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode-12) () *Builds a data graph node.* | | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode-22) (SBDDataGraphNodeData * dataPointer) *Builds a data graph node.* | | virtual | [**~SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode) () *Destroys the node.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description **Short name**: SBController ## Public Functions Documentation ### function SBDController [2/3] *Constructs a controller.* ```C++ SBDController::SBDController () ``` Initializes a new [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) instance with a default data pointer. ______________________________________________________________________ ### function SBDController [3/3] *Constructs a controller.* ```C++ SBDController::SBDController ( const SBValueMap & parameterMap ) ``` Constructs a controller with given parameters. Initializes a new [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) using the provided parameter map. **Parameters:** - `parameterMap` Map of parameters used to configure the controller. ______________________________________________________________________ ### function addChild *Adds a child to the controller.* ```C++ virtual bool SBDController::addChild ( SBNode * node, SBNode * nextNode=nullptr ) override ``` Adds a child node to the controller. Inserts the specified node as a child of this controller, optionally placing it before a given sibling node. **Parameters:** - `node` Pointer to the node to add as a child. - `nextNode` Optional pointer to the sibling node after which the new node will be inserted; may be `nullptr`. **Returns:** `true` if the child was successfully added; otherwise `false`. ______________________________________________________________________ ### function canAddChild *Returns whether this node can add* `node` *as a child.* ```C++ virtual bool SBDController::canAddChild ( const SBNode * node, const SBNode * nextNode=nullptr ) override const ``` Determines if a node can be added as a child. Checks whether the specified node can be added as a child of this controller, optionally considering a sibling node. **Parameters:** - `node` Pointer to the node to be added. - `nextNode` Optional pointer to the node after which the new node will be inserted; may be `nullptr`. **Returns:** `true` if the node can be added; otherwise `false`. ______________________________________________________________________ ### function canAddChildType *Returns whether this node can add a node with type* `nodeType` *as a child.* ```C++ virtual bool SBDController::canAddChildType ( SBNode::Type nodeType ) override const ``` Checks if a node type can be added as a child. Determines whether nodes of the specified type are allowed as children of this controller. **Parameters:** - `nodeType` The type of node to check. **Returns:** `true` if nodes of this type can be added as children; otherwise `false`. Implements [*SBDDataGraphNode::canAddChildType*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchildtype) ______________________________________________________________________ ### function canHaveDescendantType *Returns whether this node can have a node with type* `nodeType` *as a descendant.* ```C++ virtual bool SBDController::canHaveDescendantType ( SBNode::Type nodeType ) override const ``` Checks if a node type can appear as a descendant. Determines whether nodes of the given type are permitted anywhere in the subtree of this controller. **Parameters:** - `nodeType` The type of node to check. **Returns:** `true` if nodes of this type can be descendants; otherwise `false`. Implements [*SBDDataGraphNode::canHaveDescendantType*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canhavedescendanttype) ______________________________________________________________________ ### function changed *Emits the ControllerStateChanged event.* ```C++ virtual void SBDController::changed () ``` Emits a state changed event for the controller. Generates a `ControllerStateChanged` event to indicate the controller's state has changed. ______________________________________________________________________ ### function clone *Returns a copy of the node and its descendants.* ```C++ virtual SBDController * SBDController::clone () override ``` Creates a copy of the controller. Returns a new controller instance that is a copy of this node and its descendants. **Returns:** Pointer to the cloned controller. Implements [*SBDDataGraphNode::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) ______________________________________________________________________ ### function connectControllerSignalToSlot *Connects the controller signal to a slot.* ```C++ void SBDController::connectControllerSignalToSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBControllerEvent *) functionPointer, SBCReferenceTarget * nextReferenceTarget=0, void(SBCReferenceTarget::*)( SBControllerEvent *) nextFunctionPointer=0 ) ``` Connects a controller signal to a slot. Establishes a connection between the controller's signal and a slot on the specified reference target. **Parameters:** - `referenceTarget` The target object that will receive the signal. - `functionPointer` Pointer to the member function of the target that will handle the signal. - `nextReferenceTarget` Optional target for a subsequent connection; may be `nullptr`. - `nextFunctionPointer` Optional member function pointer for the subsequent connection; may be `nullptr`. ______________________________________________________________________ ### function controllerSignalIsConnectedToSlot *Returns* `true` *if and only if the controller signal is connected to the slot.* ```C++ bool SBDController::controllerSignalIsConnectedToSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBControllerEvent *) functionPointer ) const ``` Checks if a controller signal is connected to a slot. Determines whether the specified target and function are currently connected to the controller's signal. **Parameters:** - `referenceTarget` The target object to check. - `functionPointer` Pointer to the member function to check. **Returns:** `true` if the signal is connected to the slot; otherwise `false`. ______________________________________________________________________ ### function disconnectControllerSignalFromSlot *Disconnects the controller signal from a slot.* ```C++ void SBDController::disconnectControllerSignalFromSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBControllerEvent *) functionPointer ) ``` Disconnects a controller signal from a slot. Removes the connection between the controller's signal and the specified target's slot. **Parameters:** - `referenceTarget` The target object from which to disconnect. - `functionPointer` Pointer to the member function to disconnect. ______________________________________________________________________ ### function display *Displays the controller.* ```C++ virtual void SBDController::display ( SBNode::RenderingPass renderingPass ) override ``` Renders the controller and its child nodes for the specified rendering pass. **Parameters:** - `renderingPass` The rendering pass indicating the context in which to display. Implements [*SBDDataGraphNode::display*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) ______________________________________________________________________ ### function forEachNodeDepthFirst [1/2] *Performs the* `action` *on each node of this controller (the controller itself and its children), depth-first.* ```C++ virtual void SBDController::forEachNodeDepthFirst ( void(*)( SBNode *node) action ) override ``` Performs an action on each node in depth-first order. Calls the provided function for this controller and all its descendant nodes, traversing depth-first. **Parameters:** - `action` Function pointer to be invoked for each node. ______________________________________________________________________ ### function forEachNodeDepthFirst [2/2] *Performs the* `object` *'s*`action` *on each node of this controller (the controller itself and its children), depth-first.* ```C++ virtual void SBDController::forEachNodeDepthFirst ( SBCClass * object, void(SBCClass::*)( SBNode *node) action ) override ``` Performs an action on each node in depth-first order using a member function. Calls the specified member function on the given object for this controller and all its descendant nodes, traversing depth-first. **Parameters:** - `object` Pointer to the object whose member function will be called. - `action` Pointer to the member function to invoke for each node. ______________________________________________________________________ ### function getChildren *Returns the list of children of the controller.* ```C++ SBPointerList< SBDControllerNode > const * SBDController::getChildren () const ``` Retrieves the list of child nodes. Returns a pointer to the list containing this controller's children, or `nullptr` if no children exist. **Returns:** Pointer to the child list, or `nullptr` if the controller has no children. ______________________________________________________________________ ### function getNextController *Returns the next controller in the document.* ```C++ SBDController * SBDController::getNextController () const ``` Retrieves the next controller in the document. Searches forward from this controller and returns the next controller node if one exists. **Returns:** Pointer to the next controller, or `nullptr` if none is found. ______________________________________________________________________ ### function getNodes [1/2] *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual void SBDController::getNodes ( SBNodeIndexer & nodeIndexer, SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Collects nodes of a specific type. Adds nodes matching the given type to the node indexer, optionally filtering by selection status and a visit predicate. **Parameters:** - `nodeIndexer` Indexer that will receive the collected nodes. - `nodeType` The type of nodes to collect. - `selectedNodesOnly` If `true`, only selected nodes are collected. - `visitPredicate` Predicate to determine whether to traverse a node. - `includeDependencies` If `true`, includes dependent nodes in the collection. Implements [*SBDDataGraphNode::getNodes*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) ______________________________________________________________________ ### function getNodes [2/2] *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual void SBDController::getNodes ( SBNodeIndexer & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Collects nodes based on a selection predicate. Adds nodes that satisfy the selection predicate to the node indexer, optionally filtered by a visit predicate and including dependencies. **Parameters:** - `nodeIndexer` Indexer that will receive the collected nodes. - `selectionPredicate` Predicate that selects nodes to include. - `visitPredicate` Predicate that determines whether to traverse a node. - `includeDependencies` If `true`, includes dependent nodes in the collection. Implements [*SBDDataGraphNode::getNodes*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-22) ______________________________________________________________________ ### function getPreviousController *Returns the previous controller in the document.* ```C++ SBDController * SBDController::getPreviousController () const ``` Retrieves the previous controller in the document. Searches backward from this controller and returns the previous controller node if one exists. **Returns:** Pointer to the previous controller, or `nullptr` if none is found. ______________________________________________________________________ ### function getType *Returns the type of the data graph node.* ```C++ virtual SBDDataGraphNode::Type SBDController::getType () override const ``` Retrieves the type of the data graph node. Returns the enum value representing a controller node. **Returns:** The node type identifier for a controller. Implements [*SBDDataGraphNode::getType*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) ______________________________________________________________________ ### function hasNode [1/2] *Checks for nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual bool SBDController::hasNode ( SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Checks for the presence of nodes of a specific type. Determines whether the controller or its descendants contain a node of the given type, optionally filtering by selection status and a visit predicate. **Parameters:** - `nodeType` The type of node to check for. - `selectedNodesOnly` If `true`, only selected nodes are considered. - `visitPredicate` Predicate to determine whether to traverse a node. - `includeDependencies` If `true`, includes dependent nodes in the check. **Returns:** `true` if a matching node is found; otherwise `false`. Implements [*SBDDataGraphNode::hasNode*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-12) ______________________________________________________________________ ### function hasNode [2/2] *Checks for nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual bool SBDController::hasNode ( const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Checks for the presence of nodes matching a predicate. Determines whether the controller or its descendants contain a node that satisfies the selection predicate, optionally filtered by a visit predicate and including dependencies. **Parameters:** - `selectionPredicate` Predicate that selects nodes to check. - `visitPredicate` Predicate that determines whether to traverse a node. - `includeDependencies` If `true`, includes dependent nodes in the check. **Returns:** `true` if a matching node is found; otherwise `false`. Implements [*SBDDataGraphNode::hasNode*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-22) ______________________________________________________________________ ### function isSerializable *Returns* `true` *when the class is serializable.* ```C++ virtual bool SBDController::isSerializable () override const ``` Indicates whether the controller is serializable. Returns `true` if the controller supports serialization; otherwise `false`. **Returns:** `false` indicating the controller is not serializable. Implements [*SBDDataGraphNode::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable) ______________________________________________________________________ ### function pressed *Emits the ControllerPressed event.* ```C++ virtual void SBDController::pressed ( SBDControllerNode * auxiliaryNode=nullptr ) ``` Emits a pressed event for the controller. Generates a `ControllerPressed` event, optionally including an auxiliary node. **Parameters:** - `auxiliaryNode` Optional auxiliary node associated with the press event; may be `nullptr`. ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ virtual void SBDController::print ( unsigned int offset=0 ) override const ``` Prints debugging information for the controller. Outputs the controller's name and its children's information with indentation based on the provided offset. **Parameters:** - `offset` Number of indentation levels to apply before printing. Implements [*SBDDataGraphNode::print*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-print) ______________________________________________________________________ ### function released *Emits the ControllerReleased event.* ```C++ virtual void SBDController::released ( SBDControllerNode * auxiliaryNode=nullptr ) ``` Emits a released event for the controller. Generates a `ControllerReleased` event, optionally including an auxiliary node. **Parameters:** - `auxiliaryNode` Optional auxiliary node associated with the release event; may be `nullptr`. ______________________________________________________________________ ### function removeChild *Removes a child from the controller.* ```C++ virtual bool SBDController::removeChild ( SBNode * node ) override ``` Removes a child node from the controller. Detaches the specified child node from this controller. **Parameters:** - `node` Pointer to the child node to remove. **Returns:** `true` if the child was successfully removed; otherwise `false`. ______________________________________________________________________ ### function serialize *Serializes the node.* ```C++ virtual void SBDController::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` Serializes the controller. Writes the controller's data to the given serializer, including its name and children. **Parameters:** - `serializer` Serializer used to write the data. - `nodeIndexer` Indexer that maps nodes to indices. - `sdkVersionNumber` SDK version number (default is SB_SDK_VERSION_NUMBER). - `classVersionNumber` Class version number (default is SBVersionNumber(1, 0, 0)). Implements [*SBDDataGraphNode::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the node.* ```C++ virtual void SBDController::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` Unserializes the controller. Reads the controller's data from the given serializer and reconstructs its children. **Parameters:** - `serializer` Serializer used to read the data. - `nodeIndexer` Indexer that maps indices to nodes. - `sdkVersionNumber` SDK version number (default is SB_SDK_VERSION_NUMBER). - `classVersionNumber` Class version number (default is SBVersionNumber(1, 0, 0)). Implements [*SBDDataGraphNode::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ______________________________________________________________________ ### function ~SBDController *Destructs the controller.* ```C++ virtual SBDController::~SBDController () ``` Cleans up resources associated with the [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md). ______________________________________________________________________ ## Protected Functions Documentation ### function SBDController [1/3] *Builds a controller.* ```C++ SBDController::SBDController ( SBDControllerData * dataPointer ) ``` Constructs a controller from existing data. Creates an [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) that wraps the supplied data pointer. **Parameters:** - `dataPointer` Pointer to existing controller data. ______________________________________________________________________ # SBControllerEvent # Class SBDControllerEvent [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDControllerEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/index.md) *This class describes a controller event.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) ## Public Types | Type | Name | | ---- | ---------------------------------------------------------- | | enum | [**Type**](#enum-type) *Available controller event types.* | ## Public Types inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | enum | [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) *The category of the data graph event.* | ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDControllerEvent**](#function-sbdcontrollerevent) ([**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) * controller, [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/#enum-type) type, [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) * auxiliaryNode=nullptr) *Builds a controller event.* | | [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) \* | [**getAuxiliaryNode**](#function-getauxiliarynode) () const *Returns a pointer to the auxiliary node.* | | virtual [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) | [**getCategory**](#function-getcategory) () override const *Returns the category of the data graph event.* | | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/#enum-type) | [**getType**](#function-gettype) () const *Returns the controller event type.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) override const *Prints debugging information.* | | virtual | [**~SBDControllerEvent**](#function-sbdcontrollerevent) () *Destructor.* | ## Public Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent-22) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * sender) *Build a data graph event for the sender* `sender` *.* | | virtual [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) | [**getCategory**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategory) () const *Returns the category of the data graph event.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getSender**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getsender) () const *Returns the sender of the event.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-print) (unsigned int offset=0) const *Prints debugging information.* | | virtual | [**~SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent) () *Destructor.* | ## Public Static Functions | Type | Name | | ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | std::string | [**getTypeString**](#function-gettypestring) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/#enum-type) type) *Returns the controller event type as a string.* | ## Public Static Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getCategoryString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategorystring) ([**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) category) *Returns a string representation of the category of the data graph event.* | ## Protected Attributes inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBDDataGraphEventData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent-12) (SBDDataGraphEventData * dataPointer) *Protected constructor.* | ## Detailed Description **Short name**: SBControllerEvent ## Public Types Documentation ### enum Type *Available controller event types.* ```C++ enum SBDControllerEvent::Type { ControllerNodeAdded = 1, ControllerNodeRemoved = 2, ControllerPressed = 3, ControllerReleased = 4, ControllerStateChanged = 5 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBDControllerEvent *Builds a controller event.* ```C++ SBDControllerEvent::SBDControllerEvent ( SBDController * controller, Type type, SBDControllerNode * auxiliaryNode=nullptr ) ``` Constructs a controller event. **Parameters:** - `controller` The controller associated with the event. - `type` The type of the controller event. - `auxiliaryNode` Optional auxiliary node related to the event. ______________________________________________________________________ ### function getAuxiliaryNode *Returns a pointer to the auxiliary node.* ```C++ SBDControllerNode * SBDControllerEvent::getAuxiliaryNode () const ``` Returns the auxiliary node associated with this event, if any. **Returns:** Pointer to the auxiliary node, or nullptr if none. ______________________________________________________________________ ### function getCategory *Returns the category of the data graph event.* ```C++ virtual Category SBDControllerEvent::getCategory () override const ``` Returns the category of this data graph event. **Returns:** The event category (ControllerEvent). Implements [*SBDDataGraphEvent::getCategory*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategory) ______________________________________________________________________ ### function getType *Returns the controller event type.* ```C++ Type SBDControllerEvent::getType () const ``` Retrieves the type of this controller event. **Returns:** The controller event type. ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ virtual void SBDControllerEvent::print ( unsigned int offset=0 ) override const ``` Prints debugging information for this event. **Parameters:** - `offset` Number of tab characters to indent the output. Implements [*SBDDataGraphEvent::print*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-print) ______________________________________________________________________ ### function ~SBDControllerEvent *Destructor.* ```C++ virtual SBDControllerEvent::~SBDControllerEvent () ``` Destroys the controller event. ______________________________________________________________________ ## Public Static Functions Documentation ### function getTypeString *Returns the controller event type as a string.* ```C++ static std::string SBDControllerEvent::getTypeString ( Type type ) ``` Converts a controller event type to its string representation. **Parameters:** - `type` The controller event type to convert. **Returns:** A string describing the event type. ______________________________________________________________________ # SBControllerNode # Class SBDControllerNode [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) *This class describes a controller node.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) ## Public Types inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | enum | [**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) *The rendering pass.* | | enum | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) *The type of the data graph node.* | ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDControllerNode**](#function-sbdcontrollernode) () *Constructor.* | | virtual [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md) \* | [**clone**](#function-clone) () override *Returns a copy of the node and its descendants.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-12) (void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) override *Performs the* `action` *on this node.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) override *Performs the* `objects` *'s*`action` *on this node.* | | [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md) \* | [**getController**](#function-getcontroller) () const *Returns the controller which owns the controller node.* | | virtual void | [**getNodes**](#function-getnodes-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual void | [**getNodes**](#function-getnodes-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](#function-gettype) () override const *Returns the type of the data graph node.* | | virtual bool | [**hasNode**](#function-hasnode-12) ([**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Checks for nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**hasNode**](#function-hasnode-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Checks for nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` *when the class is serializable.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) override const *Prints debugging information.* | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the node.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the node.* | | virtual | [**~SBDControllerNode**](#function-sbdcontrollernode) () *Destructor.* | ## Public Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-119) (SB_SBDDATAGRAPH_EXPORT, [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \*, GetProxy) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-219) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, This) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-319) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetParent) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-419) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetThis) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-519) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetNextNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-619) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetPreviousNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-719) (SB_SBDDATAGRAPH_EXPORT, [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \*, GetDocument) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-819) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetRoot) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-919) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1019) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type), GetType) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1119) (SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1219) (SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1319) (SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1419) (SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1519) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1619) (SB_SBDDATAGRAPH_EXPORT, std::string, GetName) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1719) (SB_SBDDATAGRAPH_EXPORT, std::string, GetClass) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1819) (SB_SBDDATAGRAPH_EXPORT, std::string, GetElement) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1919) (SB_SBDDATAGRAPH_EXPORT, [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md), GetElementUUID) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-132) (SB_SBDDATAGRAPH_EXPORT, All) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-232) (SB_SBDDATAGRAPH_EXPORT, None) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-332) (SB_SBDDATAGRAPH_EXPORT, IsModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-432) (SB_SBDDATAGRAPH_EXPORT, IsAtom) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-532) (SB_SBDDATAGRAPH_EXPORT, IsBond) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-632) (SB_SBDDATAGRAPH_EXPORT, IsStructuralNode) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-732) (SB_SBDDATAGRAPH_EXPORT, IsStructuralModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-832) (SB_SBDDATAGRAPH_EXPORT, IsVisualModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-932) (SB_SBDDATAGRAPH_EXPORT, IsMesh) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1032) (SB_SBDDATAGRAPH_EXPORT, IsLight) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1132) (SB_SBDDATAGRAPH_EXPORT, IsInteractionModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1232) (SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1332) (SB_SBDDATAGRAPH_EXPORT, IsPropertyModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1432) (SB_SBDDATAGRAPH_EXPORT, IsSimulator) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1532) (SB_SBDDATAGRAPH_EXPORT, IsBallAndStick) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1632) (SB_SBDDATAGRAPH_EXPORT, IsLicorice) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1732) (SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1832) (SB_SBDDATAGRAPH_EXPORT, IsCartoon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1932) (SB_SBDDATAGRAPH_EXPORT, IsRibbon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2032) (SB_SBDDATAGRAPH_EXPORT, IsTube) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2132) (SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2232) (SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2332) (SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2432) (SB_SBDDATAGRAPH_EXPORT, HasMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2532) (SB_SBDDATAGRAPH_EXPORT, OwnsMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2632) (SB_SBDDATAGRAPH_EXPORT, IsLocked) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2732) (SB_SBDDATAGRAPH_EXPORT, IsSerializable) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2832) (SB_SBDDATAGRAPH_EXPORT, IsCreated) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2932) (SB_SBDDATAGRAPH_EXPORT, IsErased) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3032) (SB_SBDDATAGRAPH_EXPORT, IsSelected) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3132) (SB_SBDDATAGRAPH_EXPORT, IsVisible) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3232) (SB_SBDDATAGRAPH_EXPORT, IsHighlighted) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-12) (SB_SBDDATAGRAPH_EXPORT, IsType, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type)) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-22) (SB_SBDDATAGRAPH_EXPORT, HasOneOf, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md)) | | virtual bool | [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) *Adds a child to the node.* | | bool | [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial) ([**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) * material) *Adds a material.* | | bool | [**baseSignalIsConnectedToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-basesignalisconnectedtoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) const *Returns* `true` *when the base signal is connected to a slot.* | | virtual bool | [**canAddChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchild) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) const *Returns whether this node can add* `node` *as a child.* | | virtual bool | [**canAddChildType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchildtype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can add a node with type* `nodeType` *as a child.* | | bool | [**canAddMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddmaterial-12) () const *Returns whether can add a material to the node based on its type.* | | virtual bool | [**canHaveDescendantType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canhavedescendanttype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can have a node with type* `nodeType` *as a descendant.* | | virtual [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) () *Returns a copy of the node and its descendants.* | | void | [**connectBaseSignalToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-connectbasesignaltoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer, [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * nextReferenceTarget=0, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) nextFunctionPointer=0) *Connects the base signal to a slot.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | void | [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create) () *Creates the node.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them.* | | void | [**disconnectBaseSignalFromSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-disconnectbasesignalfromslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) *Disconnects the base signal from a slot.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) ([**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) renderingPass) *Displays the node.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-22) () *Displays the node (deprecated)* | | virtual void | [**displayForSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforselection) () *Displays the node for selection purposes (deprecated)* | | virtual void | [**displayForShadow**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforshadow) () *Displays the node for shadowing purposes (deprecated)* | | void | [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) () *Erases the node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-12) (void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *on this node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *on this node.* | | unsigned int | [**getDefaultOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaultopacity) () const *Returns the default opacity.* | | unsigned int | [**getDefaultTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaulttransparency) () const *Returns the default transparency.* | | [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \* | [**getDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdocument) () const *Returns the document the node belongs to.* | | virtual unsigned int | [**getFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getflags) () const *Returns the flags.* | | virtual std::string | [**getHierarchyString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethierarchystring) (const std::string & separator=" / ", bool includeNodeType=false) const *Returns a string with hierarchical information on the node and its parents names.* | | bool | [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) () const *Returns the highlighting flag.* | | virtual unsigned int | [**getInheritedFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedflags) () const *Returns the inherited flags.* | | float | [**getInheritedOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedopacity) () const *Returns the cumulative opacity, when taking into account the ascendants.* | | float | [**getInheritedTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedtransparency) () const *Returns the cumulative transparency, when taking into account the ascendants.* | | virtual bool | [**getLockedFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getlockedflag) () const *Returns the locked flag.* | | [**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) \* | [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial) () const *Returns the material.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) () const *Returns the node whose material is inherited.* | | unsigned int | [**getMaximumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumopacity) () const *Returns the maximum opacity.* | | unsigned int | [**getMaximumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumtransparency) () const *Returns the maximum transparency.* | | unsigned int | [**getMinimumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumopacity) () const *Returns the minimum opacity.* | | unsigned int | [**getMinimumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumtransparency) () const *Returns the minimum transparency.* | | virtual [**SBQuantity::mass**](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-mass) | [**getMolecularWeight**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmolecularweight) () *Returns the molecular weight.* | | virtual std::string const & | [**getName**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getname) () const *Returns the name of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnextnode-12) () const *Returns the pointer to the next node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnextnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the next node with type* `nodeType` *in the children of the node's parent.* | | unsigned int | [**getNodeIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeindex) () const *Returns the node index (unique in the whole data graph, but non-persistent)* | | [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getNodeUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeuuid) () const *Returns the node UUID.* | | virtual void | [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual void | [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual unsigned int | [**getNumberOfAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofatoms) () *Returns the number of atoms.* | | virtual unsigned int | [**getNumberOfCarbons**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofcarbons) () *Returns the number of carbons.* | | virtual unsigned int | [**getNumberOfChains**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofchains) () *Returns the number of chains.* | | virtual unsigned int | [**getNumberOfCoarseGrainedAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofcoarsegrainedatoms) () *Returns the number of coarse-grained atoms.* | | virtual unsigned int | [**getNumberOfHydrogens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofhydrogens) () *Returns the number of hydrogens.* | | virtual unsigned int | [**getNumberOfMolecules**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofmolecules) () *Returns the number of molecules.* | | virtual unsigned int | [**getNumberOfNitrogens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofnitrogens) () *Returns the number of nitrogens.* | | virtual unsigned int | [**getNumberOfOtherAtoms**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofotheratoms) () *Returns the number of other atoms.* | | virtual unsigned int | [**getNumberOfOxygens**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofoxygens) () *Returns the number of oxygens.* | | virtual unsigned int | [**getNumberOfResidues**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofresidues) () *Returns the number of residues.* | | virtual unsigned int | [**getNumberOfSegments**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofsegments) () *Returns the number of segments.* | | virtual unsigned int | [**getNumberOfStructuralGroups**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofstructuralgroups) () *Returns the number of structural groups.* | | virtual unsigned int | [**getNumberOfStructuralModels**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofstructuralmodels) () *Returns the number of structural models.* | | virtual unsigned int | [**getNumberOfSulfurs**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnumberofsulfurs) () *Returns the number of sulfurs.* | | virtual unsigned int | [**getOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacity) () const *Returns the opacity.* | | unsigned int | [**getOpacitySingleStep**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacitysinglestep) () const *Returns the opacity single step.* | | std::string | [**getOpacitySuffix**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getopacitysuffix) () const *Returns the opacity suffix.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getParent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getparent) () const *Returns the parent of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getpreviousnode-12) () const *Returns the pointer to the previous node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getpreviousnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the previous node with type* `nodeType` *in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getRoot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getroot) () const *Returns the root of the hierarchy the node belongs to.* | | bool | [**getSelected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselected) () const *Returns whether the node is selected.* | | bool | [**getSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) () const *Returns the selection flag.* | | virtual int | [**getSumOfFormalCharges**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getsumofformalcharges) () *Returns the sum of formal charges.* | | virtual float | [**getSumOfPartialCharges**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getsumofpartialcharges) () *Returns the sum of partial charges.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getThisNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getthisnode) () const *Returns the pointer to this node.* | | virtual unsigned int | [**getTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparency) () const *Returns the transparency.* | | unsigned int | [**getTransparencySingleStep**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparencysinglestep) () const *Returns the transparency single step.* | | std::string | [**getTransparencySuffix**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettransparencysuffix) () const *Returns the transparency suffix.* | | virtual [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) () const *Returns the type of the data graph node.* | | std::string | [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-12) (bool humanReadable=false) const *Returns a string describing the type of the data graph node.* | | bool | [**getVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag) () const *Returns the visibility flag.* | | bool | [**getVisible**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisible) () const *Returns whether the node is visible.* | | bool | [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial) () const *Returns whether the node has a material (by itself, or inherited)* | | virtual bool | [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | bool | [**hasOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasoneof) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or is the ancestor of one of them, or is a group that stores one of them.* | | bool | [**hasOpacityRange**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasopacityrange) () const *Returns whether the node has the opacity range.* | | bool | [**hasTransparencyRange**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hastransparencyrange) () const *Returns whether the node has the transparency range.* | | bool | [**isAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isatom) () const *Returns* `true` *when the node is an atom.* | | bool | [**isBallAndStick**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isballandstick) () const *Returns* `true` *when the node is the default ball-and-stick visual model.* | | bool | [**isBond**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isbond) () const *Returns* `true` *when the node is a bond.* | | bool | [**isCartoon**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscartoon) () const *Returns* `true` *when the node is the default cartoon visual model.* | | bool | [**isCreated**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated) () const *Returns* `true` *if and only if the node is created.* | | bool | [**isDynamicalModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isdynamicalmodel) () const *Returns* `true` *when the node is a dynamical model.* | | bool | [**isErased**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iserased) () const *Returns* `true` *if and only if the node is erased.* | | bool | [**isGaussianSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isgaussiansurface) () const *Returns* `true` *when the node is the default Gaussian surface visual model.* | | bool | [**isHighlighted**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ishighlighted) () const *Returns whether the node is highlighted.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it, or belongs to a group stored in*`node` *.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them, or belongs to a group stored in one of the nodes of the*`nodeIndexer` *.* | | bool | [**isIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isin-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them, or belongs to a group stored in of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isInteractionModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isinteractionmodel) () const *Returns* `true` *when the node is a interaction model.* | | bool | [**isLicorice**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islicorice) () const *Returns* `true` *when the node is the default licorice visual model.* | | bool | [**isLight**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islight) () const *Returns* `true` *when the node is a light.* | | virtual bool | [**isLocked**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-islocked) () const *Returns whether the node is locked.* | | bool | [**isMesh**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ismesh) () const *Returns* `true` *when the node is a mesh.* | | bool | [**isModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ismodel) () const *Returns* `true` *when the node is a model.* | | bool | [**isOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isoneof-12) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *.* | | bool | [**isOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isoneof-22) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isPropertyModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ispropertymodel) () const *Returns* `true` *when the node is a property model.* | | bool | [**isRibbon**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isribbon) () const *Returns* `true` *when the node is the default ribbon visual model.* | | bool | [**isSelected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isselected) () const *Returns whether the node is selected.* | | virtual bool | [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | bool | [**isSimulator**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issimulator) () const *Returns* `true` *when the node is a simulator.* | | bool | [**isSolventAccessibleSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issolventaccessiblesurface) () const *Returns* `true` *when the node is the default solvent accessible surface visual model.* | | bool | [**isSolventExcludedSurface**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-issolventexcludedsurface) () const *Returns* `true` *when the node is the default solvent excluded surface visual model.* | | bool | [**isStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isstructuralmodel) () const *Returns* `true` *when the node is a structural model.* | | bool | [**isStructuralNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isstructuralnode) () const *Returns* `true` *when the node is a structural node.* | | bool | [**isTube**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-istube) () const *Returns* `true` *when the node is the default tube visual model.* | | bool | [**isType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-istype) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type) const *Returns* `true` *when the type of the node corresponds to*`type` *.* | | bool | [**isVanDerWaals**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvanderwaals) () const *Returns* `true` *when the node is the default van der Waals visual model.* | | bool | [**isVisible**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvisible) () const *Returns whether the node is visible.* | | bool | [**isVisualModel**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isvisualmodel) () const *Returns* `true` *when the node is a visual model.* | | bool | [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial) () const *Returns whether the node owns a material.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-print) (unsigned int offset=0) const *Prints some debugging information.* | | virtual bool | [**removeChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removechild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) *Removes a child from the node.* | | bool | [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial) () *Removes the material.* | | void | [**removeMaterialsFromDescendants**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerialsfromdescendants) () *Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself.* | | virtual void | [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the node.* | | void | [**setHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sethighlightingflag) (bool flag) *Sets the highlighting flag.* | | virtual void | [**setLockedFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setlockedflag) (bool flag) *Sets the locked flag.* | | virtual void | [**setName**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setname) (const std::string & name) *Sets the name of the node.* | | virtual void | [**setOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setopacity) (unsigned int opacity) *Sets the opacity.* | | void | [**setSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setselectionflag) (bool flag) *Sets the selection flag.* | | virtual void | [**setTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-settransparency) (unsigned int transparency) *Sets the transparency.* | | void | [**setVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setvisibilityflag) (bool flag) *Sets the visibility flag.* | | virtual void | [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the node.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Public Static Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | bool | [**canAddMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddmaterial-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) *Returns whether can add a material to a node of type* `nodeType` *.* | | void | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & sourceNodeIndexer, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & destinationNodeIndexer) *Clones the nodes in* `sourceNodeIndexer` *(treated as a whole) and places the clones in*`destinationNodeIndexer` *.* | | void | [**forEachNodeInSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodeinselection-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *for each node in*`nodeIndexer` \_\_ | | void | [**forEachNodeInSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodeinselection-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *for each node in*`nodeIndexer` \_\_ | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnode) (unsigned int nodeIndex) *Returns the unique node corresponding to the node index* `nodeIndex` *.* | | std::string | [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-22) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type, bool humanReadable=false) *Returns a string describing the type of the data graph node.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode-12) () *Builds a data graph node.* | | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode-22) (SBDDataGraphNodeData * dataPointer) *Builds a data graph node.* | | virtual | [**~SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode) () *Destroys the node.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description **Short name**: SBControllerNode ## Public Functions Documentation ### function SBDControllerNode *Constructor.* ```C++ SBDControllerNode::SBDControllerNode () ``` Constructs a new [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md). ______________________________________________________________________ ### function clone *Returns a copy of the node and its descendants.* ```C++ virtual SBDControllerNode * SBDControllerNode::clone () override ``` Creates a copy of this node and its descendants. **Returns:** Pointer to the cloned [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md). Implements [*SBDDataGraphNode::clone*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) ______________________________________________________________________ ### function forEachNodeDepthFirst [1/2] *Performs the* `action` *on this node.* ```C++ virtual void SBDControllerNode::forEachNodeDepthFirst ( void(*)( SBDDataGraphNode *node) action ) override ``` Executes the provided action on this node. **Parameters:** - `action` Function pointer that receives this node as its argument. Implements [*SBDDataGraphNode::forEachNodeDepthFirst*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-12) ______________________________________________________________________ ### function forEachNodeDepthFirst [2/2] *Performs the* `objects` *'s*`action` *on this node.* ```C++ virtual void SBDControllerNode::forEachNodeDepthFirst ( SBCClass * object, void(SBCClass::*)( SBDDataGraphNode *node) action ) override ``` Executes the provided member function on this node using the given object. **Parameters:** - `object` Pointer to the object whose member function will be invoked. - `action` Pointer to the member function to be called with this node. Implements [*SBDDataGraphNode::forEachNodeDepthFirst*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-22) ______________________________________________________________________ ### function getController *Returns the controller which owns the controller node.* ```C++ SBDController * SBDControllerNode::getController () const ``` Retrieves the controller that owns this node. **Returns:** Pointer to the parent [**SBDController**](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md). ______________________________________________________________________ ### function getNodes [1/2] *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual void SBDControllerNode::getNodes ( SBNodeIndexer & nodeIndexer, SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Collects nodes into the provided indexer based on type and selection criteria. **Parameters:** - `nodeIndexer` Indexer to receive the collected nodes. - `nodeType` The type of nodes to collect. - `selectedNodesOnly` If true, only selected nodes are collected. - `visitPredicate` Predicate that determines whether a node should be visited. - `includeDependencies` Whether to include dependent nodes (unused in this implementation). Implements [*SBDDataGraphNode::getNodes*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) ______________________________________________________________________ ### function getNodes [2/2] *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual void SBDControllerNode::getNodes ( SBNodeIndexer & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Collects nodes into the provided indexer based on selection and visit predicates. **Parameters:** - `nodeIndexer` Indexer to receive the collected nodes. - `selectionPredicate` Predicate that determines whether a node should be selected. - `visitPredicate` Predicate that determines whether a node should be visited. - `includeDependencies` Whether to include dependent nodes (unused in this implementation). Implements [*SBDDataGraphNode::getNodes*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-22) ______________________________________________________________________ ### function getType *Returns the type of the data graph node.* ```C++ virtual SBDDataGraphNode::Type SBDControllerNode::getType () override const ``` Returns the type identifier of this data graph node. **Returns:** The type value representing a controller node. Implements [*SBDDataGraphNode::getType*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) ______________________________________________________________________ ### function hasNode [1/2] *Checks for nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual bool SBDControllerNode::hasNode ( SBNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Checks if a node of the specified type exists. **Parameters:** - `nodeType` The type of node to check for. - `selectedNodesOnly` If true, only selected nodes are considered. - `visitPredicate` Predicate that determines whether a node should be visited. - `includeDependencies` Whether to include dependent nodes (unused in this implementation). **Returns:** `true` if a matching node exists; otherwise `false`. Implements [*SBDDataGraphNode::hasNode*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-12) ______________________________________________________________________ ### function hasNode [2/2] *Checks for nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual bool SBDControllerNode::hasNode ( const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) override const ``` Checks if a node satisfying the given predicates exists. **Parameters:** - `selectionPredicate` Predicate that determines whether a node should be selected. - `visitPredicate` Predicate that determines whether a node should be visited. - `includeDependencies` Whether to include dependent nodes (unused in this implementation). **Returns:** `true` if a matching node exists; otherwise `false`. Implements [*SBDDataGraphNode::hasNode*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-22) ______________________________________________________________________ ### function isSerializable *Returns* `true` *when the class is serializable.* ```C++ virtual bool SBDControllerNode::isSerializable () override const ``` Determines whether the node is serializable. **Returns:** `false` because controller nodes are not serializable. Implements [*SBDDataGraphNode::isSerializable*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable) ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ virtual void SBDControllerNode::print ( unsigned int offset=0 ) override const ``` Prints debugging information for the node. **Parameters:** - `offset` Number of tab characters to indent the output. Implements [*SBDDataGraphNode::print*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-print) ______________________________________________________________________ ### function serialize *Serializes the node.* ```C++ virtual void SBDControllerNode::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override const ``` **Parameters:** - `serializer` The serializer used to write data. - `nodeIndexer` Indexer of nodes to be serialized. - `sdkVersionNumber` The SDK version number. - `classVersionNumber` The class version number. Implements [*SBDDataGraphNode::serialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) ______________________________________________________________________ ### function unserialize *Unserializes the node.* ```C++ virtual void SBDControllerNode::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) override ``` **Parameters:** - `serializer` The serializer used to read data. - `nodeIndexer` Indexer of nodes to be unserialized. - `sdkVersionNumber` The SDK version number. - `classVersionNumber` The class version number. Implements [*SBDDataGraphNode::unserialize*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ______________________________________________________________________ ### function ~SBDControllerNode *Destructor.* ```C++ virtual SBDControllerNode::~SBDControllerNode () ``` Destroys the [**SBDControllerNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md). ______________________________________________________________________ # SBBaseEvent # Class SBDDataGraphBaseEvent [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDDataGraphBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) *This class describes a base event.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) ## Public Types | Type | Name | | ---- | --------------------------------------------------------------- | | enum | [**Type**](#enum-type) *The type of the data graph base event.* | ## Public Types inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------ | | enum | [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) *The category of the data graph event.* | ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphBaseEvent**](#function-sbddatagraphbaseevent-12) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * sender, [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/#enum-type) type) *Builds a base event.* | | virtual [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) | [**getCategory**](#function-getcategory) () const *Returns the category of the event.* | | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/#enum-type) | [**getType**](#function-gettype) () const *Returns the type of the data graph base event.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) const *Prints some debugging information.* | | virtual | [**~SBDDataGraphBaseEvent**](#function-sbddatagraphbaseevent) () *Destructor.* | ## Public Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent-22) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * sender) *Build a data graph event for the sender* `sender` *.* | | virtual [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) | [**getCategory**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategory) () const *Returns the category of the data graph event.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getSender**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getsender) () const *Returns the sender of the event.* | | virtual void | [**print**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-print) (unsigned int offset=0) const *Prints debugging information.* | | virtual | [**~SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent) () *Destructor.* | ## Public Static Functions | Type | Name | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getTypeString**](#function-gettypestring) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/#enum-type) type) *Returns a string describing the type of the data graph base event.* | ## Public Static Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ----------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getCategoryString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategorystring) ([**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) category) *Returns a string representation of the category of the data graph event.* | ## Protected Attributes inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBDDataGraphEventData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphBaseEvent**](#function-sbddatagraphbaseevent-22) (SBDDataGraphBaseEventData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBDDataGraphEvent See [SBDDataGraphEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-sbddatagraphevent-12) (SBDDataGraphEventData * dataPointer) *Protected constructor.* | ## Detailed Description **Short name**: SBBaseEvent ## Public Types Documentation ### enum Type *The type of the data graph base event.* ```C++ enum SBDDataGraphBaseEvent::Type { NodeCreated = 0, NodeEraseBegin = 1, NodeEraseEnd = 2, NodeErased = 3, NodeDeleteBegin = 4, NodeDeleteEnd = 5, NodeDeleted = 6, SelectionFlagChanged = 10, VisibilityFlagChanged = 11, HighlightingFlagChanged = 12, IndexChanged = 14, NameChanged = 15, Shown = 16, Hidden = 17, MaterialAdded = 18, MaterialRemoved = 19, MaterialChanged = 20, UUIDChanged = 21, LockedFlagChanged = 22, TransparencyChanged = 23, ShadowingFlagChanged = 24, ParentChanged = 25, SourceFileNameChanged = 40 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBDDataGraphBaseEvent [1/2] *Builds a base event.* ```C++ SBDDataGraphBaseEvent::SBDDataGraphBaseEvent ( SBDDataGraphNode * sender, Type type ) ``` Constructs a base event with the given sender node and event type. Initializes a new [**SBDDataGraphBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) instance. **Parameters:** - `sender` Pointer to the node that sends the event. - `type` The type of the base event. ______________________________________________________________________ ### function getCategory *Returns the category of the event.* ```C++ virtual Category SBDDataGraphBaseEvent::getCategory () const ``` This function returns the event category identifying it as a base event. **Returns:** The event category (BaseEvent). Implements [*SBDDataGraphEvent::getCategory*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-getcategory) ______________________________________________________________________ ### function getType *Returns the type of the data graph base event.* ```C++ Type SBDDataGraphBaseEvent::getType () const ``` Returns the type of the base event. Retrieves the specific type identifier for this base event. **Returns:** The type of the data graph base event. ______________________________________________________________________ ### function print *Prints some debugging information.* ```C++ virtual void SBDDataGraphBaseEvent::print ( unsigned int offset=0 ) const ``` Prints debugging information about the base event. The output includes the event type and sender information, indented by the specified offset. **Parameters:** - `offset` Number of tab characters to indent the output. Implements [*SBDDataGraphEvent::print*](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#function-print) ______________________________________________________________________ ### function ~SBDDataGraphBaseEvent *Destructor.* ```C++ virtual SBDDataGraphBaseEvent::~SBDDataGraphBaseEvent () ``` Destroys the base event. ______________________________________________________________________ ## Public Static Functions Documentation ### function getTypeString *Returns a string describing the type of the data graph base event.* ```C++ static std::string SBDDataGraphBaseEvent::getTypeString ( Type type ) ``` Returns a string describing the given base event type. This function returns the string representation of the base event type `type`. **Parameters:** - `type` A type of the base event. **Returns:** A string describing the base event type. ______________________________________________________________________ ## Protected Functions Documentation ### function SBDDataGraphBaseEvent [2/2] *Protected constructor.* ```C++ SBDDataGraphBaseEvent::SBDDataGraphBaseEvent ( SBDDataGraphBaseEventData * dataPointer ) ``` Constructs a base event from the given internal data pointer. This protected constructor is used internally to create an event from existing data. **Parameters:** - `dataPointer` Pointer to the internal event data. ______________________________________________________________________ # SBEvent # Class SBDDataGraphEvent [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDDataGraphEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/index.md) *This class is the base class to describe a data graph event.* [More...](#detailed-description) - `#include ` Inherited by the following classes: [SBDAssetEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDAssetEvent/index.md), [SBDControllerEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerEvent/index.md), [SBDDataGraphBaseEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md), [SBDDocumentEvent](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentEvent/index.md), [SBMDynamicalModelEvent](https://documentation.samson-connect.net/developers/latest/api/classSBMDynamicalModelEvent/index.md), [SBMInteractionModelEvent](https://documentation.samson-connect.net/developers/latest/api/classSBMInteractionModelEvent/index.md), [SBMPropertyModelEvent](https://documentation.samson-connect.net/developers/latest/api/classSBMPropertyModelEvent/index.md), [SBMStructuralModelEvent](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelEvent/index.md), [SBMVisualModelEvent](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModelEvent/index.md), [SBSSimulatorEvent](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulatorEvent/index.md), [SBSStateUpdaterEvent](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdaterEvent/index.md) ## Public Types | Type | Name | | ---- | ---------------------------------------------------------------------- | | enum | [**Category**](#enum-category) *The category of the data graph event.* | ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphEvent**](#function-sbddatagraphevent-22) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * sender) *Build a data graph event for the sender* `sender` *.* | | virtual [**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) | [**getCategory**](#function-getcategory) () const *Returns the category of the data graph event.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getSender**](#function-getsender) () const *Returns the sender of the event.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) const *Prints debugging information.* | | virtual | [**~SBDDataGraphEvent**](#function-sbddatagraphevent) () *Destructor.* | ## Public Static Functions | Type | Name | | ----------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | std::string | [**getCategoryString**](#function-getcategorystring) ([**Category**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphEvent/#enum-category) category) *Returns a string representation of the category of the data graph event.* | ## Protected Attributes | Type | Name | | ------------------------ | ------------------------------------------------------------------------- | | SBDDataGraphEventData \* | [**dataPointer**](#variable-datapointer) *A pointer to the private data.* | ## Protected Functions | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphEvent**](#function-sbddatagraphevent-12) (SBDDataGraphEventData * dataPointer) *Protected constructor.* | ## Detailed Description **Short name**: SBEvent ## Public Types Documentation ### enum Category *The category of the data graph event.* ```C++ enum SBDDataGraphEvent::Category { UndefinedEvent = 0, BaseEvent = 1, DocumentEvent = 2, StructuralEvent = 3, VisualEvent = 4, DynamicalEvent = 5, InteractionEvent = 6, PropertyEvent = 7, StateUpdaterEvent = 8, SimulatorEvent = 9, ControllerEvent = 10, AssetEvent = 11 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SBDDataGraphEvent [2/2] *Build a data graph event for the sender* `sender` *.* ```C++ SBDDataGraphEvent::SBDDataGraphEvent ( SBDDataGraphNode * sender ) ``` Constructs a data graph event with the given sender node. This constructor creates a new event and associates it with the specified sender. **Parameters:** - `sender` Pointer to the node that sends the event. ______________________________________________________________________ ### function getCategory *Returns the category of the data graph event.* ```C++ virtual Category SBDDataGraphEvent::getCategory () const ``` Returns the category of this data graph event. The category identifies the type of the event; derived classes may override this method to provide a specific category. **Returns:** The event category. ______________________________________________________________________ ### function getSender *Returns the sender of the event.* ```C++ SBDDataGraphNode * SBDDataGraphEvent::getSender () const ``` Returns the sender of this event. The sender is the node that originated the event. **Returns:** Pointer to the event sender node, or nullptr if no sender is set. ______________________________________________________________________ ### function print *Prints debugging information.* ```C++ virtual void SBDDataGraphEvent::print ( unsigned int offset=0 ) const ``` Prints debugging information for the event. The function outputs details about the event, prefixed by a number of tab characters equal to the specified offset. **Parameters:** - `offset` Number of indentation levels (tabs) to prepend to the output. ______________________________________________________________________ ### function ~SBDDataGraphEvent *Destructor.* ```C++ virtual SBDDataGraphEvent::~SBDDataGraphEvent () ``` Destroys the data graph event and releases associated resources. ______________________________________________________________________ ## Public Static Functions Documentation ### function getCategoryString *Returns a string representation of the category of the data graph event.* ```C++ static std::string SBDDataGraphEvent::getCategoryString ( Category category ) ``` Returns the string representation of the given event category. This function returns the string representation of the event's category `category`. **Parameters:** - `category` An event's category. **Returns:** String describing the category. ______________________________________________________________________ ## Protected Attributes Documentation ### variable dataPointer *A pointer to the private data.* ```C++ SBDDataGraphEventData* SBDDataGraphEvent::dataPointer; ``` ______________________________________________________________________ ## Protected Functions Documentation ### function SBDDataGraphEvent [1/2] *Protected constructor.* ```C++ SBDDataGraphEvent::SBDDataGraphEvent ( SBDDataGraphEventData * dataPointer ) ``` Constructs a data graph event from existing internal data. This constructor initializes the event using a pre-existing data object. **Parameters:** - `dataPointer` Pointer to the internal event data. ______________________________________________________________________ # SBNode # Class SBDDataGraphNode [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) *This class is the base class to describe a node in the data graph.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) Inherited by the following classes: [SBDAsset](https://documentation.samson-connect.net/developers/latest/api/classSBDAsset/index.md), [SBDController](https://documentation.samson-connect.net/developers/latest/api/classSBDController/index.md), [SBDControllerNode](https://documentation.samson-connect.net/developers/latest/api/classSBDControllerNode/index.md), [SBDDataGraphNodeGroup](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md), [SBDDocumentAnimation](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentAnimation/index.md), [SBDDocumentCamera](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentCamera/index.md), [SBDDocumentFile](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentFile/index.md), [SBDDocumentFolder](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentFolder/index.md), [SBDDocumentLabel](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentLabel/index.md), [SBDDocumentLight](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentLight/index.md), [SBDDocumentNote](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentNote/index.md), [SBDDocumentPresentation](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentPresentation/index.md), [SBDDocumentRenderPreset](https://documentation.samson-connect.net/developers/latest/api/classSBDDocumentRenderPreset/index.md), [SBMModel](https://documentation.samson-connect.net/developers/latest/api/classSBMModel/index.md), [SBMModelNode](https://documentation.samson-connect.net/developers/latest/api/classSBMModelNode/index.md), [SBMStructuralModelConformation](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelConformation/index.md), [SBMStructuralModelPath](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelPath/index.md), [SBSSimulator](https://documentation.samson-connect.net/developers/latest/api/classSBSSimulator/index.md), [SBSStateUpdater](https://documentation.samson-connect.net/developers/latest/api/classSBSStateUpdater/index.md) ## Classes | Type | Name | | ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | class | [**DescendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode_1_1DescendsFrom/index.md) *This node predicate returns* `true` *if the node descends from a given node or node indexer* | | class | [**IsIn**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode_1_1IsIn/index.md) *This node predicate returns* `true` *if the node descends from a given node or node indexer, or if the node belongs to a group stored in the given node or node indexer* | | class | [**IsOneOf**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode_1_1IsOneOf/index.md) *This node predicate returns* `true` *for nodes in a given node indexer* | ## Public Types | Type | Name | | ---- | -------------------------------------------------------------- | | enum | [**RenderingPass**](#enum-renderingpass) *The rendering pass.* | | enum | [**Type**](#enum-type) *The type of the data graph node.* | ## Public Functions | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-119) (SB_SBDDATAGRAPH_EXPORT, [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \*, GetProxy) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-219) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, This) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-319) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetParent) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-419) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetThis) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-519) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetNextNode) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-619) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetPreviousNode) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-719) (SB_SBDDATAGRAPH_EXPORT, [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \*, GetDocument) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-819) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetRoot) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-919) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1019) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type), GetType) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1119) (SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1219) (SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1319) (SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1419) (SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1519) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1619) (SB_SBDDATAGRAPH_EXPORT, std::string, GetName) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1719) (SB_SBDDATAGRAPH_EXPORT, std::string, GetClass) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1819) (SB_SBDDATAGRAPH_EXPORT, std::string, GetElement) | | | [**SB_NODE_GETTER_0**](#function-sb_node_getter_0-1919) (SB_SBDDATAGRAPH_EXPORT, [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md), GetElementUUID) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-132) (SB_SBDDATAGRAPH_EXPORT, All) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-232) (SB_SBDDATAGRAPH_EXPORT, None) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-332) (SB_SBDDATAGRAPH_EXPORT, IsModel) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-432) (SB_SBDDATAGRAPH_EXPORT, IsAtom) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-532) (SB_SBDDATAGRAPH_EXPORT, IsBond) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-632) (SB_SBDDATAGRAPH_EXPORT, IsStructuralNode) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-732) (SB_SBDDATAGRAPH_EXPORT, IsStructuralModel) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-832) (SB_SBDDATAGRAPH_EXPORT, IsVisualModel) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-932) (SB_SBDDATAGRAPH_EXPORT, IsMesh) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1032) (SB_SBDDATAGRAPH_EXPORT, IsLight) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1132) (SB_SBDDATAGRAPH_EXPORT, IsInteractionModel) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1232) (SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1332) (SB_SBDDATAGRAPH_EXPORT, IsPropertyModel) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1432) (SB_SBDDATAGRAPH_EXPORT, IsSimulator) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1532) (SB_SBDDATAGRAPH_EXPORT, IsBallAndStick) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1632) (SB_SBDDATAGRAPH_EXPORT, IsLicorice) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1732) (SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1832) (SB_SBDDATAGRAPH_EXPORT, IsCartoon) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-1932) (SB_SBDDATAGRAPH_EXPORT, IsRibbon) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2032) (SB_SBDDATAGRAPH_EXPORT, IsTube) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2132) (SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2232) (SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2332) (SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2432) (SB_SBDDATAGRAPH_EXPORT, HasMaterial) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2532) (SB_SBDDATAGRAPH_EXPORT, OwnsMaterial) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2632) (SB_SBDDATAGRAPH_EXPORT, IsLocked) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2732) (SB_SBDDATAGRAPH_EXPORT, IsSerializable) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2832) (SB_SBDDATAGRAPH_EXPORT, IsCreated) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-2932) (SB_SBDDATAGRAPH_EXPORT, IsErased) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-3032) (SB_SBDDATAGRAPH_EXPORT, IsSelected) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-3132) (SB_SBDDATAGRAPH_EXPORT, IsVisible) | | | [**SB_NODE_PREDICATE_0**](#function-sb_node_predicate_0-3232) (SB_SBDDATAGRAPH_EXPORT, IsHighlighted) | | | [**SB_NODE_PREDICATE_1**](#function-sb_node_predicate_1-12) (SB_SBDDATAGRAPH_EXPORT, IsType, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type)) | | | [**SB_NODE_PREDICATE_1**](#function-sb_node_predicate_1-22) (SB_SBDDATAGRAPH_EXPORT, HasOneOf, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md)) | | virtual bool | [**addChild**](#function-addchild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) *Adds a child to the node.* | | bool | [**addMaterial**](#function-addmaterial) ([**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) * material) *Adds a material.* | | bool | [**baseSignalIsConnectedToSlot**](#function-basesignalisconnectedtoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) const *Returns* `true` *when the base signal is connected to a slot.* | | virtual bool | [**canAddChild**](#function-canaddchild) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) const *Returns whether this node can add* `node` *as a child.* | | virtual bool | [**canAddChildType**](#function-canaddchildtype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can add a node with type* `nodeType` *as a child.* | | bool | [**canAddMaterial**](#function-canaddmaterial-12) () const *Returns whether can add a material to the node based on its type.* | | virtual bool | [**canHaveDescendantType**](#function-canhavedescendanttype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can have a node with type* `nodeType` *as a descendant.* | | virtual [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**clone**](#function-clone-12) () *Returns a copy of the node and its descendants.* | | void | [**connectBaseSignalToSlot**](#function-connectbasesignaltoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer, [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * nextReferenceTarget=0, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) nextFunctionPointer=0) *Connects the base signal to a slot.* | | unsigned int | [**countNodes**](#function-countnodes-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | unsigned int | [**countNodes**](#function-countnodes-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | void | [**create**](#function-create) () *Creates the node.* | | bool | [**descendsFrom**](#function-descendsfrom-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it.* | | bool | [**descendsFrom**](#function-descendsfrom-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them.* | | bool | [**descendsFrom**](#function-descendsfrom-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them.* | | void | [**disconnectBaseSignalFromSlot**](#function-disconnectbasesignalfromslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) *Disconnects the base signal from a slot.* | | virtual void | [**display**](#function-display-12) ([**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) renderingPass) *Displays the node.* | | virtual void | [**display**](#function-display-22) () *Displays the node (deprecated)* | | virtual void | [**displayForSelection**](#function-displayforselection) () *Displays the node for selection purposes (deprecated)* | | virtual void | [**displayForShadow**](#function-displayforshadow) () *Displays the node for shadowing purposes (deprecated)* | | void | [**erase**](#function-erase) () *Erases the node.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-12) (void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *on this node.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *on this node.* | | unsigned int | [**getDefaultOpacity**](#function-getdefaultopacity) () const *Returns the default opacity.* | | unsigned int | [**getDefaultTransparency**](#function-getdefaulttransparency) () const *Returns the default transparency.* | | [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \* | [**getDocument**](#function-getdocument) () const *Returns the document the node belongs to.* | | virtual unsigned int | [**getFlags**](#function-getflags) () const *Returns the flags.* | | virtual std::string | [**getHierarchyString**](#function-gethierarchystring) (const std::string & separator=" / ", bool includeNodeType=false) const *Returns a string with hierarchical information on the node and its parents names.* | | bool | [**getHighlightingFlag**](#function-gethighlightingflag) () const *Returns the highlighting flag.* | | virtual unsigned int | [**getInheritedFlags**](#function-getinheritedflags) () const *Returns the inherited flags.* | | float | [**getInheritedOpacity**](#function-getinheritedopacity) () const *Returns the cumulative opacity, when taking into account the ascendants.* | | float | [**getInheritedTransparency**](#function-getinheritedtransparency) () const *Returns the cumulative transparency, when taking into account the ascendants.* | | virtual bool | [**getLockedFlag**](#function-getlockedflag) () const *Returns the locked flag.* | | [**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) \* | [**getMaterial**](#function-getmaterial) () const *Returns the material.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getMaterialOwner**](#function-getmaterialowner) () const *Returns the node whose material is inherited.* | | unsigned int | [**getMaximumOpacity**](#function-getmaximumopacity) () const *Returns the maximum opacity.* | | unsigned int | [**getMaximumTransparency**](#function-getmaximumtransparency) () const *Returns the maximum transparency.* | | unsigned int | [**getMinimumOpacity**](#function-getminimumopacity) () const *Returns the minimum opacity.* | | unsigned int | [**getMinimumTransparency**](#function-getminimumtransparency) () const *Returns the minimum transparency.* | | virtual [**SBQuantity::mass**](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-mass) | [**getMolecularWeight**](#function-getmolecularweight) () *Returns the molecular weight.* | | virtual std::string const & | [**getName**](#function-getname) () const *Returns the name of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](#function-getnextnode-12) () const *Returns the pointer to the next node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](#function-getnextnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the next node with type* `nodeType` *in the children of the node's parent.* | | unsigned int | [**getNodeIndex**](#function-getnodeindex) () const *Returns the node index (unique in the whole data graph, but non-persistent)* | | [**SBUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md) | [**getNodeUUID**](#function-getnodeuuid) () const *Returns the node UUID.* | | virtual void | [**getNodes**](#function-getnodes-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual void | [**getNodes**](#function-getnodes-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual unsigned int | [**getNumberOfAtoms**](#function-getnumberofatoms) () *Returns the number of atoms.* | | virtual unsigned int | [**getNumberOfCarbons**](#function-getnumberofcarbons) () *Returns the number of carbons.* | | virtual unsigned int | [**getNumberOfChains**](#function-getnumberofchains) () *Returns the number of chains.* | | virtual unsigned int | [**getNumberOfCoarseGrainedAtoms**](#function-getnumberofcoarsegrainedatoms) () *Returns the number of coarse-grained atoms.* | | virtual unsigned int | [**getNumberOfHydrogens**](#function-getnumberofhydrogens) () *Returns the number of hydrogens.* | | virtual unsigned int | [**getNumberOfMolecules**](#function-getnumberofmolecules) () *Returns the number of molecules.* | | virtual unsigned int | [**getNumberOfNitrogens**](#function-getnumberofnitrogens) () *Returns the number of nitrogens.* | | virtual unsigned int | [**getNumberOfOtherAtoms**](#function-getnumberofotheratoms) () *Returns the number of other atoms.* | | virtual unsigned int | [**getNumberOfOxygens**](#function-getnumberofoxygens) () *Returns the number of oxygens.* | | virtual unsigned int | [**getNumberOfResidues**](#function-getnumberofresidues) () *Returns the number of residues.* | | virtual unsigned int | [**getNumberOfSegments**](#function-getnumberofsegments) () *Returns the number of segments.* | | virtual unsigned int | [**getNumberOfStructuralGroups**](#function-getnumberofstructuralgroups) () *Returns the number of structural groups.* | | virtual unsigned int | [**getNumberOfStructuralModels**](#function-getnumberofstructuralmodels) () *Returns the number of structural models.* | | virtual unsigned int | [**getNumberOfSulfurs**](#function-getnumberofsulfurs) () *Returns the number of sulfurs.* | | virtual unsigned int | [**getOpacity**](#function-getopacity) () const *Returns the opacity.* | | unsigned int | [**getOpacitySingleStep**](#function-getopacitysinglestep) () const *Returns the opacity single step.* | | std::string | [**getOpacitySuffix**](#function-getopacitysuffix) () const *Returns the opacity suffix.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getParent**](#function-getparent) () const *Returns the parent of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](#function-getpreviousnode-12) () const *Returns the pointer to the previous node in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getPreviousNode**](#function-getpreviousnode-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns the pointer to the previous node with type* `nodeType` *in the children of the node's parent.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getRoot**](#function-getroot) () const *Returns the root of the hierarchy the node belongs to.* | | bool | [**getSelected**](#function-getselected) () const *Returns whether the node is selected.* | | bool | [**getSelectionFlag**](#function-getselectionflag) () const *Returns the selection flag.* | | virtual int | [**getSumOfFormalCharges**](#function-getsumofformalcharges) () *Returns the sum of formal charges.* | | virtual float | [**getSumOfPartialCharges**](#function-getsumofpartialcharges) () *Returns the sum of partial charges.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getThisNode**](#function-getthisnode) () const *Returns the pointer to this node.* | | virtual unsigned int | [**getTransparency**](#function-gettransparency) () const *Returns the transparency.* | | unsigned int | [**getTransparencySingleStep**](#function-gettransparencysinglestep) () const *Returns the transparency single step.* | | std::string | [**getTransparencySuffix**](#function-gettransparencysuffix) () const *Returns the transparency suffix.* | | virtual [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](#function-gettype) () const *Returns the type of the data graph node.* | | std::string | [**getTypeString**](#function-gettypestring-12) (bool humanReadable=false) const *Returns a string describing the type of the data graph node.* | | bool | [**getVisibilityFlag**](#function-getvisibilityflag) () const *Returns the visibility flag.* | | bool | [**getVisible**](#function-getvisible) () const *Returns whether the node is visible.* | | bool | [**hasMaterial**](#function-hasmaterial) () const *Returns whether the node has a material (by itself, or inherited)* | | virtual bool | [**hasNode**](#function-hasnode-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**hasNode**](#function-hasnode-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Returns whether the node has nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | bool | [**hasOneOf**](#function-hasoneof) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or is the ancestor of one of them, or is a group that stores one of them.* | | bool | [**hasOpacityRange**](#function-hasopacityrange) () const *Returns whether the node has the opacity range.* | | bool | [**hasTransparencyRange**](#function-hastransparencyrange) () const *Returns whether the node has the transparency range.* | | bool | [**isAtom**](#function-isatom) () const *Returns* `true` *when the node is an atom.* | | bool | [**isBallAndStick**](#function-isballandstick) () const *Returns* `true` *when the node is the default ball-and-stick visual model.* | | bool | [**isBond**](#function-isbond) () const *Returns* `true` *when the node is a bond.* | | bool | [**isCartoon**](#function-iscartoon) () const *Returns* `true` *when the node is the default cartoon visual model.* | | bool | [**isCreated**](#function-iscreated) () const *Returns* `true` *if and only if the node is created.* | | bool | [**isDynamicalModel**](#function-isdynamicalmodel) () const *Returns* `true` *when the node is a dynamical model.* | | bool | [**isErased**](#function-iserased) () const *Returns* `true` *if and only if the node is erased.* | | bool | [**isGaussianSurface**](#function-isgaussiansurface) () const *Returns* `true` *when the node is the default Gaussian surface visual model.* | | bool | [**isHighlighted**](#function-ishighlighted) () const *Returns whether the node is highlighted.* | | bool | [**isIn**](#function-isin-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it, or belongs to a group stored in*`node` *.* | | bool | [**isIn**](#function-isin-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them, or belongs to a group stored in one of the nodes of the*`nodeIndexer` *.* | | bool | [**isIn**](#function-isin-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them, or belongs to a group stored in of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isInteractionModel**](#function-isinteractionmodel) () const *Returns* `true` *when the node is a interaction model.* | | bool | [**isLicorice**](#function-islicorice) () const *Returns* `true` *when the node is the default licorice visual model.* | | bool | [**isLight**](#function-islight) () const *Returns* `true` *when the node is a light.* | | virtual bool | [**isLocked**](#function-islocked) () const *Returns whether the node is locked.* | | bool | [**isMesh**](#function-ismesh) () const *Returns* `true` *when the node is a mesh.* | | bool | [**isModel**](#function-ismodel) () const *Returns* `true` *when the node is a model.* | | bool | [**isOneOf**](#function-isoneof-12) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *.* | | bool | [**isOneOf**](#function-isoneof-22) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *.* | | bool | [**isPropertyModel**](#function-ispropertymodel) () const *Returns* `true` *when the node is a property model.* | | bool | [**isRibbon**](#function-isribbon) () const *Returns* `true` *when the node is the default ribbon visual model.* | | bool | [**isSelected**](#function-isselected) () const *Returns whether the node is selected.* | | virtual bool | [**isSerializable**](#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | bool | [**isSimulator**](#function-issimulator) () const *Returns* `true` *when the node is a simulator.* | | bool | [**isSolventAccessibleSurface**](#function-issolventaccessiblesurface) () const *Returns* `true` *when the node is the default solvent accessible surface visual model.* | | bool | [**isSolventExcludedSurface**](#function-issolventexcludedsurface) () const *Returns* `true` *when the node is the default solvent excluded surface visual model.* | | bool | [**isStructuralModel**](#function-isstructuralmodel) () const *Returns* `true` *when the node is a structural model.* | | bool | [**isStructuralNode**](#function-isstructuralnode) () const *Returns* `true` *when the node is a structural node.* | | bool | [**isTube**](#function-istube) () const *Returns* `true` *when the node is the default tube visual model.* | | bool | [**isType**](#function-istype) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type) const *Returns* `true` *when the type of the node corresponds to*`type` *.* | | bool | [**isVanDerWaals**](#function-isvanderwaals) () const *Returns* `true` *when the node is the default van der Waals visual model.* | | bool | [**isVisible**](#function-isvisible) () const *Returns whether the node is visible.* | | bool | [**isVisualModel**](#function-isvisualmodel) () const *Returns* `true` *when the node is a visual model.* | | bool | [**ownsMaterial**](#function-ownsmaterial) () const *Returns whether the node owns a material.* | | virtual void | [**print**](#function-print) (unsigned int offset=0) const *Prints some debugging information.* | | virtual bool | [**removeChild**](#function-removechild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) *Removes a child from the node.* | | bool | [**removeMaterial**](#function-removematerial) () *Removes the material.* | | void | [**removeMaterialsFromDescendants**](#function-removematerialsfromdescendants) () *Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself.* | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the node.* | | void | [**setHighlightingFlag**](#function-sethighlightingflag) (bool flag) *Sets the highlighting flag.* | | virtual void | [**setLockedFlag**](#function-setlockedflag) (bool flag) *Sets the locked flag.* | | virtual void | [**setName**](#function-setname) (const std::string & name) *Sets the name of the node.* | | virtual void | [**setOpacity**](#function-setopacity) (unsigned int opacity) *Sets the opacity.* | | void | [**setSelectionFlag**](#function-setselectionflag) (bool flag) *Sets the selection flag.* | | virtual void | [**setTransparency**](#function-settransparency) (unsigned int transparency) *Sets the transparency.* | | void | [**setVisibilityFlag**](#function-setvisibilityflag) (bool flag) *Sets the visibility flag.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the node.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Public Static Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | bool | [**canAddMaterial**](#function-canaddmaterial-22) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) *Returns whether can add a material to a node of type* `nodeType` *.* | | void | [**clone**](#function-clone-22) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & sourceNodeIndexer, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & destinationNodeIndexer) *Clones the nodes in* `sourceNodeIndexer` *(treated as a whole) and places the clones in*`destinationNodeIndexer` *.* | | void | [**forEachNodeInSelection**](#function-foreachnodeinselection-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *for each node in*`nodeIndexer` \_\_ | | void | [**forEachNodeInSelection**](#function-foreachnodeinselection-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *for each node in*`nodeIndexer` \_\_ | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNode**](#function-getnode) (unsigned int nodeIndex) *Returns the unique node corresponding to the node index* `nodeIndex` *.* | | std::string | [**getTypeString**](#function-gettypestring-22) ([**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) type, bool humanReadable=false) *Returns a string describing the type of the data graph node.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions | Type | Name | | ------- | ---------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNode**](#function-sbddatagraphnode-12) () *Builds a data graph node.* | | | [**SBDDataGraphNode**](#function-sbddatagraphnode-22) (SBDDataGraphNodeData * dataPointer) *Builds a data graph node.* | | virtual | [**~SBDDataGraphNode**](#function-sbddatagraphnode) () *Destroys the node.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description The data graph contains everything directly or indirectly added by the user through SAMSON's user interface, plugins, etc. A data graph node has basic pre-defined data and functionalities to manage the data (models, apps, etc.). All nodes in SAMSON's data graph, e.g. atoms ([**SBAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md)), bonds ([**SBBond**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeBond/index.md)), etc., derive from [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md). The figure below shows the *document view*, which is a view of SAMSON's data graph structure. **Short name**: SBNode ## Topology SAMSON's data graph is a directed graph, where each node has one and only one parent (with the exception of [**documents**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md), which have no parent), and possibly some children. The parent of a node can never be directly set, but can be retrieved using the [**getParent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getparent) function. Children are managed using the [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) and [**removeChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removechild) functions. ## Node lifecycle In SAMSON, a data graph node may go through four *lifecycle stages*: - C++ object creation (e.g. with a `new` operator) - Node creation (using the [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create) function) - Node destruction (using the [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) function) - C++ object destruction (usually automatically, or forced with a call to [**deleteReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceOwnerSingleton/#function-deletereferencetarget)) As [**reference targets**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md), data graph nodes should not be destructed using the `delete` operator, because objects that are referencing them need to stop doing so before the node is deleted. Thus, when a node needs to be deleted (in the C++ sense), a SAMSON pointer (see [References](https://documentation.samson-connect.net/developers/latest/referencing/index.md)) must be used: ```C++ SBPointer nodePointer = new SBAtom(); // ... // remove all references to the atom, and delete it nodePointer.deleteReferenceTarget(); ``` **See also:** [References](https://documentation.samson-connect.net/developers/latest/referencing/index.md), [MemoryManagement](https://documentation.samson-connect.net/developers/latest/memory-management/index.md) ## Node identity Each node in the data graph has a *type*, which may be retrieved using the [**getType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) function. For example, the type returned by the [**SBAtom**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/index.md) class, which derives from the [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) class, is SBNode::Atom, while the type returned by the [**SBStructuralModel**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModel/index.md) class is SBNode::StructuralModel. The [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-12) function is a convenience function that may be used to obtain a type as a string. Types may be used, for example, to rapidly search the data graph: ```C++ // Find all atoms SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::Atom); ``` Each data graph node also has a unique index, that is managed internally by SAMSON. All indices are contiguous unsigned integers between `0` and `n-1`, where `n` is the number of data graph nodes. As a result, the node index is not permanent: when node `i` is deleted (and `i` is different from `n-1`), then node `n-1` becomes node `i`. Node indices are used for example when picking objects in a viewport, by writing integers into the framebuffer instead of colors. The unique node index can be retrieved using [**getNodeIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeindex). **See also:** [**getType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype), [**getTypeString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettypestring-12), [**getNodeIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeindex) ## Flags Each data graph node has four flags: - The created flag indicates whether the node is created or not (see Node lifecycle) - The visibility flag indicates whether the renderer should display the node in the viewport - The highlighting indicates whether the renderer should highlight the node in the viewport - The selection flag indicates whether the node is [**selected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) or not These flags are accessed through functions of [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) and, except for the highlighting flag which has temporary purposes, changing these flags' values is [undoable](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md) . The [**getFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getflags) function returns an `unsigned int` that combines the highlighting and selection flags. **See also:** [**isCreated**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated), [**getVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag), [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag), [**getSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) ## Materials and color schemes Each data graph node may have a [**material**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md), which may affect its rendering in the viewport. A material may be applied to a node with the [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial) function. When a material is added to a node, it affects the node itself and all its descendants (unless they have a material themselves, which then has priority). Precisely, the [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial) function returns the material directly applied to the node (if the [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial) function was called), or determines the deepest ancestor that has a material applied (by examining the node's parent, then its parent's parent, etc.). If no material is found, the [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial) function returns 0. Each material has a [**color scheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) which may be modified and used to associate a color to a node or a spatial position. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md), [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) **See also:** [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial) ## Node predicates The [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) class defines a series of node predicates, i.e. functors that may be used to e.g. collect nodes in the data graph. For example, the SBNode::IsType predicate may be used to collect nodes by type: ```C++ // Find all atoms SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode:IsType(SBNode::Atom)); ``` and the SBNode::IsSelected predicate may be used to collect all nodes that are selected (directly, because their [**selection flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) is `true`, or because one of their ancestors is selected): ```C++ // Find all selected nodes SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode:IsSelected()); ``` Predicates may be combined through logical operations. For example, collecting selected atoms may be achieved with: ```C++ // Find all selected nodes SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsAtom() && SBNode:IsSelected()); ``` Please refer to [Functors](https://documentation.samson-connect.net/developers/latest/functors/index.md) for more information. **See also:** [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) **See also:** [Functors](https://documentation.samson-connect.net/developers/latest/functors/index.md) ## Node getters The [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) class also defines a series of [**node getters**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md), i.e. functors that may be used to collect nodes in the data graph. For example, the SBNode::GetType getter may be used to retrieve the type of a node instead of through the [**getType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) function: ```C++ // Get the type of a node SBPointer nodePointer = new SBAtom(); SBNode::GetType()(nodePointer()); // returns SBNode::Atom ``` [**Node getters**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md) may be used to construct node predicates through comparison operators, so that collecting all atoms may also be achieved with: ```C++ // Find all atoms SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::GetType() == SBNode::Atom); ``` since the statement `SBNode::GetType() == SBNode::Atom` constructs a node predicate that is passed to the [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) function. In general, node getters have the same name as the corresponding getter function, but the first letter of their name is capitalized, since they are classes. For example, just like the SBNode::GetType getter corresponds to the [**SBNode::getType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gettype) function, the SBAtom::GetTemperatureFactor getter corresponds to the [**SBAtom::getTemperatureFactor**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeAtom/#function-gettemperaturefactor) function. Node predicates and [**node getters**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md) may be used to collect nodes from potentially complex rules: ```C++ // Find all selected atoms with a large enough temperature factor SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::IsSelected() && SBNode::IsAtom() && (SBAtom::GetTemperatureFactor() > 2.0)); ``` Node predicates and [**node getters**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md) constitute the foundation of SAMSON's [NSL](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md). **See also:** [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) **See also:** [Functors](https://documentation.samson-connect.net/developers/latest/functors/index.md), [NSL](https://documentation.samson-connect.net/developers/latest/node-specification-language/index.md) ## Serialization Data graph nodes support *serialization* through the [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) and [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) functions. Serialization is used in SAMSON to e.g. copy, paste, save, load, etc. data graph nodes. Please refer to [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) for more information. ## Public Types Documentation ### enum RenderingPass *The rendering pass.* ```C++ enum SBDDataGraphNode::RenderingPass { Setup = 10, OpaqueGeometry = 20, SelectableGeometry = 30, ShadowingGeometry = 40, TransparentGeometry = 50, Interface = 60, Text = 70 }; ``` ______________________________________________________________________ ### enum Type *The type of the data graph node.* ```C++ enum SBDDataGraphNode::Type { Undefined = 0, StructuralModel = 1, StructuralModelNode = 2, StructuralModelConformation = 28, Conformation = 28, StructuralModelPath = 29, Path = 29, StructuralModelNodeGroup = 200, StructuralGroup = 200, StructuralModelNodeRoot = 20000, Root = 20000, StructuralModelNodeAtom = 20100, Atom = 20100, StructuralModelNodeBond = 202, Bond = 202, StructuralModelNodeHydrogenBond = 20202, HydrogenBond = 20202, StructuralModelNodeHydrogenBondGroup = 20203, HydrogenBondGroup = 20203, StructuralModelNodeResidue = 204, Residue = 204, StructuralModelNodeSegment = 205, Segment = 205, StructuralModelNodeChain = 207, Chain = 207, StructuralModelNodeMolecule = 208, Molecule = 208, StructuralModelNodeBackbone = 209, Backbone = 209, StructuralModelNodeSideChain = 210, SideChain = 210, VisualModel = 3, VisualModelMesh = 300, Mesh = 300, DynamicalModel = 5, DynamicalModelParticleSystem = 500, ParticleSystem = 500, DynamicalModelRigidBodySystem = 501, RigidBodySystem = 501, DynamicalModelArticulatedBodySystem = 502, ArticulatedBodySystem = 502, DynamicalModelNode = 6, DynamicalNode = 6, DynamicalModelNodeGroup = 600, DynamicalGroup = 600, DynamicalModelNodeRoot = 60000, DynamicalRoot = 60000, DynamicalModelNodeParticle = 601, Particle = 601, DynamicalModelNodeRigidBody = 602, RigidBody = 602, DynamicalModelNodeArticulatedBody = 603, ArticulatedBody = 603, InteractionModel = 7, InteractionModelParticleSystem = 700, InteractionModelRigidBodySystem = 701, InteractionModelArticulatedBodySystem = 702, PropertyModel = 9, PropertyModelFunction = 900, Simulator = 11, SimulatorParticleSystem = 1100, SimulatorRigidBodySystem = 1101, SimulatorArticulatedBodySystem = 1102, StateUpdater = 15, StateUpdaterParticleSystem = 1501, StateUpdaterRigidBodySystem = 1502, StateUpdaterArticulatedBodySystem = 1503, Animation = 800, Camera = 801, Document = 802, DocumentManager = 803, File = 804, Folder = 805, Label = 806, Light = 807, Note = 808, Presentation = 809, RenderPreset = 810, DataGraphNodeGroup = 30, NodeGroup = 30, Controller = 40, ControllerNode = 41, Asset = 50 }; ``` ______________________________________________________________________ ## Public Functions Documentation ### function SB_NODE_GETTER_0 [1/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBCClassProxy *, GetProxy ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [2/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, This ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [3/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetParent ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [4/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetThis ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [5/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetNextNode ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [6/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetPreviousNode ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [7/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDocument *, GetDocument ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [8/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode *, GetRoot ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [9/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [10/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBDDataGraphNode::Type, GetType ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [11/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [12/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [13/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [14/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [15/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [16/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, std::string, GetName ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [17/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, std::string, GetClass ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [18/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, std::string, GetElement ) ``` ______________________________________________________________________ ### function SB_NODE_GETTER_0 [19/19] ```C++ SBDDataGraphNode::SB_NODE_GETTER_0 ( SB_SBDDATAGRAPH_EXPORT, SBCContainerUUID, GetElementUUID ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [1/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, All ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [2/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, None ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [3/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsModel ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [4/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsAtom ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [5/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsBond ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [6/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsStructuralNode ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [7/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsStructuralModel ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [8/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsVisualModel ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [9/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsMesh ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [10/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsLight ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [11/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsInteractionModel ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [12/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [13/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsPropertyModel ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [14/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsSimulator ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [15/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsBallAndStick ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [16/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsLicorice ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [17/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [18/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsCartoon ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [19/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsRibbon ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [20/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsTube ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [21/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [22/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [23/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [24/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, HasMaterial ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [25/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, OwnsMaterial ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [26/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsLocked ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [27/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsSerializable ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [28/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsCreated ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [29/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsErased ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [30/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsSelected ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [31/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsVisible ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_0 [32/32] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_0 ( SB_SBDDATAGRAPH_EXPORT, IsHighlighted ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_1 [1/2] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_1 ( SB_SBDDATAGRAPH_EXPORT, IsType, SBDDataGraphNode::Type ) ``` ______________________________________________________________________ ### function SB_NODE_PREDICATE_1 [2/2] ```C++ SBDDataGraphNode::SB_NODE_PREDICATE_1 ( SB_SBDDATAGRAPH_EXPORT, HasOneOf, SBNodeIndexer ) ``` ______________________________________________________________________ ### function addChild *Adds a child to the node.* ```C++ virtual bool SBDDataGraphNode::addChild ( SBDDataGraphNode * node, SBDDataGraphNode * nextNode=nullptr ) ``` Adds a child node to this node. **Parameters:** - `node` A pointer to the child that should be added - `nextNode` A pointer to the node before which the child should be added **Returns:** `true` if the child was added successfully This function adds `node` as a child of this node, immediately before node `nextNode`. By default, `nextNode` is 0 and the child is added at the end of the list of this node's children. This function is reimplemented in derived classes. When developing new data graph nodes types, with custom children management, this convention should be respected if it makes sense for the custom node, and the reimplemented function should be [undoable](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md) . "This function is \undoable. **See also:** [**removeChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removechild) ______________________________________________________________________ ### function addMaterial *Adds a material.* ```C++ bool SBDDataGraphNode::addMaterial ( SBDDataGraphNodeMaterial * material ) ``` Adds a material to this node. This function adds a material to the node. A node may have at most one material, and a material may be applied to at most one node. The function returns `true` when the material is successfully added. **Parameters:** - `material` Pointer to the material to add. **Returns:** `true` if the material was successfully added, `false` otherwise. Please see [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) for more information "This function is \undoable. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial), [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) ______________________________________________________________________ ### function baseSignalIsConnectedToSlot *Returns* `true` *when the base signal is connected to a slot.* ```C++ bool SBDDataGraphNode::baseSignalIsConnectedToSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBBaseEvent *) functionPointer ) const ``` Checks whether the node's base signal is connected to a specific slot. **Parameters:** - `referenceTarget` Pointer to the reference target. - `functionPointer` Pointer to the reference target's member function to check. **Returns:** `true` if the slot is connected, `false` otherwise. ______________________________________________________________________ ### function canAddChild *Returns whether this node can add* `node` *as a child.* ```C++ virtual bool SBDDataGraphNode::canAddChild ( const SBDDataGraphNode * node, const SBDDataGraphNode * nextNode=nullptr ) const ``` Determines whether a node can be added as a child of this node. **Parameters:** - `node` A pointer to a potential child - `nextNode` A pointer to the node before which the child should be added **Returns:** A boolean that indicates whether `node` can be added as a child of this node, immediately before node `nextNode`. **See also:** [**canAddChildType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchildtype), [**canHaveDescendantType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canhavedescendanttype), [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ______________________________________________________________________ ### function canAddChildType *Returns whether this node can add a node with type* `nodeType` *as a child.* ```C++ virtual bool SBDDataGraphNode::canAddChildType ( SBDDataGraphNode::Type nodeType ) const ``` Determines whether a child of the given type can be added to this node. **Parameters:** - `nodeType` A node type **Returns:** A boolean that indicates whether a node with type `nodeType` can be added as a child of this node. **See also:** [**canAddChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchild), [**canHaveDescendantType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canhavedescendanttype), [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ______________________________________________________________________ ### function canAddMaterial [1/2] *Returns whether can add a material to the node based on its type.* ```C++ bool SBDDataGraphNode::canAddMaterial () const ``` Determines whether this node can have a material. This function returns whether it is possible to add a material to this node based on its node type. Not all nodes can have materials, i.e. can be colorized, - this is the case for e.g. SBNode::Animation, SBNode::Camera, SBNode::Path, etc. **Returns:** `true` if a material can be added to this node, `false` otherwise. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial), [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) ______________________________________________________________________ ### function canHaveDescendantType *Returns whether this node can have a node with type* `nodeType` *as a descendant.* ```C++ virtual bool SBDDataGraphNode::canHaveDescendantType ( SBDDataGraphNode::Type nodeType ) const ``` Determines whether a node of the given type can be a descendant of this node. **Parameters:** - `nodeType` A node type **Returns:** A boolean that indicates whether a node with type `nodeType` can be added as a descendant of this node. **See also:** [**canAddChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchild), [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ______________________________________________________________________ ### function clone [1/2] *Returns a copy of the node and its descendants.* ```C++ virtual SBDDataGraphNode * SBDDataGraphNode::clone () ``` This function returns a copy of the node and its descendants. In case the copy cannot be performed (for example if some nodes in the hierarchy have not been exposed through SAMSON's [Introspection](https://documentation.samson-connect.net/developers/latest/introspection/index.md)), the function returns nullptr. Note that the [**highlighting flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag), the [**selection flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag), and the [**created flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated) are not cloned. As a result, a clone must be [**created**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create) before insertion in the document: ```C++ SBNode* clone = node->clone(); if (clone) { SAMSON::beginHolding("Add clone"); SAMSON::hold(clone); // hold the clone in memory clone->create(); // mark the clone as created node->getParent()->addChild(clone); // add the clone as a sibling SAMSON::endHolding(); } ``` Finally, note that cloning assumes that the [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) and [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) functions have been implemented for each cloned node. **See also:** [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) ______________________________________________________________________ ### function connectBaseSignalToSlot *Connects the base signal to a slot.* ```C++ void SBDDataGraphNode::connectBaseSignalToSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBBaseEvent *) functionPointer, SBCReferenceTarget * nextReferenceTarget=0, void(SBCReferenceTarget::*)( SBBaseEvent *) nextFunctionPointer=0 ) ``` Connects the node's base signal to a slot. **Parameters:** - `referenceTarget` A pointer to the reference target that will receives the signal - `functionPointer` A pointer to the reference target's member function that will be called when the node's base signal is emitted - `nextReferenceTarget` A pointer to the next reference target; null by default - `nextFunctionPointer` A pointer to the next reference target's member function; null by default This function connects the node's base signal to a slot. Please refer to [Signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md) for more information. "This function is \undoable. **See also:** [**disconnectBaseSignalFromSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-disconnectbasesignalfromslot), [**baseSignalIsConnectedToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-basesignalisconnectedtoslot) ______________________________________________________________________ ### function countNodes [1/2] *Counts nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* ```C++ unsigned int SBDDataGraphNode::countNodes ( SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) const ``` Counts nodes of a given type in the sub‑tree, optionally including dependencies. This function traverses the sub‑tree for which `visitPredicate` is `true` (depth‑first), and counts the nodes for which the `selectionPredicate` is `true`. Precisely, if the `visitPredicate` returns `false`, a node is not visited, and neither are its descendants. If the `visitPredicate` returns `true`, the node is visited, and the `visitPredicate` will be used to decide whether its children are visited or not. When `includeDependencies` is `true`, the function also counts nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a [**bond**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeBond/index.md), the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the `nodeType`, `selectedNodesOnly`, and `visitPredicate`, they are counted if `includeDependencies` is `true`. Among the node types defined in the SAMSON SDK, four have dependencies that are not children: - [**Bonds**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeBond/index.md): the left and right atom - [**Conformations**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelConformation/index.md): the atoms whose positions are stored in the conformation - [**Groups**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md): the nodes belonging to the group - [**Paths**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelPath/index.md): the atoms whose positions are stored in the path Some SAMSON Extensions may define nodes that have non‑child dependencies. For example, a [**visual model**](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModel/index.md) that references atoms should reimplement the [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) function to add these dependencies to the `nodeIndexer`. See [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) for more information and examples. This function is a convenience function that internally calls [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12). **Parameters:** - `nodeType` [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) of nodes to count. - `selectedNodesOnly` If `true`, only selected nodes are counted. - `visitPredicate` Predicate that determines which nodes are visited. - `includeDependencies` If `true`, also counts dependency nodes. **Returns:** Number of nodes counted. **See also:** [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12), [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-12) ______________________________________________________________________ ### function countNodes [2/2] *Counts nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* ```C++ unsigned int SBDDataGraphNode::countNodes ( const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) const ``` Counts nodes matching a selection predicate in the sub‑tree, optionally including dependencies. This function traverses the sub‑tree for which `visitPredicate` is `true` (depth‑first), and counts the nodes for which the `selectionPredicate` is `true`. Precisely, if the `visitPredicate` returns `false`, a node is not visited, and neither are its descendants. If the `visitPredicate` returns `true`, the node is visited, and the `visitPredicate` will be used to decide whether its children are visited or not. When `includeDependencies` is `true`, the function also counts nodes that are not descendants of this node, but are dependencies nonetheless. For example, in a [**bond**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeBond/index.md), the two atoms connected by the bond are not children of the bond, but are still dependencies of the bond. Hence, provided they satisfy the `selectionPredicate` and `visitPredicate`, they are counted if `includeDependencies` is `true`. Among the node types defined in the SAMSON SDK, four have dependencies that are not children: - [**Bonds**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelNodeBond/index.md): the left and right atom - [**Conformations**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelConformation/index.md): the atoms whose positions are stored in the conformation - [**Groups**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md): the nodes belonging to the group - [**Paths**](https://documentation.samson-connect.net/developers/latest/api/classSBMStructuralModelPath/index.md): the atoms whose positions are stored in the path Some SAMSON Extensions may define nodes that have non‑child dependencies. For example, a [**visual model**](https://documentation.samson-connect.net/developers/latest/api/classSBMVisualModel/index.md) that references atoms should reimplement the [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) function to add these dependencies to the `nodeIndexer`. See [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12) for more information and examples. This function is a convenience function that internally calls [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12). **Parameters:** - `selectionPredicate` Predicate that selects nodes to be counted. - `visitPredicate` Predicate that determines which nodes are visited. - `includeDependencies` If `true`, also counts dependency nodes. **Returns:** Number of nodes counted. **See also:** [**getNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodes-12), [**hasNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasnode-12) ______________________________________________________________________ ### function create *Creates the node.* ```C++ void SBDDataGraphNode::create () ``` Creates the node and all its descendants, marking them as created. This function creates the node and all its descendants, i.e. sets their created flag to `true`. Nodes which were not already created send the event SBEvent::NodeCreated. The created flag indicates whether the node is created or not, from SAMSON's point of view (as opposed to C++ object creation and destruction). For more information, please refer to section Node lifecycle. **See also:** [**isCreated**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated), [**isErased**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iserased), [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create), [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) **See also:** Node lifecycle **See also:** [Signals and slots](https://documentation.samson-connect.net/developers/latest/signals-and-slots/index.md) "This function is \undoable. ______________________________________________________________________ ### function descendsFrom [1/3] *Returns* `true` *if and only if this node is*`node` *, or descends from it.* ```C++ bool SBDDataGraphNode::descendsFrom ( const SBDDataGraphNode * node ) const ``` Checks whether this node is the given node or descends from it. **Parameters:** - `node` The node to test against. **Returns:** `true` if this node is the given node or a descendant. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function descendsFrom [2/3] *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them.* ```C++ bool SBDDataGraphNode::descendsFrom ( const SBNodeIndexer & nodeIndexer ) const ``` Checks whether this node matches any node in the indexer or descends from any. **Parameters:** - `nodeIndexer` The indexer containing nodes to test against. **Returns:** `true` if this node matches or descends from any node in the indexer. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function descendsFrom [3/3] *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them.* ```C++ bool SBDDataGraphNode::descendsFrom ( SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer ) const ``` Checks whether this node matches any node in the pointer indexer or descends from any. **Parameters:** - `nodePointerIndexer` The pointer indexer containing nodes to test against. **Returns:** `true` if this node matches or descends from any node in the pointer indexer. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function disconnectBaseSignalFromSlot *Disconnects the base signal from a slot.* ```C++ void SBDDataGraphNode::disconnectBaseSignalFromSlot ( SBCReferenceTarget * referenceTarget, void(SBCReferenceTarget::*)( SBBaseEvent *) functionPointer ) ``` Disconnects the node's base signal from a slot. **Parameters:** - `referenceTarget` Pointer to the reference target to disconnect. - `functionPointer` Pointer to the member function to disconnect. ______________________________________________________________________ ### function display [1/2] *Displays the node.* ```C++ virtual void SBDDataGraphNode::display ( RenderingPass renderingPass ) ``` Displays the node based on the rendering pass. This function displays the node. It receives from the SAMSON renderer the current `renderingPass` which indicates what the function should display. **Parameters:** - `renderingPass` The rendering pass indicating which geometry to render. - `Setup:` the setup pass where you can perform initialization that may be used in other passes, without rendering anything - `OpaqueGeometry:` the main pass where you should render opaque geometry - `SelectableGeometry:` the pass where you should render selectable geometry - `ShadowingGeometry:` the pass where you should render shadowing geometry - `TransparentGeometry:` the pass where you should render transparent geometry - `Interface:` the pass where you should render 2D and 3D interface components - `Text:` the pass where you should render text Please refer to tutorials for more information. Starting with SAMSON 0.9.0, this is the main and only function to display nodes in the viewport. Previous display functions ([**SBDDataGraphNode::display()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-22), [**SBDDataGraphNode::displayForSelection()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforselection) and [**SBDDataGraphNode::displayForShadow()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforshadow)) are marked as deprecated and will be removed in a future SAMSON version. To facilitate porting to SAMSON 0.9.0, the default implementation of this function calls the now deprecated functions [**SBDDataGraphNode::display()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-22), [**SBDDataGraphNode::displayForSelection()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforselection) and [**SBDDataGraphNode::displayForShadow()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforshadow). ______________________________________________________________________ ### function display [2/2] *Displays the node (deprecated)* ```C++ virtual void SBDDataGraphNode::display () ``` Displays the node (deprecated). This function is deprecated and will be removed in a future version. Implement [**SBDDataGraphNode::display(RenderingPass renderingPass)**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) instead. ______________________________________________________________________ ### function displayForSelection *Displays the node for selection purposes (deprecated)* ```C++ virtual void SBDDataGraphNode::displayForSelection () ``` Displays the node for selection (deprecated). This function is deprecated and will be removed in a future version. Implement [**SBDDataGraphNode::display(RenderingPass renderingPass)**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) instead. ______________________________________________________________________ ### function displayForShadow *Displays the node for shadowing purposes (deprecated)* ```C++ virtual void SBDDataGraphNode::displayForShadow () ``` Displays the node for shadow rendering (deprecated). This function is deprecated and will be removed in a future version. Implement [**SBDDataGraphNode::display(RenderingPass renderingPass)**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) instead. ______________________________________________________________________ ### function erase *Erases the node.* ```C++ void SBDDataGraphNode::erase () ``` Erases the node and all its descendants. This function erases the node and all its descendants. To perform custom erase operations (for example, a bond being erased will remove itself from its parent and disconnect from the base signal of its left and right atom), derived class may reimplement [**onErase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-onerase), which is a private virtual function of [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md). Because the objects that are connected to this node's *base signal* might want to perform some tasks before the node is erased, nodes being erased send three events: SBBaseEvent::Type::NodeEraseBegin immediately before erasing begins, SBBaseEvent::Type::NodeEraseEnd after erasing is complete, and finally SBBaseEvent::Type::NodeErased. Precisely, the [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) function sends the SBBaseEvent::Type::NodeEraseBegin event, sets the selection flag of the node to `false`, calls the virtual [**onErase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-onerase) function, removes the node from its parent, then sends the SBBaseEvent::Type::NodeEraseEnd and the SBBaseEvent::Type::NodeErased events. In the case of a bond, for example, the operations mentioned above are thus performed between the SBBaseEvent::Type::NodeEraseBegin and SBBaseEvent::Type::NodeEraseEnd events. For more information, please refer to section Node lifecycle. **See also:** [**isCreated**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated), [**isErased**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iserased), [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create), [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase), [**onErase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-onerase) **See also:** Node lifecycle ______________________________________________________________________ ### function forEachNodeDepthFirst [1/2] *Performs the* `action` *on this node.* ```C++ virtual void SBDDataGraphNode::forEachNodeDepthFirst ( void(*)( SBDDataGraphNode *node) action ) ``` Executes a given action on this node. Calls the provided function pointer with this node as its argument. **Parameters:** - `action` Function pointer that takes a SBDDataGraphNode\* and performs an action. ______________________________________________________________________ ### function forEachNodeDepthFirst [2/2] *Performs the* `objects` *'s*`action` *on this node.* ```C++ virtual void SBDDataGraphNode::forEachNodeDepthFirst ( SBCClass * object, void(SBCClass::*)( SBDDataGraphNode *node) action ) ``` Executes a member function on this node using a given object. Calls the specified member function of the provided object with this node as its argument. **Parameters:** - `object` Pointer to an object whose member function will be called. - `action` Pointer to the member function of [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) that takes a SBDDataGraphNode\*. ______________________________________________________________________ ### function getDefaultOpacity *Returns the default opacity.* ```C++ unsigned int SBDDataGraphNode::getDefaultOpacity () const ``` Returns the default opacity value (0-100). **Returns:** The default opacity. ______________________________________________________________________ ### function getDefaultTransparency *Returns the default transparency.* ```C++ unsigned int SBDDataGraphNode::getDefaultTransparency () const ``` Returns the default transparency value (0-100). **Returns:** The default transparency. ______________________________________________________________________ ### function getDocument *Returns the document the node belongs to.* ```C++ SBDDocument * SBDDataGraphNode::getDocument () const ``` Returns the document the node belongs to, or `nullptr` if none. The function traverses the ancestors of the node to locate a document node. ______________________________________________________________________ ### function getFlags *Returns the flags.* ```C++ virtual unsigned int SBDDataGraphNode::getFlags () const ``` This function returns an unsigned int that contains the flags of the node: - the first bit is the selection flag - the second bit is the highlighting flag **Returns:** the flags **See also:** Flags **See also:** [**getSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag), [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) ______________________________________________________________________ ### function getHierarchyString *Returns a string with hierarchical information on the node and its parents names.* ```C++ virtual std::string SBDDataGraphNode::getHierarchyString ( const std::string & separator=" / ", bool includeNodeType=false ) const ``` Generates a string describing the node's hierarchy. This function returns a string with information on the node's hierarchy. This information can be used for logging and debugging. **Parameters:** - `separator` Separator string used between hierarchy elements. - `includeNodeType` If `true`, includes the node type in the output. **Returns:** Hierarchy string. ______________________________________________________________________ ### function getHighlightingFlag *Returns the highlighting flag.* ```C++ bool SBDDataGraphNode::getHighlightingFlag () const ``` This function returns the highlighting flag of the node. Setting this flag to true instructs the renderer to highlight the node in the viewport. **See also:** [**setHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sethighlightingflag) ______________________________________________________________________ ### function getInheritedFlags *Returns the inherited flags.* ```C++ virtual unsigned int SBDDataGraphNode::getInheritedFlags () const ``` This function returns an unsigned int that contains the inherited flags of the node: - the first bit is `true` if the node is [**selected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isselected) - the second bit is `true` if the node is [**highlighted**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ishighlighted) **Returns:** the flags **See also:** Flags **See also:** [**isSelected**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isselected), [**isHighlighted**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ishighlighted) ______________________________________________________________________ ### function getInheritedOpacity *Returns the cumulative opacity, when taking into account the ascendants.* ```C++ float SBDDataGraphNode::getInheritedOpacity () const ``` Returns the cumulative opacity of the node and its ancestors. This function returns the product of the opacities of all the ascendant nodes. **Returns:** The cumulative opacity as a float. ______________________________________________________________________ ### function getInheritedTransparency *Returns the cumulative transparency, when taking into account the ascendants.* ```C++ float SBDDataGraphNode::getInheritedTransparency () const ``` Returns the cumulative transparency of the node and its ancestors. **Returns:** One minus the cumulative opacity as a float. ______________________________________________________________________ ### function getLockedFlag *Returns the locked flag.* ```C++ virtual bool SBDDataGraphNode::getLockedFlag () const ``` Returns the locked flag of the node. **Returns:** `true` if the node is locked; otherwise `false`. ______________________________________________________________________ ### function getMaterial *Returns the material.* ```C++ SBDDataGraphNodeMaterial * SBDDataGraphNode::getMaterial () const ``` Retrieves the material associated with this node or an ancestor. This function returns the material associated to this node, if a material was added to the node itself or to one of its ancestors (in which case it returns the deepest ancestor with a material applied). **Returns:** Pointer to the material, or `nullptr` if none. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial), [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) ______________________________________________________________________ ### function getMaterialOwner *Returns the node whose material is inherited.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getMaterialOwner () const ``` Retrieves the node that owns the material for this node. This function returns the node which owns the material associated to this node, i.e. the deepest ancestor with a material applied. The function returns 0 if no (direct or inherited) material is applied. **Returns:** Pointer to the node owning the material, or `nullptr` if none. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial) ______________________________________________________________________ ### function getMaximumOpacity *Returns the maximum opacity.* ```C++ unsigned int SBDDataGraphNode::getMaximumOpacity () const ``` Returns the maximum opacity value (0-100). **Returns:** The maximum opacity. ______________________________________________________________________ ### function getMaximumTransparency *Returns the maximum transparency.* ```C++ unsigned int SBDDataGraphNode::getMaximumTransparency () const ``` Returns the maximum transparency value (0-100). **Returns:** The maximum transparency. ______________________________________________________________________ ### function getMinimumOpacity *Returns the minimum opacity.* ```C++ unsigned int SBDDataGraphNode::getMinimumOpacity () const ``` Returns the minimum opacity value (0-100). **Returns:** The minimum opacity. ______________________________________________________________________ ### function getMinimumTransparency *Returns the minimum transparency.* ```C++ unsigned int SBDDataGraphNode::getMinimumTransparency () const ``` Returns the minimum transparency value (0-100). **Returns:** The minimum transparency. ______________________________________________________________________ ### function getMolecularWeight *Returns the molecular weight.* ```C++ virtual SBQuantity::mass SBDDataGraphNode::getMolecularWeight () ``` ______________________________________________________________________ ### function getName *Returns the name of the node.* ```C++ virtual std::string const & SBDDataGraphNode::getName () const ``` **Returns:** The node's name. ______________________________________________________________________ ### function getNextNode [1/2] *Returns the pointer to the next node in the children of the node's parent.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getNextNode () const ``` Returns the next sibling node in the parent's child list, or `nullptr` if none. ______________________________________________________________________ ### function getNextNode [2/2] *Returns the pointer to the next node with type* `nodeType` *in the children of the node's parent.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getNextNode ( SBDDataGraphNode::Type nodeType ) const ``` Returns the next sibling node with the specified type in the parent's child list, or `nullptr` if none. ______________________________________________________________________ ### function getNodeIndex *Returns the node index (unique in the whole data graph, but non-persistent)* ```C++ unsigned int SBDDataGraphNode::getNodeIndex () const ``` Returns the unique index of the data graph node. At any time, each data graph node has a unique index, that is managed internally by SAMSON. All indices are contiguous unsigned integers between `0` and `n-1`, where `n` is the number of data graph nodes. As a result, the node index is not permanent: when node `i` is deleted (and `i` is different from `n-1`), then node `n-1` becomes node `i`. Node indices are used for example when picking objects in a viewport, by writing integers into the framebuffer instead of colors. **Returns:** The unique node index. ______________________________________________________________________ ### function getNodeUUID *Returns the node UUID.* ```C++ SBUUID SBDDataGraphNode::getNodeUUID () const ``` Returns the unique identifier (UUID) of the node. This function returns the UUID associated with this data graph node. If the internal data pointer is not set, an empty UUID is returned. **Returns:** The node's UUID, or an empty UUID if unavailable. ______________________________________________________________________ ### function getNodes [1/2] *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual void SBDDataGraphNode::getNodes ( SBNodeIndexer & nodeIndexer, SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) const ``` Collects nodes of a specific type into a node indexer. **Parameters:** - `nodeIndexer` Reference to the node indexer where matching nodes will be added. - `nodeType` The type of nodes to collect. - `selectedNodesOnly` If true, only selected nodes (or ancestors) are collected. - `visitPredicate` Predicate that determines which nodes and subtrees to visit. - `includeDependencies` If true, also includes dependent nodes that are not children. ______________________________________________________________________ ### function getNodes [2/2] *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual void SBDDataGraphNode::getNodes ( SBNodeIndexer & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) const ``` Collects nodes that satisfy a selection predicate into a node indexer. **Parameters:** - `nodeIndexer` Reference to the node indexer where matching nodes will be added. - `selectionPredicate` Predicate that selects nodes to collect. - `visitPredicate` Predicate that determines which nodes and subtrees to visit. - `includeDependencies` If true, also includes dependent nodes that are not children. ______________________________________________________________________ ### function getNumberOfAtoms *Returns the number of atoms.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfAtoms () ``` ______________________________________________________________________ ### function getNumberOfCarbons *Returns the number of carbons.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfCarbons () ``` ______________________________________________________________________ ### function getNumberOfChains *Returns the number of chains.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfChains () ``` ______________________________________________________________________ ### function getNumberOfCoarseGrainedAtoms *Returns the number of coarse-grained atoms.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfCoarseGrainedAtoms () ``` ______________________________________________________________________ ### function getNumberOfHydrogens *Returns the number of hydrogens.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfHydrogens () ``` ______________________________________________________________________ ### function getNumberOfMolecules *Returns the number of molecules.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfMolecules () ``` ______________________________________________________________________ ### function getNumberOfNitrogens *Returns the number of nitrogens.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfNitrogens () ``` ______________________________________________________________________ ### function getNumberOfOtherAtoms *Returns the number of other atoms.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfOtherAtoms () ``` ______________________________________________________________________ ### function getNumberOfOxygens *Returns the number of oxygens.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfOxygens () ``` ______________________________________________________________________ ### function getNumberOfResidues *Returns the number of residues.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfResidues () ``` ______________________________________________________________________ ### function getNumberOfSegments *Returns the number of segments.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfSegments () ``` ______________________________________________________________________ ### function getNumberOfStructuralGroups *Returns the number of structural groups.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfStructuralGroups () ``` ______________________________________________________________________ ### function getNumberOfStructuralModels *Returns the number of structural models.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfStructuralModels () ``` ______________________________________________________________________ ### function getNumberOfSulfurs *Returns the number of sulfurs.* ```C++ virtual unsigned int SBDDataGraphNode::getNumberOfSulfurs () ``` ______________________________________________________________________ ### function getOpacity *Returns the opacity.* ```C++ virtual unsigned int SBDDataGraphNode::getOpacity () const ``` Returns the opacity of the node as a percentage (0-100). **Returns:** The opacity value (0-100). ______________________________________________________________________ ### function getOpacitySingleStep *Returns the opacity single step.* ```C++ unsigned int SBDDataGraphNode::getOpacitySingleStep () const ``` Returns the single step increment for opacity adjustments. **Returns:** The opacity step size. ______________________________________________________________________ ### function getOpacitySuffix *Returns the opacity suffix.* ```C++ std::string SBDDataGraphNode::getOpacitySuffix () const ``` Returns the suffix used when displaying opacity values. **Returns:** The opacity suffix string. ______________________________________________________________________ ### function getParent *Returns the parent of the node.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getParent () const ``` Returns the parent of the node, or `nullptr` if there is none. ______________________________________________________________________ ### function getPreviousNode [1/2] *Returns the pointer to the previous node in the children of the node's parent.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getPreviousNode () const ``` Returns the previous sibling node in the parent's child list, or `nullptr` if none. ______________________________________________________________________ ### function getPreviousNode [2/2] *Returns the pointer to the previous node with type* `nodeType` *in the children of the node's parent.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getPreviousNode ( SBDDataGraphNode::Type nodeType ) const ``` Returns the previous sibling node with the specified type in the parent's child list, or `nullptr` if none. ______________________________________________________________________ ### function getRoot *Returns the root of the hierarchy the node belongs to.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getRoot () const ``` This function returns the root of the hierarchy the node belongs to. In general, this returns a pointer to the document that contains the node. However, if the node is not yet inserted in a document, this may return a node with a different type. In case the node has not been added as a child to another node, this function returns a pointer to the node itself. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function getSelected *Returns whether the node is selected.* ```C++ bool SBDDataGraphNode::getSelected () const ``` This function returns `true` if the node is selected, either directly or indirectly through its ancestors. **Returns:** `true` if the node is selected, `false` otherwise. ______________________________________________________________________ ### function getSelectionFlag *Returns the selection flag.* ```C++ bool SBDDataGraphNode::getSelectionFlag () const ``` This function returns the selection flag of the data graph node. The selection flag is `true` if and only if the node is currently selected. Please refer to [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) for more information about the way selection works in SAMSON. **See also:** [**setSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setselectionflag) ______________________________________________________________________ ### function getSumOfFormalCharges *Returns the sum of formal charges.* ```C++ virtual int SBDDataGraphNode::getSumOfFormalCharges () ``` ______________________________________________________________________ ### function getSumOfPartialCharges *Returns the sum of partial charges.* ```C++ virtual float SBDDataGraphNode::getSumOfPartialCharges () ``` ______________________________________________________________________ ### function getThisNode *Returns the pointer to this node.* ```C++ SBDDataGraphNode * SBDDataGraphNode::getThisNode () const ``` Returns a pointer to this node. This is useful for inspectors to easily select the inspected node. ______________________________________________________________________ ### function getTransparency *Returns the transparency.* ```C++ virtual unsigned int SBDDataGraphNode::getTransparency () const ``` Returns the transparency of the node as a percentage (0-100). **Returns:** The transparency value (0-100). ______________________________________________________________________ ### function getTransparencySingleStep *Returns the transparency single step.* ```C++ unsigned int SBDDataGraphNode::getTransparencySingleStep () const ``` Returns the single step increment for transparency adjustments. **Returns:** The transparency step size. ______________________________________________________________________ ### function getTransparencySuffix *Returns the transparency suffix.* ```C++ std::string SBDDataGraphNode::getTransparencySuffix () const ``` Returns the suffix used when displaying transparency values. **Returns:** The transparency suffix string. ______________________________________________________________________ ### function getType *Returns the type of the data graph node.* ```C++ virtual Type SBDDataGraphNode::getType () const ``` Each node in the data graph has a *type*, which can be used, for example, to rapidly search the data graph: ```C++ // Find all atoms SBNodeIndexer nodeIndexer; SAMSON::getActiveDocument()->getNodes(nodeIndexer, SBNode::Atom); ``` **Returns:** The node type. ______________________________________________________________________ ### function getTypeString [1/2] *Returns a string describing the type of the data graph node.* ```C++ std::string SBDDataGraphNode::getTypeString ( bool humanReadable=false ) const ``` Returns a string describing the type of this data graph node. This function is a convenience function used to produce a string corresponding to the node's type. **Parameters:** - `humanReadable` If `true`, returns a human-readable string; otherwise a programmatic string. **Returns:** A string representation of the node type. ______________________________________________________________________ ### function getVisibilityFlag *Returns the visibility flag.* ```C++ bool SBDDataGraphNode::getVisibilityFlag () const ``` This function returns the visibility flag of the node. The visibility flag is `true` if and only if the node is visible in viewports. In other words, setting this flag to false instructs the renderer to not display the node (in case it has a visual representation). **See also:** [**setVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-setvisibilityflag) ______________________________________________________________________ ### function getVisible *Returns whether the node is visible.* ```C++ bool SBDDataGraphNode::getVisible () const ``` This function returns `true` if the node is visible, i.e., both the node and all its ancestors have their visibility flag set to true. **Returns:** `true` if the node is visible, `false` otherwise. ______________________________________________________________________ ### function hasMaterial *Returns whether the node has a material (by itself, or inherited)* ```C++ bool SBDDataGraphNode::hasMaterial () const ``` Checks whether this node has a material directly or via inheritance. This function returns whether the node has a material by itself, or inherited **Returns:** `true` if the node has a material, `false` otherwise. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner), [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial) ______________________________________________________________________ ### function hasNode [1/2] *Returns whether the node has nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual bool SBDDataGraphNode::hasNode ( SBDDataGraphNode::Type nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) const ``` Checks if there is at least one node of a given type in the sub-tree. **Parameters:** - `nodeType` The type of node to check for. - `selectedNodesOnly` If true, only selected nodes are considered. - `visitPredicate` Predicate that determines which nodes and subtrees to visit. - `includeDependencies` If true, includes dependent nodes. **Returns:** `true` if at least one matching node exists, `false` otherwise. ______________________________________________________________________ ### function hasNode [2/2] *Returns whether the node has nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* ```C++ virtual bool SBDDataGraphNode::hasNode ( const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false ) const ``` Checks if there is at least one node satisfying a selection predicate in the sub-tree. **Parameters:** - `selectionPredicate` Predicate that selects nodes. - `visitPredicate` Predicate that determines which nodes and subtrees to visit. - `includeDependencies` If true, includes dependent nodes. **Returns:** `true` if at least one matching node exists, `false` otherwise. ______________________________________________________________________ ### function hasOneOf *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or is the ancestor of one of them, or is a group that stores one of them.* ```C++ bool SBDDataGraphNode::hasOneOf ( const SBNodeIndexer & nodeIndexer ) const ``` Checks whether this node matches any node in the given indexer, is an ancestor of any, or belongs to a group storing one. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function hasOpacityRange *Returns whether the node has the opacity range.* ```C++ bool SBDDataGraphNode::hasOpacityRange () const ``` Determines whether the node has an opacity range. **Returns:** `true` if the node has an opacity range, `false` otherwise. ______________________________________________________________________ ### function hasTransparencyRange *Returns whether the node has the transparency range.* ```C++ bool SBDDataGraphNode::hasTransparencyRange () const ``` Determines whether the node has a transparency range. **Returns:** `true` if the node has a transparency range, `false` otherwise. ______________________________________________________________________ ### function isAtom *Returns* `true` *when the node is an atom.* ```C++ bool SBDDataGraphNode::isAtom () const ``` Checks whether the node is an atom. **Returns:** `true` if the node type is Atom. ______________________________________________________________________ ### function isBallAndStick *Returns* `true` *when the node is the default ball-and-stick visual model.* ```C++ bool SBDDataGraphNode::isBallAndStick () const ``` Checks whether the node is a ball‑and‑stick visual model. **Returns:** `true` if the node's proxy name matches the ball‑and‑stick model. ______________________________________________________________________ ### function isBond *Returns* `true` *when the node is a bond.* ```C++ bool SBDDataGraphNode::isBond () const ``` Checks whether the node is a bond. **Returns:** `true` if the node type is Bond. ______________________________________________________________________ ### function isCartoon *Returns* `true` *when the node is the default cartoon visual model.* ```C++ bool SBDDataGraphNode::isCartoon () const ``` Checks whether the node is a cartoon visual model. **Returns:** `true` if the node's proxy name matches the cartoon model. ______________________________________________________________________ ### function isCreated *Returns* `true` *if and only if the node is created.* ```C++ bool SBDDataGraphNode::isCreated () const ``` Returns `true` if the node has been created. For more information, please refer to section Node lifecycle. **See also:** [**isErased**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iserased), [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create), [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) **See also:** Node lifecycle ______________________________________________________________________ ### function isDynamicalModel *Returns* `true` *when the node is a dynamical model.* ```C++ bool SBDDataGraphNode::isDynamicalModel () const ``` Checks whether the node is a dynamical model. **Returns:** `true` if the node type is DynamicalModel or one of its derived types. ______________________________________________________________________ ### function isErased *Returns* `true` *if and only if the node is erased.* ```C++ bool SBDDataGraphNode::isErased () const ``` Returns `true` if the node is erased (i.e., not created). For more information, please refer to section Node lifecycle. **See also:** [**isCreated**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-iscreated), [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create), [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) **See also:** Node lifecycle ______________________________________________________________________ ### function isGaussianSurface *Returns* `true` *when the node is the default Gaussian surface visual model.* ```C++ bool SBDDataGraphNode::isGaussianSurface () const ``` Checks whether the node is a Gaussian surface visual model. **Returns:** `true` if the node's proxy name matches the Gaussian surface model. ______________________________________________________________________ ### function isHighlighted *Returns whether the node is highlighted.* ```C++ bool SBDDataGraphNode::isHighlighted () const ``` This function returns whether the node is highlighted directly (because its [**highlighting flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) is `true`) or indirectly (because the [**highlighting flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) of one of its ancestors is `true`). **See also:** [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) ______________________________________________________________________ ### function isIn [1/3] *Returns* `true` *if and only if this node is*`node` *, or descends from it, or belongs to a group stored in*`node` *.* ```C++ bool SBDDataGraphNode::isIn ( const SBDDataGraphNode * node ) const ``` Checks whether this node is the given node, descends from it, or belongs to a group stored in it. **Parameters:** - `node` The node to test against. **Returns:** `true` if this node is the given node, descends from it, or belongs to a group stored in it. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function isIn [2/3] *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them, or belongs to a group stored in one of the nodes of the*`nodeIndexer` *.* ```C++ bool SBDDataGraphNode::isIn ( const SBNodeIndexer & nodeIndexer ) const ``` Checks whether this node matches any node in the given indexer, descends from any, or belongs to a group stored in one of the nodes of the indexer. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function isIn [3/3] *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them, or belongs to a group stored in of the nodes of the*`nodePointerIndexer` *.* ```C++ bool SBDDataGraphNode::isIn ( SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer ) const ``` This function returns `true` if and only if this node is one of the nodes of the `nodePointerIndexer`, or descends from one of them. If a node of the `nodePointerIndexer` contains [**groups**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md), then the function returns `true` if this node belongs to them. **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function isInteractionModel *Returns* `true` *when the node is a interaction model.* ```C++ bool SBDDataGraphNode::isInteractionModel () const ``` Checks whether the node is an interaction model. **Returns:** `true` if the node type is InteractionModel or one of its derived types. ______________________________________________________________________ ### function isLicorice *Returns* `true` *when the node is the default licorice visual model.* ```C++ bool SBDDataGraphNode::isLicorice () const ``` Checks whether the node is a licorice visual model. **Returns:** `true` if the node's proxy name matches the licorice model. ______________________________________________________________________ ### function isLight *Returns* `true` *when the node is a light.* ```C++ bool SBDDataGraphNode::isLight () const ``` Checks whether the node is a light. **Returns:** `true` if the node type is Light. ______________________________________________________________________ ### function isLocked *Returns whether the node is locked.* ```C++ virtual bool SBDDataGraphNode::isLocked () const ``` **Returns:** `true` if the node is locked; otherwise `false`. ______________________________________________________________________ ### function isMesh *Returns* `true` *when the node is a mesh.* ```C++ bool SBDDataGraphNode::isMesh () const ``` Checks whether the node is a mesh. **Returns:** `true` if the node type is Mesh. ______________________________________________________________________ ### function isModel *Returns* `true` *when the node is a model.* ```C++ bool SBDDataGraphNode::isModel () const ``` Checks whether the node is a model (structural, visual, dynamical, interaction, or property). **Returns:** `true` if the node is a model. ______________________________________________________________________ ### function isOneOf [1/2] *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *.* ```C++ bool SBDDataGraphNode::isOneOf ( const SBNodeIndexer & nodeIndexer ) const ``` This function returns `true` if and only if this node is one of the nodes of the `nodeIndexer` **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function isOneOf [2/2] *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *.* ```C++ bool SBDDataGraphNode::isOneOf ( SBPointerIndexer< SBDDataGraphNode > * nodePointerIndexer ) const ``` This function returns `true` if and only if this node is one of the nodes of the `nodePointerIndexer` **See also:** [data graph](https://documentation.samson-connect.net/developers/latest/data-graph/index.md) ______________________________________________________________________ ### function isPropertyModel *Returns* `true` *when the node is a property model.* ```C++ bool SBDDataGraphNode::isPropertyModel () const ``` Checks whether the node is a property model. **Returns:** `true` if the node type is PropertyModel or PropertyModelFunction. ______________________________________________________________________ ### function isRibbon *Returns* `true` *when the node is the default ribbon visual model.* ```C++ bool SBDDataGraphNode::isRibbon () const ``` Checks whether the node is a ribbon visual model. **Returns:** `true` if the node's proxy name matches the ribbon model. ______________________________________________________________________ ### function isSelected *Returns whether the node is selected.* ```C++ bool SBDDataGraphNode::isSelected () const ``` This function returns whether the node is selected directly (because its [**selection flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) is `true`) or indirectly (because the [**selection flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) of one of its ancestors is `true`). Please refer to [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) for more information about the way selection works in SAMSON. **See also:** [**getSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) ______________________________________________________________________ ### function isSerializable *Returns* `true` *when the class is serializable.* ```C++ virtual bool SBDDataGraphNode::isSerializable () const ``` Returns `true` when the node is serializable. By default, custom nodes are not serializable (i.e. the function returns `false`). If the node should be serializable (for example to make it possible to copy and paste the node, and save and load it), this function should be overloaded to return `true`. **Returns:** `true` if the node is serializable; otherwise `false`. **See also:** [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) **See also:** [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize), [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ______________________________________________________________________ ### function isSimulator *Returns* `true` *when the node is a simulator.* ```C++ bool SBDDataGraphNode::isSimulator () const ``` Checks whether the node is a simulator. **Returns:** `true` if the node type is Simulator or one of its derived types. ______________________________________________________________________ ### function isSolventAccessibleSurface *Returns* `true` *when the node is the default solvent accessible surface visual model.* ```C++ bool SBDDataGraphNode::isSolventAccessibleSurface () const ``` Checks whether the node is a solvent‑accessible surface visual model. **Returns:** `true` if the node's proxy name matches the solvent‑accessible surface model. ______________________________________________________________________ ### function isSolventExcludedSurface *Returns* `true` *when the node is the default solvent excluded surface visual model.* ```C++ bool SBDDataGraphNode::isSolventExcludedSurface () const ``` Checks whether the node is a solvent‑excluded surface visual model. **Returns:** `true` if the node's proxy name matches the solvent‑excluded surface model. ______________________________________________________________________ ### function isStructuralModel *Returns* `true` *when the node is a structural model.* ```C++ bool SBDDataGraphNode::isStructuralModel () const ``` Checks whether the node is a structural model. **Returns:** `true` if the node type is StructuralModel. ______________________________________________________________________ ### function isStructuralNode *Returns* `true` *when the node is a structural node.* ```C++ bool SBDDataGraphNode::isStructuralNode () const ``` Checks whether the node is a structural node (e.g., atom, bond, residue, etc.). **Returns:** `true` if the node is a structural node. ______________________________________________________________________ ### function isTube *Returns* `true` *when the node is the default tube visual model.* ```C++ bool SBDDataGraphNode::isTube () const ``` Checks whether the node is a tube visual model. **Returns:** `true` if the node's proxy name matches the tube model. ______________________________________________________________________ ### function isType *Returns* `true` *when the type of the node corresponds to*`type` *.* ```C++ bool SBDDataGraphNode::isType ( Type type ) const ``` Checks whether the node's type matches the given type. **Parameters:** - `type` The type to compare against. **Returns:** `true` if the node's type equals the specified type. ______________________________________________________________________ ### function isVanDerWaals *Returns* `true` *when the node is the default van der Waals visual model.* ```C++ bool SBDDataGraphNode::isVanDerWaals () const ``` Checks whether the node is a van‑der‑Waals visual model. **Returns:** `true` if the node's proxy name matches the van‑der‑Waals model. ______________________________________________________________________ ### function isVisible *Returns whether the node is visible.* ```C++ bool SBDDataGraphNode::isVisible () const ``` This function returns whether the node is visible, which happens when the node and all its ancestors have their [**visibility flag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag) set to true. **See also:** [**getVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag) ______________________________________________________________________ ### function isVisualModel *Returns* `true` *when the node is a visual model.* ```C++ bool SBDDataGraphNode::isVisualModel () const ``` Checks whether the node is a visual model. **Returns:** `true` if the node type is VisualModel or Mesh. ______________________________________________________________________ ### function ownsMaterial *Returns whether the node owns a material.* ```C++ bool SBDDataGraphNode::ownsMaterial () const ``` Checks whether this node directly owns a material. This function returns whether the node owns a material **Returns:** `true` if the node owns a material, `false` otherwise. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner), [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial) ______________________________________________________________________ ### function print *Prints some debugging information.* ```C++ virtual void SBDDataGraphNode::print ( unsigned int offset=0 ) const ``` Prints debugging information for the node. Prints information with indentation specified by offset. **Parameters:** - `offset` Number of tab characters to prepend to each line. ______________________________________________________________________ ### function removeChild *Removes a child from the node.* ```C++ virtual bool SBDDataGraphNode::removeChild ( SBDDataGraphNode * node ) ``` Removes a child node from this node. **Parameters:** - `node` A pointer to the child that should be removed **Returns:** `true` if the child was removed successfully This function removes `node` from the children of this node. This function is reimplemented in derived classes. When developing new data graph nodes types, with custom children management, the reimplemented function should be [undoable](https://documentation.samson-connect.net/developers/latest/undo-and-redo/index.md) . "This function is \undoable. **See also:** [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ______________________________________________________________________ ### function removeMaterial *Removes the material.* ```C++ bool SBDDataGraphNode::removeMaterial () ``` Removes the material from this node. This function removes a material from the node. Please see [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) for more information **Returns:** `true` if the material was removed, `false` otherwise. "This function is \undoable. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial), [**removeMaterialsFromDescendants**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerialsfromdescendants), [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) ______________________________________________________________________ ### function removeMaterialsFromDescendants *Removes materials from all nodes that descend from this node, but it does not remove the material from the node itself.* ```C++ void SBDDataGraphNode::removeMaterialsFromDescendants () ``` Removes materials from all descendant nodes. This function removes materials from all nodes that descend from this node, but it does not remove the material from the node itself. Please see [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) for more information "This function is \undoable. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial), [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) ______________________________________________________________________ ### function serialize *Serializes the node.* ```C++ virtual void SBDDataGraphNode::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) const ``` This function writes the node's data to the provided serializer. **Parameters:** - `serializer` A pointer to a serializer. - `nodeIndexer` A node indexer used to retrieve indices associated to nodes. - `sdkVersionNumber` A version number of the SDK. - `classVersionNumber` A version number of the class. Please refer to the page about [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) for more information. **See also:** [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) **See also:** [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable), [**unserialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-unserialize) ______________________________________________________________________ ### function setHighlightingFlag *Sets the highlighting flag.* ```C++ void SBDDataGraphNode::setHighlightingFlag ( bool flag ) ``` This function sets the highlighting flag of the node. Setting this flag to true instructs the renderer to highlight the node in the viewport. "This function is \undoable. **See also:** [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) ______________________________________________________________________ ### function setLockedFlag *Sets the locked flag.* ```C++ virtual void SBDDataGraphNode::setLockedFlag ( bool flag ) ``` Sets the locked flag of the node. **Parameters:** - `flag` The new locked state. ______________________________________________________________________ ### function setName *Sets the name of the node.* ```C++ virtual void SBDDataGraphNode::setName ( const std::string & name ) ``` Example usage: ```C++ SBCamera* activeCamera = SAMSON::getActiveCamera(); activeCamera->setName("Overview camera"); ``` "This function is \undoable. ______________________________________________________________________ ### function setOpacity *Sets the opacity.* ```C++ virtual void SBDDataGraphNode::setOpacity ( unsigned int opacity ) ``` Sets the opacity of the node. **Parameters:** - `opacity` The new opacity value (0-100). ______________________________________________________________________ ### function setSelectionFlag *Sets the selection flag.* ```C++ void SBDDataGraphNode::setSelectionFlag ( bool flag ) ``` This function sets the selection flag of the data graph node. The selection flag is `true` if and only if the node is currently selected. Please refer to [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) for more information about the way selection works in SAMSON. "This function is \undoable. **See also:** [**getSelectionFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getselectionflag) ______________________________________________________________________ ### function setTransparency *Sets the transparency.* ```C++ virtual void SBDDataGraphNode::setTransparency ( unsigned int transparency ) ``` Sets the transparency of the node. **Parameters:** - `transparency` The new transparency value (0-100). ______________________________________________________________________ ### function setVisibilityFlag *Sets the visibility flag.* ```C++ void SBDDataGraphNode::setVisibilityFlag ( bool flag ) ``` This function sets the visibility flag of the node. "This function is \undoable. **See also:** [**getVisibilityFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getvisibilityflag) ______________________________________________________________________ ### function unserialize *Unserializes the node.* ```C++ virtual void SBDDataGraphNode::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) ``` This function reads the node's data from the provided serializer. **Parameters:** - `serializer` A pointer to a serializer. - `nodeIndexer` A node indexer used to retrieve indices associated to nodes. - `sdkVersionNumber` A version number of the SDK. - `classVersionNumber` A version number of the class. Please refer to the page about [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) for more information. **See also:** [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) **See also:** [**isSerializable**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-isserializable), [**serialize**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-serialize) ______________________________________________________________________ ## Public Static Functions Documentation ### function canAddMaterial [2/2] *Returns whether can add a material to a node of type* `nodeType` *.* ```C++ static bool SBDDataGraphNode::canAddMaterial ( SBDDataGraphNode::Type nodeType ) ``` Determines whether a node of the specified type can have a material. This function returns whether it is possible to add a material to a node of type `nodeType`. Not all nodes can have materials, i.e. can be colorized, - this is the case for e.g. SBNode::Animation, SBNode::Camera, SBNode::Path, etc. **Parameters:** - `nodeType` [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) of the node. **Returns:** `true` if a material can be added to nodes of this type, `false` otherwise. **See also:** [Materials](https://documentation.samson-connect.net/developers/latest/materials/index.md) **See also:** [**hasMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-hasmaterial), [**ownsMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-ownsmaterial), [**removeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-removematerial), [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial), [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) ______________________________________________________________________ ### function clone [2/2] *Clones the nodes in* `sourceNodeIndexer` *(treated as a whole) and places the clones in*`destinationNodeIndexer` *.* ```C++ static void SBDDataGraphNode::clone ( const SBNodeIndexer & sourceNodeIndexer, SBNodeIndexer & destinationNodeIndexer ) ``` This function clones the nodes in `sourceNodeIndexer` and places the roots of the clones in `destinationNodeIndexer`. This variant is useful when multiple nodes must be cloned simultaneously. For example, cloning a bond would not clone the two referenced atoms, and the clone would still reference the original atoms. With this variant, placing the bond and the two referenced atoms in `sourceNodeIndexer` will result in three nodes in `destinationNodeIndexer` (the cloned bond and the two cloned atoms), and the cloned bond will reference the two bond atoms. Note that all restrictions applying to [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) cloning individual nodes still apply. In particular, if one of the nodes cannot be cloned, the function may return without modifying `destinationNodeIndexer`. **See also:** [Serialization](https://documentation.samson-connect.net/developers/latest/serialization/index.md) **See also:** [**clone()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) ______________________________________________________________________ ### function forEachNodeInSelection [1/2] *Performs the* `action` *for each node in*`nodeIndexer` \_\_ ```C++ static void SBDDataGraphNode::forEachNodeInSelection ( SBNodeIndexer & nodeIndexer, void(*)( SBDDataGraphNode *node) action ) ``` Executes a given action for each node in the provided indexer. Iterates over all nodes in the SBNodeIndexer and calls the function pointer with each node. **Parameters:** - `nodeIndexer` Indexer containing nodes to process. - `action` Function pointer to be called for each node. ______________________________________________________________________ ### function forEachNodeInSelection [2/2] *Performs the* `objects` *'s*`action` *for each node in*`nodeIndexer` \_\_ ```C++ static void SBDDataGraphNode::forEachNodeInSelection ( SBNodeIndexer & nodeIndexer, SBCClass * object, void(SBCClass::*)( SBDDataGraphNode *node) action ) ``` Executes a member function on each node in the provided indexer using a given object. Iterates over all nodes in the SBNodeIndexer and calls the specified member function of the object with each node. **Parameters:** - `nodeIndexer` Indexer containing nodes to process. - `object` Pointer to an object whose member function will be called. - `action` Pointer to the member function of [**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) that takes a SBDDataGraphNode\*. ______________________________________________________________________ ### function getNode *Returns the unique node corresponding to the node index* `nodeIndex` *.* ```C++ static SBDDataGraphNode * SBDDataGraphNode::getNode ( unsigned int nodeIndex ) ``` Returns the unique node of the data graph node corresponding to the given node index. **Parameters:** - `nodeIndex` The index of the node to retrieve. **Returns:** Pointer to the node with the given index, or nullptr if not found. **See also:** [**getNodeIndex**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getnodeindex) ______________________________________________________________________ ### function getTypeString [2/2] *Returns a string describing the type of the data graph node.* ```C++ static std::string SBDDataGraphNode::getTypeString ( Type type, bool humanReadable=false ) ``` Returns a string describing the type of a data graph node. This function is a convenience function used to produce a string corresponding to the given node type `type`. **Parameters:** - `type` The node type to describe. - `humanReadable` If `true`, returns a human‑readable string; otherwise returns the internal identifier (a programmatic string). **Returns:** A string representation of the node type. ______________________________________________________________________ ## Protected Functions Documentation ### function SBDDataGraphNode [1/2] *Builds a data graph node.* ```C++ SBDDataGraphNode::SBDDataGraphNode () ``` (protected) constructor that is indirectly called when constructing instances of derived classes, assigning a unique index to the new node. By default, the created flag, the selection flag and the highlighting flag are set to `false`, whereas the visibility flag is set to `true`. **See also:** Node identity, Flags ______________________________________________________________________ ### function SBDDataGraphNode [2/2] *Builds a data graph node.* ```C++ SBDDataGraphNode::SBDDataGraphNode ( SBDDataGraphNodeData * dataPointer ) ``` (protected) constructor that builds a data graph node from an existing data pointer. This constructor is used internally when the data graph node data already exists. **Parameters:** - `dataPointer` Pointer to the data graph node data. **See also:** [**SBDDataGraphNode::SBDDataGraphNode()**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sbddatagraphnode-12) ______________________________________________________________________ ### function ~SBDDataGraphNode *Destroys the node.* ```C++ virtual SBDDataGraphNode::~SBDDataGraphNode () ``` (protected) destructor that releases the node's unique index. The destructor releases the node's unique index. When this destructor completes, the SBBaseEvent::Type::NodeDeleted event is emitted. **See also:** Node identity ______________________________________________________________________ # SBNodeColorScheme # Class SBDDataGraphNodeColorScheme [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) *This class describes a color scheme.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) Inherited by the following classes: [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemeCPK](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPK/index.md), [SBDColorSchemeCPKConstantCarbons](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeCPKConstantCarbons/index.md), [SBDColorSchemeConstant](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemeConstant/index.md), [SBDColorSchemePerAttribute](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerAttribute/index.md), [SBDColorSchemePerStructuralModel](https://documentation.samson-connect.net/developers/latest/api/classSBDColorSchemePerStructuralModel/index.md) ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](#function-sbddatagraphnodecolorscheme-12) () *Constructs a color scheme.* | | virtual bool | [**canHavePalette**](#function-canhavepalette) () const *Returns whether the color scheme requires and therefore can have a color palette.* | | virtual [**SBDDataGraphNodeColorScheme**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeColorScheme/index.md) \* | [**clone**](#function-clone) () const *Returns a copy of the color scheme.* | | virtual void | [**getColor**](#function-getcolor) (float * color, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node=nullptr, const SBPosition3 & position=SBPosition3::zero) const *Returns a color given a* `node` *and / or a*`position` *.* | | virtual [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getDefaultPalette**](#function-getdefaultpalette) () const *Returns a clone of the default color palette for this color scheme.* | | const [**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) \* | [**getPalette**](#function-getpalette) () const *Returns a pointer to a color palette owned by the color scheme.* | | bool | [**hasPalette**](#function-haspalette) () const *Returns whether the color scheme has a color palette defined.* | | virtual bool | [**isSerializable**](#function-isserializable) () const *Returns* `true` *when the class is serializable.* | | void | [**requestUpdate**](#function-requestupdate) () *Requests a material update for a node to which the material that owns this color scheme is applied.* | | void | [**resetPalette**](#function-resetpalette) () *Resets the color palette to the default one for color schemes that can have it.* | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) const *Serializes the color scheme.* | | void | [**setPalette**](#function-setpalette) ([**SBDPalette**](https://documentation.samson-connect.net/developers/latest/api/classSBDPalette/index.md) * palette) *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) *Unserializes the color scheme.* | | virtual | [**~SBDDataGraphNodeColorScheme**](#function-sbddatagraphnodecolorscheme) () *Destructs the color scheme.* | ## Public Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------ | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-22) () *Builds the reference target.* | | unsigned int | [**getMemoryFootprint**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-getmemoryfootprint) () const *Returns the memory footprint.* | | void | [**printReferencesToOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-printreferencestoowners) () const *Prints the references to the owners of this reference target.* | | virtual | [**~SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget) () *Destructor.* | ## Protected Attributes inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SBCReferenceTargetData \* | [**dataPointer**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#variable-datapointer) *A pointer to the private data.* | ## Protected Functions | Type | Name | | ---- | ---------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeColorScheme**](#function-sbddatagraphnodecolorscheme-22) (SBDDataGraphNodeColorSchemeData * dataPointer) *Protected constructor.* | ## Protected Functions inherited from SBCReferenceTarget See [SBCReferenceTarget](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) | Type | Name | | ---- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-sbcreferencetarget-12) (SBCReferenceTargetData * dataPointer) *Protected constructor.* | | void | [**removeAllReferenceOwners**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/#function-removeallreferenceowners) () *Stops all the reference owners from referencing this reference target.* | ## Detailed Description This class describes a color scheme in SAMSON. Please refer to [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) for more information. **Short name**: SBNodeColorScheme **See also:** [Color schemes](https://documentation.samson-connect.net/developers/latest/color-schemes/index.md) ## Public Functions Documentation ### function SBDDataGraphNodeColorScheme [1/2] *Constructs a color scheme.* ```C++ SBDDataGraphNodeColorScheme::SBDDataGraphNodeColorScheme () ``` Constructs a new color scheme. Initializes the color scheme object with default settings. ______________________________________________________________________ ### function canHavePalette *Returns whether the color scheme requires and therefore can have a color palette.* ```C++ virtual bool SBDDataGraphNodeColorScheme::canHavePalette () const ``` Indicates whether the color scheme can be associated with a color palette. **Returns:** `true` if the color scheme supports a palette; otherwise `false`. ______________________________________________________________________ ### function clone *Returns a copy of the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme * SBDDataGraphNodeColorScheme::clone () const ``` Creates a copy of the color scheme. **Returns:** Pointer to a newly allocated color scheme that is a copy of this object. The caller is responsible for managing the returned object. ______________________________________________________________________ ### function getColor *Returns a color given a* `node` *and / or a*`position` *.* ```C++ virtual void SBDDataGraphNodeColorScheme::getColor ( float * color, SBDDataGraphNode * node=nullptr, const SBPosition3 & position=SBPosition3::zero ) const ``` Retrieves the RGBA color for a given node and position. The method fills the provided `color` array with four floating‑point values representing red, green, blue, and alpha components. **Parameters:** - `color` Output array of four floats that will receive the RGBA values. - `node` Optional pointer to the node for which the color is requested. May be `nullptr`. - `position` Optional position used to compute the color. Defaults to the origin. ______________________________________________________________________ ### function getDefaultPalette *Returns a clone of the default color palette for this color scheme.* ```C++ virtual SBDPalette * SBDDataGraphNodeColorScheme::getDefaultPalette () const ``` Retrieves the default color palette for this color scheme. **Returns:** Pointer to a newly allocated default palette. The caller takes ownership of the returned palette. ______________________________________________________________________ ### function getPalette *Returns a pointer to a color palette owned by the color scheme.* ```C++ const SBDPalette * SBDDataGraphNodeColorScheme::getPalette () const ``` Retrieves the current color palette. **Returns:** Pointer to the palette owned by the color scheme, or `nullptr` if no palette is set. ______________________________________________________________________ ### function hasPalette *Returns whether the color scheme has a color palette defined.* ```C++ bool SBDDataGraphNodeColorScheme::hasPalette () const ``` Checks if a color palette is currently set for the color scheme. **Returns:** `true` if a palette is assigned; otherwise `false`. ______________________________________________________________________ ### function isSerializable *Returns* `true` *when the class is serializable.* ```C++ virtual bool SBDDataGraphNodeColorScheme::isSerializable () const ``` Indicates whether the color scheme supports serialization. **Returns:** `true` if the color scheme can be serialized; otherwise `false`. ______________________________________________________________________ ### function requestUpdate *Requests a material update for a node to which the material that owns this color scheme is applied.* ```C++ void SBDDataGraphNodeColorScheme::requestUpdate () ``` Requests an update of the material that uses this color scheme. Notifies the owning material that the color scheme has changed, prompting a refresh of any visual representation. ______________________________________________________________________ ### function resetPalette *Resets the color palette to the default one for color schemes that can have it.* ```C++ void SBDDataGraphNodeColorScheme::resetPalette () ``` Resets the color palette to the default palette. If the color scheme supports a palette, this method replaces the current palette with a clone of the default palette. ______________________________________________________________________ ### function serialize *Serializes the color scheme.* ```C++ virtual void SBDDataGraphNodeColorScheme::serialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) const ``` Writes the color scheme data to the given serializer. This function does not modify the color scheme. **Parameters:** - `serializer` Pointer to the serializer used to write the data. - `nodeIndexer` Provides indexing information for nodes in the data graph. - `sdkVersionNumber` SDK version number used for compatibility (optional). - `classVersionNumber` Class version number used for compatibility (optional). ______________________________________________________________________ ### function setPalette *Sets the color palette for color schemes that can have it. The color scheme takes ownership of the color palette. If NULL is supplied then it will reset to the default color palette.* ```C++ void SBDDataGraphNodeColorScheme::setPalette ( SBDPalette * palette ) ``` Sets the color palette for the color scheme. The color scheme takes ownership of the provided palette. If `nullptr` is passed, the palette is reset to the default palette (if applicable). This operation may be recorded for undo/redo when appropriate. **Parameters:** - `palette` Pointer to the new palette to assign, or `nullptr` to reset to the default. ______________________________________________________________________ ### function unserialize *Unserializes the color scheme.* ```C++ virtual void SBDDataGraphNodeColorScheme::unserialize ( SBCSerializer * serializer, const SBNodeIndexer & nodeIndexer, const SBVersionNumber & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const SBVersionNumber & classVersionNumber=SBVersionNumber (1, 0, 0) ) ``` Deserializes the color scheme. Reads the color scheme data from the given serializer and updates the object. **Parameters:** - `serializer` Pointer to the serializer used to read the data. - `nodeIndexer` Provides indexing information for nodes in the data graph. - `sdkVersionNumber` SDK version number used for compatibility (optional). - `classVersionNumber` Class version number used for compatibility (optional). ______________________________________________________________________ ### function ~SBDDataGraphNodeColorScheme *Destructs the color scheme.* ```C++ virtual SBDDataGraphNodeColorScheme::~SBDDataGraphNodeColorScheme () ``` Destroys the color scheme. Releases any resources owned by the color scheme. ______________________________________________________________________ ## Protected Functions Documentation ### function SBDDataGraphNodeColorScheme [2/2] *Protected constructor.* ```C++ SBDDataGraphNodeColorScheme::SBDDataGraphNodeColorScheme ( SBDDataGraphNodeColorSchemeData * dataPointer ) ``` Constructs a color scheme with an existing data pointer. **Parameters:** - `dataPointer` Pointer to the internal data structure that backs the color scheme. The color scheme takes ownership of this pointer. ______________________________________________________________________ # SBNodeGetter # Class SBDDataGraphNodeGetter **template ** [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md) *This class describes a getter functor of a data graph node.* [More...](#detailed-description) - `#include ` Inherits the following classes: SBCFunctor1< Output, SBDDataGraphNode const * > ## Public Functions | Type | Name | | -------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeGetter**](#function-sbddatagraphnodegetter-12) () *Builds the node getter.* | | | [**SBDDataGraphNodeGetter**](#function-sbddatagraphnodegetter-22) (const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > &) *Builds the node getter.* | | virtual [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md) \* | [**clone**](#function-clone) () override const *Clones the getter.* | | virtual Output | [**operator()**](#function-operator) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) const * node) override = 0 *Performs the getter's operation on node* `node` *and returns the result.* | | virtual Output | [**operator()**](#function-operator_1) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) const * node) override const = 0 *Performs the getter's operation on node* `node` *and returns the result.* | | void | [**operator=**](#function-operator_2) (const [**SBDDataGraphNodeGetter**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGetter/index.md)< Output > &) *Assignment operator.* | | virtual | [**~SBDDataGraphNodeGetter**](#function-sbddatagraphnodegetter) () *Destructor.* | ## Detailed Description **Short name**: SBNodeGetter ## Public Functions Documentation ### function SBDDataGraphNodeGetter [1/2] *Builds the node getter.* ```C++ inline SBDDataGraphNodeGetter::SBDDataGraphNodeGetter () ``` ______________________________________________________________________ ### function SBDDataGraphNodeGetter [2/2] *Builds the node getter.* ```C++ inline SBDDataGraphNodeGetter::SBDDataGraphNodeGetter ( const SBDDataGraphNodeGetter < Output > & ) ``` ______________________________________________________________________ ### function clone *Clones the getter.* ```C++ inline virtual SBDDataGraphNodeGetter * SBDDataGraphNodeGetter::clone () override const ``` ______________________________________________________________________ ### function operator() *Performs the getter's operation on node* `node` *and returns the result.* ```C++ virtual Output SBDDataGraphNodeGetter::operator() ( SBDDataGraphNode const * node ) override = 0 ``` ______________________________________________________________________ ### function operator() *Performs the getter's operation on node* `node` *and returns the result.* ```C++ virtual Output SBDDataGraphNodeGetter::operator() ( SBDDataGraphNode const * node ) override const = 0 ``` ______________________________________________________________________ ### function operator= *Assignment operator.* ```C++ inline void SBDDataGraphNodeGetter::operator= ( const SBDDataGraphNodeGetter < Output > & ) ``` ______________________________________________________________________ ### function ~SBDDataGraphNodeGetter *Destructor.* ```C++ inline virtual SBDDataGraphNodeGetter::~SBDDataGraphNodeGetter () ``` ______________________________________________________________________ # SBNodeGroup # Class SBDDataGraphNodeGroup [**ClassList**](https://documentation.samson-connect.net/developers/latest/api/annotated/index.md) **>** [**SBDDataGraphNodeGroup**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md) *This class describes a node group.* [More...](#detailed-description) - `#include ` Inherits the following classes: [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) ## Public Types inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---- | --------------------------------------------------------------------------------------------------------------------------------------------------- | | enum | [**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) *The rendering pass.* | | enum | [**Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) *The type of the data graph node.* | ## Public Functions | Type | Name | | ------------------------------------------------------------------------------------------------------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SBDDataGraphNodeGroup**](#function-sbddatagraphnodegroup-12) () *Constructs a group.* | | | [**SBDDataGraphNodeGroup**](#function-sbddatagraphnodegroup-22) (const std::string & name, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) *Constructs a group with name* `name` *from the nodes in*`nodeVector` *.* | | virtual [**SBDDataGraphNodeGroup**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md) \* | [**clone**](#function-clone) () override *Returns a copy of the node and its descendants.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-12) (void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) override *Performs the* `action` *on this node group.* | | virtual void | [**forEachNodeDepthFirst**](#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) override *Performs the* `object` *'s*`action` *on this node group.* | | SBPointerIndexer< [**SBNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > const \* | [**getGroupNodes**](#function-getgroupnodes) () const *Returns the index of nodes belonging to the group.* | | [**SBDDataGraphNodeGroup**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md) \* | [**getNextGroup**](#function-getnextgroup) () const *Returns the next group in the document.* | | virtual void | [**getNodes**](#function-getnodes-12) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, [**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Collects nodes into* `nodeIndexer` *, based on a*`nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual void | [**getNodes**](#function-getnodes-22) ([**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Collects nodes into* `nodeIndexer` *, based on a*`selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | [**SBDDataGraphNodeGroup**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeGroup/index.md) \* | [**getPreviousGroup**](#function-getpreviousgroup) () const *Returns the previous group in the document.* | | unsigned int | [**getSize**](#function-getsize) () const *Returns the number of nodes belonging to the group.* | | virtual [**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) | [**getType**](#function-gettype) () override const *Returns the data graph node type.* | | virtual bool | [**hasNode**](#function-hasnode-12) ([**SBNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Checks for nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**hasNode**](#function-hasnode-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) override const *Checks for nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | virtual bool | [**isSerializable**](#function-isserializable) () override const *Returns* `true` \_\_ | | virtual void | [**print**](#function-print) (unsigned int offset=0) override const *Prints the group.* | | virtual void | [**serialize**](#function-serialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override const *Serializes the group.* | | virtual void | [**unserialize**](#function-unserialize) ([**SBCSerializer**](https://documentation.samson-connect.net/developers/latest/api/classSBCSerializer/index.md) * serializer, const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & sdkVersionNumber=SB_SDK_VERSION_NUMBER, const [**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md) & classVersionNumber=[**SBVersionNumber**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerVersionNumber/index.md)(1, 0, 0)) override *Unserializes the group.* | | virtual | [**~SBDDataGraphNodeGroup**](#function-sbddatagraphnodegroup) () *Destructs the group.* | ## Public Functions inherited from SBDDataGraphNode See [SBDDataGraphNode](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) | Type | Name | | ---------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-119) (SB_SBDDATAGRAPH_EXPORT, [**SBCClassProxy**](https://documentation.samson-connect.net/developers/latest/api/classSBCClassProxy/index.md) \*, GetProxy) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-219) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, This) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-319) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetParent) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-419) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetThis) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-519) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetNextNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-619) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetPreviousNode) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-719) (SB_SBDDATAGRAPH_EXPORT, [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \*, GetDocument) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-819) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*, GetRoot) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-919) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetNodeIndex) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1019) (SB_SBDDATAGRAPH_EXPORT, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type), GetType) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1119) (SB_SBDDATAGRAPH_EXPORT, bool, GetSelectionFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1219) (SB_SBDDATAGRAPH_EXPORT, bool, GetLockedFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1319) (SB_SBDDATAGRAPH_EXPORT, bool, GetVisibilityFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1419) (SB_SBDDATAGRAPH_EXPORT, bool, GetHighlightingFlag) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1519) (SB_SBDDATAGRAPH_EXPORT, unsigned int, GetFlags) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1619) (SB_SBDDATAGRAPH_EXPORT, std::string, GetName) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1719) (SB_SBDDATAGRAPH_EXPORT, std::string, GetClass) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1819) (SB_SBDDATAGRAPH_EXPORT, std::string, GetElement) | | | [**SB_NODE_GETTER_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_getter_0-1919) (SB_SBDDATAGRAPH_EXPORT, [**SBCContainerUUID**](https://documentation.samson-connect.net/developers/latest/api/classSBCContainerUUID/index.md), GetElementUUID) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-132) (SB_SBDDATAGRAPH_EXPORT, All) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-232) (SB_SBDDATAGRAPH_EXPORT, None) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-332) (SB_SBDDATAGRAPH_EXPORT, IsModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-432) (SB_SBDDATAGRAPH_EXPORT, IsAtom) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-532) (SB_SBDDATAGRAPH_EXPORT, IsBond) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-632) (SB_SBDDATAGRAPH_EXPORT, IsStructuralNode) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-732) (SB_SBDDATAGRAPH_EXPORT, IsStructuralModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-832) (SB_SBDDATAGRAPH_EXPORT, IsVisualModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-932) (SB_SBDDATAGRAPH_EXPORT, IsMesh) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1032) (SB_SBDDATAGRAPH_EXPORT, IsLight) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1132) (SB_SBDDATAGRAPH_EXPORT, IsInteractionModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1232) (SB_SBDDATAGRAPH_EXPORT, IsDynamicalModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1332) (SB_SBDDATAGRAPH_EXPORT, IsPropertyModel) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1432) (SB_SBDDATAGRAPH_EXPORT, IsSimulator) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1532) (SB_SBDDATAGRAPH_EXPORT, IsBallAndStick) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1632) (SB_SBDDATAGRAPH_EXPORT, IsLicorice) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1732) (SB_SBDDATAGRAPH_EXPORT, IsVanDerWaals) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1832) (SB_SBDDATAGRAPH_EXPORT, IsCartoon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-1932) (SB_SBDDATAGRAPH_EXPORT, IsRibbon) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2032) (SB_SBDDATAGRAPH_EXPORT, IsTube) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2132) (SB_SBDDATAGRAPH_EXPORT, IsGaussianSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2232) (SB_SBDDATAGRAPH_EXPORT, IsSolventAccessibleSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2332) (SB_SBDDATAGRAPH_EXPORT, IsSolventExcludedSurface) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2432) (SB_SBDDATAGRAPH_EXPORT, HasMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2532) (SB_SBDDATAGRAPH_EXPORT, OwnsMaterial) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2632) (SB_SBDDATAGRAPH_EXPORT, IsLocked) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2732) (SB_SBDDATAGRAPH_EXPORT, IsSerializable) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2832) (SB_SBDDATAGRAPH_EXPORT, IsCreated) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-2932) (SB_SBDDATAGRAPH_EXPORT, IsErased) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3032) (SB_SBDDATAGRAPH_EXPORT, IsSelected) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3132) (SB_SBDDATAGRAPH_EXPORT, IsVisible) | | | [**SB_NODE_PREDICATE_0**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_0-3232) (SB_SBDDATAGRAPH_EXPORT, IsHighlighted) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-12) (SB_SBDDATAGRAPH_EXPORT, IsType, [**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type)) | | | [**SB_NODE_PREDICATE_1**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-sb_node_predicate_1-22) (SB_SBDDATAGRAPH_EXPORT, HasOneOf, [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md)) | | virtual bool | [**addChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addchild) ([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) *Adds a child to the node.* | | bool | [**addMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-addmaterial) ([**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) * material) *Adds a material.* | | bool | [**baseSignalIsConnectedToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-basesignalisconnectedtoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) const *Returns* `true` *when the base signal is connected to a slot.* | | virtual bool | [**canAddChild**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchild) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node, const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * nextNode=nullptr) const *Returns whether this node can add* `node` *as a child.* | | virtual bool | [**canAddChildType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddchildtype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can add a node with type* `nodeType` *as a child.* | | bool | [**canAddMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canaddmaterial-12) () const *Returns whether can add a material to the node based on its type.* | | virtual bool | [**canHaveDescendantType**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-canhavedescendanttype) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType) const *Returns whether this node can have a node with type* `nodeType` *as a descendant.* | | virtual [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**clone**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-clone-12) () *Returns a copy of the node and its descendants.* | | void | [**connectBaseSignalToSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-connectbasesignaltoslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer, [**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * nextReferenceTarget=0, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) nextFunctionPointer=0) *Connects the base signal to a slot.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-12) ([**SBDDataGraphNode::Type**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-type) nodeType, bool selectedNodesOnly=false, const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `nodeType` *, a selection status and a*`visitPredicate` *, with or without dependencies.* | | unsigned int | [**countNodes**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-countnodes-22) (const SBNodePredicate & selectionPredicate=SBDDataGraphNode::All(), const SBNodePredicate & visitPredicate=SBDDataGraphNode::All(), bool includeDependencies=false) const *Counts nodes based on a* `selectionPredicate` *and a*`visitPredicate` *, with or without dependencies.* | | void | [**create**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-create) () *Creates the node.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-13) (const [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) * node) const *Returns* `true` *if and only if this node is*`node` *, or descends from it.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-23) (const [**SBNodeIndexer**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeIndexer/index.md) & nodeIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodeIndexer` *, or descends from one of them.* | | bool | [**descendsFrom**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-descendsfrom-33) (SBPointerIndexer< [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) > * nodePointerIndexer) const *Returns* `true` *if and only if this node is one of the nodes of the*`nodePointerIndexer` *, or descends from one of them.* | | void | [**disconnectBaseSignalFromSlot**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-disconnectbasesignalfromslot) ([**SBCReferenceTarget**](https://documentation.samson-connect.net/developers/latest/api/classSBCReferenceTarget/index.md) * referenceTarget, void(SBCReferenceTarget::\*)([**SBBaseEvent**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphBaseEvent/index.md) \*) functionPointer) *Disconnects the base signal from a slot.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-12) ([**RenderingPass**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#enum-renderingpass) renderingPass) *Displays the node.* | | virtual void | [**display**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-display-22) () *Displays the node (deprecated)* | | virtual void | [**displayForSelection**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforselection) () *Displays the node for selection purposes (deprecated)* | | virtual void | [**displayForShadow**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-displayforshadow) () *Displays the node for shadowing purposes (deprecated)* | | void | [**erase**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-erase) () *Erases the node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-12) (void(\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `action` *on this node.* | | virtual void | [**forEachNodeDepthFirst**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-foreachnodedepthfirst-22) ([**SBCClass**](https://documentation.samson-connect.net/developers/latest/api/classSBCClass/index.md) * object, void(SBCClass::\*)([**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \*node) action) *Performs the* `objects` *'s*`action` *on this node.* | | unsigned int | [**getDefaultOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaultopacity) () const *Returns the default opacity.* | | unsigned int | [**getDefaultTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdefaulttransparency) () const *Returns the default transparency.* | | [**SBDDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDocument/index.md) \* | [**getDocument**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getdocument) () const *Returns the document the node belongs to.* | | virtual unsigned int | [**getFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getflags) () const *Returns the flags.* | | virtual std::string | [**getHierarchyString**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethierarchystring) (const std::string & separator=" / ", bool includeNodeType=false) const *Returns a string with hierarchical information on the node and its parents names.* | | bool | [**getHighlightingFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-gethighlightingflag) () const *Returns the highlighting flag.* | | virtual unsigned int | [**getInheritedFlags**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedflags) () const *Returns the inherited flags.* | | float | [**getInheritedOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedopacity) () const *Returns the cumulative opacity, when taking into account the ascendants.* | | float | [**getInheritedTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getinheritedtransparency) () const *Returns the cumulative transparency, when taking into account the ascendants.* | | virtual bool | [**getLockedFlag**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getlockedflag) () const *Returns the locked flag.* | | [**SBDDataGraphNodeMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNodeMaterial/index.md) \* | [**getMaterial**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterial) () const *Returns the material.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getMaterialOwner**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaterialowner) () const *Returns the node whose material is inherited.* | | unsigned int | [**getMaximumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumopacity) () const *Returns the maximum opacity.* | | unsigned int | [**getMaximumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmaximumtransparency) () const *Returns the maximum transparency.* | | unsigned int | [**getMinimumOpacity**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumopacity) () const *Returns the minimum opacity.* | | unsigned int | [**getMinimumTransparency**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getminimumtransparency) () const *Returns the minimum transparency.* | | virtual [**SBQuantity::mass**](https://documentation.samson-connect.net/developers/latest/api/classSBDQuantity/#typedef-mass) | [**getMolecularWeight**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getmolecularweight) () *Returns the molecular weight.* | | virtual std::string const & | [**getName**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/#function-getname) () const *Returns the name of the node.* | | [**SBDDataGraphNode**](https://documentation.samson-connect.net/developers/latest/api/classSBDDataGraphNode/index.md) \* | [**getNextNode**](https://documentation.samson-connect.net/developers/latest/api/clas