libabigail
Loading...
Searching...
No Matches
abg-traverse.cc
Go to the documentation of this file.
1// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
2// -*- Mode: C++ -*-
3//
4// Copyright (C) 2013-2024 Red Hat, Inc.
5
6/// @file
7
8#include "abg-internal.h"
9// <headers defining libabigail's API go under here>
10ABG_BEGIN_EXPORT_DECLARATIONS
11
12#include "abg-traverse.h"
13
14ABG_END_EXPORT_DECLARATIONS
15// </headers defining libabigail's API>
16
17namespace abigail
18{
19
20namespace ir
21{
22
23/// Private data type of the @ref traversable_base type.
24struct traversable_base::priv
25{
26 bool visiting_;
27
28 priv(bool visiting = false)
29 : visiting_(visiting)
30 {}
31}; // end struct traversable_base::priv
32
33/// Default constructor of the @ref traversable_base type.
35 :priv_(new priv)
36{}
37
38/// Destructor of the @ref traversable_base type.
41
42/// This should returns false before and after the node has been
43/// visiting. During the visiting of the node (and of its children)
44/// this should return true.
45///
46/// @return true if the current node is being visited.
47bool
49{return priv_->visiting_;}
50
51/// The traversing code should be responsible of calling this, not
52/// the user code.
53///
54/// This is the setter of the "visiting" flag of the node being
55/// visited. If set to yes, it means the node is being visited.
56/// False means either the node has not yet been visited, or it
57/// has already been visited.
58///
59/// @param f the new value of the "visiting" flag.
60void
62{priv_->visiting_ = f;}
63
64}// end namaspace ir
65}// end namespace abigail
virtual ~traversable_base()
Destructor of the traversable_base type.
bool visiting() const
This should returns false before and after the node has been visiting. During the visiting of the nod...
traversable_base()
Default constructor of the traversable_base type.
Toplevel namespace for libabigail.