Logo ROOT   6.08/07
Reference Guide
RStl.h
Go to the documentation of this file.
1 // @(#)root/cont:$Id$
2 // Author: Philippe Canal 20/08/2003
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2003, Rene Brun, Fons Rademakers and al. *
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 R__RSTL_H
13 #define R__RSTL_H
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // RStl //
18 // //
19 // Use to manage the code that needs to be generated for the STL //
20 // by rootcint. This class is reserved for rootcint and is a //
21 // singleton. //
22 // //
23 //////////////////////////////////////////////////////////////////////////
24 
25 #include <cstdio>
26 #include <string>
27 #include <set>
28 
29 #include "TMetaUtils.h"
30 
31 namespace clang {
32  class CXXRecordDecl;
33 }
34 
35 namespace cling {
36  class Interpreter;
37 }
38 
39 namespace ROOT {
40  namespace TMetaUtils {
41  class TNormalizedCtxt;
42  }
43 }
44 
45 namespace ROOT {
46 namespace Internal {
47 
48  class RStl {
49  private:
50  typedef std::set<ROOT::TMetaUtils::AnnotatedRecordDecl,ROOT::TMetaUtils::AnnotatedRecordDecl::CompareByName> list_t;
51  list_t fList;
52 
53  public:
54  static RStl& Instance();
55  ~RStl() {};
56 
57  void GenerateTClassFor(const char *requestedName, const clang::CXXRecordDecl *stlClass, const cling::Interpreter &interp, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt);
58  void GenerateTClassFor(const clang::QualType &type, const cling::Interpreter &interp, const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt);
59  void Print();
60  void WriteClassInit(std::ostream &strm,
61  const cling::Interpreter &interp,
62  const ROOT::TMetaUtils::TNormalizedCtxt &normCtxt,
64  bool &needCollectionProxy,
65  void (*emitStreamerInfo)(const char*) );
66 // void WriteStreamer(FILE *file,const clang::CXXRecordDecl *stlcl);
67 // void WriteStreamer(FILE *file);
68 
69  private:
70  RStl() : fList() {};
71  RStl(const RStl&);
72  RStl& operator=(const RStl&);
73  };
74 
75 }
76 }
77 #endif // R__RSTL_H
This namespace contains pre-defined functions to be used in conjuction with TExecutor::Map and TExecu...
Definition: StringConv.hxx:21
list_t fList
Definition: RStl.h:51
void WriteClassInit(std::ostream &finalString, const AnnotatedRecordDecl &cl, const clang::CXXRecordDecl *decl, const cling::Interpreter &interp, const TNormalizedCtxt &normCtxt, const RConstructorTypes &ctorTypes, bool &needCollectionProxy)
FIXME: a function of ~300 lines!
std::list< RConstructorType > RConstructorTypes
Definition: TMetaUtils.h:299
std::set< ROOT::TMetaUtils::AnnotatedRecordDecl, ROOT::TMetaUtils::AnnotatedRecordDecl::CompareByName > list_t
Definition: RStl.h:50
void Print(std::ostream &os, const OptionType &opt)
Definition: TCling.h:48
int type
Definition: TGX11.cxx:120
Print a TSeq at the prompt:
Definition: TDatime.h:114