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
4255a346
Commit
4255a346
authored
Jun 22, 2015
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove temporaries in `abstract_event_based_actor`
parent
d73bfcfa
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
20 deletions
+22
-20
libcaf_core/caf/abstract_event_based_actor.hpp
libcaf_core/caf/abstract_event_based_actor.hpp
+22
-20
No files found.
libcaf_core/caf/abstract_event_based_actor.hpp
View file @
4255a346
...
@@ -32,12 +32,10 @@
...
@@ -32,12 +32,10 @@
namespace
caf
{
namespace
caf
{
/*
/// Base type for statically and dynamically typed event-based actors.
* Base type for typed and untyped event-based actors.
/// @tparam BehaviorType Denotes the expected type for become().
* @tparam BehaviorType Denotes the expected type for become().
/// @tparam HasSyncSend Configures whether this base extends `sync_sender`.
* @tparam HasSyncSend Configures whether this base class extends `sync_sender`.
/// @tparam Base Either `local_actor` (default) or a subtype thereof.
* @extends local_actor
*/
template
<
class
BehaviorType
,
bool
HasSyncSend
,
class
Base
=
local_actor
>
template
<
class
BehaviorType
,
bool
HasSyncSend
,
class
Base
=
local_actor
>
class
abstract_event_based_actor
:
public
Base
{
class
abstract_event_based_actor
:
public
Base
{
public:
public:
...
@@ -60,19 +58,22 @@ public:
...
@@ -60,19 +58,22 @@ public:
this
->
do_become
(
std
::
move
(
bhvr
.
unbox
()),
false
);
this
->
do_become
(
std
::
move
(
bhvr
.
unbox
()),
false
);
}
}
template
<
class
T
,
class
...
Ts
>
template
<
class
T
0
,
class
T1
,
class
...
Ts
>
typename
std
::
enable_if
<
typename
std
::
enable_if
<
!
std
::
is_same
<
keep_behavior_t
,
typename
std
::
decay
<
T
>::
type
>::
value
,
!
std
::
is_same
<
keep_behavior_t
,
typename
std
::
decay
<
T0
>::
type
>::
value
void
>::
type
>::
type
become
(
T
&&
x
,
Ts
&&
...
xs
)
{
become
(
T0
&&
x0
,
T1
&&
x1
,
Ts
&&
...
xs
)
{
behavior_type
bhvr
{
std
::
forward
<
T
>
(
x
),
std
::
forward
<
Ts
>
(
xs
)...};
behavior_type
bhvr
{
std
::
forward
<
T0
>
(
x0
),
std
::
forward
<
T1
>
(
x1
),
std
::
forward
<
Ts
>
(
xs
)...};
this
->
do_become
(
std
::
move
(
bhvr
.
unbox
()),
true
);
this
->
do_become
(
std
::
move
(
bhvr
.
unbox
()),
true
);
}
}
template
<
class
...
Ts
>
template
<
class
T0
,
class
T1
,
class
...
Ts
>
void
become
(
const
keep_behavior_t
&
,
Ts
&&
...
xs
)
{
void
become
(
const
keep_behavior_t
&
,
T0
&&
x0
,
T1
&&
x1
,
Ts
&&
...
xs
)
{
behavior_type
bhvr
{
std
::
forward
<
Ts
>
(
xs
)...};
behavior_type
bhvr
{
std
::
forward
<
T0
>
(
x0
),
std
::
forward
<
T1
>
(
x1
),
std
::
forward
<
Ts
>
(
xs
)...};
this
->
do_become
(
std
::
move
(
bhvr
.
unbox
()),
false
);
this
->
do_become
(
std
::
move
(
bhvr
.
unbox
()),
false
);
}
}
...
@@ -84,15 +85,16 @@ public:
...
@@ -84,15 +85,16 @@ public:
template
<
class
BehaviorType
,
class
Base
>
template
<
class
BehaviorType
,
class
Base
>
class
abstract_event_based_actor
<
BehaviorType
,
true
,
Base
>
class
abstract_event_based_actor
<
BehaviorType
,
true
,
Base
>
:
public
extend
<
abstract_event_based_actor
<
BehaviorType
,
false
,
Base
>>
:
public
extend
<
abstract_event_based_actor
<
BehaviorType
,
false
,
Base
>>
::
template
with
<
mixin
::
sync_sender
<
nonblocking_response_handle_tag
>
::
template
impl
>
{
::
template
with
<
mixin
::
sync_sender
<
nonblocking_response_handle_tag
>
::
template
impl
>
{
public:
public:
using
super
using
super
=
typename
extend
<
abstract_event_based_actor
<
BehaviorType
,
false
,
Base
>>::
=
typename
extend
<
abstract_event_based_actor
<
BehaviorType
,
false
,
Base
>>
template
with
<
mixin
::
sync_sender
<
nonblocking_response_handle_tag
>
::
::
template
with
<
mixin
::
sync_sender
<
nonblocking_response_handle_tag
>
template
impl
>;
::
template
impl
>;
template
<
class
...
Ts
>
template
<
class
...
Ts
>
abstract_event_based_actor
(
Ts
&&
...
xs
)
abstract_event_based_actor
(
Ts
&&
...
xs
)
:
super
(
std
::
forward
<
Ts
>
(
xs
)...)
{
:
super
(
std
::
forward
<
Ts
>
(
xs
)...)
{
// nop
// nop
}
}
};
};
...
...
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