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
e47c5a49
Commit
e47c5a49
authored
Aug 02, 2016
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix aout(self) in composable behaviors, close #496
parent
46fec1c8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
0 deletions
+23
-0
libcaf_core/caf/actor_ostream.hpp
libcaf_core/caf/actor_ostream.hpp
+13
-0
libcaf_core/caf/typed_actor_pointer.hpp
libcaf_core/caf/typed_actor_pointer.hpp
+5
-0
libcaf_core/caf/typed_actor_view.hpp
libcaf_core/caf/typed_actor_view.hpp
+5
-0
No files found.
libcaf_core/caf/actor_ostream.hpp
View file @
e47c5a49
...
@@ -22,6 +22,7 @@
...
@@ -22,6 +22,7 @@
#include "caf/actor.hpp"
#include "caf/actor.hpp"
#include "caf/deep_to_string.hpp"
#include "caf/deep_to_string.hpp"
#include "caf/typed_actor_pointer.hpp"
namespace
caf
{
namespace
caf
{
...
@@ -46,6 +47,12 @@ public:
...
@@ -46,6 +47,12 @@ public:
explicit
actor_ostream
(
scoped_actor
&
self
);
explicit
actor_ostream
(
scoped_actor
&
self
);
template
<
class
...
Sigs
>
explicit
actor_ostream
(
const
typed_actor_pointer
<
Sigs
...
>&
ptr
)
:
actor_ostream
(
ptr
.
internal_ptr
())
{
// nop
}
/// Writes `arg` to the buffer allocated for the calling actor.
/// Writes `arg` to the buffer allocated for the calling actor.
actor_ostream
&
write
(
std
::
string
arg
);
actor_ostream
&
write
(
std
::
string
arg
);
...
@@ -95,6 +102,12 @@ actor_ostream aout(local_actor* self);
...
@@ -95,6 +102,12 @@ actor_ostream aout(local_actor* self);
/// Convenience factory function for creating an actor output stream.
/// Convenience factory function for creating an actor output stream.
actor_ostream
aout
(
scoped_actor
&
self
);
actor_ostream
aout
(
scoped_actor
&
self
);
/// Convenience factory function for creating an actor output stream.
template
<
class
...
Sigs
>
actor_ostream
aout
(
const
typed_actor_pointer
<
Sigs
...
>&
ptr
)
{
return
actor_ostream
{
ptr
};
}
}
// namespace caf
}
// namespace caf
namespace
std
{
namespace
std
{
...
...
libcaf_core/caf/typed_actor_pointer.hpp
View file @
e47c5a49
...
@@ -55,6 +55,11 @@ public:
...
@@ -55,6 +55,11 @@ public:
return
view_
.
ctrl
();
return
view_
.
ctrl
();
}
}
/// @private
scheduled_actor
*
internal_ptr
()
const
{
return
view_
.
internal_ptr
();
}
template
<
class
Supertype
>
template
<
class
Supertype
>
typed_actor_pointer
&
operator
=
(
Supertype
*
ptr
)
{
typed_actor_pointer
&
operator
=
(
Supertype
*
ptr
)
{
using
namespace
caf
::
detail
;
using
namespace
caf
::
detail
;
...
...
libcaf_core/caf/typed_actor_view.hpp
View file @
e47c5a49
...
@@ -114,6 +114,11 @@ public:
...
@@ -114,6 +114,11 @@ public:
return
actor_control_block
::
from
(
self_
);;
return
actor_control_block
::
from
(
self_
);;
}
}
/// @private
scheduled_actor
*
internal_ptr
()
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