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
b71aa335
Commit
b71aa335
authored
Jun 29, 2017
by
Dominik Charousset
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve to_string for actor_config
parent
1b4a018e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
22 additions
and
3 deletions
+22
-3
libcaf_core/src/actor_config.cpp
libcaf_core/src/actor_config.cpp
+22
-3
No files found.
libcaf_core/src/actor_config.cpp
View file @
b71aa335
...
@@ -19,6 +19,8 @@
...
@@ -19,6 +19,8 @@
#include "caf/actor_config.hpp"
#include "caf/actor_config.hpp"
#include "caf/abstract_actor.hpp"
namespace
caf
{
namespace
caf
{
actor_config
::
actor_config
(
execution_unit
*
ptr
)
actor_config
::
actor_config
(
execution_unit
*
ptr
)
...
@@ -28,9 +30,26 @@ actor_config::actor_config(execution_unit* ptr)
...
@@ -28,9 +30,26 @@ actor_config::actor_config(execution_unit* ptr)
// nop
// nop
}
}
std
::
string
to_string
(
const
actor_config
&
)
{
std
::
string
to_string
(
const
actor_config
&
x
)
{
// TODO: print flags and groups
std
::
string
result
=
"actor_config("
;
return
"actor_config"
;
if
(
x
.
groups
==
nullptr
)
result
+=
"[]"
;
else
result
+=
deep_to_string
(
*
x
.
groups
);
auto
add
=
[
&
](
int
flag
,
const
char
*
name
)
{
if
((
x
.
flags
&
flag
)
!=
0
)
{
result
+=
", "
;
result
+=
name
;
}
};
add
(
abstract_channel
::
is_actor_bind_decorator_flag
,
"bind_decorator_flag"
);
add
(
abstract_channel
::
is_actor_dot_decorator_flag
,
"dot_decorator_flag"
);
add
(
abstract_actor
::
is_detached_flag
,
"detached_flag"
);
add
(
abstract_actor
::
is_blocking_flag
,
"blocking_flag"
);
add
(
abstract_actor
::
is_priority_aware_flag
,
"priority_aware_flag"
);
add
(
abstract_actor
::
is_hidden_flag
,
"hidden_flag"
);
result
+=
")"
;
return
result
;
}
}
}
// namespace caf
}
// namespace caf
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