Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
CoMISo
Base
Commits
e2bdbb8c
Commit
e2bdbb8c
authored
Jun 22, 2017
by
Martin Marinov
Browse files
Add access to the Node next, child and parent. Adjust the tick number maximum if it is exceeded.
parent
b377ef2d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Progress/ProgressNode.hh
View file @
e2bdbb8c
...
...
@@ -23,7 +23,7 @@ public:
Node
(
const
char
*
const
_name
,
Node
*
_next
=
nullptr
,
Node
*
_chld
=
nullptr
)
:
name
(
_name
),
next_
(
_next
),
chld_
(
_chld
),
prnt_
(
nullptr
),
tick_nmbr_
(
0
),
tick_nmbr_max_
(
1
000000000
),
abrt_
(
false
)
tick_nmbr_max_
(
1
),
abrt_
(
false
)
{}
void
enter
(
Node
*
_prnt
)
...
...
@@ -42,6 +42,8 @@ public:
void
tick
(
const
char
*
const
_flnm
,
const
char
*
const
_fnct
)
{
++
tick_nmbr_
;
if
(
tick_nmbr_
>
tick_nmbr_max_
)
tick_nmbr_max_
*=
2
;
if
(
trck_fnct
!=
nullptr
)
(
*
trck_fnct
)(
this
,
_flnm
,
_fnct
);
}
...
...
@@ -57,6 +59,10 @@ public:
// handling
bool
aborting
()
const
{
return
abrt_
;
}
const
Node
*
next
()
const
{
return
next_
;
};
const
Node
*
child
()
const
{
return
chld_
;
};
const
Node
*
parent
()
const
{
return
prnt_
;
};
protected:
Node
*
next_
;
//!< next node on the same level, last if nullptr
Node
*
chld_
;
//!< first child node, leaf if nullptr
...
...
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