acme
Foundational cross-platform layer of the ca2 framework
Loading...
Searching...
No Matches
predicate_process.h
1#pragma once
2
3
4//template < typename PRED >
5//class predicate_future :
6// virtual public ::matter
7//{
8//public:
9//
10//
11// PRED m_predicate;
12//
13//
14// predicate_future(PRED pred) :
15// m_predicate(pred)
16// {
17//
18// }
19//
20//
21// virtual ~predicate_future()
22// {
23//
24//
25// }
26//
27//
28// virtual void run() override
29// {
30//
31// throw ::interface_only();
32//
33// throw ::interface_only();
34//
35// }
36//
37//
38// void receive_response(const ::payload & payload) override
39// {
40//
41// m_predicate(payload);
42//
43// }
44//
45//
46//};
47//
48
49
50template < typename PRED >
51class predicate_process :
52 virtual public matter
53{
54public:
55
56 PRED m_predicate;
57 //future() {}
58
59 //future(const ::future& future) : function((const ::function &) future) { }
60 //future(::future * pfuture) : function((const ::function &) *pfuture) { }
61 predicate_process(PRED pred) : m_predicate(pred) { }
62
63
64 virtual void operator()(const ::payload & payload) override
65 {
66
67 m_predicate(payload);
68
69 }
70
71
72 //template < typename PRED >
73 //void pred(PRED pred);
74
75
76 //inline future& operator = (const ::future& future) { m_pmatter = future.m_pmatter; return *this; }
77 //future& operator = (const ::payload & payload);
78
79};
80
81
82//template < typename PRED >
83//::future __process(PRED pred)
84//{
85//
86// return allocateø predicate_process< PRED > (pred);
87//
88//}
89
90
91
Definition payload.h:54