File indexing completed on 2025-01-18 10:12:23
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013 #ifndef ROOT_TRint
0014 #define ROOT_TRint
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025 #include "TApplication.h"
0026 #include "TString.h"
0027
0028 class TFileHandler;
0029
0030
0031 class TRint : public TApplication {
0032
0033 private:
0034 Int_t fNcmd;
0035 TString fDefaultPrompt;
0036 TString fNonContinuePrompt;
0037 char fPrompt[64];
0038 Bool_t fInterrupt;
0039 Int_t fCaughtSignal;
0040 TFileHandler *fInputHandler;
0041 Bool_t fBackslashContinue{};
0042
0043 TRint(const TRint&) = delete;
0044 TRint& operator=(const TRint&) = delete;
0045
0046 void ExecLogon();
0047 Longptr_t ProcessRemote(const char *line, Int_t *error = nullptr) override;
0048 Longptr_t ProcessLineNr(const char* filestem, const char *line, Int_t *error = nullptr);
0049
0050 public:
0051 TRint(const char *appClassName, Int_t *argc, char **argv, void *options = nullptr, Int_t numOptions = 0,
0052 Bool_t noLogo = kFALSE, Bool_t exitOnUnknownArgs = kFALSE);
0053 virtual ~TRint();
0054 virtual char *GetPrompt();
0055 virtual const char *SetPrompt(const char *newPrompt);
0056 void SetEchoMode(Bool_t mode) override;
0057 void HandleException(Int_t sig) override;
0058 Bool_t HandleTermInput() override;
0059 virtual void PrintLogo(Bool_t lite = kFALSE);
0060 void Run(Bool_t retrn = kFALSE) override;
0061 virtual void Terminate(int status) override;
0062 void Interrupt() { fInterrupt = kTRUE; }
0063 Int_t TabCompletionHook(char *buf, int *pLoc, std::ostream& out) override;
0064
0065 TFileHandler *GetInputHandler() { return fInputHandler; }
0066
0067 ClassDefOverride(TRint,0);
0068 };
0069
0070 #endif