Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
RStyle.cxx
Go to the documentation of this file.
1 /*************************************************************************
2  * Copyright (C) 1995-2017, 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/RStyle.hxx>
10 
11 #include <ROOT/RDrawable.hxx>
12 
13 // #include "RStyleReader.hxx" // in src/
14 
15 
16 using namespace std::string_literals;
17 
18 
19 ///////////////////////////////////////////////////////////////////////////////
20 /// Evaluate style
21 
22 const ROOT::Experimental::RAttrMap::Value_t *ROOT::Experimental::RStyle::Eval(const std::string &field, const RDrawable &drawable) const
23 {
24  for (const auto &block : fBlocks) {
25  if (drawable.MatchSelector(block.selector)) {
26  auto res = block.map.Find(field);
27  if (res)
28  return res;
29  }
30  }
31 
32  return nullptr;
33 }