Logo ROOT   6.14/05
Reference Guide
TRemoteObject.h
Go to the documentation of this file.
1 // @(#)root/base:$Id$
2 // Author: Bertrand Bellenot 19/06/2007
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2007, 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 #ifndef ROOT_TObjectRemote
12 #define ROOT_TObjectRemote
13 
14 //////////////////////////////////////////////////////////////////////////
15 // //
16 // TRemoteObject //
17 // //
18 // The TRemoteObject class provides protocol for browsing ROOT objects //
19 // from a remote ROOT session. //
20 // It contains information on the real remote object as: //
21 // - Object Properties (i.e. file stat if the object is a TSystemFile) //
22 // - Object Name //
23 // - Class Name //
24 // - TKey Object Name (if the remote object is a TKey) //
25 // - TKey Class Name (if the remote object is a TKey) //
26 // - Remote object address //
27 // //
28 //////////////////////////////////////////////////////////////////////////
29 
30 #include "TSystemDirectory.h"
31 
32 #include "TList.h"
33 
34 #include "TSystem.h"
35 
36 class TRemoteObject : public TNamed {
37 
38 protected:
39  FileStat_t fFileStat; // file status
40  Bool_t fIsFolder; // is folder flag
41  Long64_t fRemoteAddress; // remote address
42  TString fClassName; // real object class name
43  TString fKeyObjectName; // key object name
44  TString fKeyClassName; // key object class name
45 
46 public:
47  TRemoteObject();
48  TRemoteObject(const char *name, const char *title, const char *classname);
49 
50  virtual ~TRemoteObject();
51 
52  virtual void Browse(TBrowser *b);
53  Bool_t IsFolder() const { return fIsFolder; }
54  TList *Browse();
56  const char *GetClassName() const { return fClassName.Data(); }
57  const char *GetKeyObjectName() const { return fKeyObjectName.Data(); }
58  const char *GetKeyClassName() const { return fKeyClassName.Data(); }
59  void SetFolder(Bool_t isFolder) { fIsFolder = isFolder; }
60  void SetKeyObjectName(const char *name) { fKeyObjectName = name; }
61  void SetKeyClassName(const char *name) { fKeyClassName = name; }
62  void SetRemoteAddress(Long_t addr) { fRemoteAddress = addr; }
63 
64  ClassDef(TRemoteObject,0) //A remote object
65 };
66 
67 #endif
68 
void SetKeyObjectName(const char *name)
Definition: TRemoteObject.h:60
const char * GetClassName() const
Definition: TRemoteObject.h:56
long long Long64_t
Definition: RtypesCore.h:69
void SetKeyClassName(const char *name)
Definition: TRemoteObject.h:61
void SetFolder(Bool_t isFolder)
Definition: TRemoteObject.h:59
Basic string class.
Definition: TString.h:131
bool Bool_t
Definition: RtypesCore.h:59
TString fKeyObjectName
Definition: TRemoteObject.h:43
void SetRemoteAddress(Long_t addr)
Definition: TRemoteObject.h:62
The TRemoteObject class provides protocol for browsing ROOT objects from a remote ROOT session...
Definition: TRemoteObject.h:36
#define ClassDef(name, id)
Definition: Rtypes.h:320
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:29
const char * GetKeyClassName() const
Definition: TRemoteObject.h:58
const char * GetKeyObjectName() const
Definition: TRemoteObject.h:57
A doubly linked list.
Definition: TList.h:44
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:37
FileStat_t fFileStat
Definition: TRemoteObject.h:39
Bool_t fIsFolder
Definition: TRemoteObject.h:40
virtual ~TRemoteObject()
Delete remote object.
long Long_t
Definition: RtypesCore.h:50
TString fKeyClassName
Definition: TRemoteObject.h:44
Long64_t fRemoteAddress
Definition: TRemoteObject.h:41
TString fClassName
Definition: TRemoteObject.h:42
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Definition: TRemoteObject.h:53
you should not use this method at all Int_t Int_t Double_t Double_t Double_t Int_t Double_t Double_t Double_t Double_t b
Definition: TRolke.cxx:630
TList * Browse()
Browse OS system directories.
Bool_t GetFileStat(FileStat_t *sbuf)
Get remote file status.
char name[80]
Definition: TGX11.cxx:109
TRemoteObject()
Create a remote object.
const char * Data() const
Definition: TString.h:364