X-Git-Url: http://matita.cs.unibo.it/gitweb/?a=blobdiff_plain;f=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTObject.hh;fp=helm%2FDEVEL%2Fmathml_editor%2Fsrc%2FTObject.hh;h=c4b4e9e3fedb076cc45da501c188bfe9fd8c3b79;hb=30060cffed61b88fe53e4d6386b606050d6dfda0;hp=0000000000000000000000000000000000000000;hpb=e6927665462cbbace76cff1b17d4f8badcb44eda;p=helm.git 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__