ROOT  6.07/01
Reference Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 53 of file TDocParser.h.

Public Types

enum  ESourceInfo {
  kInfoLastUpdate, kInfoAuthor, kInfoCopyright, kInfoLastChanged,
  kInfoLastGenerated, kNumSourceInfos
}
 
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)) }
 
- Public Types inherited from TObject
enum  EStatusBits {
  kCanDelete = BIT(0), kMustCleanup = BIT(3), kObjInCanvas = BIT(3), kIsReferenced = BIT(4),
  kHasUUID = BIT(5), kCannotPick = BIT(6), kNoContextMenu = BIT(8), kInvalidObject = BIT(13)
}
 
enum  { kIsOnHeap = 0x01000000, kNotDeleted = 0x02000000, kZombie = 0x04000000, kBitMask = 0x00ffffff }
 
enum  { kSingleKey = BIT(0), kOverwrite = BIT(1), kWriteDelete = BIT(2) }
 

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...
 
void DecrementMethodCount (const char *name)
 reduce method count for method called name, removing it from fMethodCounts once the count reaches 0. 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...
 
virtual void DeleteDirectiveOutput () const
 Delete output generated by prior runs of all known directives; the output file names might have changes. More...
 
const TListGetMethods (EAccess access) const
 
TClassGetCurrentClass () const
 
void GetCurrentModule (TString &out_module) const
 Return the name of module for which sources are currently parsed. More...
 
TDocOutputGetDocOutput () const
 
Long_t GetLineNumber () const
 
const TListGetDataMembers (EAccess access) const
 
const TListGetEnums (EAccess access) const
 
const char * GetSourceInfo (ESourceInfo type) const
 
void SetCurrentModule (const char *module)
 
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...
 
 ClassDef (TDocParser, 0)
 
- Public Member Functions inherited from TObject
 TObject ()
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual ~TObject ()
 TObject destructor. 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...
 
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 pad. More...
 
virtual void Dump () const
 Dump contents of object on stdout. 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 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 UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual Option_tGetOption () const
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual const char * GetTitle () const
 Returns title of object. 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...
 
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...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
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 IsSortable () const
 
Bool_t IsOnHeap () const
 
Bool_t IsZombie () const
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. 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...
 
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...
 
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 UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. 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...
 
voidoperator new (size_t sz)
 
voidoperator new[] (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz, void *vp)
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
void SetBit (UInt_t f)
 
void ResetBit (UInt_t f)
 
Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
void InvertBit (UInt_t f)
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. 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...
 
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...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. 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 void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 

Protected Types

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

Protected Member Functions

void AddClassMethodsRecursively (TBaseClass *bc)
 Add accessible (i.e. More...
 
void AddClassDataMembersRecursively (TBaseClass *bc)
 Add data members of fCurrentClass and of bc to datamembers, recursively. 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)
 
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 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...
 
void LocateMethodsInHeaderInline (std::ostream &out)
 Given fCurrentClass, look for methods in its header file, and extract documentation to out. 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 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...
 
virtual Bool_t ProcessComment ()
 
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
void MakeZombie ()
 
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 

Protected Attributes

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

Static Protected Attributes

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

#include <TDocParser.h>

Inheritance diagram for TDocParser:
[legend]

Member Enumeration Documentation

anonymous enum
protected
Enumerator
kClassDoc_Uninitialized 
kClassDoc_LookingNothingFound 
kClassDoc_LookingHaveSomething 
kClassDoc_Written 
kClassDoc_Ignore 
kClassDoc_NumStates 

Definition at line 116 of file TDocParser.h.

Enumerator
kPrivate 
kProtected 
kPublic 

Definition at line 71 of file TDocParser.h.

enum TDocParser::EDocContext
protected
Enumerator
kIgnore 
kDocFunc 
kDocClass 
kNumDocContexts 

Definition at line 55 of file TDocParser.h.

Enumerator
kNoContext 
kCode 
kComment 
kDirective 
kString 
kKeyword 
kCPP 
kVerbatim 
kNumParseContexts 
kParseContextMask 

Definition at line 76 of file TDocParser.h.

Enumerator
kCXXComment 
kParseContextFlagMask 

Definition at line 88 of file TDocParser.h.

Enumerator
kInfoLastUpdate 
kInfoAuthor 
kInfoCopyright 
kInfoLastChanged 
kInfoLastGenerated 
kNumSourceInfos 

Definition at line 63 of file TDocParser.h.

Constructor & Destructor Documentation

TDocParser::TDocParser ( TClassDocOutput docOutput,
TClass cl 
)

Constructor called for parsing class sources.

Definition at line 150 of file TDocParser.cxx.

TDocParser::TDocParser ( TDocOutput docOutput)

constructor called for parsing text files with Convert()

Definition at line 190 of file TDocParser.cxx.

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

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.

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.

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.

Referenced by LocateMethodInCurrentLine(), LocateMethods(), and TDocOutput::NameSpace2FileName().

TDocParser::ClassDef ( TDocParser  ,
 
)
EParseContext TDocParser::Context ( ) const
inlineprotected

Definition at line 138 of file TDocParser.h.

Referenced by ProcessComment().

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.

Referenced by TDocOutput::Convert(), TDocMacroDirective::GetResult(), and TDocOutput::ProcessDocInDir().

void TDocParser::DecorateKeywords ( std::ostream &  out,
const char *  text 
)
virtual
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.

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.

Referenced by WriteMethod().

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.

Referenced by Parse().

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.

TClass* TDocParser::GetCurrentClass ( ) const
inline

Definition at line 180 of file TDocParser.h.

Referenced by TDocDirective::GetName().

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.

Referenced by TDocMacroDirective::CreateSubprocessInputFile().

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

Definition at line 184 of file TDocParser.h.

Referenced by TClassDocOutput::ListDataMembers().

TDocOutput* TDocParser::GetDocOutput ( ) const
inline

Definition at line 182 of file TDocParser.h.

Referenced by TDocDirective::SetParser().

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

Definition at line 185 of file TDocParser.h.

Referenced by TClassDocOutput::ListDataMembers().

Long_t TDocParser::GetLineNumber ( ) const
inline

Definition at line 183 of file TDocParser.h.

Referenced by TDocOutput::Convert().

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

Definition at line 179 of file TDocParser.h.

Referenced by TClassDocOutput::ListFunctions().

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

Definition at line 186 of file TDocParser.h.

Referenced by TClassDocOutput::Class2Html().

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

Definition at line 2 of file TDocParser_002.C.

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 183 of file TDocParser_002.C.

Referenced by DecorateKeywords(), HandleDirective(), LocateMethods(), and ProcessComment().

void TDocParser::InitKeywords ( ) const
protectedvirtual

fill C++ keywords into fgKeywords

Definition at line 200 of file TDocParser_002.C.

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 278 of file TDocParser_002.C.

Referenced by HandleDirective().

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 326 of file TDocParser_002.C.

Referenced by LocateMethodInCurrentLine().

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 349 of file TDocParser_002.C.

Referenced by TDocLatexDirective::GetResult(), LocateMethodInCurrentLine(), and ProcessComment().

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 368 of file TDocParser_002.C.

Referenced by 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 632 of file TDocParser_002.C.

Referenced by LocateMethodsInHeaderClassDecl(), LocateMethodsInHeaderInline(), and LocateMethodsInSource().

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 938 of file TDocParser_002.C.

Referenced by Parse().

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

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

Definition at line 904 of file TDocParser_002.C.

Referenced by Parse().

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 871 of file TDocParser_002.C.

Referenced by 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 598 of file TDocParser_002.C.

Referenced by TClassDocOutput::Class2Html().

*etc **Return kFALSE if the line is not a comment *Bool_t TDocParser::ProcessComment ( )
protectedvirtual

Definition at line 953 of file TDocParser_002.C.

Referenced by LocateMethods().

void TDocParser::RemoveCommentContext ( Bool_t  cxxcomment)
protected

remove the top-most comment context that matches cxxcomment,

Definition at line 1085 of file TDocParser_002.C.

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

Definition at line 187 of file TDocParser.h.

Bool_t TDocParser::Strip ( TString s)
static

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

Definition at line 1100 of file TDocParser_002.C.

Referenced by TDocLatexDirective::AddLine(), LocateMethodInCurrentLine(), LocateMethods(), and ProcessComment().

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

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

Definition at line 1121 of file TDocParser_002.C.

Referenced by LocateMethods(), and 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 1267 of file TDocParser_002.C.

Referenced by LocateMethods().

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

Write fLineSource to out.

Adjust relative paths first.

Definition at line 1332 of file TDocParser_002.C.

