Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TExec.h
Go to the documentation of this file.
1// @(#)root/base:$Id$
2// Author: Rene Brun 29/12/99
3
4/*************************************************************************
5 * Copyright (C) 1995-2022, 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 *************************************************************************/
11
12#ifndef ROOT_TExec
13#define ROOT_TExec
14
15
16//////////////////////////////////////////////////////////////////////////
17// //
18// TExec //
19// //
20// A TExec object can execute a CLING command. //
21// //
22//////////////////////////////////////////////////////////////////////////
23
24#include "TNamed.h"
25
26class TExec : public TNamed {
27
28public:
29
30 TExec();
31 TExec(const char *name, const char *command);
32 TExec(const TExec &text);
33 virtual ~TExec();
34 virtual void Exec(const char *command = "");
35 void Paint(Option_t *option="") override;
36 void SavePrimitive(std::ostream &out, Option_t *option = "") override;
37 virtual void SetAction(const char *action) { SetTitle(action); }
38
39 ClassDefOverride(TExec,1); //To execute a CLING command
40};
41
42#endif
const char Option_t
Definition RtypesCore.h:66
#define ClassDefOverride(name, id)
Definition Rtypes.h:346
Option_t Option_t option
Option_t Option_t TPoint TPoint const char text
char name[80]
Definition TGX11.cxx:110
TExec is a utility class that can be used to execute a C++ command when some event happens in a pad.
Definition TExec.h:26
virtual ~TExec()
Exec default destructor.
Definition TExec.cxx:120
void SavePrimitive(std::ostream &out, Option_t *option="") override
Save primitive as a C++ statement(s) on output stream out.
Definition TExec.cxx:168
void Paint(Option_t *option="") override
Execute the command referenced by this object.
Definition TExec.cxx:160
virtual void SetAction(const char *action)
Definition TExec.h:37
virtual void Exec(const char *command="")
Execute the command referenced by this object.
Definition TExec.cxx:143
TExec()
Exec default constructor.
Definition TExec.cxx:105
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
Definition TNamed.cxx:164