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