Logo ROOT   6.18/05
Reference Guide
RDrawingOptsBase.cxx
Go to the documentation of this file.
1/// \file RDrawingOptsBase.cxx
2/// \ingroup Gpad ROOT7
3/// \author Axel Naumann <axel@cern.ch>
4/// \date 2018-02-20
5/// \warning This is part of the ROOT 7 prototype! It will change without notice. It might trigger earthquakes. Feedback
6/// is welcome!
7
8/*************************************************************************
9 * Copyright (C) 1995-2018, Rene Brun and Fons Rademakers. *
10 * All rights reserved. *
11 * *
12 * For the licensing terms see $ROOTSYS/LICENSE. *
13 * For the list of contributors see $ROOTSYS/README/CREDITS. *
14 *************************************************************************/
15
17
18#include "ROOT/RDrawingAttr.hxx"
19#include "ROOT/RLogger.hxx"
20
21#include "TClass.h"
22#include "TDataMember.h"
23#include "TMemberInspector.h"
24
25#include <algorithm>
26#include <sstream>
27
28std::shared_ptr<ROOT::Experimental::RDrawingAttrHolder> &
30{
31 if (!fHolder) {
32 fHolder = std::make_shared<RDrawingAttrHolder>();
33 fHolderIO = fHolder.get();
34 }
35 return fHolder;
36}
37
38void ROOT::Experimental::RDrawingOptsBase::SetStyleClasses(const std::vector<std::string> &styles)
39{
40 if (!fHolder) {
41 fHolder = std::make_shared<RDrawingAttrHolder>(styles);
42 fHolderIO = fHolder.get();
43 } else
44 fHolder->SetStyleClasses(styles);
45}
46
47const std::vector<std::string> &ROOT::Experimental::RDrawingOptsBase::GetStyleClasses() const
48{
49 static const std::vector<std::string> sEmpty;
50 if (!fHolder)
51 return sEmpty;
52 return fHolder->GetStyleClasses();
53}
void SetStyleClasses(const std::vector< std::string > &styles)
Get the attribute style classes of these options.
std::shared_ptr< RDrawingAttrHolder > & GetHolder()
RDrawingAttrHolder * fHolderIO
only for I/O, should be fixed in the fututre
std::shared_ptr< RDrawingAttrHolder > fHolder
The RDrawingAttrHolder of the attribute values.
const std::vector< std::string > & GetStyleClasses() const
Get the attribute style classes of these options.