Logo ROOT  
Reference Guide
Go to the documentation of this file.
1// @(#)root/rint:$Id$
2// Author: Rene Brun 17/02/95
5 * Copyright (C) 1995-2000, 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 *************************************************************************/
13#ifndef ROOT_TRint
14#define ROOT_TRint
17// //
18// Rint //
19// //
20// Rint is the ROOT Interactive Interface. It allows interactive access //
21// to the ROOT system via a C++ interpreter. //
22// //
25#include "TApplication.h"
26#include "TString.h"
28class TFileHandler;
31class TRint : public TApplication {
34 Int_t fNcmd; // command history number
35 TString fDefaultPrompt; // default prompt: "root [%d] "
36 TString fNonContinuePrompt; // default prompt before continue prompt was set
37 char fPrompt[64]; // interpreter prompt
38 Bool_t fInterrupt; // if true macro execution will be stopped
39 Int_t fCaughtSignal; // TRint just caught a signal
40 TFileHandler *fInputHandler; // terminal input handler
41 Bool_t fBackslashContinue{};// whether the last line ended with '\'
43 TRint(const TRint&) = delete;
44 TRint& operator=(const TRint&) = delete;
46 void ExecLogon();
47 Longptr_t ProcessRemote(const char *line, Int_t *error = nullptr) override;
48 Longptr_t ProcessLineNr(const char* filestem, const char *line, Int_t *error = nullptr);
51 TRint(const char *appClassName, Int_t *argc, char **argv, void *options = 0, Int_t numOptions = 0,
52 Bool_t noLogo = kFALSE, Bool_t exitOnUnknownArgs = kFALSE);
53 virtual ~TRint();
54 virtual char *GetPrompt();
55 virtual const char *SetPrompt(const char *newPrompt);
56 void SetEchoMode(Bool_t mode) override;
57 void HandleException(Int_t sig) override;
58 Bool_t HandleTermInput() override;
59 virtual void PrintLogo(Bool_t lite = kFALSE);
60 void Run(Bool_t retrn = kFALSE) override;
61 virtual void Terminate(int status) override;
63 Int_t TabCompletionHook(char *buf, int *pLoc, std::ostream& out) override;
67 ClassDefOverride(TRint,0); //ROOT Interactive Application Interface
int Int_t
Definition: RtypesCore.h:45
long Longptr_t
Definition: RtypesCore.h:82
const Bool_t kFALSE
Definition: RtypesCore.h:101
const Bool_t kTRUE
Definition: RtypesCore.h:100
#define ClassDefOverride(name, id)
Definition: Rtypes.h:339
Option_t Option_t TPoint TPoint const char mode
This class creates the ROOT Application Environment that interfaces to the windowing system eventloop...
Definition: TApplication.h:39
Definition: TRint.h:31
void Interrupt()
Definition: TRint.h:62
void SetEchoMode(Bool_t mode) override
Set console mode:
Definition: TRint.cxx:750
Bool_t HandleTermInput() override
Handle input coming from terminal.
Definition: TRint.cxx:611
Bool_t fInterrupt
Definition: TRint.h:38
void Run(Bool_t retrn=kFALSE) override
Main application eventloop.
Definition: TRint.cxx:384
Longptr_t ProcessLineNr(const char *filestem, const char *line, Int_t *error=nullptr)
Calls TRint::ProcessLine() possibly prepending a #line directive for better diagnostics.
Definition: TRint.cxx:789
virtual const char * SetPrompt(const char *newPrompt)
Set a new default prompt.
Definition: TRint.cxx:595
virtual void Terminate(int status) override
Terminate the application.
Definition: TRint.cxx:720
char fPrompt[64]
Definition: TRint.h:37
Int_t TabCompletionHook(char *buf, int *pLoc, std::ostream &out) override
Forward tab completion request to our TTabCom::Hook().
Definition: TRint.cxx:825
virtual char * GetPrompt()
Get prompt from interpreter. Either "root [n]" or "end with '}'".
Definition: TRint.cxx:575
void HandleException(Int_t sig) override
Handle signals (kSigBus, kSigSegmentationViolation, kSigIllegalInstruction and kSigFloatingException)...
Definition: TRint.cxx:704
virtual ~TRint()
Definition: TRint.cxx:316
virtual void PrintLogo(Bool_t lite=kFALSE)
Print the ROOT logo on standard output.
Definition: TRint.cxx:512
void ExecLogon()
Execute logon macro's.
Definition: TRint.cxx:341
Longptr_t ProcessRemote(const char *line, Int_t *error=nullptr) override
Process the content of a line starting with ".R" (already stripped-off) The format is [user@]host[:di...
Definition: TRint.cxx:766
Bool_t fBackslashContinue
Definition: TRint.h:41
TString fDefaultPrompt
Definition: TRint.h:35
TRint & operator=(const TRint &)=delete
TString fNonContinuePrompt
Definition: TRint.h:36
Int_t fCaughtSignal
Definition: TRint.h:39
Int_t fNcmd
Definition: TRint.h:34
TRint(const TRint &)=delete
TFileHandler * GetInputHandler()
Definition: TRint.h:65
TFileHandler * fInputHandler
Definition: TRint.h:40
Basic string class.
Definition: TString.h:136
TLine * line