projects
/
cvc5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0d6bb28
)
scoped node managers
author
Morgan Deters
<mdeters@gmail.com>
Mon, 25 Jan 2010 21:10:01 +0000
(21:10 +0000)
committer
Morgan Deters
<mdeters@gmail.com>
Mon, 25 Jan 2010 21:10:01 +0000
(21:10 +0000)
src/expr/node_manager.h
patch
|
blob
|
history
diff --git
a/src/expr/node_manager.h
b/src/expr/node_manager.h
index 827c6c1b70628a1d5e41ee325a29bcf80b82ff92..60699eeaf0d1d7a9c55c556e110998a0ae60dc31 100644
(file)
--- a/
src/expr/node_manager.h
+++ b/
src/expr/node_manager.h
@@
-53,6
+53,19
@@
public:
Node mkVar();
};
+
+class NodeManagerScope {
+ NodeManager *d_oldNodeManager;
+
+public:
+ NodeManagerScope(const NodeManager* nm) : d_oldNodeManager(NodeManager::s_current) {
+ NodeManager::s_current = nm;
+ }
+ ~NodeManagerScope() {
+ NodeManager::s_current = d_oldNodeManager;
+ }
+};
+
}/* CVC4 namespace */
#endif /* __CVC4__EXPR_MANAGER_H */