00001 // @(#)root/rint:$Id: TRint.h 20882 2007-11-19 11:31:26Z rdm $ 00002 // Author: Rene Brun 17/02/95 00003 00004 /************************************************************************* 00005 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers. * 00006 * All rights reserved. * 00007 * * 00008 * For the licensing terms see $ROOTSYS/LICENSE. * 00009 * For the list of contributors see $ROOTSYS/README/CREDITS. * 00010 *************************************************************************/ 00011 00012 00013 #ifndef ROOT_TRint 00014 #define ROOT_TRint 00015 00016 ////////////////////////////////////////////////////////////////////////// 00017 // // 00018 // Rint // 00019 // // 00020 // Rint is the ROOT Interactive Interface. It allows interactive access // 00021 // to the ROOT system via a C++ interpreter. // 00022 // // 00023 ////////////////////////////////////////////////////////////////////////// 00024 00025 #ifndef ROOT_TApplication 00026 #include "TApplication.h" 00027 #endif 00028 #ifndef ROOT_TString 00029 #include "TString.h" 00030 #endif 00031 00032 class TFileHandler; 00033 00034 00035 class TRint : public TApplication { 00036 00037 private: 00038 Int_t fNcmd; // command history number 00039 TString fDefaultPrompt; // default prompt: "root [%d] " 00040 char fPrompt[64]; // interpreter prompt 00041 Bool_t fInterrupt; // if true macro execution will be stopped 00042 TFileHandler *fInputHandler; // terminal input handler 00043 00044 TRint(const TRint&); // not implemented 00045 TRint& operator=(const TRint&); // not implemented 00046 00047 void ExecLogon(); 00048 Long_t ProcessRemote(const char *line, Int_t *error = 0); 00049 00050 public: 00051 TRint(const char *appClassName, int *argc, char **argv, 00052 void *options = 0, int numOptions = 0, Bool_t noLogo = kFALSE); 00053 virtual ~TRint(); 00054 virtual char *GetPrompt(); 00055 virtual const char *SetPrompt(const char *newPrompt); 00056 virtual void SetEchoMode(Bool_t mode); 00057 virtual void HandleException(Int_t sig); 00058 virtual Bool_t HandleTermInput(); 00059 virtual void PrintLogo(Bool_t lite = kFALSE); 00060 virtual void Run(Bool_t retrn = kFALSE); 00061 virtual void Terminate(int status); 00062 void Interrupt() { fInterrupt = kTRUE; } 00063 00064 ClassDef(TRint,0); //ROOT Interactive Application Interface 00065 }; 00066 00067 #endif