/usr/include/polybori/ring/WeakRingPtr.h is in libpolybori-dev 0.8.3-5build1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | // -*- c++ -*-
//*****************************************************************************
/** @file WeakRingPtr.h
*
* @author Alexander Dreyer
* @date 2011-06-14
*
* This file includes the definition of the class @c WeakRingPtr.
*
* @par Copyright:
* (c) 2011 by The PolyBoRi Team
*
**/
//*****************************************************************************
#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
* @brief This class defines WeakRingPtr.
*
* This is just a wrapper for @c CWeakPtr<BoolePolyRing::core_type>.
* For aceesing such internals it is good @c friend with @c BoolePolyRing.
**/
class WeakRingPtr {
/// Type of *this
typedef WeakRingPtr self;
public:
typedef BoolePolyRing value_type;
/// Default constructor
WeakRingPtr(const value_type& data): m_data(*data.core()) {}
/// Copy constructor
WeakRingPtr(const self& rhs): m_data(rhs.m_data) {}
/// Destructor
~WeakRingPtr() {}
/// Dereferencing
value_type operator*() const { return value_type(m_data); }
/// Validity check
operator bool() const { return m_data; }
private:
CWeakPtr<value_type::core_type> m_data;
};
END_NAMESPACE_PBORI
#endif /* polybori_WeakRingPtr_h_ */
|