Logo ROOT  
Reference Guide
ROOT::TModuleGenerator Class Reference

Definition at line 35 of file TModuleGenerator.h.

Public Types

enum  ESourceFileKind { kSFKNotC , kSFKHeader , kSFKSource , kSFKLinkdef }
 

Public Member Functions

 TModuleGenerator (clang::CompilerInstance *CI, bool inlineHeader, const std::string &shLibFileName, bool isInPCH)
 
 ~TModuleGenerator ()
 
const std::string & GetContentName () const
 
const std::string & GetDemangledDictionaryName () const
 
const std::string & GetDictionaryName () const
 
int GetErrorCount () const
 
const std::vector< std::string > & GetHeaders () const
 
const std::vector< std::string > & GetIncludePaths () const
 
const std::string & GetModuleDirName () const
 
const std::string & GetModuleFileName () const
 
const std::string & GetUmbrellaName () const
 
bool IsPCH () const
 
void ParseArgs (const std::vector< std::string > &args)
 Parse -I -D -U headers.h SomethingLinkdef.h. More...
 
void WriteContentHeader (std::ostream &out) const
 Write a header file describing the content of this module through a series of variables inside the namespace ROOT::Dict::[DictionaryName]. More...
 
std::ostream & WritePPDefines (std::ostream &out) const
 Write #ifndef FOO. More...
 
std::ostream & WritePPUndefines (std::ostream &out) const
 Write #ifdef FOO. More...
 
void WriteRegistrationSource (std::ostream &out, const std::string &fwdDeclnArgsToKeepString, const std::string &headersClassesMapString, const std::string &fwdDeclsString, const std::string &extraIncludes, bool hasCxxModule) const
 
void WriteUmbrellaHeader (std::ostream &out) const
 Write a header file pulling in the content of this module through a series of #defined, #undefs and #includes. More...
 

Private Types

typedef std::vector< std::pair< std::string, std::string > > StringPairVec_t
 

Private Member Functions

void ConvertToCppString (std::string &text) const
 
bool FindHeader (const std::string &hdrName, std::string &hdrFullPath) const
 Return true if the header is found in the include paths in this case also fill the full path variable with the full path. More...
 
ESourceFileKind GetSourceFileKind (const char *filename) const
 Check whether the file's extension is compatible with C or C++. More...
 
std::ostream & WriteDefinesArray (std::ostream &out) const
 
std::ostream & WriteHeaderArray (std::ostream &out) const
 
std::ostream & WriteIncludePathArray (std::ostream &out) const
 
std::ostream & WritePPCode (std::ostream &out) const
 
std::ostream & WritePPIncludes (std::ostream &out) const
 Write #include "header1.h" #include "header2.h" or, if inlining of headers is requested, dump the content of the files. More...
 
void WriteRegistrationSourceImpl (std::ostream &out, const std::string &dictName, const std::string &demangledDictName, const std::vector< std::string > &headerArray, const std::vector< std::string > &includePathArray, const std::string &fwdDeclStringRAW, const std::string &fwdDeclnArgsToKeepString, const std::string &payloadCodeWrapped, const std::string &headersClassesMapString, const std::string &extraIncludes, bool hasCxxModule) const
 
std::ostream & WriteStringPairVec (const StringPairVec_t &vecP, std::ostream &out) const
 
std::ostream & WriteStringVec (const std::vector< std::string > &vec, std::ostream &out) const
 
std::ostream & WriteUndefinesArray (std::ostream &out) const
 

Private Attributes

clang::CompilerInstance * fCI
 
StringPairVec_t fCompD
 
std::vector< std::string > fCompI
 
std::vector< std::string > fCompU
 
std::string fContentName
 
std::string fDemangledDictionaryName
 
std::string fDictionaryName
 
int fErrorCount
 
std::vector< std::string > fHeaders
 
bool fInlineInputHeaders
 
bool fIsInPCH
 
bool fIsPCH
 
std::string fLinkDefFile
 
std::string fModuleDirName
 
std::string fModuleFileName
 
std::string fUmbrellaName
 

#include </home/sftnight/build/workspace/root-makedoc-v622/rootspi/rdoc/src/v6-22-00-patches/core/dictgen/res/TModuleGenerator.h>

Member Typedef Documentation

◆ StringPairVec_t

typedef std::vector<std::pair<std::string, std::string> > ROOT::TModuleGenerator::StringPairVec_t
private

Definition at line 143 of file TModuleGenerator.h.

Member Enumeration Documentation

◆ ESourceFileKind

Enumerator
kSFKNotC 
kSFKHeader 
kSFKSource 
kSFKLinkdef 

Definition at line 37 of file TModuleGenerator.h.

Constructor & Destructor Documentation

◆ TModuleGenerator()

TModuleGenerator::TModuleGenerator ( clang::CompilerInstance *  CI,
bool  inlineHeader,
const std::string &  shLibFileName,
bool  isInPCH 
)

