Logo ROOT   6.18/05
Reference Guide
List of all members | Public Types | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
ROOT::TModuleGenerator Class Reference

Definition at line 36 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) 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...
 
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-v618/rootspi/rdoc/src/v6-18-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 134 of file TModuleGenerator.h.

Member Enumeration Documentation

◆ ESourceFileKind

Enumerator
kSFKNotC 
kSFKHeader 
kSFKSource 
kSFKLinkdef 

Definition at line 38 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 523 of file TModuleGenerator.cxx.

◆ GetContentName()

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

Definition at line 79 of file TModuleGenerator.h.

◆ GetDemangledDictionaryName()

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

Definition at line 61 of file TModuleGenerator.h.

◆ GetDictionaryName()

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

Definition at line 57 of file TModuleGenerator.h.

◆ GetErrorCount()

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

Definition at line 72 of file TModuleGenerator.h.

◆ GetHeaders()

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

Definition at line 83 of file TModuleGenerator.h.

◆ GetIncludePaths()

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

Definition at line 87 of file TModuleGenerator.h.

◆ GetModuleDirName()

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

Definition at line 68 of file TModuleGenerator.h.

◆ GetModuleFileName()

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

Definition at line 65 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 76 of file TModuleGenerator.h.

◆ IsPCH()

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

Definition at line 52 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 499 of file TModuleGenerator.cxx.

◆ WriteDefinesArray()

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

Definition at line 123 of file TModuleGenerator.h.

◆ WriteHeaderArray()

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

Definition at line 115 of file TModuleGenerator.h.

◆ WriteIncludePathArray()

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

Definition at line 119 of file TModuleGenerator.h.

◆ WritePPCode()

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

Definition at line 107 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 
) const

Definition at line 344 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 558 of file TModuleGenerator.cxx.

◆ WriteUndefinesArray()

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

Definition at line 127 of file TModuleGenerator.h.

Member Data Documentation

◆ fCI

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

Definition at line 142 of file TModuleGenerator.h.

◆ fCompD

StringPairVec_t ROOT::TModuleGenerator::fCompD
private

Definition at line 158 of file TModuleGenerator.h.

◆ fCompI

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

Definition at line 156 of file TModuleGenerator.h.

◆ fCompU

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

Definition at line 159 of file TModuleGenerator.h.

◆ fContentName

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

Definition at line 152 of file TModuleGenerator.h.

◆ fDemangledDictionaryName

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

Definition at line 148 of file TModuleGenerator.h.

◆ fDictionaryName

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

Definition at line 147 of file TModuleGenerator.h.

◆ fErrorCount

int ROOT::TModuleGenerator::fErrorCount
mutableprivate

Definition at line 160 of file TModuleGenerator.h.

◆ fHeaders

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

Definition at line 154 of file TModuleGenerator.h.

◆ fInlineInputHeaders

bool ROOT::TModuleGenerator::fInlineInputHeaders
private

Definition at line 145 of file TModuleGenerator.h.

◆ fIsInPCH

bool ROOT::TModuleGenerator::fIsInPCH
private

Definition at line 144 of file TModuleGenerator.h.

◆ fIsPCH

bool ROOT::TModuleGenerator::fIsPCH
private

Definition at line 143 of file TModuleGenerator.h.

◆ fLinkDefFile

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

Definition at line 155 of file TModuleGenerator.h.

◆ fModuleDirName

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

Definition at line 150 of file TModuleGenerator.h.

◆ fModuleFileName

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

Definition at line 149 of file TModuleGenerator.h.

◆ fUmbrellaName

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

Definition at line 151 of file TModuleGenerator.h.


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