Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
Actor Framework
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
cpp-libs
Actor Framework
Commits
9ecec36b
Commit
9ecec36b
authored
Aug 26, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #341 from ufownl/topic/typed_stateful_broker
Typed stateful broker
parents
e140966f
62ffbbbe
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
0 deletions
+28
-0
libcaf_core/caf/infer_handle.hpp
libcaf_core/caf/infer_handle.hpp
+18
-0
libcaf_core/caf/typed_actor.hpp
libcaf_core/caf/typed_actor.hpp
+10
-0
No files found.
libcaf_core/caf/infer_handle.hpp
View file @
9ecec36b
...
@@ -126,6 +126,24 @@ struct infer_handle_from_fun_impl<Result,
...
@@ -126,6 +126,24 @@ struct infer_handle_from_fun_impl<Result,
static
constexpr
spawn_mode
mode
=
spawn_mode
::
function_with_selfptr
;
static
constexpr
spawn_mode
mode
=
spawn_mode
::
function_with_selfptr
;
};
};
// statically typed stateful broker with self pointer
template
<
class
Result
,
class
State
,
class
...
Sigs
>
struct
infer_handle_from_fun_impl
<
Result
,
experimental
::
stateful_actor
<
State
,
io
::
experimental
::
typed_broker
<
Sigs
...
>
>*
,
true
>
{
using
type
=
typed_actor
<
Sigs
...
>
;
using
impl
=
experimental
::
stateful_actor
<
State
,
io
::
experimental
::
typed_broker
<
Sigs
...
>
>
;
using
behavior_type
=
typed_behavior
<
Sigs
...
>
;
static
constexpr
spawn_mode
mode
=
spawn_mode
::
function_with_selfptr
;
};
template
<
class
F
,
class
Trait
=
typename
detail
::
get_callable_trait
<
F
>
::
type
>
template
<
class
F
,
class
Trait
=
typename
detail
::
get_callable_trait
<
F
>
::
type
>
struct
infer_handle_from_fun
{
struct
infer_handle_from_fun
{
using
result_type
=
typename
Trait
::
result_type
;
using
result_type
=
typename
Trait
::
result_type
;
...
...
libcaf_core/caf/typed_actor.hpp
View file @
9ecec36b
...
@@ -104,6 +104,16 @@ class typed_actor : detail::comparable<typed_actor<Sigs...>>,
...
@@ -104,6 +104,16 @@ class typed_actor : detail::comparable<typed_actor<Sigs...>>,
template
<
class
State
>
template
<
class
State
>
using
stateful_pointer
=
experimental
::
stateful_actor
<
State
,
base
>*
;
using
stateful_pointer
=
experimental
::
stateful_actor
<
State
,
base
>*
;
/// Identifies the broker_base class for this kind of actor with actor.
template
<
class
State
>
using
stateful_broker_base
=
experimental
::
stateful_actor
<
State
,
broker_base
>
;
/// Identifies the broker_base class for this kind of actor with actor.
template
<
class
State
>
using
stateful_broker_pointer
=
experimental
::
stateful_actor
<
State
,
broker_base
>*
;
typed_actor
()
=
default
;
typed_actor
()
=
default
;
typed_actor
(
typed_actor
&&
)
=
default
;
typed_actor
(
typed_actor
&&
)
=
default
;
typed_actor
(
const
typed_actor
&
)
=
default
;
typed_actor
(
const
typed_actor
&
)
=
default
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment