WeakRingPtr.h
Go to the documentation of this file.
// -*- c++ -*-
//*****************************************************************************
//*****************************************************************************
#ifndef polybori_WeakRingPtr_h_
#define polybori_WeakRingPtr_h_
// include basic definitions
#include <polybori/pbori_defs.h>
#include <polybori/common/CWeakPtr.h>
#include <polybori/BoolePolyRing.h>
BEGIN_NAMESPACE_PBORI
class WeakRingPtr {
typedef WeakRingPtr self;
public:
typedef BoolePolyRing value_type;
WeakRingPtr(const value_type& data): m_data(*data.core()) {}
WeakRingPtr(const self& rhs): m_data(rhs.m_data) {}
~WeakRingPtr() {}
value_type operator*() const { return value_type(m_data); }
operator bool() const { return m_data; }
private:
CWeakPtr<value_type::core_type> m_data;
};
END_NAMESPACE_PBORI
#endif /* polybori_WeakRingPtr_h_ */