]>
git.proxmox.com Git - mirror_edk2.git/blob - BaseTools/Source/C/VfrCompile/Pccts/h/ATokPtrImpl.h
4d682a5ef75f141b4fb334cda9a3a0de793b9921
2 * ATokPtrImpl.h (formerly ATokPtr.cpp)
4 * This is #included in ATokBuffer.cpp for historical reasons.
5 * It has been renamed because of problems with the .cpp extension
9 * ANTLRToken MUST be defined before entry to this file.
13 * We reserve no LEGAL rights to the Purdue Compiler Construction Tool
14 * Set (PCCTS) -- PCCTS is in the public domain. An individual or
15 * company may do whatever they wish with source code distributed with
16 * PCCTS or the code generated by PCCTS, including the incorporation of
17 * PCCTS, or its output, into commerical software.
19 * We encourage users to develop software with PCCTS. However, we do ask
20 * that credit is given to us for developing PCCTS. By "credit",
21 * we mean that if you incorporate our source code into one of your
22 * programs (commercial product, research project, or otherwise) that you
23 * acknowledge this fact somewhere in the documentation, research report,
24 * etc... If you like PCCTS and have developed a nice tool with the
25 * output, please mention that you developed it using PCCTS. In
26 * addition, we ask that this header remain intact in our source code.
27 * As long as these guidelines are kept, we expect to continue enhancing
28 * this system and expect to make other tools available as they are
32 * Written by Russell Quong June 30, 1995
33 * Adapted by Terence Parr to ANTLR stuff
34 * Parr Research Corporation
35 * with Purdue University and AHPCRC, University of Minnesota
45 void ANTLRTokenPtr::ref() const
52 void ANTLRTokenPtr::deref()
57 if ( ptr_
->nref()==0 )
65 ANTLRTokenPtr::~ANTLRTokenPtr()
71 // 8-Apr-97 MR1 Make operator -> a const member function
72 // as well as some other member functions
74 ANTLRTokenPtr
& ANTLRTokenPtr::operator = (const ANTLRTokenPtr
& lhs
) // MR1
76 lhs
.ref(); // protect against "xp = xp"; ie same underlying object
82 ANTLRTokenPtr
& ANTLRTokenPtr::operator = (ANTLRAbstractToken
*addr
)