Logo ROOT   6.08/07
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 #ifndef ROOT_TSystemDirectory
31 #include "TSystemDirectory.h"
32 #endif
33 
34 #ifndef ROOT_TList
35 #include "TList.h"
36 #endif
37 
38 #ifndef ROOT_TSystem
39 #include "TSystem.h"
40 #endif
41 
42 class TRemoteObject : public TNamed {
43 
44 protected:
45  FileStat_t fFileStat; // file status
46  Bool_t fIsFolder; // is folder flag
47  Long64_t fRemoteAddress; // remote address
48  TString fClassName; // real object class name
49  TString fKeyObjectName; // key object name
50  TString fKeyClassName; // key object class name
51 
52 public:
53  TRemoteObject();
54  TRemoteObject(const char *name, const char *title, const char *classname);
55 
56  virtual ~TRemoteObject();
57 
58  virtual void Browse(TBrowser *b);
59  Bool_t IsFolder() const { return fIsFolder; }
60  TList *Browse();
62  const char *GetClassName() const { return fClassName.Data(); }
63  const char *GetKeyObjectName() const { return fKeyObjectName.Data(); }
64  const char *GetKeyClassName() const { return fKeyClassName.Data(); }
65  void SetFolder(Bool_t isFolder) { fIsFolder = isFolder; }
66  void SetKeyObjectName(const char *name) { fKeyObjectName = name; }
67  void SetKeyClassName(const char *name) { fKeyClassName = name; }
68  void SetRemoteAddress(Long_t addr) { fRemoteAddress = addr; }
69 
70  ClassDef(TRemoteObject,0) //A remote object
71 };
72 
73 #endif
74 
void SetKeyObjectName(const char *name)
Definition: TRemoteObject.h:66
const char * GetClassName() const
Definition: TRemoteObject.h:62
long long Long64_t
Definition: RtypesCore.h:69
void SetKeyClassName(const char *name)
Definition: TRemoteObject.h:67
void SetFolder(Bool_t isFolder)
Definition: TRemoteObject.h:65
Basic string class.
Definition: TString.h:137
bool Bool_t
Definition: RtypesCore.h:59
TString fKeyObjectName
Definition: TRemoteObject.h:49
void SetRemoteAddress(Long_t addr)
Definition: TRemoteObject.h:68
The TRemoteObject class provides protocol for browsing ROOT objects from a remote ROOT session...
Definition: TRemoteObject.h:42
#define ClassDef(name, id)
Definition: Rtypes.h:254
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
const char * GetKeyClassName() const
Definition: TRemoteObject.h:64
const char * GetKeyObjectName() const
Definition: TRemoteObject.h:63
A doubly linked list.
Definition: TList.h:47
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
FileStat_t fFileStat
Definition: TRemoteObject.h:45
Bool_t fIsFolder
Definition: TRemoteObject.h:46
virtual ~TRemoteObject()
Delete remote object.
long Long_t
Definition: RtypesCore.h:50
TString fKeyClassName
Definition: TRemoteObject.h:50
Long64_t fRemoteAddress
Definition: TRemoteObject.h:47
TString fClassName
Definition: TRemoteObject.h:48
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Definition: TRemoteObject.h:59
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:349