summaryrefslogtreecommitdiff
path: root/src/expr/node.h
diff options
context:
space:
mode:
authorMorgan Deters <mdeters@gmail.com>2010-02-22 20:51:01 +0000
committerMorgan Deters <mdeters@gmail.com>2010-02-22 20:51:01 +0000
commit3d8fd1dad54c4057384c99bf6857361f29c23d12 (patch)
tree0111837f0713646af58383b560e9d8c1a9e8afbe /src/expr/node.h
parent7c143dc5d5a52664a3cecca5226df57269063162 (diff)
* src/expr/attribute.h: fixed an issue with "const pointer"-valued
attributes. * src/expr/attribute.h, src/expr/node_manager.h, src/expr/node.h: hasAttribute() and getAttribute() are now const member functions.
Diffstat (limited to 'src/expr/node.h')
-rw-r--r--src/expr/node.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/expr/node.h b/src/expr/node.h
index a39dc5b7e..517a9eb7f 100644
--- a/src/expr/node.h
+++ b/src/expr/node.h
@@ -25,6 +25,7 @@
#include "cvc4_config.h"
#include "expr/kind.h"
+#include "expr/type.h"
#include "util/Assert.h"
namespace CVC4 {
@@ -156,11 +157,11 @@ public:
bool isAtomic() const;
template <class AttrKind>
- inline typename AttrKind::value_type getAttribute(const AttrKind&);
+ inline typename AttrKind::value_type getAttribute(const AttrKind&) const;
template <class AttrKind>
inline bool hasAttribute(const AttrKind&,
- typename AttrKind::value_type* = NULL);
+ typename AttrKind::value_type* = NULL) const;
template <class AttrKind>
inline void setAttribute(const AttrKind&,
@@ -262,7 +263,7 @@ inline size_t Node::getNumChildren() const {
}
template <class AttrKind>
-inline typename AttrKind::value_type Node::getAttribute(const AttrKind&) {
+inline typename AttrKind::value_type Node::getAttribute(const AttrKind&) const {
Assert( NodeManager::currentNM() != NULL,
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
@@ -272,7 +273,7 @@ inline typename AttrKind::value_type Node::getAttribute(const AttrKind&) {
template <class AttrKind>
inline bool Node::hasAttribute(const AttrKind&,
- typename AttrKind::value_type* ret) {
+ typename AttrKind::value_type* ret) const {
Assert( NodeManager::currentNM() != NULL,
"There is no current CVC4::NodeManager associated to this thread.\n"
"Perhaps a public-facing function is missing a NodeManagerScope ?" );
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback