mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-11 22:03:01 -06:00
Improved CallbackArgTarget
git-svn-id: svn://ultimatepp.org/upp/trunk@633 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
9cbcdd3ebb
commit
8287da742e
1 changed files with 3 additions and 0 deletions
|
|
@ -383,6 +383,7 @@ class CallbackArgTarget
|
|||
T result;
|
||||
|
||||
void SetResult(const T& value) { result = value; }
|
||||
void Set(T value) { result = value; }
|
||||
|
||||
public:
|
||||
typedef CallbackArgTarget CLASSNAME;
|
||||
|
|
@ -391,6 +392,8 @@ public:
|
|||
bool IsNullInstance() const { return IsNull(result); }
|
||||
|
||||
Callback operator[](const T& value) { return THISBACK1(SetResult, value); }
|
||||
operator Callback1<const T&>() { return THISBACK(SetResult); }
|
||||
operator Callback1<T>() { return THISBACK(Set); }
|
||||
|
||||
CallbackArgTarget() { result = Null; }
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue