mFrame
載入中...
搜尋中...
無符合項目
BiConsumerEvent.h
1
7#ifndef MFRAME_CD612142_B47C_4196_98D0_5562F4AF953E
8#define MFRAME_CD612142_B47C_4196_98D0_5562F4AF953E
9
10/* ***************************************************************************************
11 * Include
12 */
13
14//----------------------------------------------------------------------------------------
15
16//----------------------------------------------------------------------------------------
17#include "./../func/BiConsumer.h"
18#include "./../lang/Object.h"
19
20/* ***************************************************************************************
21 * Namespace
22 */
23namespace mframe::func {
24 class BiConsumerEvent;
25}
26
27/* ***************************************************************************************
28 * Class/Interface/Struct/Enum
29 */
32 /* *************************************************************************************
33 * Variable
34 */
35 private:
36 void (*vFunction)(Interface&, Interface&);
37
38 /* *************************************************************************************
39 * Abstract Method
40 */
41
42 /* *************************************************************************************
43 * Construct Method
44 */
45 public:
50 template <typename T, typename U>
51 BiConsumerEvent(void (*function)(T&, U&)) {
52 this->vFunction = reinterpret_cast<void (*)(Interface&, Interface&)>(function);
53 return;
54 }
55
60 virtual ~BiConsumerEvent(void) override;
61
62 /* *************************************************************************************
63 * Operator Method
64 */
65 public:
73 template <typename T, typename U>
74 inline operator const BiConsumer<T, U>&(void) const {
75 const BiConsumer<>* src = this;
76 return *reinterpret_cast<const BiConsumer<T, U>*>(src);
77 }
78
85 template <typename T, typename U>
86 inline operator BiConsumer<T, U>&(void) {
87 BiConsumer<>* src = this;
88 return *reinterpret_cast<BiConsumer<T, U>*>(src);
89 }
90
91 /* *************************************************************************************
92 * Public Method <Override> mframe::func::BiConsumer<>
93 */
94 public:
95 virtual void accept(Interface& t, Interface& u) override;
96
97 /* *************************************************************************************
98 * Public Method
99 */
100
101 /* *************************************************************************************
102 * Protected Method
103 */
104
105 /* *************************************************************************************
106 * Private Method
107 */
108
109 /* *************************************************************************************
110 * Static Variable
111 */
112
113 /* *************************************************************************************
114 * Static Method
115 */
116};
117
118/* ***************************************************************************************
119 * End of file
120 */
121
122#endif /* MFRAME_CD612142_B47C_4196_98D0_5562F4AF953E */
Definition BiConsumerEvent.h:31
BiConsumerEvent(void(*function)(T &, U &))
Construct a new object.
Definition BiConsumerEvent.h:51
virtual ~BiConsumerEvent(void) override
Destroy the object.
Definition Object.h:34
Definition BiConsumer.h:22
Definition BiConsumer.h:31
Definition Interface.h:134