bWidgets
Core widget toolkit designed for Blender
bWidgets::bwFunctorInterface Class Referenceabstract

Abstract function object class. More...

#include <bwFunctorInterface.h>

Public Member Functions

virtual void operator() ()=0
 
virtual ~bwFunctorInterface ()=default
 

Detailed Description

Abstract function object class.

We use this to avoid having to use function pointers with ugly void pointers to pass type-generic data. Instead, just derive from this interface and add needed data to the derived class.

Example implementation:

class WidgetApplyFunctor : public bwFunctorInterface
{
bwWidget& some_widget;
public:
WidgetApplyFunctor(bwWidget& widget) :
some_widget(widget)
{
}
inline void operator()() override
{
some_widget.do_stuff();
}
};
virtual void operator()()=0

Constructor & Destructor Documentation

◆ ~bwFunctorInterface()

virtual bWidgets::bwFunctorInterface::~bwFunctorInterface ( )
virtualdefault

Member Function Documentation

◆ operator()()

virtual void bWidgets::bwFunctorInterface::operator() ( )
pure virtual

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