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
c868d8c9
Commit
c868d8c9
authored
Jan 06, 2012
by
neverlord
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed spawn(..., self, ...)
parent
0f85ceb4
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
6 deletions
+30
-6
cppa/detail/get_behavior.hpp
cppa/detail/get_behavior.hpp
+14
-2
cppa/detail/implicit_conversions.hpp
cppa/detail/implicit_conversions.hpp
+5
-1
cppa/self.hpp
cppa/self.hpp
+6
-3
src/self.cpp
src/self.cpp
+5
-0
No files found.
cppa/detail/get_behavior.hpp
View file @
c868d8c9
...
...
@@ -62,7 +62,13 @@ class ftor_behavior<true, true, F, Args...> : public scheduled_actor
static_assert
(
sizeof
...(
Args
)
>
0
,
"sizeof...(Args) == 0"
);
F
m_fun
;
tdata
<
Args
...
>
m_args
;
typedef
typename
tdata_from_type_list
<
typename
util
::
type_list_apply
<
util
::
type_list
<
Args
...
>
,
implicit_conversions
>::
type
>::
type
tdata_type
;
tdata_type
m_args
;
public:
...
...
@@ -95,7 +101,13 @@ class ftor_behavior<false, true, F, Args...> : public scheduled_actor
static_assert
(
sizeof
...(
Args
)
>
0
,
"sizeof...(Args) == 0"
);
F
m_fun
;
tdata
<
Args
...
>
m_args
;
typedef
typename
tdata_from_type_list
<
typename
util
::
type_list_apply
<
util
::
type_list
<
Args
...
>
,
implicit_conversions
>::
type
>::
type
tdata_type
;
tdata_type
m_args
;
public:
...
...
cppa/detail/implicit_conversions.hpp
View file @
c868d8c9
...
...
@@ -34,6 +34,7 @@
#include <string>
#include <type_traits>
#include "cppa/self.hpp"
#include "cppa/actor.hpp"
#include "cppa/util/is_array_of.hpp"
...
...
@@ -67,8 +68,11 @@ struct implicit_conversions
typedef
typename
util
::
replace_type
<
subtype3
,
actor_ptr
,
std
::
is_same
<
actor
*
,
T
>
,
std
::
is_same
<
local_actor
*
,
T
>>::
type
std
::
is_same
<
local_actor
*
,
T
>
,
std
::
is_same
<
self_type
,
T
>
,
std
::
is_same
<
self_type
,
T
>>::
type
type
;
};
}
}
// namespace cppa::detail
...
...
cppa/self.hpp
View file @
c868d8c9
...
...
@@ -32,7 +32,6 @@
#define SELF_HPP
#include "cppa/actor.hpp"
#include "cppa/local_actor.hpp"
#include "cppa/intrusive_ptr.hpp"
namespace
cppa
{
...
...
@@ -47,6 +46,8 @@ extern local_actor* self;
#else
class
local_actor
;
// convertible<...> enables "actor_ptr this_actor = self;"
class
self_type
:
public
convertible
<
self_type
,
actor
*>
{
...
...
@@ -57,6 +58,8 @@ class self_type : public convertible<self_type, actor*>
static
local_actor
*
get_impl
();
static
actor
*
convert_impl
();
self_type
(
self_type
const
&
)
=
delete
;
self_type
&
operator
=
(
self_type
const
&
)
=
delete
;
...
...
@@ -65,9 +68,9 @@ class self_type : public convertible<self_type, actor*>
constexpr
self_type
()
{
}
// "inherited" from convertible<...>
inline
local_
actor
*
do_convert
()
const
inline
actor
*
do_convert
()
const
{
return
ge
t_impl
();
return
conver
t_impl
();
}
// allow "self" wherever an local_actor or actor pointer is expected
...
...
src/self.cpp
View file @
c868d8c9
...
...
@@ -80,6 +80,11 @@ local_actor* self_type::get_impl()
return
result
;
}
actor
*
self_type
::
convert_impl
()
{
return
get_impl
();
}
local_actor
*
self_type
::
get_unchecked_impl
()
{
return
t_this_context
.
get
();
...
...
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