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
ASTRefCount< AST > RefAST
Definition ASTRefCount.hpp:92
Definition ASTRefCount.hpp:44
ASTRefCount(const ASTRefCount< T > &other)
Definition ASTRefCount.hpp:53
ASTRef * ref
Definition ASTRefCount.hpp:46
~ASTRefCount()
Definition ASTRefCount.hpp:57
ASTRefCount< T > & operator=(AST *other)
Definition ASTRefCount.hpp:62
ASTRefCount< T > & operator=(const ASTRefCount< T > &other)
Definition ASTRefCount.hpp:73
ASTRefCount(const AST *p=0)
Definition ASTRefCount.hpp:49
T * operator->() const
Definition ASTRefCount.hpp:88
T * get() const
Definition ASTRefCount.hpp:89
#define ANTLR_API
Definition config.hpp:22
Definition ANTLRException.hpp:15
Definition ASTRefCount.hpp:20
AST *const ptr
Definition ASTRefCount.hpp:21
bool decrement()
Definition ASTRefCount.hpp:31
unsigned int count
Definition ASTRefCount.hpp:22
static ASTRef * getRef(const AST *p)
Definition ASTRefCount.cpp:26
ASTRef * increment()
Definition ASTRefCount.hpp:26
ASTRef & operator=(const ASTRef &)