mirror of
https://github.com/AntonioND/tobkit.git
synced 2025-06-19 00:55:33 -04:00
36 lines
587 B
C++
36 lines
587 B
C++
#include <sigc++/sigc++.h>
|
|
|
|
class Base
|
|
: virtual public sigc::trackable
|
|
{
|
|
};
|
|
|
|
class Base2
|
|
{
|
|
public:
|
|
virtual ~Base2()
|
|
{}
|
|
};
|
|
|
|
class Derived
|
|
: virtual public Base,
|
|
public Base2
|
|
{
|
|
public:
|
|
void method()
|
|
{}
|
|
};
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
Derived *instance = new Derived();
|
|
sigc::slot<void> handler = sigc::mem_fun(instance, &Derived::method);
|
|
sigc::slot<void> param =
|
|
sigc::bind(sigc::slot<void, Derived &>(), sigc::ref(*instance));
|
|
sigc::slot<Derived> ret =
|
|
sigc::bind_return(sigc::slot<void>(), sigc::ref(*instance));
|
|
delete instance;
|
|
|
|
return 0;
|
|
}
|