arabica/include/DOM/Traversal/TraversalImpl.hpp

40 lines
675 B
C++
Raw Normal View History

#ifndef JEZUK_DOM_TRAVERSAL_IMPL_H
#define JEZUK_DOM_TRAVERSAL_IMPL_H
2007-09-05 13:47:13 +02:00
namespace Arabica
{
namespace DOM
{
//todo: move this class somewhere (or rename to TraversalImpl??)
class TraversalImpl
{
public:
TraversalImpl() : refCount_(0)
{}
virtual ~TraversalImpl() {}
///////////////////////////////////////////////////////
// Ref counting
virtual void addRef()
{
++refCount_;
} // addRef
virtual void releaseRef()
{
if(--refCount_ == 0)
delete this;
} // releaseRef
private:
int refCount_;
2007-09-05 13:47:13 +02:00
}; //class TraversalImpl
} // namespace DOM
2007-09-05 13:47:13 +02:00
} // namespace Arabica
#endif //JEZUK_DOM_TRAVERSAL_IMPL_H