ROOT
v6-26
Reference Guide
Loading...
Searching...
No Matches
RDrawableRequest.cxx
Go to the documentation of this file.
1
/*************************************************************************
2
* Copyright (C) 1995-2020, Rene Brun and Fons Rademakers. *
3
* All rights reserved. *
4
* *
5
* For the licensing terms see $ROOTSYS/LICENSE. *
6
* For the list of contributors see $ROOTSYS/README/CREDITS. *
7
*************************************************************************/
8
9
#include "
ROOT/RDrawableRequest.hxx
"
10
11
#include "
ROOT/RDrawable.hxx
"
12
#include "
ROOT/RCanvas.hxx
"
13
14
using namespace
ROOT::Experimental
;
15
16
17
/////////////////////////////////////////////////////////////////////////////
18
/// destructor, pin vtable
19
20
RDrawableReply::~RDrawableReply
() =
default
;
21
22
/////////////////////////////////////////////////////////////////////////////
23
/// destructor, pin vtable
24
25
RDrawableRequest::~RDrawableRequest
() =
default
;
26
27
28
/////////////////////////////////////////////////////////////////////////////
29
/// Execute method of the drawable
30
31
std::unique_ptr<RDrawableReply>
RDrawableExecRequest::Process
()
32
{
33
if
(!
exec
.empty() &&
GetContext
().
GetDrawable
()) {
34
std::string buf =
exec
;
35
36
// many operations can be separated by ";;" string
37
// TODO: exclude potential mistake if such symbols appears inside quotes
38
39
while
(!buf.empty()) {
40
std::string sub = buf;
41
auto
pos = buf.find(
";;"
);
42
if
(pos == std::string::npos) {
43
sub = buf;
44
buf.clear();
45
}
else
{
46
sub = buf.substr(0,pos);
47
buf = buf.substr(pos+2);
48
}
49
if
(!sub.empty())
50
GetContext
().
GetDrawable
()->
Execute
(sub);
51
}
52
}
53
54
if
(
GetContext
().GetCanvas())
55
GetContext
().
GetCanvas
()->
Modified
();
56
57
return
nullptr
;
58
}
RCanvas.hxx
RDrawableRequest.hxx
RDrawable.hxx
ROOT::Experimental::RCanvas::Modified
void Modified()
Definition
RCanvas.hxx:140
ROOT::Experimental::RDrawableExecRequest::Process
std::unique_ptr< RDrawableReply > Process() override
Execute method of the drawable.
Definition
RDrawableRequest.cxx:31
ROOT::Experimental::RDrawableExecRequest::exec
std::string exec
that to execute
Definition
RDrawableRequest.hxx:90
ROOT::Experimental::RDrawableReply::~RDrawableReply
virtual ~RDrawableReply()
destructor, pin vtable
ROOT::Experimental::RDrawableRequest::GetContext
const RDrawable::RDisplayContext & GetContext() const
Definition
RDrawableRequest.hxx:64
ROOT::Experimental::RDrawableRequest::~RDrawableRequest
virtual ~RDrawableRequest()
destructor, pin vtable
ROOT::Experimental::RDrawable::RDisplayContext::GetCanvas
RCanvas * GetCanvas() const
Definition
RDrawable.hxx:160
ROOT::Experimental::RDrawable::RDisplayContext::GetDrawable
RDrawable * GetDrawable() const
Definition
RDrawable.hxx:162
ROOT::Experimental::RDrawable::Execute
virtual void Execute(const std::string &)
Definition
RDrawable.cxx:40
ROOT::Experimental
Definition
RDirectory.hxx:30
ROOT::Experimental::GetDrawable
auto GetDrawable(const std::shared_ptr< DRAWABLE > &drawable)
Central method to insert drawable in list of pad primitives By default drawable placed as is.
Definition
RDrawable.hxx:228
graf2d
gpadv7
src
RDrawableRequest.cxx
ROOT v6-26 - Reference Guide Generated on Mon Sep 11 2023 21:02:20 (GVA Time) using Doxygen 1.9.8