mirror of
https://github.com/Z3Prover/z3
synced 2025-11-03 13:07:53 +00:00
more udoc
Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
parent
f71730b0df
commit
44e8833369
4 changed files with 208 additions and 10 deletions
|
|
@ -106,5 +106,21 @@ private:
|
|||
}
|
||||
};
|
||||
|
||||
class tbv_ref {
|
||||
tbv_manager& mgr;
|
||||
tbv* d;
|
||||
public:
|
||||
tbv_ref(tbv_manager& mgr):mgr(mgr),d(0) {}
|
||||
tbv_ref(tbv_manager& mgr, tbv* d):mgr(mgr),d(d) {}
|
||||
~tbv_ref() {
|
||||
if (d) mgr.deallocate(d);
|
||||
}
|
||||
tbv_ref& operator=(tbv* d2) {
|
||||
if (d) mgr.deallocate(d);
|
||||
d = d2;
|
||||
}
|
||||
tbv& operator*() { return *d; }
|
||||
};
|
||||
|
||||
|
||||
#endif /* _TBV_H_ */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue