KDBindings API Documentation  1.0.95
Public Member Functions | List of all members
KDBindings::node_abs Struct Reference

An example struct that is used with a call to KDBINDINGS_DECLARE_FUNCTION to declare all overloads of std::abs as usable in data binding. More...

#include <node_functions.h>

Public Member Functions

template<typename... Ts>
auto operator() (Ts &&...x) const
 The operator() is overloaded so the struct can be used as a function object. More...
 

Detailed Description

An example struct that is used with a call to KDBINDINGS_DECLARE_FUNCTION to declare all overloads of std::abs as usable in data binding.

Because of the way node_abs overloads its operator(), it can be used in a call to KDBINDINGS_DECLARE_FUNCTION like this:

#define KDBINDINGS_DECLARE_FUNCTION(NAME, FUNC)
KDBINDINGS_DECLARE_FUNCTION is a helper macro to declare and define functions for use in data binding...

To generate such a struct for another function, use the KDBINDINGS_DECLARE_FUNCTION_OBJECT macro.

Definition at line 72 of file node_functions.h.

Member Function Documentation

◆ operator()()

template<typename... Ts>
auto KDBindings::node_abs::operator() ( Ts &&...  x) const
inline

The operator() is overloaded so the struct can be used as a function object.

Because this operator is templated, a single instance of node_abs can refer to all overloads of std::abs.

Definition at line 80 of file node_functions.h.


The documentation for this struct was generated from the following file:

© Klarälvdalens Datakonsult AB (KDAB)
"The Qt, C++ and OpenGL Experts"
https://www.kdab.com/
KDBindings
Reactive programming & data binding in C++
https://github.com/KDAB/KDBindings/
Generated by doxygen 1.9.1