Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:12:21

0001 // @(#)root/base:$Id$
0002 // Author: Valeriy Onuchin & Fons Rademakers   15/10/2000
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TQClass
0013 #define ROOT_TQClass
0014 
0015 //////////////////////////////////////////////////////////////////////////
0016 //                                                                      //
0017 // This is part of the ROOT implementation of the Qt object             //
0018 // communication mechanism (see also                                    //
0019 // http://www.troll.no/qt/metaobjects.html)                             //
0020 //                                                                      //
0021 // See TQObject for details.                                             //
0022 //                                                                      //
0023 // This implementation is provided by                                   //
0024 // Valeriy Onuchin (onuchin@sirius.ihep.su).                            //
0025 //                                                                      //
0026 //////////////////////////////////////////////////////////////////////////
0027 
0028 #include "TQObject.h"
0029 #include "TClass.h"
0030 
0031 // This class makes it possible to have a single connection from
0032 // all objects of the same class
0033 class TQClass : public TQObject, public TClass {
0034 
0035 private:
0036    TQClass(const TClass&) = delete;
0037    TQClass& operator=(const TQClass&) = delete;
0038 
0039 friend class TQObject;
0040 
0041 public:
0042    TQClass(const char *name, Version_t cversion,
0043            const std::type_info &info, TVirtualIsAProxy *isa,
0044            const char *dfil = nullptr, const char *ifil = nullptr,
0045            Int_t dl = 0, Int_t il = 0) :
0046            TQObject(),
0047            TClass(name, cversion, info,isa,dfil, ifil, dl, il) { }
0048 
0049    virtual ~TQClass() { Disconnect(); }
0050 
0051    ClassDefOverride(TQClass,0)  // Class with connections
0052 };
0053 
0054 
0055 //---- Class Initialization Behavior --------------------------------------
0056 //
0057 // This Class and Function are automatically used for classes inheriting from
0058 // TQObject. They make it possible to have a single connection from all
0059 // objects of the same class.
0060 namespace ROOT {
0061 namespace Internal {
0062    class TDefaultInitBehavior;
0063    class TQObjectInitBehavior : public TDefaultInitBehavior {
0064    public:
0065       TClass *CreateClass(const char *cname, Version_t id,
0066                           const std::type_info &info, TVirtualIsAProxy *isa,
0067                           const char *dfil, const char *ifil,
0068                           Int_t dl, Int_t il) const override
0069       {
0070          return new TQClass(cname, id, info, isa, dfil, ifil,dl, il);
0071       }
0072    };
0073 
0074    inline const TQObjectInitBehavior *DefineBehavior(TQObject*, TQObject*)
0075    {
0076       TQObjectInitBehavior *behave = new TQObjectInitBehavior;
0077       return behave;
0078    }
0079 }
0080 }
0081 
0082 
0083 #endif
0084