libcopp
2.3.1
Loading...
Searching...
No Matches
test
cli
cmd_option_bindt_mf_cc.h
Go to the documentation of this file.
1
#ifndef UTIL_CLI_CMDOPTIONBINDT_MF_CC_H
2
#define UTIL_CLI_CMDOPTIONBINDT_MF_CC_H
3
4
#pragma once
5
6
/*
7
* cmd_option_bindt_mf_cc.h
8
*
9
* Created on: 2012-01-18
10
* Author: OWenT
11
*
12
* bind to member function
13
*/
14
15
namespace
util
{
16
namespace
cli {
17
// 绑定器集合
18
namespace
binder {
19
// ============================
20
// === 类绑定 ===
21
// ============================
22
23
template
<
typename
_T,
typename
_F>
24
class
cmd_option_bindt_mf_cc_caller
{
25
private
:
26
_F
mem_func_
;
27
28
public
:
29
cmd_option_bindt_mf_cc_caller
(_F f) :
mem_func_
(f) {}
30
31
template
<
typename
_TCBP,
typename
... _Args>
32
void
operator()
(_TCBP ¶m, _T *arg0, _Args &...args) {
33
(arg0->*
mem_func_
)(param, args...);
34
}
35
36
template
<
typename
_TCBP,
typename
... _Args>
37
void
operator()
(_TCBP ¶m, _T &arg0, _Args &...args) {
38
(arg0.*
mem_func_
)(param, args...);
39
}
40
};
41
}
// namespace binder
42
}
// namespace cli
43
}
// namespace util
44
#endif
/* _CMDOPTIONBINDT_MF_CC_H_ */
util::cli::binder::cmd_option_bindt_mf_cc_caller
Definition
cmd_option_bindt_mf_cc.h:24
util::cli::binder::cmd_option_bindt_mf_cc_caller::cmd_option_bindt_mf_cc_caller
cmd_option_bindt_mf_cc_caller(_F f)
Definition
cmd_option_bindt_mf_cc.h:29
util::cli::binder::cmd_option_bindt_mf_cc_caller::mem_func_
_F mem_func_
Definition
cmd_option_bindt_mf_cc.h:26
util::cli::binder::cmd_option_bindt_mf_cc_caller::operator()
void operator()(_TCBP ¶m, _T *arg0, _Args &...args)
Definition
cmd_option_bindt_mf_cc.h:32
util::cli::binder::cmd_option_bindt_mf_cc_caller::operator()
void operator()(_TCBP ¶m, _T &arg0, _Args &...args)
Definition
cmd_option_bindt_mf_cc.h:37
util
Definition
atomic_int_type.h:86
Generated by
1.9.8