home *** CD-ROM | disk | FTP | other *** search
- #ifndef __RWREF_H__
- #define __RWREF_H__
- pragma push_align_members(64);
-
- /*
- * Base class for reference counted objects. Inherits from RWMemoryPool.
- *
- * $Header: E:/vcs/rw/ref.h_v 1.0 11 Mar 1992 14:09:58 KEFFER $
- *
- ****************************************************************************
- *
- * Rogue Wave Software, Inc.
- * P.O. Box 2328
- * Corvallis, OR 97339
- *
- * Copyright (C) 1992. This software is subject to copyright
- * protection under the laws of the United States and other countries.
- *
- ***************************************************************************
- *
- * $Log: E:/vcs/rw/ref.h_v $
- *
- * Rev 1.0 11 Mar 1992 14:09:58 KEFFER
- * Initial revision.
- */
-
- #ifndef __RWMEMPOOL_H__
- # include "rw/mempool.h"
- #endif
-
- class RWExport RWReference : public RWMemoryPool {
-
- public:
-
- RWReference() : _refs(1) { } // Start w. one reference
- void addReference() {_refs++;}
- unsigned short references() {return _refs;}
- unsigned short removeReference() {return --_refs;}
-
- private:
-
- unsigned short _refs; // Number of references to this block
-
- };
-
- pragma pop_align_members();
- #endif /* __RWREF_H__ */
-