<commit_before>// @(#)root/base:$Name:  $:$Id: TApplication.h,v 1.8 2003/01/07 17:31:29 rdm Exp $
// Author: <NAME>   22/12/95

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TApplication
#define ROOT_TApplication


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TApplication                                                         //
//                                                                      //
// This class creates the ROOT Application Environment that interfaces  //
// to the windowing system eventloop and eventhandlers.                 //
// This class must be instantiated exactly once in any given            //
// application. Normally the specific application class inherits from   //
// TApplication (see TRint).                                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif

#ifndef ROOT_TApplicationImp
#include "TApplicationImp.h"
#endif

class TObjArray;
class TTimer;
class TSignalHandler;


class TApplication : public TObject {

private:
   Int_t              fArgc;           //Number of com   mand line arguments
   char             **fArgv;           //Command line arguments
   TApplicationImp   *fAppImp;         //!Window system specific application implementation
   Bool_t             fReturnFromRun;  //When true return from Run()
   Bool_t             fNoLog;          //Do not process logon and logoff macros
   Bool_t             fNoLogo;         //Do not show splash screen and welcome message
   Bool_t             fQuit;           //Exit after having processed input files
   TObjArray         *fFiles;          //Array of input files (TObjString's)
   char              *fIdleCommand;    //Command to execute while application is idle
   TTimer            *fIdleTimer;      //Idle timer
   TSignalHandler    *fSigHandler;     //Interrupt handler

protected:
   TApplication();
   virtual void Help(const char *line);
   virtual void InitializeColors();
   virtual void LoadGraphicsLibs();
   virtual void MakeBatch();
   void         SetSignalHandler(TSignalHandler *sh) { fSigHandler = sh; }

public:
   TApplication(const char *appClassName, int *argc, char **argv,
                void *options = 0, int numOptions = 0);
   virtual ~TApplication();

   virtual void    GetOptions(int *argc, char **argv);
   TSignalHandler *GetSignalHandler() const { return fSigHandler; }
   virtual void    HandleIdleTimer();
   virtual Bool_t  HandleTermInput() { return kFALSE; }
   virtual void    Init() { fAppImp->Init(); }
   virtual void    ProcessLine(const char *line, Bool_t sync = kFALSE, int* error = 0);
   virtual void    ProcessFile(const char *line, int* error = 0);
   virtual void    Run(Bool_t retrn = kFALSE);
   virtual void    SetIdleTimer(UInt_t idleTimeInSec, const char *command);
   virtual void    RemoveIdleTimer();
   const char     *GetIdleCommand() const { return fIdleCommand; }
   virtual void    StartIdleing();
   virtual void    StopIdleing();
   virtual void    Terminate(int status = 0);

   virtual const char *ApplicationName() const { return fAppImp->ApplicationName(); }
   virtual void    Show()    { fAppImp->Show(); }
   virtual void    Hide()    { fAppImp->Hide(); }
   virtual TApplicationImp *GetApplicationImp(){ return fAppImp;}
   virtual void    Iconify() { fAppImp->Iconify(); }
   virtual Bool_t  IsCmdThread(){ return fAppImp->IsCmdThread(); }
   virtual void    Open()    { fAppImp->Open(); }
   virtual void    Raise()   { fAppImp->Raise(); }
   virtual void    Lower()   { fAppImp->Lower(); }

   int             Argc() const  { return fArgc; }
   char          **Argv() const  { return fArgv; }
   char           *Argv(int index) const { return fArgv[index]; }
   Bool_t          NoLogOpt() const { return fNoLog; }
   Bool_t          NoLogoOpt() const { return fNoLogo; }
   Bool_t          QuitOpt() const { return fQuit; }
   TObjArray      *InputFiles() const { return fFiles; }
   void            ClearInputFiles();

   Bool_t          ReturnFromRun() const { return fReturnFromRun; }
   void            SetReturnFromRun(Bool_t ret) { fReturnFromRun = ret; }

   static void     CreateApplication();

   ClassDef(TApplication,0)  //GUI application singleton
};

R__EXTERN TApplication *gApplication;

#endif<commit_msg>From <NAME>:<commit_after>// @(#)root/base:$Name:  $:$Id: TApplication.h,v 1.9 2003/10/22 17:20:50 rdm Exp $
// Author: <NAME>   22/12/95

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TApplication
#define ROOT_TApplication


