X-Git-Url: http://matita.cs.unibo.it/gitweb/?p=helm.git;a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTObject.hh;fp=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTObject.hh;h=c4b4e9e3fedb076cc45da501c188bfe9fd8c3b79;hp=0000000000000000000000000000000000000000;hb=89262281b6e83bd2321150f81f1a0583645eb0c8;hpb=b1fb6b8e1767d775bc452303629e95941d142bea diff --git a/helm/DEVEL/mathml_editor/src/TObject.hh b/helm/DEVEL/mathml_editor/src/TObject.hh new file mode 100644 index 000000000..c4b4e9e3f --- /dev/null +++ b/helm/DEVEL/mathml_editor/src/TObject.hh @@ -0,0 +1,16 @@ + +#ifndef __TObject_hh__ +#define __TObject_hh__ + +class TObject +{ +protected: + TObject(void) { refCounter = 1; }; + virtual ~TObject() { }; + +public: + void ref(coid) const { refCounter++; }; + void unref(void) const { if (--refCounter) delete this; }; +}; + +#endif // __TObject_hh__