TQClass.h

Go to the documentation of this file.
00001 // @(#)root/base:$Id: TQClass.h 26606 2008-12-02 20:36:09Z pcanal $
00002 // Author: Valeriy Onuchin & Fons Rademakers   15/10/2000
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TQClass
00013 #define ROOT_TQClass
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // This is part of the ROOT implementation of the Qt object             //
00018 // communication mechanism (see also                                    //
00019 // http://www.troll.no/qt/metaobjects.html)                             //
00020 //                                                                      //
00021 // See TQObject for details.                                             //
00022 //                                                                      //
00023 // This implementation is provided by                                   //
00024 // Valeriy Onuchin (onuchin@sirius.ihep.su).                            //
00025 //                                                                      //
00026 //////////////////////////////////////////////////////////////////////////
00027 
00028 #ifndef ROOT_TQObject
00029 #include "TQObject.h"
00030 #endif
00031 #ifndef ROOT_TClass
00032 #include "TClass.h"
00033 #endif
00034 
00035 // This class makes it possible to have a single connection from
00036 // all objects of the same class
00037 class TQClass : public TQObject, public TClass {
00038 
00039 private:
00040    TQClass(const TClass&) : TQObject(), TClass() {};
00041    TQClass& operator=(const TQClass&) { return *this; }
00042       
00043 friend class TQObject;
00044 
00045 public:
00046    TQClass(const char *name, Version_t cversion,
00047            const type_info &info, TVirtualIsAProxy *isa,
00048            ShowMembersFunc_t showmembers,
00049            const char *dfil = 0, const char *ifil = 0,
00050            Int_t dl = 0, Int_t il = 0) :
00051            TQObject(),
00052            TClass(name, cversion, info,isa,showmembers, dfil, ifil, dl, il) { }
00053 
00054    virtual ~TQClass() { Disconnect(); }
00055 
00056    ClassDef(TQClass,0)  // Class with connections
00057 };
00058 
00059 
00060 //---- Class Initialization Behavior --------------------------------------
00061 //
00062 // This Class and Function are automatically used for classes inheriting from
00063 // TQObject. They make it possible to have a single connection from all
00064 // objects of the same class.
00065 namespace ROOT {
00066    class TDefaultInitBehavior;
00067    class TQObjectInitBehavior : public TDefaultInitBehavior {
00068    public:
00069       virtual TClass *CreateClass(const char *cname, Version_t id,
00070                                   const type_info &info, TVirtualIsAProxy *isa,
00071                                   ShowMembersFunc_t show,
00072                                   const char *dfil, const char *ifil,
00073                                   Int_t dl, Int_t il) const
00074       {
00075          return new TQClass(cname, id, info, isa, show, dfil, ifil,dl, il);
00076       }
00077    };
00078 
00079    inline const TQObjectInitBehavior *DefineBehavior(TQObject*, TQObject*)
00080    {
00081       TQObjectInitBehavior *behave = new TQObjectInitBehavior;
00082       return behave;
00083    }
00084 }
00085 
00086 #endif
00087 

Generated on Tue Jul 5 14:10:29 2011 for ROOT_528-00b_version by  doxygen 1.5.1