ultimatepp/uppdev/Callback/Callback.cpp
cxl 351994a6cc Adding uppdev....
git-svn-id: svn://ultimatepp.org/upp/trunk@328 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2008-08-15 08:36:24 +00:00

38 lines
555 B
C++

#include <Core/Core.h>
using namespace Upp;
void TestFn(int a, int b, int c)
{
LOG("TestFn" << a << b << c);
}
struct Test : Pte<Test> {
void TestMethod(int a, int b, int c) {
LOG("TestMethod" << a << b << c);
}
Callback cb1;
Callback cb2;
Callback cb3;
void Perform()
{
cb1();
cb2();
cb3();
}
typedef Test CLASSNAME;
Test() {
cb1 = THISBACK3(TestMethod, 1, 2, 3);
cb2 = PTEBACK3(TestMethod, 3, 2, 1);
cb3 = callback3(TestFn, 4, 5, 6);
}
};
CONSOLE_APP_MAIN
{
Test().Perform();
}