12 #ifndef ROOT_TDocParser
13 #define ROOT_TDocParser
30 #ifndef ROOT_THashList
146 std::ostream &srcOut,
TString &anchor,
147 std::ifstream& sourcefile,
Bool_t allowPureVirtual);
155 const char* methodPattern = 0,
156 const char* sourceExt = 0);
173 void Convert(std::ostream&
out, std::istream& in,
const char* relpath,
193 virtual void Parse(std::ostream&
out);
199 #endif // ROOT_TDocParser
TDocParser(TClassDocOutput &docOutput, TClass *cl)
Constructor called for parsing class sources.
TMethod * LocateMethodInCurrentLine(Ssiz_t &posMethodName, TString &ret, TString &name, TString ¶ms, Bool_t &isconst, std::ostream &srcOut, TString &anchor, std::ifstream &sourcefile, Bool_t allowPureVirtual)
Search for a method starting at posMethodName, and return its return type, its name, and its arguments.
enum TDocParser::@111 fClassDocState
TString fSourceInfoTags[kNumSourceInfos]
static const char * filename()
void AddClassDataMembersRecursively(TBaseClass *bc)
Add data members of fCurrentClass and of bc to datamembers, recursively.
void DecrementMethodCount(const char *name)
reduce method count for method called name, removing it from fMethodCounts once the count reaches 0...
const TList * GetMethods(EAccess access) const
TDocOutput * GetDocOutput() const
void WriteClassDoc(std::ostream &out, Bool_t first=kTRUE)
Write the class description depending (among others) on fClassDocState.
virtual Int_t GetOverloadIdx() const =0
TClass * GetCurrentClass() const
void RemoveCommentContext(Bool_t cxxcomment)
remove the top-most comment context that matches cxxcomment,
virtual void InitKeywords() const
fill C++ keywords into fgKeywords
virtual Bool_t ProcessComment()
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
virtual void ExpandCPPLine(TString &line, Ssiz_t &pos)
Expand preprocessor statements.
void WriteSourceLine(std::ostream &out)
Write fLineSource to out.
void Convert(std::ostream &out, std::istream &in, const char *relpath, Bool_t isCode, Bool_t interpretDirectives)
Parse text file "in", add links etc, and write output to "out".
virtual ~TDocParser()
destructor, checking whether all methods have been found for gDebug > 3
static Bool_t Strip(TString &s)
strips ' ', tabs, and newlines from both sides of str
static std::set< std::string > fgKeywords
virtual void Parse(std::ostream &out)
Locate methods, starting in the source file, then inline, then immediately inside the class declarati...
static Bool_t IsWord(UChar_t c)
Check if c is a valid first character for C++ name.
const TList * GetEnums(EAccess access) const
void WriteMethod(std::ostream &out, TString &ret, TString &name, TString ¶ms, Bool_t isconst, const char *file, TString &anchor, TString &codeOneLiner)
Write a method, forwarding to TClassDocOutput.
TString fCurrentMethodTag
static void AnchorFromLine(const TString &line, TString &anchor)
Create an anchor from the given line, by hashing it and convertig the hash into a custom base64 strin...
virtual Bool_t HandleDirective(TString &keyword, Ssiz_t &pos, TString &word, Ssiz_t &copiedToCommentUpTo)
static Bool_t IsName(UChar_t c)
Check if c is a valid C++ name character.
std::map< std::string, Int_t > fMethodCounts
Long_t GetLineNumber() const
The ROOT global object gROOT contains a list of all defined classes.
void LocateMethodsInHeaderInline(std::ostream &out)
Given fCurrentClass, look for methods in its header file, and extract documentation to out...
virtual TClass * IsDirective(const TString &line, Ssiz_t pos, const TString &word, Bool_t &begin) const
return whether word at line's pos is a valid directive, and returns its TDocDirective's TClass object...
virtual TMethod * GetMethod() const =0
virtual void DeleteDirectiveOutput() const
Delete output generated by prior runs of all known directives; the output file names might have chang...
Each class (see TClass) has a linked list of its base class(es).
EParseContext Context() const
void LocateMethodsInHeaderClassDecl(std::ostream &out)
Given fCurrentClass, look for methods in its header file's class declaration block, and extract documentation to out, while beautifying the header file in parallel.
const TList * GetDataMembers(EAccess access) const
TString fSourceInfo[kNumSourceInfos]
std::set< UInt_t > fExtraLinesWithAnchor
virtual void DecorateKeywords(std::ostream &out, const char *text)
Expand keywords in text, writing to out.
const char * GetSourceInfo(ESourceInfo type) const
void SetCurrentModule(const char *module)
std::list< UInt_t > fParseContext
Mother of all ROOT objects.
Each ROOT class (see TClass) has a linked list of methods.
void LocateMethods(std::ostream &out, const char *filename, Bool_t lookForSourceInfo=kTRUE, Bool_t useDocxxStyle=kFALSE, Bool_t allowPureVirtual=kFALSE, const char *methodPattern=0, const char *sourceExt=0)
Collect methods from the source or header file called filename.
void AddClassMethodsRecursively(TBaseClass *bc)
Add accessible (i.e.
UInt_t InContext(Int_t context) const
checks whether we are in a parse context, return the entry closest to the current context...
void GetCurrentModule(TString &out_module) const
Return the name of module for which sources are currently parsed.
void LocateMethodsInSource(std::ostream &out)
Given fCurrentClass, look for methods in its source file, and extract documentation to out...