Logo ROOT   6.12/07
Reference Guide
TStatusBitsChecker.h
Go to the documentation of this file.
1 // @(#)root/meta:$Id$
2 // Author: Philippe Canal, 2017
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2017, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TStatusBitsChecker
13 #define ROOT_TStatusBitsChecker
14 
15 #include <string>
16 #include <map>
17 #include <list>
18 
19 #include "Rtypes.h"
20 
21 class TClass;
22 
23 namespace ROOT {
24 namespace Detail {
25 
27 protected:
28  static UChar_t ConvertToBit(Long64_t constant, TClass &classRef, const char *constantName);
29 
30 public:
31  class Registry {
32  protected:
33  struct Info;
34 
35  std::map<UChar_t, std::list<Info>> fRegister; ///<! Register of bits seen so far.
36 
37  public:
38 
39  void RegisterBits(TClass &classRef);
40 
41  bool Check(TClass &classRef, bool verbose = false);
42 
43  Registry(); // Implemented in source file to allow hiding of the Info struct.
44  ~Registry(); // Implemented in source file to allow hiding of the Info struct.
45  };
46 
47  static bool Check(TClass &classRef, bool verbose = false);
48  static bool Check(const char *classname, bool verbose = false);
49  static bool CheckAllClasses(bool verbosity = false);
50 };
51 
52 } // Details
53 } // ROOT
54 
55 #endif // ROOT__TStatusBitsChecker
static UChar_t ConvertToBit(Long64_t constant, TClass &classRef, const char *constantName)
long long Long64_t
Definition: RtypesCore.h:69
Namespace for new ROOT classes and functions.
Definition: StringConv.hxx:21
static bool CheckAllClasses(bool verbosity=false)
void Info(const char *location, const char *msgfmt,...)
bool Check(TClass &classRef, bool verbose=false)
The ROOT global object gROOT contains a list of all defined classes.
Definition: TClass.h:75
std::map< UChar_t, std::list< Info > > fRegister
! Register of bits seen so far.
unsigned char UChar_t
Definition: RtypesCore.h:34