1 #ifndef INC_ASTRefCount_hpp__ 2 # define INC_ASTRefCount_hpp__ 13 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE 50 : ref(p ?
ASTRef::getRef(p) : 0)
54 : ref(other.ref ? other.ref->increment() : 0)
75 if( other.
ref != ref )
87 operator T* ()
const {
return ref ?
static_cast<T*
>(ref->
ptr) : 0; }
89 T*
get()
const {
return ref ?
static_cast<T*
>(ref->
ptr) : 0; }
94 #ifdef ANTLR_CXX_SUPPORTS_NAMESPACE 98 #endif //INC_ASTRefCount_hpp__ Definition: ANTLRException.hpp:15
static ASTRef * getRef(const AST *p)
Definition: ASTRefCount.cpp:26
T * operator->() const
Definition: ASTRefCount.hpp:88
ASTRef * ref
Definition: ASTRefCount.hpp:46
~ASTRefCount()
Definition: ASTRefCount.hpp:57
ASTRefCount(const ASTRefCount< T > &other)
Definition: ASTRefCount.hpp:53
#define ANTLR_API
Definition: config.hpp:22
bool decrement()
Definition: ASTRefCount.hpp:31
ASTRefCount(const AST *p=0)
Definition: ASTRefCount.hpp:49
ASTRefCount< T > & operator=(AST *other)
Definition: ASTRefCount.hpp:62
AST *const ptr
Definition: ASTRefCount.hpp:21
Definition: ASTRefCount.hpp:19
Definition: ASTRefCount.hpp:43
unsigned int count
Definition: ASTRefCount.hpp:22
ASTRefCount< AST > RefAST
Definition: ASTRefCount.hpp:92
ASTRef * increment()
Definition: ASTRefCount.hpp:26
ASTRefCount< T > & operator=(const ASTRefCount< T > &other)
Definition: ASTRefCount.hpp:73