Definition at line 45 of file TModuleGenerator.cxx.

◆ ~TModuleGenerator()

TModuleGenerator::~TModuleGenerator ( )

Definition at line 85 of file TModuleGenerator.cxx.

Member Function Documentation

◆ ConvertToCppString()

void ROOT::TModuleGenerator::ConvertToCppString ( std::string &  text) const
private

◆ FindHeader()

bool TModuleGenerator::FindHeader ( const std::string &  hdrName,
std::string &  hdrFullPath 
) const
private

Return true if the header is found in the include paths in this case also fill the full path variable with the full path.

Definition at line 560 of file TModuleGenerator.cxx.

◆ GetContentName()

const std::string & ROOT::TModuleGenerator::GetContentName ( ) const
inline

Definition at line 78 of file TModuleGenerator.h.

◆ GetDemangledDictionaryName()

const std::string & ROOT::TModuleGenerator::GetDemangledDictionaryName ( ) const
inline

Definition at line 60 of file TModuleGenerator.h.

◆ GetDictionaryName()

const std::string & ROOT::TModuleGenerator::GetDictionaryName ( ) const
inline

Definition at line 56 of file TModuleGenerator.h.

◆ GetErrorCount()

int ROOT::TModuleGenerator::GetErrorCount ( ) const
inline

Definition at line 71 of file TModuleGenerator.h.

◆ GetHeaders()

const std::vector< std::string > & ROOT::TModuleGenerator::GetHeaders ( ) const
inline

Definition at line 82 of file TModuleGenerator.h.

◆ GetIncludePaths()

const std::vector< std::string > & ROOT::TModuleGenerator::GetIncludePaths ( ) const
inline

Definition at line 86 of file TModuleGenerator.h.

◆ GetModuleDirName()

const std::string & ROOT::TModuleGenerator::GetModuleDirName ( ) const
inline

Definition at line 67 of file TModuleGenerator.h.

◆ GetModuleFileName()

const std::string & ROOT::TModuleGenerator::GetModuleFileName ( ) const
inline

Definition at line 64 of file TModuleGenerator.h.

◆ GetSourceFileKind()

TModuleGenerator::ESourceFileKind TModuleGenerator::GetSourceFileKind ( const char *  filename) const
private

Check whether the file's extension is compatible with C or C++.

Return whether source, header, Linkdef or nothing.

Definition at line 96 of file TModuleGenerator.cxx.

◆ GetUmbrellaName()

const std::string & ROOT::TModuleGenerator::GetUmbrellaName ( ) const
inline

Definition at line 75 of file TModuleGenerator.h.

◆ IsPCH()

bool ROOT::TModuleGenerator::IsPCH ( ) const
inline

Definition at line 51 of file TModuleGenerator.h.

◆ ParseArgs()

void TModuleGenerator::ParseArgs ( const std::vector< std::string > &  args)

Parse -I -D -U headers.h SomethingLinkdef.h.

Definition at line 173 of file TModuleGenerator.cxx.

◆ WriteContentHeader()

void TModuleGenerator::WriteContentHeader ( std::ostream &  out) const

Write a header file describing the content of this module through a series of variables inside the namespace ROOT::Dict::[DictionaryName].

Each variable is an array of string literals, with a const char* of 0 being the last element, e.g. ROOT::Dict::_DictName::arrIncludes[] = { "A.h", "B.h", 0 };

Definition at line 536 of file TModuleGenerator.cxx.

◆ WriteDefinesArray()

std::ostream & ROOT::TModuleGenerator::WriteDefinesArray ( std::ostream &  out) const
inlineprivate

Definition at line 132 of file TModuleGenerator.h.

◆ WriteHeaderArray()

std::ostream & ROOT::TModuleGenerator::WriteHeaderArray ( std::ostream &  out) const
inlineprivate

Definition at line 124 of file TModuleGenerator.h.

◆ WriteIncludePathArray()

std::ostream & ROOT::TModuleGenerator::WriteIncludePathArray ( std::ostream &  out) const
inlineprivate

Definition at line 128 of file TModuleGenerator.h.

◆ WritePPCode()

std::ostream & ROOT::TModuleGenerator::WritePPCode ( std::ostream &  out) const
inlineprivate

Definition at line 116 of file TModuleGenerator.h.

◆ WritePPDefines()

std::ostream & TModuleGenerator::WritePPDefines ( std::ostream &  out) const

Write #ifndef FOO.

define FOO=bar

#endif

Definition at line 209 of file TModuleGenerator.cxx.

◆ WritePPIncludes()

std::ostream & TModuleGenerator::WritePPIncludes ( std::ostream &  out) const
private

Write #include "header1.h" #include "header2.h" or, if inlining of headers is requested, dump the content of the files.

Definition at line 281 of file TModuleGenerator.cxx.

