34    if (!strstr(inclist, statement)) {
 
   35       if (strlen(inclist)+strlen(statement) >= 50000) {
 
   36          Fatal(
"AddUniqueStatement",
"inclist too short need %u instead of 500000",
UInt_t(strlen(inclist)+strlen(statement)));
 
   38       strcat(inclist, statement);
 
   39       fprintf(fp, 
"%s", statement);
 
   50       what.
Form(
"#include <%s>\n", header);
 
   52       what.
Form(
"#include \"%s\"\n", header);
 
   63    if (name.
Length() >= limit) {
 
   71       name.
Remove( limit - 32 - 5); 
 
   87    const char *
name = strname.c_str();
 
   88    Int_t len = strlen(name);
 
   90    for (
Int_t i = 0; i < len; ++i) {
 
  101             if (nest == 0 && name[i+1] == 
':') {
 
  105                if (!definedInParent && cl==0 && extrainfos!=0) {
 
  108                      definedInParent = 
kTRUE;
 
  111                if (definedInParent) {
 
  116                   if (strcmp(name + strlen(name) - 2, 
".h") == 0) {
 
  152    Int_t numberOfNamespaces = 0;
 
  153    const char *fullname = clname;
 
  156    if (strchr(clname, 
':')) {
 
  158       Int_t len = strlen(clname);
 
  159       const char *
name = clname;
 
  161       for (
Int_t cur = 0; cur < len; ++cur) {
 
  162          switch (clname[cur]) {
 
  171                   if (nest == 0 && clname[cur+1] == 
':') {
 
  176                         if (cl == 0 || (cl && cl->
Size() == 0)) {
 
  177                            TString last(name, cur - (name - clname));
 
  178                            if ((numberOfClasses == 0 || *numberOfClasses == 0) && strchr(last.
Data(), 
'<') == 0) {
 
  179                               fprintf(fp, 
"namespace %s {\n", last.
Data());
 
  180                               ++numberOfNamespaces;
 
  183                               fprintf(fp, 
"#ifndef %s_h\n", headername.
Data());
 
  184                               fprintf(fp, 
"#define %s_h\n", headername.
Data());
 
  187                               fprintf(fp, 
"public:\n");
 
  188                               if (numberOfClasses) ++(*numberOfClasses);
 
  191                            name = clname + cur + 2;
 
  195                         name = clname + cur + 2;
 
  204       istemplate = strstr(clname, 
"<") != 0;
 
  209    if (implementEmptyClass==1) {
 
  211       fprintf(fp, 
"#ifndef %s_h\n", headername.
Data());
 
  212       fprintf(fp, 
"#define %s_h\n", headername.
Data());
 
  215       std::vector<const char*> argtype;
 
  220          if (isdigit(protoname[pos+1])) {
 
  221             argtype.push_back(
"int");
 
  223             argtype.push_back(
"typename");
 
  227             switch (protoname[i]) {
 
  236                      if (isdigit(protoname[i+1])) {
 
  237                         argtype.push_back(
"int");
 
  239                         argtype.push_back(
"typename");
 
  250       fprintf(fp, 
"template <");
 
  251       for (
UInt_t p = 0; p < nparam; ++p) {
 
  252          if (p >= argtype.size() ) {
 
  253             fprintf(fp, 
"/* missing */ T%d", p);
 
  255             fprintf(fp, 
"%s T%d", argtype[p], p);
 
  257          if (p != (nparam - 1)) fprintf(fp, 
", ");
 
  259       if (needGenericTemplate) {
 
  260          fprintf(fp, 
"> class %s", protoname.
Data());
 
  262          fprintf(fp, 
"> class %s;\n", protoname.
Data());
 
  263          fprintf(fp, 
"template <> ");
 
  267    if (implementEmptyClass) {
 
  269          if (!needGenericTemplate) {
 
  270             fprintf(fp, 
"class %s", clname);
 
  273          if (numberOfClasses) ++(*numberOfClasses);
 
  274          fprintf(fp, 
"public:\n");
 
  275          fprintf(fp, 
"operator int() { return 0; };\n");
 
  277          fprintf(fp, 
"enum %s { kDefault_%s };\n", clname, clname);
 
  280          if (implementEmptyClass==1) {
 
  281             if (strchr(fullname, 
':') == 0) {
 
  283                fprintf(fp, 
"#ifdef __MAKECINT__\n#pragma link C++ class %s+;\n#endif\n", fullname);
 
  285             fprintf(fp, 
"#endif\n");
 
  289       if (!(istemplate && needGenericTemplate)) {
 
  290           fprintf(fp, 
"class %s", clname);
 
  293    return numberOfNamespaces;
 
  312          if (clname[strlen(clname)-1]==
'>') {
 
  313             newinfo->
SetTitle(
"Generated by MakeProject as an empty class template instantiation");
 
  316             newinfo->
SetTitle(
"Generated by MakeProject as a namespace");
 
  319             newinfo->
SetTitle(
"Generated by MakeProject as an enum");
 
  322          extrainfos->
Add(newinfo);
 
  328                info->
SetTitle(
"Generated by MakeProject as an empty class");
 
  335                info->
SetTitle(
"Generated by MakeProject as an empty class");
 
  352    UInt_t len = strlen(clname);
 
  357    for (
UInt_t i = 0; i < len; ++i) {
 
  360             if (nest == 0 && clname[i+1] == 
':') {
 
  368             if (nest == 1) last = i + 1;
 
  371             if (nest == 0) 
return; 
 
  374             if ((clname[i] == 
',' && nest == 1) || (clname[i] == 
'>' && nest == 0)) {
 
  375                TString incName(clname + last, i - last);
 
  377                if (clname[i] == 
'>' && nest == 1) incName.
Append(
">");
 
  379                if (isdigit(incName[0])) {
 
  417    if (strchr(clname, 
'<')) {
 
  421    UInt_t numberOfClasses = 0;
 
  424    if (!implementEmptyClass) fprintf(fp, 
";\n");
 
  425    for (
UInt_t i = 0;i < numberOfClasses;++i) {
 
  426       fprintf(fp, 
"}; // end of class.\n");
 
  427       fprintf(fp, 
"#endif\n");
 
  429    for (
UInt_t i = 0;i < numberOfNamespaces;++i) {
 
  430       fprintf(fp, 
"} // end of namespace.\n");
 
  443    UInt_t len = strlen(clname);
 
  448    for (
UInt_t i = 0; i < len; ++i) {
 
  452             if (nest == 1) last = i + 1;
 
  455             if (nest==0) 
return ninc; 
 
  458             if ((clname[i] == 
',' && nest == 1) || (clname[i] == 
'>' && nest == 0)) {
 
  459                TString incName(clname + last, i - last);
 
  461                if (clname[i] == 
'>' && nest == 1) incName.
Append(
">");
 
  463                if (isdigit(incName[0])) {
 
  466                   const char *
what = 
"";
 
  475                         what = 
"forward_list";
 
  486                         what = 
"unordered_map";
 
  494                         what = 
"unordered_set";
 
  499                         what = 
"undetermined_stl_container";
 
  503                   fprintf(fp, 
"namespace std {} using namespace std;\n");
 
  505                } 
else if (strncmp(incName.
Data(), 
"pair<", strlen(
"pair<")) == 0) {
 
  508                } 
else if (strncmp(incName.
Data(), 
"auto_ptr<", strlen(
"auto_ptr<")) == 0) {
 
  515                   if (!forward && cl) {
 
  520                         if (include && include[0]) {
 
  522                            if (strncmp(include, 
"include/", 8) == 0) {
 
  525                            if (strncmp(include, 
"include\\", 9) == 0) {
 
  536                   } 
else if (incName.
Length() && incName[0] != 
' ' && 
gROOT->GetType(incName) == 0) {
 
  538                      if (emptyclass && extrainfos) {
 
  554       std::vector<std::string> inside;
 
  581    if (strncmp(clname, 
"auto_ptr<", strlen(
"auto_ptr<")) == 0) {
 
  599          std::vector<std::string> inside;
 
  605          if (strncmp(inside[1].c_str(),
"pair<",strlen(
"pair<"))==0) {
 
  606             what = inside[1].c_str();
 
  642    if (strchr(name,
'<')!=0) {
 
  643       std::vector<std::string> inside;
 
  646       if (nestedLoc) --narg;
 
  649       for(
unsigned int i = 1; i<narg; ++i) {
 
  653       static const char* allocPrefix = 
"std::allocator<";
 
  654       static const unsigned int allocPrefixLen (strlen(allocPrefix));
 
  660             if (narg>2 && strncmp(inside[2].c_str(),allocPrefix,allocPrefixLen)==0) {
 
  668             if (narg>4 && strncmp(inside[4].c_str(),allocPrefix,allocPrefixLen)==0) {
 
  674             if (narg>5 && strncmp(inside[5].c_str(),allocPrefix,allocPrefixLen)==0) {
 
  680             if (narg>6 && strncmp(inside[6].c_str(),allocPrefix,allocPrefixLen)==0) {
 
  701                   if (what[what.size()-1]==
'>') {
 
  707                   inside.push_back(
"std::vector");
 
  708                   inside.push_back(what);
 
  716                   inside[0] = 
"std::vector";
 
  720          if (strncmp(inside[0].c_str(),
"std::",5) != 0) {
 
  721             inside[0] = 
"std::" + inside[0];
 
  724          static const char *stlnames[] = { 
"pair", 
"greater", 
"less", 
"allocator" };
 
  725          for(
unsigned int in = 0; in < 
sizeof(stlnames)/
sizeof(stlnames[0]); ++in) {
 
  726             if (strncmp( inside[0].c_str(), stlnames[in], strlen(stlnames[in])) == 0 ) {
 
  727                inside[0] = 
"std::" + inside[0];
 
  734       newname.
Append(inside[1]);
 
  735       for(
unsigned int j=2; j<narg; ++j) {
 
  736          if (!inside[j].empty()) {
 
  738             newname.
Append(inside[j]);
 
  741       if (newname[newname.
Length()-1]==
'>') {
 
  746       if (nestedLoc) newname.
Append(inside[nestedLoc]);
 
  747    } 
else if ( newname == 
"string" ) {
 
  748       newname = 
"std::string";
 
Describe Streamer information for one class version. 
static void GenerateMissingStreamerInfo(TList *extrainfos, const char *clname, Bool_t iscope)
Generate an empty StreamerInfo for the given type (no recursion) if it is not not known in the list o...
ROOT::ESTLType IsSTLCont(std::string_view type)
type : type name: vector,allocator> result: 0 : not stl container code of cont...
const char * GetTypeName() const 
void Final()
MD5 finalization, ends an MD5 message-digest operation, writing the the message digest and zeroizing ...
ClassImp(TSeqCollection) Int_t TSeqCollection TIter next(this)
Return index of object in collection. 
void Fatal(const char *location, const char *msgfmt,...)
int GetSplit(const char *type, std::vector< std::string > &output, int &nestedLoc, EModType mode=TClassEdit::kNone)
Stores in output (after emptying it) the splited type. 
static TString GetHeaderName(const char *name, const TList *extrainfos, Bool_t includeNested=kFALSE)
Return the header name containing the description of name. 
TString & ReplaceAll(const TString &s1, const TString &s2)
virtual void SetName(const char *name)
Change (i.e. 
static void ChopFileName(TString &name, Int_t limit)
Chop the name by replacing the ending (before a potential extension) with a md5 summary of the name...
static void GeneratePostDeclaration(FILE *fp, const TVirtualStreamerInfo *info, char *inclist)
Add to the header file anything that need to appear after the class declaration (this includes some #...
virtual TObject * FindObject(const char *name) const 
Find an object in this list using its name. 
virtual Bool_t IsBase() const 
Return kTRUE if the element represent a base class. 
const char * Data() const 
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString...
const char * AsString() const 
Return message digest as string. 
This code implements the MD5 message-digest algorithm. 
ROOT::ESTLType STLKind(std::string_view type)
Converts STL container name to number. 
TString & Append(const char *cs)
static UInt_t GenerateForwardDeclaration(FILE *fp, const char *clname, char *inclist, Bool_t implementEmptyClass, Bool_t needGenericTemplate, const TList *extrainfos)
Insert a (complete) forward declaration for the class 'clname'. 
std::string GetLong64_Name(const char *original)
Replace 'long long' and 'unsigned long long' by 'Long64_t' and 'ULong64_t'. 
Int_t GetClassVersion() const 
static void AddInclude(FILE *fp, const char *header, Bool_t system, char *inclist)
Add an include statement, if it has not already been added. 
void Update(const UChar_t *buf, UInt_t len)
Update TMD5 object to reflect the concatenation of another buffer full of bytes. 
Bool_t HasInterpreterInfo() const 
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor. 
static void AddUniqueStatement(FILE *fp, const char *statement, char *inclist)
Add an include statement, if it has not already been added. 
virtual const char * GetName() const 
Returns name of object. 
The ROOT global object gROOT contains a list of all defined classes. 
void SetClassVersion(Int_t vers)
bool IsStdClass(const char *type)
return true if the class belongs to the std namespace 
static void GenerateMissingStreamerInfos(TList *extrainfos, TStreamerElement *element)
Generate an empty StreamerInfo for types that are used in templates parameters but are not known in t...
static UInt_t GenerateIncludeForTemplate(FILE *fp, const char *clname, char *inclist, Bool_t forward, const TList *extrainfos)
Add to the header file, the #include needed for the argument of this template. 
TString & Remove(Ssiz_t pos)
virtual TObjArray * GetElements() const =0
virtual TClass * GetClassPointer() const 
Returns a pointer to the TClass of this element. 
static TClass * GetClass(const char *name, Bool_t load=kTRUE, Bool_t silent=kFALSE)
Static method returning pointer to TClass of the specified class name. 
static TString UpdateAssociativeToVector(const char *name)
If we have a map, multimap, set or multiset, plus unordered partners, and the key is a class...
const char * GetDeclFileName() const 
virtual void Add(TObject *obj)
std::string ShortType(const char *typeDesc, int mode)
Return the absolute type of typeDesc. 
Abstract Interface class describing Streamer information for one class. 
virtual void SetTitle(const char *title="")
Change (i.e. set) the title of the TNamed. 
static UInt_t GenerateClassPrefix(FILE *fp, const char *clname, Bool_t top, TString &protoname, UInt_t *numberOfClasses, Int_t implementEmptyClass=kFALSE, Bool_t needGenericTemplate=kFALSE)
Write the start of the class (forward) declaration. 
Int_t Size() const 
Return size of object of this class. 
Ssiz_t First(char c) const 
Find first occurrence of a character c.