mirror of
https://github.com/Z3Prover/z3
synced 2025-04-22 16:45:31 +00:00
shorthands in enode to access args and partents
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
be4edddd2b
commit
3b78bdc8e5
2 changed files with 23 additions and 1 deletions
|
@ -216,6 +216,15 @@ namespace smt {
|
|||
return m_args;
|
||||
}
|
||||
|
||||
class args {
|
||||
enode const& n;
|
||||
public:
|
||||
args(enode const& n):n(n) {}
|
||||
args(enode const* n):n(*n) {}
|
||||
enode_vector::const_iterator begin() const { return n.get_args(); }
|
||||
enode_vector::const_iterator end() const { return n.get_args() + n.get_num_args(); }
|
||||
};
|
||||
|
||||
// unsigned get_id() const {
|
||||
// return m_id;
|
||||
// }
|
||||
|
@ -285,6 +294,16 @@ namespace smt {
|
|||
return m_commutative;
|
||||
}
|
||||
|
||||
class parents {
|
||||
enode const& n;
|
||||
public:
|
||||
parents(enode const& _n):n(_n) {}
|
||||
parents(enode const* _n):n(*_n) {}
|
||||
enode_vector::const_iterator begin() const { return n.begin_parents(); }
|
||||
enode_vector::const_iterator end() const { return n.end_parents(); }
|
||||
};
|
||||
|
||||
|
||||
unsigned get_num_parents() const {
|
||||
return m_parents.size();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue