Logo ROOT   6.16/01
Reference Guide
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
TDocParser Class Reference

Definition at line 44 of file TDocParser.h.

Public Types

enum  EAccess { kPrivate , kProtected , kPublic }
 
enum  EParseContext {
  kNoContext , kCode , kComment , kDirective ,
  kString , kKeyword , kCPP , kVerbatim ,
  kNumParseContexts , kParseContextMask = BIT(4) - 1
}
 
enum  EParseContextFlag { kCXXComment = BIT(4) , kParseContextFlagMask = (UInt_t)(~(BIT(4) - 1)) }
 
enum  ESourceInfo {
  kInfoLastUpdate , kInfoAuthor , kInfoCopyright , kInfoLastChanged ,
  kInfoLastGenerated , kNumSourceInfos
}
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 

Public Member Functions

 TDocParser (TClassDocOutput &docOutput, TClass *cl)
 Constructor called for parsing class sources. More...
 
 TDocParser (TDocOutput &docOutput)
 constructor called for parsing text files with Convert() More...
 
virtual ~TDocParser ()
 destructor, checking whether all methods have been found for gDebug > 3 More...
 
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". More...
 
virtual void DecorateKeywords (std::ostream &out, const char *text)
 Expand keywords in text, writing to out. More...
 
virtual void DecorateKeywords (TString &text)
 Find keywords in line and create URLs around them. More...
 
void DecrementMethodCount (const char *name)
 reduce method count for method called name, removing it from fMethodCounts once the count reaches 0. More...
 
virtual void DeleteDirectiveOutput () const
 Delete output generated by prior runs of all known directives; the output file names might have changes. More...
 
TClassGetCurrentClass () const
 
void GetCurrentModule (TString &out_module) const
 Return the name of module for which sources are currently parsed. More...
 
const TListGetDataMembers (EAccess access) const
 
TDocOutputGetDocOutput () const
 
const TListGetEnums (EAccess access) const
 
Long_t GetLineNumber () const
 
const TListGetMethods (EAccess access) const
 
const char * GetSourceInfo (ESourceInfo type) const
 
UInt_t InContext (Int_t context) const
 checks whether we are in a parse context, return the entry closest to the current context. More...
 
virtual void Parse (std::ostream &out)
 Locate methods, starting in the source file, then inline, then immediately inside the class declaration. More...
 
void SetCurrentModule (const char *module)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Static Public Member Functions

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 string. More...
 
static Bool_t IsName (UChar_t c)
 Check if c is a valid C++ name character. More...
 
static Bool_t IsWord (UChar_t c)
 Check if c is a valid first character for C++ name. More...
 
static Bool_t Strip (TString &s)
 strips ' ', tabs, and newlines from both sides of str More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Protected Types

enum  {
  kClassDoc_Uninitialized , kClassDoc_LookingNothingFound , kClassDoc_LookingHaveSomething , kClassDoc_Written ,
  kClassDoc_Ignore , kClassDoc_NumStates
}
 
enum  EDocContext { kIgnore , kDocFunc , kDocClass , kNumDocContexts }
 

Protected Member Functions

void AddClassDataMembersRecursively (TBaseClass *bc)
 Add data members of fCurrentClass and of bc to datamembers, recursively. More...
 
void AddClassMethodsRecursively (TBaseClass *bc)
 Add accessible (i.e. More...
 
EParseContext Context () const
 
virtual void ExpandCPPLine (TString &line, Ssiz_t &pos)
 Expand preprocessor statements. More...
 
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_Macro", and "Begin_Latex" / "End_Latex". More...
 
virtual void InitKeywords () const
 fill C++ keywords into fgKeywords More...
 
virtual TClassIsDirective (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, or 0 if it's not a directive. More...
 
TMethodLocateMethodInCurrentLine (Ssiz_t &posMethodName, TString &ret, TString &name, TString &params, 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. More...
 
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. More...
 
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. More...
 
void LocateMethodsInHeaderInline (std::ostream &out)
 Given fCurrentClass, look for methods in its header file, and extract documentation to out. More...
 
void LocateMethodsInSource (std::ostream &out)
 Given fCurrentClass, look for methods in its source file, and extract documentation to out, while beautifying the source file in parallel. More...
 
virtual Bool_t ProcessComment ()
 Parse the current line as a comment, handling directives and re-formatting the comment: remove "/*", "*‍/", "//", similar characters surrounding lines, etc. More...
 
void RemoveCommentContext (Bool_t cxxcomment)
 remove the top-most comment context that matches cxxcomment, More...
 
void WriteClassDoc (std::ostream &out, Bool_t first=kTRUE)
 Write the class description depending (among others) on fClassDocState. More...
 
void WriteMethod (std::ostream &out, TString &ret, TString &name, TString &params, Bool_t isconst, const char *file, TString &anchor, TString &codeOneLiner)
 Write a method, forwarding to TClassDocOutput. More...
 
void WriteSourceLine (std::ostream &out)
 Write fLineSource to out. More...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

Protected Attributes

Bool_t fAllowDirectives
 
Bool_t fCheckForMethod
 
TString fClassDescrTag
 
enum TDocParser:: { ... }  fClassDocState
 
TString fComment
 
Bool_t fCommentAtBOL
 
TClassfCurrentClass
 
TString fCurrentFile
 
TString fCurrentMethodTag
 
TString fCurrentModule
 
TList fDataMembers [6]
 
Int_t fDirectiveCount
 
TList fDirectiveHandlers
 
EDocContext fDocContext
 
TDocOutputfDocOutput
 
std::set< UInt_tfExtraLinesWithAnchor
 
TString fFirstClassDoc
 
THtmlfHtml
 
TString fLastClassDoc
 
TString fLineComment
 
UInt_t fLineNo
 
Long_t fLineNumber
 
TString fLineRaw
 
TString fLineSource
 
TString fLineStripped
 
std::map< std::string, Int_tfMethodCounts
 
THashList fMethods [3]
 
std::list< UInt_tfParseContext
 
TClassfRecentClass
 
TString fSourceInfo [kNumSourceInfos]
 
TString fSourceInfoTags [kNumSourceInfos]
 

Static Protected Attributes

static std::set< std::string > fgKeywords
 

#include <TDocParser.h>

Inheritance diagram for TDocParser:
[legend]

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
protected
Enumerator
kClassDoc_Uninitialized 
kClassDoc_LookingNothingFound 
kClassDoc_LookingHaveSomething 
kClassDoc_Written 
kClassDoc_Ignore 
kClassDoc_NumStates 

Definition at line 107 of file TDocParser.h.

◆ EAccess

Enumerator
kPrivate 
kProtected 
kPublic 

Definition at line 62 of file TDocParser.h.

◆ EDocContext

enum TDocParser::EDocContext
protected
Enumerator
kIgnore 
kDocFunc 
kDocClass 
kNumDocContexts 

Definition at line 46 of file TDocParser.h.

◆ EParseContext

Enumerator
kNoContext 
kCode 
kComment 
kDirective 
kString 
kKeyword 
kCPP 
kVerbatim 
kNumParseContexts 
kParseContextMask 

Definition at line 67 of file TDocParser.h.

◆ EParseContextFlag

Enumerator
kCXXComment 
kParseContextFlagMask 

Definition at line 79 of file TDocParser.h.

◆ ESourceInfo

Enumerator
kInfoLastUpdate 
kInfoAuthor 
kInfoCopyright 
kInfoLastChanged 
kInfoLastGenerated 
kNumSourceInfos 

Definition at line 54 of file TDocParser.h.

Constructor & Destructor Documentation

◆ TDocParser() [1/2]

TDocParser::TDocParser ( TClassDocOutput docOutput,
TClass cl 
)

Constructor called for parsing class sources.

Definition at line 150 of file TDocParser.cxx.

◆ TDocParser() [2/2]

TDocParser::TDocParser ( TDocOutput docOutput)

constructor called for parsing text files with Convert()

Definition at line 190 of file TDocParser.cxx.

◆ ~TDocParser()

TDocParser::~TDocParser ( )
virtual

destructor, checking whether all methods have been found for gDebug > 3

Definition at line 211 of file TDocParser.cxx.

Member Function Documentation

◆ AddClassDataMembersRecursively()

void TDocParser::AddClassDataMembersRecursively ( TBaseClass bc)
protected

Add data members of fCurrentClass and of bc to datamembers, recursively.

Real data members are in idx 0..2 (public, protected, private access), enum constants in idx 3..5.

Definition at line 306 of file TDocParser.cxx.

◆ AddClassMethodsRecursively()

void TDocParser::AddClassMethodsRecursively ( TBaseClass bc)
protected

Add accessible (i.e.

non-private) methods of base class bc and its base classes' methods to methodNames. If bc==0, we add fCurrentClass's methods (and also private functions).

Definition at line 235 of file TDocParser.cxx.

◆ AnchorFromLine()

void TDocParser::AnchorFromLine ( const TString line,
TString anchor 
)
static

Create an anchor from the given line, by hashing it and convertig the hash into a custom base64 string.

Definition at line 381 of file TDocParser.cxx.

◆ Context()

EParseContext TDocParser::Context ( ) const
inlineprotected

Definition at line 129 of file TDocParser.h.

◆ Convert()

void TDocParser::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".

If "isCode", "in" is assumed to be C++ code.

Definition at line 402 of file TDocParser.cxx.

◆ DecorateKeywords() [1/2]

void TDocParser::DecorateKeywords ( std::ostream &  out,
const char *  text 
)
virtual

Expand keywords in text, writing to out.

Definition at line 450 of file TDocParser.cxx.

◆ DecorateKeywords() [2/2]

void TDocParser::DecorateKeywords ( TString line)
virtual

Find keywords in line and create URLs around them.

Escape characters with a special meaning for HTML. Protect "Begin_Html"/"End_Html" pairs, and set the parsing context. Evaluate sequences like a::b->c. Skip regions where directives are active.

Definition at line 463 of file TDocParser.cxx.

◆ DecrementMethodCount()

void TDocParser::DecrementMethodCount ( const char *  name)

reduce method count for method called name, removing it from fMethodCounts once the count reaches 0.

Definition at line 869 of file TDocParser.cxx.

◆ DeleteDirectiveOutput()

void TDocParser::DeleteDirectiveOutput ( ) const
virtual

Delete output generated by prior runs of all known directives; the output file names might have changes.

Definition at line 884 of file TDocParser.cxx.

◆ ExpandCPPLine()

void TDocParser::ExpandCPPLine ( TString line,
Ssiz_t pos 
)
protectedvirtual

Expand preprocessor statements.

Input: line - line containing the CPP statement, pos - position of '#'

NOTE: Looks for the #include statements and creates link to the corresponding file if such file exists

Definition at line 911 of file TDocParser.cxx.

◆ GetCurrentClass()

TClass * TDocParser::GetCurrentClass ( ) const
inline

Definition at line 171 of file TDocParser.h.

◆ GetCurrentModule()

void TDocParser::GetCurrentModule ( TString out_module) const

Return the name of module for which sources are currently parsed.

Definition at line 967 of file TDocParser.cxx.

◆ GetDataMembers()

const TList * TDocParser::GetDataMembers ( EAccess  access) const
inline

Definition at line 175 of file TDocParser.h.

◆ GetDocOutput()

TDocOutput * TDocParser::GetDocOutput ( ) const
inline

Definition at line 173 of file TDocParser.h.

◆ GetEnums()

const TList * TDocParser::GetEnums ( EAccess  access) const
inline

Definition at line 176 of file TDocParser.h.

◆ GetLineNumber()

Long_t TDocParser::GetLineNumber ( ) const
inline

Definition at line 174 of file TDocParser.h.

◆ GetMethods()

const TList * TDocParser::GetMethods ( EAccess  access) const
inline

Definition at line 170 of file TDocParser.h.

◆ GetSourceInfo()

const char * TDocParser::GetSourceInfo ( ESourceInfo  type) const
inline

Definition at line 177 of file TDocParser.h.

◆ HandleDirective()

Bool_t TDocParser::HandleDirective ( TString keyword,
Ssiz_t pos,
TString word,
Ssiz_t copiedToCommentUpTo 
)
protectedvirtual

Process directives to the documentation engine, like "Begin_Html" / "End_Html", "Begin_Macro" / "End_Macro", and "Begin_Latex" / "End_Latex".

Definition at line 977 of file TDocParser.cxx.

◆ InContext()

UInt_t TDocParser::InContext ( Int_t  context) const

checks whether we are in a parse context, return the entry closest to the current context.

If context is a EParseContextFlag just look for the first match in the flags

Definition at line 1158 of file TDocParser.cxx.

◆ InitKeywords()

void TDocParser::InitKeywords ( ) const
protectedvirtual

fill C++ keywords into fgKeywords

Definition at line 1175 of file TDocParser.cxx.

◆ IsDirective()

TClass * TDocParser::IsDirective ( const TString line,
Ssiz_t  pos,
const TString word,
Bool_t begin 
) const
protectedvirtual

return whether word at line's pos is a valid directive, and returns its TDocDirective's TClass object, or 0 if it's not a directive.

Set begin to kTRUE for "Begin_..." You can implement your own handlers by implementing a class deriving from TDocHandler, and calling it TDocTagDirective for "BEGIN_TAG", "END_TAG" blocks.

Definition at line 1253 of file TDocParser.cxx.

◆ IsName()

Bool_t TDocParser::IsName ( UChar_t  c)
static

Check if c is a valid C++ name character.

Input: c - a single character

Output: TRUE if c is a valid C++ name character and FALSE if it's not.

NOTE: Valid name characters are [a..zA..Z0..9_~],

Definition at line 1301 of file TDocParser.cxx.

◆ IsWord()

Bool_t TDocParser::IsWord ( UChar_t  c)
static

Check if c is a valid first character for C++ name.

Input: c - a single character

Output: TRUE if c is a valid first character for C++ name, and FALSE if it's not.

NOTE: Valid first characters are [a..zA..Z_~]

Definition at line 1324 of file TDocParser.cxx.

◆ LocateMethodInCurrentLine()

TMethod * TDocParser::LocateMethodInCurrentLine ( Ssiz_t posMethodName,
TString ret,
TString name,
TString params,
Bool_t isconst,
std::ostream &  srcOut,
TString anchor,
std::ifstream &  sourceFile,
Bool_t  allowPureVirtual 
)
protected

Search for a method starting at posMethodName, and return its return type, its name, and its arguments.

If the end of arguments is not found in the current line, get a new line from sourceFile, beautify it to srcOut, creating an anchor as necessary. When this function returns, posMethodName points to the end of the function declaration, i.e. right after the arguments' closing bracket. If posMethodName == kNPOS, we look for the first matching method in fMethodCounts.

Definition at line 1343 of file TDocParser.cxx.

◆ LocateMethods()

void TDocParser::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 
)
protected

Collect methods from the source or header file called filename.

It generates a beautified version of the source file on the fly; the output file is given by the fCurrentClass's name, and sourceExt. Documentation is extracted to out. lookForSourceInfo: if set, author, lastUpdate, and copyright are extracted (i.e. the values contained in fSourceInfo) useDocxxStyle: if set, documentation can be in front of the method name, not only inside the method. Useful doc Doc++/Doxygen style, and inline methods. lookForClassDescr: if set, the first line matching the class description rules is assumed to be the class description for fCurrentClass; the description is written to out. methodPattern: if set, methods have to be prepended by this tag. Usually the class name + "::". In header files, looking for in-place function definitions, this should be 0. In that case, only functions in fMethodCounts are searched for.

Definition at line 1607 of file TDocParser.cxx.

◆ LocateMethodsInHeaderClassDecl()

void TDocParser::LocateMethodsInHeaderClassDecl ( std::ostream &  out)
protected

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.

Definition at line 1913 of file TDocParser.cxx.

◆ LocateMethodsInHeaderInline()

void TDocParser::LocateMethodsInHeaderInline ( std::ostream &  out)
protected

Given fCurrentClass, look for methods in its header file, and extract documentation to out.

Definition at line 1879 of file TDocParser.cxx.

◆ LocateMethodsInSource()

void TDocParser::LocateMethodsInSource ( std::ostream &  out)
protected

Given fCurrentClass, look for methods in its source file, and extract documentation to out, while beautifying the source file in parallel.

Definition at line 1846 of file TDocParser.cxx.

◆ Parse()

void TDocParser::Parse ( std::ostream &  out)
virtual

Locate methods, starting in the source file, then inline, then immediately inside the class declaration.

While doing that also find the class description and special tags like the macro tag etc.

Definition at line 1573 of file TDocParser.cxx.

◆ ProcessComment()

Bool_t TDocParser::ProcessComment ( )
protectedvirtual

Parse the current line as a comment, handling directives and re-formatting the comment: remove "/*", "*&zwj;/", "//", similar characters surrounding lines, etc.

Return kFALSE if the line is not a comment.

Definition at line 1928 of file TDocParser.cxx.

◆ RemoveCommentContext()

void TDocParser::RemoveCommentContext ( Bool_t  cxxcomment)
protected

remove the top-most comment context that matches cxxcomment,

Definition at line 2060 of file TDocParser.cxx.

◆ SetCurrentModule()

void TDocParser::SetCurrentModule ( const char *  module)
inline

Definition at line 178 of file TDocParser.h.

◆ Strip()

Bool_t TDocParser::Strip ( TString s)
static

strips ' ', tabs, and newlines from both sides of str

Definition at line 2075 of file TDocParser.cxx.

◆ WriteClassDoc()

void TDocParser::WriteClassDoc ( std::ostream &  out,
Bool_t  first = kTRUE 
)
protected

Write the class description depending (among others) on fClassDocState.

Definition at line 2096 of file TDocParser.cxx.

◆ WriteMethod()

void TDocParser::WriteMethod ( std::ostream &  out,
TString ret,
TString name,
TString params,
Bool_t  isconst,
const char *  file,
TString anchor,
TString codeOneLiner 
)
protected

Write a method, forwarding to TClassDocOutput.

Definition at line 2242 of file TDocParser.cxx.

◆ WriteSourceLine()

void TDocParser::WriteSourceLine ( std::ostream &  out)
protected

Write fLineSource to out.

Adjust relative paths first.

Definition at line 2307 of file TDocParser.cxx.

Member Data Documentation

◆ fAllowDirectives

Bool_t TDocParser::fAllowDirectives
protected

Definition at line 119 of file TDocParser.h.

◆ fCheckForMethod

Bool_t TDocParser::fCheckForMethod
protected

Definition at line 106 of file TDocParser.h.

◆ fClassDescrTag

TString TDocParser::fClassDescrTag
protected

Definition at line 116 of file TDocParser.h.

◆ 

enum { ... } TDocParser::fClassDocState

◆ fComment

TString TDocParser::fComment
protected

Definition at line 93 of file TDocParser.h.

◆ fCommentAtBOL

Bool_t TDocParser::fCommentAtBOL
protected

Definition at line 115 of file TDocParser.h.

◆ fCurrentClass

TClass* TDocParser::fCurrentClass
protected

Definition at line 96 of file TDocParser.h.

◆ fCurrentFile

TString TDocParser::fCurrentFile
protected

Definition at line 102 of file TDocParser.h.

◆ fCurrentMethodTag

TString TDocParser::fCurrentMethodTag
protected

Definition at line 99 of file TDocParser.h.

◆ fCurrentModule

TString TDocParser::fCurrentModule
protected

Definition at line 98 of file TDocParser.h.

◆ fDataMembers

TList TDocParser::fDataMembers[6]
protected

Definition at line 123 of file TDocParser.h.

◆ fDirectiveCount

Int_t TDocParser::fDirectiveCount
protected

Definition at line 100 of file TDocParser.h.

◆ fDirectiveHandlers

TList TDocParser::fDirectiveHandlers
protected

Definition at line 118 of file TDocParser.h.

◆ fDocContext

EDocContext TDocParser::fDocContext
protected

Definition at line 104 of file TDocParser.h.

◆ fDocOutput

TDocOutput* TDocParser::fDocOutput
protected

Definition at line 87 of file TDocParser.h.

◆ fExtraLinesWithAnchor

std::set<UInt_t> TDocParser::fExtraLinesWithAnchor
protected

Definition at line 120 of file TDocParser.h.

◆ fFirstClassDoc

TString TDocParser::fFirstClassDoc
protected

Definition at line 94 of file TDocParser.h.

◆ fgKeywords

std::set<std::string> TDocParser::fgKeywords
staticprotected

Definition at line 125 of file TDocParser.h.

◆ fHtml

THtml* TDocParser::fHtml
protected

Definition at line 86 of file TDocParser.h.

◆ fLastClassDoc

TString TDocParser::fLastClassDoc
protected

Definition at line 95 of file TDocParser.h.

◆ fLineComment

TString TDocParser::fLineComment
protected

Definition at line 91 of file TDocParser.h.

◆ fLineNo

UInt_t TDocParser::fLineNo
protected

Definition at line 88 of file TDocParser.h.

◆ fLineNumber

Long_t TDocParser::fLineNumber
protected

Definition at line 101 of file TDocParser.h.

◆ fLineRaw

TString TDocParser::fLineRaw
protected

Definition at line 89 of file TDocParser.h.

◆ fLineSource

TString TDocParser::fLineSource
protected

Definition at line 92 of file TDocParser.h.

◆ fLineStripped

TString TDocParser::fLineStripped
protected

Definition at line 90 of file TDocParser.h.

◆ fMethodCounts

std::map<std::string , Int_t > TDocParser::fMethodCounts
protected

Definition at line 103 of file TDocParser.h.

◆ fMethods

THashList TDocParser::fMethods[3]
protected

Definition at line 122 of file TDocParser.h.

◆ fParseContext

std::list<UInt_t> TDocParser::fParseContext
protected

Definition at line 105 of file TDocParser.h.

◆ fRecentClass

TClass* TDocParser::fRecentClass
protected

Definition at line 97 of file TDocParser.h.

◆ fSourceInfo

TString TDocParser::fSourceInfo[kNumSourceInfos]
protected

Definition at line 121 of file TDocParser.h.

◆ fSourceInfoTags

TString TDocParser::fSourceInfoTags[kNumSourceInfos]
protected

Definition at line 117 of file TDocParser.h.

Libraries for TDocParser:
[legend]

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