From c732da16287657609a80734b29ab785698960672 Mon Sep 17 00:00:00 2001 From: Clark Barrett Date: Fri, 29 Jan 2010 21:02:15 +0000 Subject: Fixed compile errors --- src/context/context.h | 24 +++++++++++++++++++----- 1 file changed, 19 insertions(+), 5 deletions(-) (limited to 'src/context/context.h') 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; -- cgit v1.2.3