ROOT  6.06/09
Reference Guide
ClassSelectionRule.h
Go to the documentation of this file.
1 
2 // @(#)root/core/utils:$Id: ClassSelectionRule.h 28529 2009-05-11 16:43:35Z pcanal $
3 // Author: Velislava Spasova September 2010
4 
5 /*************************************************************************
6  * Copyright (C) 1995-2011, Rene Brun, Fons Rademakers and al. *
7  * All rights reserved. *
8  * *
9  * For the licensing terms see $ROOTSYS/LICENSE. *
10  * For the list of contributors see $ROOTSYS/README/CREDITS. *
11  *************************************************************************/
12 
13 #ifndef R__CLASSSELECTIONRULE_H
14 #define R__CLASSSELECTIONRULE_H
15 
16 //////////////////////////////////////////////////////////////////////////
17 // //
18 // ClassSelection //
19 // //
20 //////////////////////////////////////////////////////////////////////////
21 
22 #include "BaseSelectionRule.h"
23 #include "VariableSelectionRule.h"
24 
25 #include <list>
26 #include <iosfwd>
27 
28 namespace cling {
29  class Interpreter;
30 }
31 
33 {
34 private:
35  std::list<VariableSelectionRule> fFieldSelectionRules;
36  std::list<FunctionSelectionRule> fMethodSelectionRules;
38 
39  bool fRequestStreamerInfo; // for linkdef.h: true if we had '+' at the end of a class name
40  bool fRequestNoStreamer; // for linkdef.h: true if we had '-' or "-!" at the end of a class name
41  bool fRequestNoInputOperator; // for linkdef.h: true if we had '!' at the end of a class name
42  bool fRequestOnlyTClass; // True if the user want the TClass intiliazer but *not* the interpreter meta data
43  bool fRequestProtected; // Explicit request to be able to access protected member from the interpreter.
44  bool fRequestPrivate; // Explicit request to be able to access private member from the interpreter.
45  int fRequestedVersionNumber; // Explicit request for a specific version number (default to no request with -1).
46 
47 public:
48 
50  BaseSelectionRule(sel), fIsInheritable(false), fRequestStreamerInfo(false), fRequestNoStreamer(false), fRequestNoInputOperator(false), fRequestOnlyTClass(false), fRequestProtected(false), fRequestPrivate(false), fRequestedVersionNumber(-1) {}
51 
52  ClassSelectionRule(long index, cling::Interpreter &interp, const char* selFileName = "", long lineno = -1):
53  BaseSelectionRule(index, interp, selFileName, lineno), fIsInheritable(false), fRequestStreamerInfo(false), fRequestNoStreamer(false), fRequestNoInputOperator(false), fRequestOnlyTClass(false), fRequestProtected(false), fRequestPrivate(false), fRequestedVersionNumber(-1) {}
54 
55  ClassSelectionRule(long index, bool inherit, ESelect sel, std::string attributeName, std::string attributeValue, cling::Interpreter &interp, const char* selFileName = "", long lineno = -1):
56  BaseSelectionRule(index, sel, attributeName, attributeValue, interp, selFileName, lineno), fIsInheritable(inherit), fRequestStreamerInfo(false), fRequestNoStreamer(false), fRequestNoInputOperator(false), fRequestOnlyTClass(false), fRequestProtected(false), fRequestPrivate(false), fRequestedVersionNumber(-1) {}
57 
58  void Print(std::ostream &out) const;
59 
60  void AddFieldSelectionRule(const VariableSelectionRule& field); //adds entry to the filed selections list
61  bool HasFieldSelectionRules() const;
62  //const std::list<VariableSelectionRule>& getFieldSelectionRules(); //gets the field selections list
63  const std::list<VariableSelectionRule>& GetFieldSelectionRules() const; //gets the field selections list
64 
65  void AddMethodSelectionRule(const FunctionSelectionRule& method); //adds entry to the method selections list
66  bool HasMethodSelectionRules() const;
67  //const std::list<FunctionSelectionRule>& getMethodSelectionRules(); //gets the method selections list
68  const std::list<FunctionSelectionRule>& GetMethodSelectionRules() const; //gets the method selections list
69 
70  bool IsInheritable() const; //checks if the class selection rule is inheritable
71  void SetInheritable(bool inherit); //sets the inheritance rule for the class
72 
73  void SetRequestStreamerInfo(bool needStreamerInfo);
74  void SetRequestNoStreamer(bool noStreamer);
75  void SetRequestNoInputOperator(bool excl);
76  void SetRequestOnlyTClass(bool val);
77  void SetRequestProtected(bool val);
78  void SetRequestPrivate(bool val);
79  void SetRequestedVersionNumber(int version);
80 
81  bool RequestOnlyTClass() const; // True if the user want the TClass intiliazer but *not* the interpreter meta data
82  bool RequestNoStreamer() const; // Request no Streamer function in the dictionary
83  bool RequestNoInputOperator() const; // Request no generation on a default input operator by rootcint or the compiler.
84  bool RequestStreamerInfo() const; // Request the ROOT 4+ I/O streamer
85  bool RequestProtected() const;
86  bool RequestPrivate() const;
87  int RequestedVersionNumber() const;
88 };
89 
90 #endif
91 
void SetRequestOnlyTClass(bool val)
std::list< FunctionSelectionRule > fMethodSelectionRules
bool RequestStreamerInfo() const
void SetRequestProtected(bool val)
bool RequestNoStreamer() const
void SetRequestStreamerInfo(bool needStreamerInfo)
bool HasFieldSelectionRules() const
ClassSelectionRule(long index, cling::Interpreter &interp, const char *selFileName="", long lineno=-1)
bool RequestNoInputOperator() const
ClassImp(TIterator) Bool_t TIterator return false
Compare two iterator objects.
Definition: TIterator.cxx:20
void Print(std::ostream &out) const
void SetRequestNoInputOperator(bool excl)
int RequestedVersionNumber() const
char * out
Definition: TBase64.cxx:29
bool RequestPrivate() const
bool HasMethodSelectionRules() const
void SetRequestNoStreamer(bool noStreamer)
const std::list< VariableSelectionRule > & GetFieldSelectionRules() const
void SetInheritable(bool inherit)
void AddMethodSelectionRule(const FunctionSelectionRule &method)
void AddFieldSelectionRule(const VariableSelectionRule &field)
void SetRequestedVersionNumber(int version)
ClassSelectionRule(ESelect sel=kYes)
Definition: TDatime.h:114
const std::list< FunctionSelectionRule > & GetMethodSelectionRules() const
ClassSelectionRule(long index, bool inherit, ESelect sel, std::string attributeName, std::string attributeValue, cling::Interpreter &interp, const char *selFileName="", long lineno=-1)
bool RequestProtected() const
std::list< VariableSelectionRule > fFieldSelectionRules
void SetRequestPrivate(bool val)
bool RequestOnlyTClass() const