ROOT logo
// @(#)root/base:$Id: TRemoteObject.h 20877 2007-11-19 11:17:07Z rdm $
// Author: Bertrand Bellenot   19/06/2007

/*************************************************************************
 * Copyright (C) 1995-2007, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/
#ifndef ROOT_TObjectRemote
#define ROOT_TObjectRemote

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TRemoteObject                                                        //
//                                                                      //
// The TRemoteObject class provides protocol for browsing ROOT objects  //
// from a remote ROOT session.                                          //
// It contains informations on the real remote object as:               //
//  - Object Properties (i.e. file stat if the object is a TSystemFile) //
//  - Object Name                                                       //
//  - Class Name                                                        //
//  - TKey Object Name (if the remote object is a TKey)                 //
//  - TKey Class Name (if the remote object is a TKey)                  //
//  - Remote object address                                             //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TSystemDirectory
#include "TSystemDirectory.h"
#endif

#ifndef ROOT_TList
#include "TList.h"
#endif

#ifndef ROOT_TSystem
#include "TSystem.h"
#endif

class TRemoteObject : public TNamed {

protected:
   FileStat_t  fFileStat;        // file status
   Bool_t      fIsFolder;        // is folder flag
   Long64_t    fRemoteAddress;   // remote address
   TString     fClassName;       // real object class name
   TString     fKeyObjectName;   // key object name
   TString     fKeyClassName;    // key object class name

public:
   TRemoteObject();
   TRemoteObject(const char *name, const char *title, const char *classname);

   virtual ~TRemoteObject();

   virtual void            Browse(TBrowser *b);
   Bool_t                  IsFolder() const { return fIsFolder; }
   TList                  *Browse();
   Bool_t                  GetFileStat(FileStat_t *sbuf);
   const char             *GetClassName() const { return fClassName.Data(); }
   const char             *GetKeyObjectName() const { return fKeyObjectName.Data(); }
   const char             *GetKeyClassName() const { return fKeyClassName.Data(); }
   void                    SetFolder(Bool_t isFolder) { fIsFolder = isFolder; }
   void                    SetKeyObjectName(const char *name) { fKeyObjectName = name; }
   void                    SetKeyClassName(const char *name) { fKeyClassName = name; }
   void                    SetRemoteAddress(Long_t addr) { fRemoteAddress = addr; }

   ClassDef(TRemoteObject,0)  //A remote object
};

#endif

 TRemoteObject.h:1
 TRemoteObject.h:2
 TRemoteObject.h:3
 TRemoteObject.h:4
 TRemoteObject.h:5
 TRemoteObject.h:6
 TRemoteObject.h:7
 TRemoteObject.h:8
 TRemoteObject.h:9
 TRemoteObject.h:10
 TRemoteObject.h:11
 TRemoteObject.h:12
 TRemoteObject.h:13
 TRemoteObject.h:14
 TRemoteObject.h:15
 TRemoteObject.h:16
 TRemoteObject.h:17
 TRemoteObject.h:18
 TRemoteObject.h:19
 TRemoteObject.h:20
 TRemoteObject.h:21
 TRemoteObject.h:22
 TRemoteObject.h:23
 TRemoteObject.h:24
 TRemoteObject.h:25
 TRemoteObject.h:26
 TRemoteObject.h:27
 TRemoteObject.h:28
 TRemoteObject.h:29
 TRemoteObject.h:30
 TRemoteObject.h:31
 TRemoteObject.h:32
 TRemoteObject.h:33
 TRemoteObject.h:34
 TRemoteObject.h:35
 TRemoteObject.h:36
 TRemoteObject.h:37
 TRemoteObject.h:38
 TRemoteObject.h:39
 TRemoteObject.h:40
 TRemoteObject.h:41
 TRemoteObject.h:42
 TRemoteObject.h:43
 TRemoteObject.h:44
 TRemoteObject.h:45
 TRemoteObject.h:46
 TRemoteObject.h:47
 TRemoteObject.h:48
 TRemoteObject.h:49
 TRemoteObject.h:50
 TRemoteObject.h:51
 TRemoteObject.h:52
 TRemoteObject.h:53
 TRemoteObject.h:54
 TRemoteObject.h:55
 TRemoteObject.h:56
 TRemoteObject.h:57
 TRemoteObject.h:58
 TRemoteObject.h:59
 TRemoteObject.h:60
 TRemoteObject.h:61
 TRemoteObject.h:62
 TRemoteObject.h:63
 TRemoteObject.h:64
 TRemoteObject.h:65
 TRemoteObject.h:66
 TRemoteObject.h:67
 TRemoteObject.h:68
 TRemoteObject.h:69
 TRemoteObject.h:70
 TRemoteObject.h:71
 TRemoteObject.h:72
 TRemoteObject.h:73
 TRemoteObject.h:74