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
578c940f
Commit
578c940f
authored
Oct 02, 2019
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Prettify to_string output for actors
parent
6ad52ebb
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
4 deletions
+16
-4
libcaf_core/caf/node_id.hpp
libcaf_core/caf/node_id.hpp
+6
-0
libcaf_core/src/actor_control_block.cpp
libcaf_core/src/actor_control_block.cpp
+10
-4
No files found.
libcaf_core/caf/node_id.hpp
View file @
578c940f
...
...
@@ -223,6 +223,12 @@ private:
intrusive_ptr
<
data
>
data_
;
};
/// Returns whether `x` contains an URI.
/// @relates node_id
inline
bool
wraps_uri
(
const
node_id
&
x
)
noexcept
{
return
x
&&
x
->
implementation_id
()
==
node_id
::
uri_data
::
class_id
;
}
/// @relates node_id
inline
bool
operator
==
(
const
node_id
&
x
,
const
node_id
&
y
)
noexcept
{
return
x
.
compare
(
y
)
==
0
;
...
...
libcaf_core/src/actor_control_block.cpp
View file @
578c940f
...
...
@@ -114,11 +114,17 @@ namespace {
void
append_to_string_impl
(
std
::
string
&
x
,
const
actor_control_block
*
y
)
{
if
(
y
!=
nullptr
)
{
if
(
wraps_uri
(
y
->
nid
))
{
append_to_string
(
x
,
y
->
nid
);
x
+=
"/id/"
;
x
+=
std
::
to_string
(
y
->
aid
);
}
else
{
x
+=
std
::
to_string
(
y
->
aid
);
x
+=
'@'
;
append_to_string
(
x
,
y
->
nid
);
}
}
else
{
x
+=
"
0@invalid-node
"
;
x
+=
"
null:pointer
"
;
}
}
...
...
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