home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ssvpar.zip / SSLEXIRF.HPP < prev    next >
Text File  |  1994-07-31  |  1KB  |  47 lines

  1. /*---------------------------------------------------------------------------
  2.  
  3.                Copyright (c) 1994 SandStone Software Inc.
  4.                           All rights reserved
  5.  
  6. ----------------------------------------------------------------------------*/
  7. #if !defined( SSLEXIRF)
  8. #  define SSLEXIRF
  9. #  include<sslex.hpp>
  10. #  include<irefcnt.hpp>
  11.  
  12.    class SSLexLexemeIRef : public SSLexLexeme, public IRefCounted
  13.       {
  14.       public:
  15.          SSConstr     SSLexLexemeIRef( SSLexConsumer&, SSUnsigned32,
  16.                          SSLexMark&);
  17.  
  18.          void         addRef( void);
  19.          void         refFree( void);
  20.          void         removeRef( void);
  21.       };
  22.  
  23.    SSInline SSLexLexemeIRef::SSLexLexemeIRef( SSLexConsumer& qConsumer,
  24.       SSUnsigned32 qulToken, SSLexMark& qMark) :
  25.       SSLexLexeme( qConsumer, qulToken, qMark)
  26.       {
  27.       }
  28.  
  29.    SSInline void SSLexLexemeIRef::addRef( void)
  30.       {
  31.       refInc();
  32.       }
  33.  
  34.    SSInline void SSLexLexemeIRef::removeRef( void)
  35.       {
  36.       refDec();
  37.       }
  38.  
  39.    SSInline void SSLexLexemeIRef::refFree( void)
  40.       {
  41.       delete this;
  42.       }
  43.  
  44.    typedef IReference< SSLexLexemeIRef>  SSLexLexemeIRefRef;
  45.  
  46. #endif
  47.