/usr/include/plotmm/compat.h is in libplotmm-dev 0.1.2-2.
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 61 62 63 64 65 | #ifndef _compat_h_
#define _compat_h_
#include <gtkmmconfig.h>
#include <assert.h>
#if (GTKMM_MAJOR_VERSION == 2 && GTKMM_MINOR_VERSION >= 4)
namespace PlotMM {
class ObjectBase : public sigc::trackable
{
protected:
ObjectBase()
: _counter(1)
#ifdef DEBUG
,_id(serial++)
,_magic(1234)
#endif
{};
ObjectBase(const ObjectBase &a)
: _counter(1)
#ifdef DEBUG
,_id(serial++)
,_magic(1234)
#endif
{};
virtual ~ObjectBase() {
#ifdef DEBUG
is_to_be_deleted();
_magic=5678;
#endif
};
public:
void reference() const {_counter++;
#ifdef DEBUG
is_valid();
#endif
};
void unreference() const {if (!--_counter) delete this;
#ifdef DEBUG
else is_valid();
#endif
};
private:
mutable unsigned int _counter;
#ifdef DEBUG
void is_valid() const {assert (_counter>0); assert(_magic==1234);};
void is_to_be_deleted() const {assert (_counter==0); assert(_magic==1234);};
unsigned int _magic;
#endif
};
};
#else
namespace PlotMM {
typedef SigC::ObjectBase ObjectBase;
}
#endif
#endif
|