Logo ROOT  
Reference Guide
TQClass.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Valeriy Onuchin & Fons Rademakers 15/10/2000
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TQClass
13 #define ROOT_TQClass
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // This is part of the ROOT implementation of the Qt object //
18 // communication mechanism (see also //
19 // http://www.troll.no/qt/metaobjects.html) //
20 // //
21 // See TQObject for details. //
22 // //
23 // This implementation is provided by //
24 // Valeriy Onuchin (onuchin@sirius.ihep.su). //
25 // //
26 //////////////////////////////////////////////////////////////////////////
27 
28 #include "TQObject.h"
29 #include "TClass.h"
30 
31 // This class makes it possible to have a single connection from
32 // all objects of the same class
33 class TQClass : public TQObject, public TClass {
34 
35 private:
36  TQClass(const TClass&) : TQObject(), TClass() {};
37  TQClass& operator=(const TQClass&) { return *this; }
38 
39 friend class TQObject;
40 
41 public:
42  TQClass(const char *name, Version_t cversion,
43  const std::type_info &info, TVirtualIsAProxy *isa,
44  const char *dfil = 0, const char *ifil = 0,
45  Int_t dl = 0, Int_t il = 0) :
46  TQObject(),
47  TClass(name, cversion, info,isa,dfil, ifil, dl, il) { }
48 
49  virtual ~TQClass() { Disconnect(); }
50 
51  ClassDef(TQClass,0) // Class with connections
52 };
53 
54 
55 //---- Class Initialization Behavior --------------------------------------
56 //
57 // This Class and Function are automatically used for classes inheriting from
58 // TQObject. They make it possible to have a single connection from all
59 // objects of the same class.
60 namespace ROOT {
61 namespace Internal {
62  class TDefaultInitBehavior;
64  public:
65  virtual TClass *CreateClass(const char *cname, Version_t id,
66  const std::type_info &info, TVirtualIsAProxy *isa,
67  const char *dfil, const char *ifil,
68  Int_t dl, Int_t il) const
69  {
70  return new TQClass(cname, id, info, isa, dfil, ifil,dl, il);
71  }
72  };
73 
75  {
77  return behave;
78  }
79 }
80 }
81 
82 
83 #endif
84 
TQObject::Disconnect
Bool_t Disconnect(const char *signal=0, void *receiver=0, const char *slot=0)
Disconnects signal of this object from slot of receiver.
Definition: TQObject.cxx:1024
ROOT::Internal::DefineBehavior
const TInitBehavior * DefineBehavior(void *, void *)
Definition: TGenericClassInfo.cxx:44
Version_t
short Version_t
Definition: RtypesCore.h:65
TQClass::TQClass
TQClass(const TClass &)
Definition: TQClass.h:36
TClass.h
TQClass::TQClass
TQClass(const char *name, Version_t cversion, const std::type_info &info, TVirtualIsAProxy *isa, const char *dfil=0, const char *ifil=0, Int_t dl=0, Int_t il=0)
Definition: TQClass.h:42
TQClass
Definition: TQClass.h:33
TQObject.h
TQObject
This is the ROOT implementation of the Qt object communication mechanism (see also http://www....
Definition: TQObject.h:48
TQClass::operator=
TQClass & operator=(const TQClass &)
Definition: TQClass.h:37
ROOT::Internal::TQObjectInitBehavior
Definition: TQClass.h:63
TQClass::~TQClass
virtual ~TQClass()
Definition: TQClass.h:49
ROOT::Internal::TQObjectInitBehavior::CreateClass
virtual TClass * CreateClass(const char *cname, Version_t id, const std::type_info &info, TVirtualIsAProxy *isa, const char *dfil, const char *ifil, Int_t dl, Int_t il) const
Definition: TQClass.h:65
TClass
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition: TClass.h:80
ClassDef
#define ClassDef(name, id)
Definition: Rtypes.h:325
ROOT::Internal::TDefaultInitBehavior
Definition: Rtypes.h:163
name
char name[80]
Definition: TGX11.cxx:110
TVirtualIsAProxy
Definition: TVirtualIsAProxy.h:27
ROOT
VSD Structures.
Definition: StringConv.hxx:21
int