Referenced by LocateMethodInCurrentLine(), and LocateMethods().

Member Data Documentation

Bool_t TDocParser::fAllowDirectives
protected

Definition at line 128 of file TDocParser.h.

Bool_t TDocParser::fCheckForMethod
protected

Definition at line 115 of file TDocParser.h.

TString TDocParser::fClassDescrTag
protected

Definition at line 125 of file TDocParser.h.

Referenced by ProcessComment().

enum { ... } TDocParser::fClassDocState
TString TDocParser::fComment
protected

Definition at line 102 of file TDocParser.h.

Referenced by LocateMethods(), ProcessComment(), and WriteMethod().

Bool_t TDocParser::fCommentAtBOL
protected

Definition at line 124 of file TDocParser.h.

Referenced by LocateMethodInCurrentLine(), LocateMethods(), and ProcessComment().

TClass* TDocParser::fCurrentClass
protected
TString TDocParser::fCurrentFile
protected

Definition at line 111 of file TDocParser.h.

Referenced by LocateMethods().

TString TDocParser::fCurrentMethodTag
protected

Definition at line 108 of file TDocParser.h.

Referenced by HandleDirective(), and LocateMethodInCurrentLine().

TString TDocParser::fCurrentModule
protected

Definition at line 107 of file TDocParser.h.

TList TDocParser::fDataMembers[6]
protected

Definition at line 132 of file TDocParser.h.

Referenced by AddClassDataMembersRecursively().

Int_t TDocParser::fDirectiveCount
protected

Definition at line 109 of file TDocParser.h.

Referenced by HandleDirective(), and LocateMethodInCurrentLine().

TList TDocParser::fDirectiveHandlers
protected

Definition at line 127 of file TDocParser.h.

Referenced by DecorateKeywords(), and HandleDirective().

EDocContext TDocParser::fDocContext
protected

Definition at line 113 of file TDocParser.h.

Referenced by LocateMethods(), ProcessComment(), and WriteMethod().

TDocOutput* TDocParser::fDocOutput
protected
std::set<UInt_t> TDocParser::fExtraLinesWithAnchor
protected

Definition at line 129 of file TDocParser.h.

Referenced by LocateMethods().

TString TDocParser::fFirstClassDoc
protected

Definition at line 103 of file TDocParser.h.

Referenced by LocateMethods(), and WriteClassDoc().

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

Definition at line 134 of file TDocParser.h.

Referenced by InitKeywords().

THtml* TDocParser::fHtml
protected
TString TDocParser::fLastClassDoc
protected

Definition at line 104 of file TDocParser.h.

Referenced by LocateMethods(), and WriteClassDoc().

TString TDocParser::fLineComment
protected

Definition at line 100 of file TDocParser.h.

Referenced by HandleDirective(), LocateMethods(), and ProcessComment().

UInt_t TDocParser::fLineNo
protected

Definition at line 97 of file TDocParser.h.

Referenced by IsDirective(), and LocateMethods().

Long_t TDocParser::fLineNumber
protected

Definition at line 110 of file TDocParser.h.

Referenced by GetLineNumber(), LocateMethodInCurrentLine(), and LocateMethods().

TString TDocParser::fLineRaw
protected
TString TDocParser::fLineSource
protected
TString TDocParser::fLineStripped
protected

Definition at line 99 of file TDocParser.h.

Referenced by LocateMethodInCurrentLine(), LocateMethods(), and ProcessComment().

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

Definition at line 112 of file TDocParser.h.

Referenced by LocateMethodInCurrentLine().

THashList TDocParser::fMethods[3]
protected

Definition at line 131 of file TDocParser.h.

Referenced by AddClassMethodsRecursively(), and WriteMethod().

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

Definition at line 114 of file TDocParser.h.

Referenced by HandleDirective(), InContext(), LocateMethods(), and RemoveCommentContext().

TClass* TDocParser::fRecentClass
protected

Definition at line 106 of file TDocParser.h.

TString TDocParser::fSourceInfo[kNumSourceInfos]
protected

Definition at line 130 of file TDocParser.h.

Referenced by LocateMethods(), and Parse().

TString TDocParser::fSourceInfoTags[kNumSourceInfos]
protected

Definition at line 126 of file TDocParser.h.

Referenced by LocateMethods().

Collaboration diagram for TDocParser:
[legend]

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