12#ifndef ROOT_TDocParser
13#define ROOT_TDocParser
137 std::ostream &srcOut,
TString &anchor,
138 std::ifstream& sourcefile,
Bool_t allowPureVirtual);
146 const char* methodPattern = 0,
147 const char* sourceExt = 0);
164 void Convert(std::ostream& out, std::istream& in,
const char* relpath,
184 virtual void Parse(std::ostream& out);
#define ClassDef(name, id)
Each class (see TClass) has a linked list of its base class(es).
TClass instances represent classes, structs and namespaces in the ROOT type system.
virtual Int_t GetOverloadIdx() const =0
virtual TMethod * GetMethod() const =0
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...
static Bool_t IsWord(UChar_t c)
Check if c is a valid first character for C++ name.
EParseContext Context() const
void LocateMethodsInSource(std::ostream &out)
Given fCurrentClass, look for methods in its source file, and extract documentation to out,...
void WriteClassDoc(std::ostream &out, Bool_t first=kTRUE)
Write the class description depending (among others) on fClassDocState.
std::set< UInt_t > fExtraLinesWithAnchor
const TList * GetMethods(EAccess access) const
const char * GetSourceInfo(ESourceInfo type) const
void LocateMethodsInHeaderClassDecl(std::ostream &out)
Given fCurrentClass, look for methods in its header file's class declaration block,...
virtual void ExpandCPPLine(TString &line, Ssiz_t &pos)
Expand preprocessor statements.
void SetCurrentModule(const char *module)
const TList * GetDataMembers(EAccess access) const
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...
static std::set< std::string > fgKeywords
static Bool_t Strip(TString &s)
strips ' ', tabs, and newlines from both sides of str
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.
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,...
virtual void InitKeywords() const
fill C++ keywords into fgKeywords
@ kClassDoc_Uninitialized
@ kClassDoc_LookingNothingFound
@ kClassDoc_LookingHaveSomething
void RemoveCommentContext(Bool_t cxxcomment)
remove the top-most comment context that matches cxxcomment,
TString fSourceInfoTags[kNumSourceInfos]
TString fCurrentMethodTag
TString fSourceInfo[kNumSourceInfos]
void DecrementMethodCount(const char *name)
reduce method count for method called name, removing it from fMethodCounts once the count reaches 0.
virtual Bool_t ProcessComment()
Parse the current line as a comment, handling directives and re-formatting the comment: remove "/*",...
static Bool_t IsName(UChar_t c)
Check if c is a valid C++ name character.
virtual ~TDocParser()
destructor, checking whether all methods have been found for gDebug > 3
Long_t GetLineNumber() const
void GetCurrentModule(TString &out_module) const
Return the name of module for which sources are currently parsed.
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".
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.
enum TDocParser::@93 fClassDocState
TDocOutput * GetDocOutput() const
std::list< UInt_t > fParseContext
UInt_t InContext(Int_t context) const
checks whether we are in a parse context, return the entry closest to the current context.
void AddClassMethodsRecursively(TBaseClass *bc)
Add accessible (i.e.
const TList * GetEnums(EAccess access) const
std::map< std::string, Int_t > fMethodCounts
void WriteSourceLine(std::ostream &out)
Write fLineSource to out.
void AddClassDataMembersRecursively(TBaseClass *bc)
Add data members of fCurrentClass and of bc to datamembers, recursively.
virtual void DecorateKeywords(std::ostream &out, const char *text)
Expand keywords in text, writing to out.
virtual Bool_t HandleDirective(TString &keyword, Ssiz_t &pos, TString &word, Ssiz_t &copiedToCommentUpTo)
Process directives to the documentation engine, like "Begin_Html" / "End_Html", "Begin_Macro" / "End_...
virtual void DeleteDirectiveOutput() const
Delete output generated by prior runs of all known directives; the output file names might have chang...
TClass * GetCurrentClass() const
virtual void Parse(std::ostream &out)
Locate methods, starting in the source file, then inline, then immediately inside the class declarati...
THashList implements a hybrid collection class consisting of a hash table and a list to store TObject...
Legacy ROOT documentation system.
Each ROOT class (see TClass) has a linked list of methods.
Mother of all ROOT objects.