◆ WritePPUndefines()

std::ostream & TModuleGenerator::WritePPUndefines ( std::ostream &  out) const

Write #ifdef FOO.

undef FOO

#endif

Definition at line 231 of file TModuleGenerator.cxx.

◆ WriteRegistrationSource()

void TModuleGenerator::WriteRegistrationSource ( std::ostream &  out,
const std::string &  fwdDeclnArgsToKeepString,
const std::string &  headersClassesMapString,
const std::string &  fwdDeclsString,
const std::string &  extraIncludes,
bool  hasCxxModule 
) const

Definition at line 392 of file TModuleGenerator.cxx.

◆ WriteRegistrationSourceImpl()

void TModuleGenerator::WriteRegistrationSourceImpl ( std::ostream &  out,
const std::string &  dictName,
const std::string &  demangledDictName,
const std::vector< std::string > &  headerArray,
const std::vector< std::string > &  includePathArray,
const std::string &  fwdDeclStringRAW,
const std::string &  fwdDeclnArgsToKeepString,
const std::string &  payloadCodeWrapped,
const std::string &  headersClassesMapString,
const std::string &  extraIncludes,
bool  hasCxxModule 
) const
private

Definition at line 341 of file TModuleGenerator.cxx.

◆ WriteStringPairVec()

std::ostream & TModuleGenerator::WriteStringPairVec ( const StringPairVec_t vecP,
std::ostream &  out 
) const
private

Definition at line 318 of file TModuleGenerator.cxx.

◆ WriteStringVec()

std::ostream & TModuleGenerator::WriteStringVec ( const std::vector< std::string > &  vec,
std::ostream &  out 
) const
private

Definition at line 306 of file TModuleGenerator.cxx.

◆ WriteUmbrellaHeader()

void TModuleGenerator::WriteUmbrellaHeader ( std::ostream &  out) const

Write a header file pulling in the content of this module through a series of #defined, #undefs and #includes.

The sequence corrsponds to a rootcling invocation with -c -DFOO -UBAR header.h I.e. defines, undefines and finally includes.

Definition at line 595 of file TModuleGenerator.cxx.

◆ WriteUndefinesArray()

std::ostream & ROOT::TModuleGenerator::WriteUndefinesArray ( std::ostream &  out) const
inlineprivate

Definition at line 136 of file TModuleGenerator.h.

Member Data Documentation

◆ fCI

clang::CompilerInstance* ROOT::TModuleGenerator::fCI
private

Definition at line 151 of file TModuleGenerator.h.

◆ fCompD

StringPairVec_t ROOT::TModuleGenerator::fCompD
private

Definition at line 167 of file TModuleGenerator.h.

◆ fCompI

std::vector<std::string> ROOT::TModuleGenerator::fCompI
private

Definition at line 165 of file TModuleGenerator.h.

◆ fCompU

std::vector<std::string> ROOT::TModuleGenerator::fCompU
private

Definition at line 168 of file TModuleGenerator.h.

◆ fContentName

std::string ROOT::TModuleGenerator::fContentName
private

Definition at line 161 of file TModuleGenerator.h.

◆ fDemangledDictionaryName

std::string ROOT::TModuleGenerator::fDemangledDictionaryName
private

Definition at line 157 of file TModuleGenerator.h.

◆ fDictionaryName

std::string ROOT::TModuleGenerator::fDictionaryName
private

Definition at line 156 of file TModuleGenerator.h.

◆ fErrorCount

int ROOT::TModuleGenerator::fErrorCount
mutableprivate

Definition at line 169 of file TModuleGenerator.h.

◆ fHeaders

std::vector<std::string> ROOT::TModuleGenerator::fHeaders
private

Definition at line 163 of file TModuleGenerator.h.

◆ fInlineInputHeaders

bool ROOT::TModuleGenerator::fInlineInputHeaders
private

Definition at line 154 of file TModuleGenerator.h.

◆ fIsInPCH

bool ROOT::TModuleGenerator::fIsInPCH
private

Definition at line 153 of file TModuleGenerator.h.

◆ fIsPCH

bool ROOT::TModuleGenerator::fIsPCH
private

Definition at line 152 of file TModuleGenerator.h.

◆ fLinkDefFile

std::string ROOT::TModuleGenerator::fLinkDefFile
private

Definition at line 164 of file TModuleGenerator.h.

◆ fModuleDirName

std::string ROOT::TModuleGenerator::fModuleDirName
private

Definition at line 159 of file TModuleGenerator.h.

◆ fModuleFileName

std::string ROOT::TModuleGenerator::fModuleFileName
private

Definition at line 158 of file TModuleGenerator.h.

◆ fUmbrellaName

std::string ROOT::TModuleGenerator::fUmbrellaName
private

Definition at line 160 of file TModuleGenerator.h.


The documentation for this class was generated from the following files: