ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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
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
const char * GetKeyClassName() const
Definition: TRemoteObject.h:64
TString fKeyObjectName
Definition: TRemoteObject.h:49
const char * Data() const
Definition: TString.h:349
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
A doubly linked list.
Definition: TList.h:47
Using a TBrowser one can browse all ROOT objects.
Definition: TBrowser.h:41
TPaveLabel title(3, 27.1, 15, 28.7,"ROOT Environment and Tools")
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
Bool_t IsFolder() const
Returns kTRUE in case object contains browsable objects (like containers or lists of other objects)...
Definition: TRemoteObject.h:59
TString fKeyClassName
Definition: TRemoteObject.h:50
const char * GetKeyObjectName() const
Definition: TRemoteObject.h:63
Long64_t fRemoteAddress
Definition: TRemoteObject.h:47
const char * GetClassName() const
Definition: TRemoteObject.h:62
#define name(a, b)
Definition: linkTestLib0.cpp:5
TString fClassName
Definition: TRemoteObject.h:48
TList * Browse()
Browse OS system directories.
Bool_t GetFileStat(FileStat_t *sbuf)
Get remote file status.
TRemoteObject()
Create a remote object.