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
7ad680ec
Commit
7ad680ec
authored
Jul 27, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Enable anon_send in composable behaviors
parent
70f560bc
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
5 deletions
+25
-5
libcaf_core/caf/actor_cast.hpp
libcaf_core/caf/actor_cast.hpp
+4
-3
libcaf_core/caf/fwd.hpp
libcaf_core/caf/fwd.hpp
+1
-0
libcaf_core/caf/mixin/sender.hpp
libcaf_core/caf/mixin/sender.hpp
+7
-2
libcaf_core/caf/typed_actor_pointer.hpp
libcaf_core/caf/typed_actor_pointer.hpp
+8
-0
libcaf_core/caf/typed_actor_view.hpp
libcaf_core/caf/typed_actor_view.hpp
+5
-0
No files found.
libcaf_core/caf/actor_cast.hpp
View file @
7ad680ec
...
@@ -65,9 +65,10 @@ struct is_weak_ptr {
...
@@ -65,9 +65,10 @@ struct is_weak_ptr {
};
};
template
<
class
T
>
template
<
class
T
>
struct
is_weak_ptr
<
T
*>
{
struct
is_weak_ptr
<
T
*>
:
std
::
false_type
{};
static
constexpr
bool
value
=
false
;
};
template
<
class
...
Ts
>
struct
is_weak_ptr
<
typed_actor_pointer
<
Ts
...
>>
:
std
::
false_type
{};
template
<
class
T
>
template
<
class
T
>
struct
is_non_null_handle
{
struct
is_non_null_handle
{
...
...
libcaf_core/caf/fwd.hpp
View file @
7ad680ec
...
@@ -44,6 +44,7 @@ template <class, class, int> class actor_cast_access;
...
@@ -44,6 +44,7 @@ template <class, class, int> class actor_cast_access;
template
<
class
...
>
class
result
;
template
<
class
...
>
class
result
;
template
<
class
...
>
class
delegated
;
template
<
class
...
>
class
delegated
;
template
<
class
...
>
class
typed_actor
;
template
<
class
...
>
class
typed_actor
;
template
<
class
...
>
class
typed_actor_pointer
;
template
<
class
...
>
class
typed_response_promise
;
template
<
class
...
>
class
typed_response_promise
;
template
<
class
...
>
class
typed_event_based_actor
;
template
<
class
...
>
class
typed_event_based_actor
;
...
...
libcaf_core/caf/mixin/sender.hpp
View file @
7ad680ec
...
@@ -142,7 +142,7 @@ public:
...
@@ -142,7 +142,7 @@ public:
>::
type
>::
type
>::
value
,
>::
value
,
"this actor does not accept the response message"
);
"this actor does not accept the response message"
);
this
->
system
().
scheduler
().
delayed_send
(
dptr
()
->
system
().
scheduler
().
delayed_send
(
rtime
,
this
->
ctrl
(),
actor_cast
<
strong_actor_ptr
>
(
dest
),
rtime
,
this
->
ctrl
(),
actor_cast
<
strong_actor_ptr
>
(
dest
),
message_id
::
make
(
P
),
make_message
(
std
::
forward
<
Ts
>
(
xs
)...));
message_id
::
make
(
P
),
make_message
(
std
::
forward
<
Ts
>
(
xs
)...));
}
}
...
@@ -161,10 +161,15 @@ public:
...
@@ -161,10 +161,15 @@ public:
token
token
>::
value
,
>::
value
,
"receiver does not accept given message"
);
"receiver does not accept given message"
);
this
->
system
().
scheduler
().
delayed_send
(
dptr
()
->
system
().
scheduler
().
delayed_send
(
rtime
,
nullptr
,
actor_cast
<
strong_actor_ptr
>
(
dest
),
rtime
,
nullptr
,
actor_cast
<
strong_actor_ptr
>
(
dest
),
message_id
::
make
(
P
),
make_message
(
std
::
forward
<
Ts
>
(
xs
)...));
message_id
::
make
(
P
),
make_message
(
std
::
forward
<
Ts
>
(
xs
)...));
}
}
private:
Subtype
*
dptr
()
{
return
static_cast
<
Subtype
*>
(
this
);
}
};
};
}
// namespace mixin
}
// namespace mixin
...
...
libcaf_core/caf/typed_actor_pointer.hpp
View file @
7ad680ec
...
@@ -29,6 +29,9 @@ namespace caf {
...
@@ -29,6 +29,9 @@ namespace caf {
template
<
class
...
Sigs
>
template
<
class
...
Sigs
>
class
typed_actor_pointer
{
class
typed_actor_pointer
{
public:
public:
/// Stores the template parameter pack.
using
signatures
=
detail
::
type_list
<
Sigs
...
>
;
template
<
class
Supertype
>
template
<
class
Supertype
>
typed_actor_pointer
(
Supertype
*
selfptr
)
:
view_
(
selfptr
)
{
typed_actor_pointer
(
Supertype
*
selfptr
)
:
view_
(
selfptr
)
{
using
namespace
caf
::
detail
;
using
namespace
caf
::
detail
;
...
@@ -47,6 +50,11 @@ public:
...
@@ -47,6 +50,11 @@ public:
return
&
view_
;
return
&
view_
;
}
}
/// @private
actor_control_block
*
get
()
const
{
return
actor_control_block
::
from
(
view_
.
selfptr
());
}
private:
private:
typed_actor_view
<
Sigs
...
>
view_
;
typed_actor_view
<
Sigs
...
>
view_
;
};
};
...
...
libcaf_core/caf/typed_actor_view.hpp
View file @
7ad680ec
...
@@ -95,6 +95,11 @@ public:
...
@@ -95,6 +95,11 @@ public:
return
self_
->
response
(
std
::
forward
<
Ts
>
(
xs
)...);
return
self_
->
response
(
std
::
forward
<
Ts
>
(
xs
)...);
}
}
/// @private
scheduled_actor
*
selfptr
()
const
{
return
self_
;
}
private:
private:
scheduled_actor
*
self_
;
scheduled_actor
*
self_
;
};
};
...
...
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