Logo ROOT  
Reference Guide
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
10
11#include "ROOT/RDrawable.hxx"
12#include "ROOT/RCanvas.hxx"
13
14using namespace ROOT::Experimental;
15
16
17/////////////////////////////////////////////////////////////////////////////
18/// destructor, pin vtable
19
20RDrawableReply::~RDrawableReply() = default;
21
22/////////////////////////////////////////////////////////////////////////////
23/// destructor, pin vtable
24
25RDrawableRequest::~RDrawableRequest() = default;
26
27
28/////////////////////////////////////////////////////////////////////////////
29/// Execute method of the drawable
30
31std::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())
51 }
52 }
53
54 if (GetContext().GetCanvas())
56
57 return nullptr;
58}
const RDrawable::RDisplayContext & GetContext() const
virtual void Execute(const std::string &)
Definition: RDrawable.cxx:40
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