Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
CoMISo
Base
Commits
c175be23
Commit
c175be23
authored
Jun 19, 2017
by
Martin Marinov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Progress::ActiveScope to define the scope in which a progress node is active.
parent
49b094cc
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
0 deletions
+20
-0
Progress/ProgressNode.hh
Progress/ProgressNode.hh
+20
-0
No files found.
Progress/ProgressNode.hh
View file @
c175be23
...
...
@@ -56,6 +56,22 @@ private:
extern
thread_local
Node
*
actv_node
;
// active node
struct
ActiveScope
{
Node
*
prnt_node
;
ActiveScope
(
Node
*
_node
)
:
prnt_node
(
actv_node
)
{
actv_node
=
_node
;
}
~
ActiveScope
()
{
actv_node
=
prnt_node
;
}
};
typedef
Node
*
(
*
MakeNodeFunction
)(
Node
*
_next
);
inline
Node
*
make_children_list
()
{
return
nullptr
;
}
...
...
@@ -101,10 +117,14 @@ inline Node* make_children_list(MakeNodeFunction _make_node_fnct,
(NODE)->tick(__FILE__, __PROGRESS_FUNCTION__); }
#define PROGRESS_ACTIVE_TICK PROGRESS_TICK(Progress::actv_node)
#define PROGRESS_ACTIVE_SCOPE(NAME, NODE) Progress::ActiveScope NAME = \
Progress::ActiveScope(Progress::PROGRESS_NODE_NAME(NODE))
#else
#define PROGRESS_DECLARE_NODE(OPRT)
#define PROGRESS_DEFINE_NODE(OPRT, ...)
#define PROGRESS_ACTIVE_SCOPE(NAME, NODE)
#endif// PROGRESS_ON
...
...
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