Logo ROOT   master
Reference Guide
TClingDeclInfo.h
Go to the documentation of this file.
1 /// \file TClingDeclInfo.h
2 ///
3 /// \brief The file contains a base class of TCling*Info classes.
4 ///
5 /// \author Vassil Vassilev <vvasilev@cern.ch>
6 ///
7 /// \date March, 2019
8 ///
9 /*************************************************************************
10  * Copyright (C) 1995-2019, Rene Brun and Fons Rademakers. *
11  * All rights reserved. *
12  * *
13  * For the licensing terms see $ROOTSYS/LICENSE. *
14  * For the list of contributors see $ROOTSYS/README/CREDITS. *
15  *************************************************************************/
16 
17 #ifndef ROOT_TClingDeclInfo
18 #define ROOT_TClingDeclInfo
19 
20 #include <clang/AST/Type.h>
21 
22 #include <string>
23 
24 namespace clang {
25  class Decl;
26 }
27 
29 protected:
30  const clang::Decl* fDecl = nullptr;
31  mutable std::string fNameCache;
32  long Property(long property, clang::QualType &qt) const;
33 public:
34  TClingDeclInfo(const clang::Decl* D) : fDecl(D) {}
35  virtual ~TClingDeclInfo();
36 
37  virtual const clang::Decl* GetDecl() const { return fDecl; }
38  clang::Decl* GetDecl() {
39  return const_cast<clang::Decl*>(const_cast<const TClingDeclInfo*>(this)->GetDecl());
40  }
41  virtual bool IsValid() const { return GetDecl(); }
42  virtual const char* Name() const;
43 };
44 
45 #endif // ROOT_TClingDeclInfo
clang::Decl * GetDecl()
TClingDeclInfo(const clang::Decl *D)
virtual bool IsValid() const
virtual ~TClingDeclInfo()
virtual const clang::Decl * GetDecl() const
virtual const char * Name() const
const clang::Decl * fDecl
std::string fNameCache
long Property(long property, clang::QualType &qt) const