/* libzz
 *
 * This program is distributed under the GNU General Public License, version 2.
 * A copy of this license is included with this source.
 *
 * Copyright 2000-2006, Toni Thomsson <toni@tonjac.org> 
*/

#ifndef zz_use_counter_h
#define zz_use_counter_h

#include <zz_export.h>

/**
    Reference counter, used internally by CzzHandle

    @see CzzHandle
    @author Toni Thomsson, toni@tonjac.org  
*/
class ZZ_API CzzUseCounter
{
public:

    /** Create counter */
    CzzUseCounter( void );

    virtual ~CzzUseCounter();

    /** Number of references */
    unsigned long getCount( void );

    /** Add reference */
    unsigned long addRef( void );

    /** Release reference */
    unsigned long release( void );

private:
    unsigned long m_Count;
};

#endif // zz_use_counter_h