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
6a8fd3e5
Commit
6a8fd3e5
authored
Aug 07, 2014
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into develop
parents
a9b54271
55417751
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
26 deletions
+17
-26
libcaf_core/caf/event_based_actor.hpp
libcaf_core/caf/event_based_actor.hpp
+17
-26
No files found.
libcaf_core/caf/event_based_actor.hpp
View file @
6a8fd3e5
...
...
@@ -17,8 +17,8 @@
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#ifndef CAF_
UNTYP
ED_ACTOR_HPP
#define CAF_
UNTYP
ED_ACTOR_HPP
#ifndef CAF_
EVENT_BAS
ED_ACTOR_HPP
#define CAF_
EVENT_BAS
ED_ACTOR_HPP
#include <type_traits>
...
...
@@ -41,16 +41,19 @@ namespace caf {
* A cooperatively scheduled, event-based actor implementation.
* This is the recommended base class for user-defined actors and is used
* implicitly when spawning functor-based actors without the
* {@link blocking_api} flag.
*
* `blocking_api` flag.
* @extends local_actor
*/
class
event_based_actor
:
public
extend
<
local_actor
,
event_based_actor
>::
with
<
mixin
::
mailbox_based
,
mixin
::
behavior_stack_based
<
behavior
>::
impl
,
:
public
extend
<
local_actor
,
event_based_actor
>::
with
<
mixin
::
mailbox_based
,
mixin
::
behavior_stack_based
<
behavior
>::
impl
,
mixin
::
sync_sender
<
nonblocking_response_handle_tag
>::
impl
>
{
public:
/**
* Forwards the last received message to `whom`.
*/
void
forward_to
(
const
actor
&
whom
);
event_based_actor
();
...
...
@@ -59,36 +62,24 @@ class event_based_actor
class
functor_based
;
protected:
/**
* Returns the initial actor behavior.
*/
virtual
behavior
make_behavior
()
=
0
;
/**
* Forwards the last received message to `whom`.
*/
void
forward_to
(
const
actor
&
whom
);
bool
m_initialized
;
};
class
event_based_actor
::
functor_based
:
public
extend
<
event_based_actor
>::
with
<
mixin
::
functor_based
>
{
using
super
=
combined_type
;
class
event_based_actor
::
functor_based
:
public
extend
<
event_based_actor
>::
with
<
mixin
::
functor_based
>
{
public:
template
<
class
...
Ts
>
functor_based
(
Ts
&&
...
vs
)
:
super
(
std
::
forward
<
Ts
>
(
vs
)...)
{}
functor_based
(
Ts
&&
...
vs
)
:
combined_type
(
std
::
forward
<
Ts
>
(
vs
)...)
{
// nop
}
behavior
make_behavior
()
override
;
};
}
// namespace caf
#endif // CAF_
UNTYP
ED_ACTOR_HPP
#endif // CAF_
EVENT_BAS
ED_ACTOR_HPP
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