//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TApplication                                                         //
//                                                                      //
// This class creates the ROOT Application Environment that interfaces  //
// to the windowing system eventloop and eventhandlers.                 //
// This class must be instantiated exactly once in any given            //
// application. Normally the specific application class inherits from   //
// TApplication (see TRint).                                            //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TObject
#include "TObject.h"
#endif

#ifndef ROOT_TApplicationImp
#include "TApplicationImp.h"
#endif

class TObjArray;
class TTimer;
class TSignalHandler;


class TApplication : public TObject {

private:
   Int_t              fArgc;           //Number of com   mand line arguments
   char             **fArgv;           //Command line arguments
   TApplicationImp   *fAppImp;         //!Window system specific application implementation
   Bool_t             fReturnFromRun;  //When true return from Run()
   Bool_t             fNoLog;          //Do not process logon and logoff macros
   Bool_t             fNoLogo;         //Do not show splash screen and welcome message
   Bool_t             fQuit;           //Exit after having processed input files
   TObjArray         *fFiles;          //Array of input files (TObjString's)
   char              *fIdleCommand;    //Command to execute while application is idle
   TTimer            *fIdleTimer;      //Idle timer
   TSignalHandler    *fSigHandler;     //Interrupt handler

protected:
   TApplication();
   virtual void Help(const char *line);
   virtual void InitializeColors();
   virtual void LoadGraphicsLibs();
   virtual void MakeBatch();
   void         SetSignalHandler(TSignalHandler *sh) { fSigHandler = sh; }

public:
   TApplication(const char *appClassName, int *argc, char **argv,
                void *options = 0, int numOptions = 0);
   virtual ~TApplication();

   virtual void    GetOptions(int *argc, char **argv);
   TSignalHandler *GetSignalHandler() const { return fSigHandler; }
   virtual void    HandleIdleTimer();
   virtual Bool_t  HandleTermInput() { return kFALSE; }
   virtual void    Init() { fAppImp->Init(); }
   virtual void    ProcessLine(const char *line, Bool_t sync = kFALSE, int* error = 0);
   virtual void    ProcessFile(const char *line, int* error = 0);
   virtual void    Run(Bool_t retrn = kFALSE);
   virtual void    SetIdleTimer(UInt_t idleTimeInSec, const char *command);
   virtual void    RemoveIdleTimer();
   const char     *GetIdleCommand() const { return fIdleCommand; }
   virtual void    StartIdleing();
   virtual void    StopIdleing();
   virtual void    Terminate(int status = 0);

   virtual const char *ApplicationName() const { return fAppImp->ApplicationName(); }
   virtual void    Show()    { fAppImp->Show(); }
   virtual void    Hide()    { fAppImp->Hide(); }
   virtual TApplicationImp *GetApplicationImp(){ return fAppImp;}
   virtual void    Iconify() { fAppImp->Iconify(); }
   virtual Bool_t  IsCmdThread(){ return fAppImp->IsCmdThread(); }
   virtual void    Open()    { fAppImp->Open(); }
   virtual void    Raise()   { fAppImp->Raise(); }
   virtual void    Lower()   { fAppImp->Lower(); }

   int             Argc() const  { return fArgc; }
   char          **Argv() const  { return fArgv; }
   char           *Argv(int index) const { return fArgv ? fArgv[index] : 0; }
   Bool_t          NoLogOpt() const { return fNoLog; }
   Bool_t          NoLogoOpt() const { return fNoLogo; }
   Bool_t          QuitOpt() const { return fQuit; }
   TObjArray      *InputFiles() const { return fFiles; }
   void            ClearInputFiles();

   Bool_t          ReturnFromRun() const { return fReturnFromRun; }
   void            SetReturnFromRun(Bool_t ret) { fReturnFromRun = ret; }

   static void     CreateApplication();

   ClassDef(TApplication,0)  //GUI application singleton
};

R__EXTERN TApplication *gApplication;

#endif
{'fraction_non_alphanumeric': 0.1458020614430101, 'fraction_numerical': 0.007305113579505654, 'mean_word_length': 1.7761111111111112, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 28, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 36, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1966756', 'n_tokens_mistral': 2594, 'n_tokens_neox': 2470, 'n_words': 774}