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
8aede249
Commit
8aede249
authored
Nov 30, 2018
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make is_actor_handle public
parent
227ba3ed
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
41 additions
and
13 deletions
+41
-13
libcaf_core/caf/detail/type_traits.hpp
libcaf_core/caf/detail/type_traits.hpp
+0
-10
libcaf_core/caf/is_actor_handle.hpp
libcaf_core/caf/is_actor_handle.hpp
+37
-0
libcaf_core/caf/scheduled_actor.hpp
libcaf_core/caf/scheduled_actor.hpp
+4
-3
No files found.
libcaf_core/caf/detail/type_traits.hpp
View file @
8aede249
...
@@ -650,16 +650,6 @@ struct transfer_const<const T, U> {
...
@@ -650,16 +650,6 @@ struct transfer_const<const T, U> {
template
<
class
T
,
class
U
>
template
<
class
T
,
class
U
>
using
transfer_const_t
=
typename
transfer_const
<
T
,
U
>::
type
;
using
transfer_const_t
=
typename
transfer_const
<
T
,
U
>::
type
;
/// Checks whether `T` is an `actor` or a `typed_actor<...>`.
template
<
class
T
>
struct
is_actor_handle
:
std
::
false_type
{};
template
<
>
struct
is_actor_handle
<
actor
>
:
std
::
true_type
{};
template
<
class
...
Ts
>
struct
is_actor_handle
<
typed_actor
<
Ts
...
>>
:
std
::
true_type
{};
template
<
class
T
>
template
<
class
T
>
struct
is_stream
:
std
::
false_type
{};
struct
is_stream
:
std
::
false_type
{};
...
...
libcaf_core/caf/is_actor_handle.hpp
0 → 100644
View file @
8aede249
/******************************************************************************
* ____ _ _____ *
* / ___| / \ | ___| C++ *
* | | / _ \ | |_ Actor *
* | |___ / ___ \| _| Framework *
* \____/_/ \_|_| *
* *
* Copyright 2011-2018 Dominik Charousset *
* *
* Distributed under the terms and conditions of the BSD 3-Clause License or *
* (at your option) under the terms and conditions of the Boost Software *
* License 1.0. See accompanying files LICENSE and LICENSE_ALTERNATIVE. *
* *
* If you did not receive a copy of the license files, see *
* http://opensource.org/licenses/BSD-3-Clause and *
* http://www.boost.org/LICENSE_1_0.txt. *
******************************************************************************/
#pragma once
#include <type_traits>
#include "caf/fwd.hpp"
namespace
caf
{
/// Checks whether `T` is an `actor` or a `typed_actor<...>`.
template
<
class
T
>
struct
is_actor_handle
:
std
::
false_type
{};
template
<
>
struct
is_actor_handle
<
actor
>
:
std
::
true_type
{};
template
<
class
...
Ts
>
struct
is_actor_handle
<
typed_actor
<
Ts
...
>>
:
std
::
true_type
{};
}
// namespace caf
libcaf_core/caf/scheduled_actor.hpp
View file @
8aede249
...
@@ -37,6 +37,7 @@
...
@@ -37,6 +37,7 @@
#include "caf/fwd.hpp"
#include "caf/fwd.hpp"
#include "caf/inbound_path.hpp"
#include "caf/inbound_path.hpp"
#include "caf/invoke_message_result.hpp"
#include "caf/invoke_message_result.hpp"
#include "caf/is_actor_handle.hpp"
#include "caf/local_actor.hpp"
#include "caf/local_actor.hpp"
#include "caf/logger.hpp"
#include "caf/logger.hpp"
#include "caf/make_sink_result.hpp"
#include "caf/make_sink_result.hpp"
...
@@ -461,7 +462,7 @@ public:
...
@@ -461,7 +462,7 @@ public:
template
<
class
Init
,
class
Pull
,
class
Done
,
class
Finalize
=
unit_t
,
template
<
class
Init
,
class
Pull
,
class
Done
,
class
Finalize
=
unit_t
,
class
DownstreamManager
=
default_downstream_manager_t
<
Pull
>,
class
DownstreamManager
=
default_downstream_manager_t
<
Pull
>,
class
Trait
=
stream_source_trait_t
<
Pull
>>
class
Trait
=
stream_source_trait_t
<
Pull
>>
detail
::
enable_if_t
<!
detail
::
is_actor_handle
<
Init
>::
value
&&
Trait
::
valid
,
detail
::
enable_if_t
<!
is_actor_handle
<
Init
>::
value
&&
Trait
::
valid
,
make_source_result_t
<
DownstreamManager
>>
make_source_result_t
<
DownstreamManager
>>
make_source
(
Init
init
,
Pull
pull
,
Done
done
,
Finalize
finalize
=
{},
make_source
(
Init
init
,
Pull
pull
,
Done
done
,
Finalize
finalize
=
{},
policy
::
arg
<
DownstreamManager
>
token
=
{})
{
policy
::
arg
<
DownstreamManager
>
token
=
{})
{
...
@@ -474,7 +475,7 @@ public:
...
@@ -474,7 +475,7 @@ public:
class
Finalize
=
unit_t
,
class
Finalize
=
unit_t
,
class
DownstreamManager
=
default_downstream_manager_t
<
Pull
>,
class
DownstreamManager
=
default_downstream_manager_t
<
Pull
>,
class
Trait
=
stream_source_trait_t
<
Pull
>>
class
Trait
=
stream_source_trait_t
<
Pull
>>
detail
::
enable_if_t
<
detail
::
is_actor_handle
<
ActorHandle
>::
value
,
detail
::
enable_if_t
<
is_actor_handle
<
ActorHandle
>::
value
,
make_source_result_t
<
DownstreamManager
>>
make_source_result_t
<
DownstreamManager
>>
make_source
(
const
ActorHandle
&
dest
,
std
::
tuple
<
Ts
...
>
xs
,
Init
init
,
make_source
(
const
ActorHandle
&
dest
,
std
::
tuple
<
Ts
...
>
xs
,
Init
init
,
Pull
pull
,
Done
done
,
Finalize
fin
=
{},
Pull
pull
,
Done
done
,
Finalize
fin
=
{},
...
@@ -495,7 +496,7 @@ public:
...
@@ -495,7 +496,7 @@ public:
class
Finalize
=
unit_t
,
class
Finalize
=
unit_t
,
class
DownstreamManager
=
default_downstream_manager_t
<
Pull
>,
class
DownstreamManager
=
default_downstream_manager_t
<
Pull
>,
class
Trait
=
stream_source_trait_t
<
Pull
>>
class
Trait
=
stream_source_trait_t
<
Pull
>>
detail
::
enable_if_t
<
detail
::
is_actor_handle
<
ActorHandle
>::
value
&&
Trait
::
valid
,
detail
::
enable_if_t
<
is_actor_handle
<
ActorHandle
>::
value
&&
Trait
::
valid
,
make_source_result_t
<
DownstreamManager
>>
make_source_result_t
<
DownstreamManager
>>
make_source
(
const
ActorHandle
&
dest
,
Init
init
,
Pull
pull
,
Done
done
,
make_source
(
const
ActorHandle
&
dest
,
Init
init
,
Pull
pull
,
Done
done
,
Finalize
fin
=
{},
Finalize
fin
=
{},
...
...
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