summaryrefslogtreecommitdiff
path: root/src/context/context.h
diff options
context:
space:
mode:
authorClark Barrett <barrett@cs.nyu.edu>2010-01-29 21:02:15 +0000
committerClark Barrett <barrett@cs.nyu.edu>2010-01-29 21:02:15 +0000
commitc732da16287657609a80734b29ab785698960672 (patch)
tree4b29d4de7fe240947eab383bbe6787085ef65a6a /src/context/context.h
parent3cbc003c6ea1f1cbd8c635ffb788bab5179b0132 (diff)
Fixed compile errors
Diffstat (limited to 'src/context/context.h')
-rw-r--r--src/context/context.h24
1 files changed, 19 insertions, 5 deletions
diff --git a/src/context/context.h b/src/context/context.h
index 6c9f01acf..114c8ed69 100644
--- a/src/context/context.h
+++ b/src/context/context.h
@@ -16,6 +16,8 @@
#ifndef __CVC4__CONTEXT__CONTEXT_H
#define __CVC4__CONTEXT__CONTEXT_H
+#include "context/context_mm.h"
+
namespace CVC4 {
namespace context {
@@ -182,7 +184,7 @@ public:
*/
Scope(Context* pContext, ContextMemoryManager* pCMM,
Scope* pScopePrev = NULL)
- : d_pContext(context), d_pCMM(pCMM), d_pScopePrev(pScopePrev),
+ : d_pContext(pContext), d_pCMM(pCMM), d_pScopePrev(pScopePrev),
d_level(0), d_pContextObjList(NULL)
{ if (pScopePrev != NULL) d_level = pScopePrev->getLevel() + 1; }
@@ -237,7 +239,7 @@ public:
* ContextMemoryManager. No need to do anything because memory is freed
* automatically when the ContextMemoryManager pop() method is called.
*/
- void operator delete(void* pMem, ContextMemoryManager* pCMM) {}
+ void operator delete(void* pMem) {}
//FIXME: //! Check for memory leaks
// void check(void);
@@ -374,7 +376,7 @@ class ContextNotifyObj {
* Context is our friend so that when the Context is deleted, any remaining
* ContextNotifyObj can be removed from the Context list.
*/
- friend Context;
+ friend class Context;
/**
* Pointer to next ContextNotifyObject in this List
@@ -386,6 +388,18 @@ class ContextNotifyObj {
*/
ContextNotifyObj** d_ppCNOprev;
+ /**
+ * Return reference to next link in ContextNotifyObj list. Used by
+ * Context::addNotifyObj methods.
+ */
+ ContextNotifyObj*& next() { return d_pCNOnext; }
+
+ /**
+ * Return reference to prev link in ContextNotifyObj list. Used by
+ * Context::addNotifyObj methods.
+ */
+ ContextNotifyObj**& prev() { return d_ppCNOprev; }
+
public:
/**
* Constructor for ContextNotifyObj. Parameters are the context to which
@@ -412,7 +426,7 @@ public:
inline int Context::getLevel() const { return getTopScope()->getLevel(); }
-inline void Scope::~Scope() {
+inline Scope::~Scope() {
// Call restore() method on each ContextObj object in the list.
// Note that it is the responsibility of restore() to return the next item in
// the list.
@@ -421,7 +435,7 @@ inline void Scope::~Scope() {
}
}
-inline void Scope::addToChain(ContextObjChain* pContextObj) {
+inline void Scope::addToChain(ContextObj* pContextObj) {
if(d_pContextObjList != NULL)
d_pContextObjList->prev() = &(pContextObj->next());
pContextObj->next() = d_pContextObjList;
generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback