Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
doxverilog
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
Elphel
doxverilog
Commits
d8da737a
Commit
d8da737a
authored
Apr 01, 2002
by
Dimitri van Heesch
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Release-1.2.15
parent
a633d797
Changes
26
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
26 changed files
with
764 additions
and
253 deletions
+764
-253
INSTALL
INSTALL
+2
-2
README
README
+2
-2
VERSION
VERSION
+1
-1
doxmlintf.h
addon/doxmlparser/include/doxmlintf.h
+108
-28
basehandler.h
addon/doxmlparser/src/basehandler.h
+2
-2
baseiterator.h
addon/doxmlparser/src/baseiterator.h
+15
-0
compoundhandler.cpp
addon/doxmlparser/src/compoundhandler.cpp
+125
-15
compoundhandler.h
addon/doxmlparser/src/compoundhandler.h
+57
-15
dochandler.cpp
addon/doxmlparser/src/dochandler.cpp
+5
-4
dochandler.h
addon/doxmlparser/src/dochandler.h
+145
-104
doxmlintf.h
addon/doxmlparser/src/doxmlintf.h
+108
-28
graphhandler.cpp
addon/doxmlparser/src/graphhandler.cpp
+25
-5
graphhandler.h
addon/doxmlparser/src/graphhandler.h
+11
-7
linkedtexthandler.cpp
addon/doxmlparser/src/linkedtexthandler.cpp
+8
-8
linkedtexthandler.h
addon/doxmlparser/src/linkedtexthandler.h
+14
-7
mainhandler.cpp
addon/doxmlparser/src/mainhandler.cpp
+2
-2
memberhandler.cpp
addon/doxmlparser/src/memberhandler.cpp
+1
-1
memberhandler.h
addon/doxmlparser/src/memberhandler.h
+4
-4
paramhandler.h
addon/doxmlparser/src/paramhandler.h
+10
-9
sectionhandler.h
addon/doxmlparser/src/sectionhandler.h
+3
-4
main.cpp
addon/doxmlparser/test/main.cpp
+83
-1
enum.h
examples/enum.h
+7
-0
make.bat
make.bat
+2
-0
doxygen.spec
packages/rpm/doxygen.spec
+1
-1
code.l
src/code.l
+21
-2
doxygen.cpp
src/doxygen.cpp
+2
-1
No files found.
INSTALL
View file @
d8da737a
DOXYGEN Version 1.2.1
4-20020324
DOXYGEN Version 1.2.1
5
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (
24 March
2002)
Dimitri van Heesch (
01 April
2002)
README
View file @
d8da737a
DOXYGEN Version 1.2.1
4_20020324
DOXYGEN Version 1.2.1
5
Please read INSTALL for compilation instructions.
...
...
@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (
24 March
2002)
Dimitri van Heesch (dimitri@stack.nl) (
01 April
2002)
VERSION
View file @
d8da737a
1.2.1
4-20020324
1.2.1
5
addon/doxmlparser/include/doxmlintf.h
View file @
d8da737a
...
...
@@ -7,13 +7,13 @@ class IMember;
class
IDocIterator
;
class
ICompound
;
class
ISection
;
class
INode
;
class
ILinkedText
{
public
:
enum
Kind
{
Kind_Text
,
Kind_Ref
};
virtual
Kind
kind
()
const
=
0
;
virtual
~
ILinkedText
()
{}
};
class
ILT_Text
:
public
ILinkedText
...
...
@@ -52,7 +52,6 @@ class IParam
virtual
QString
attrib
()
const
=
0
;
virtual
QString
arraySpecifier
()
const
=
0
;
virtual
ILinkedTextIterator
*
defaultValue
()
const
=
0
;
virtual
~
IParam
()
{}
};
class
IParamIterator
...
...
@@ -71,7 +70,6 @@ class IMemberReference
public
:
virtual
IMember
*
member
()
const
=
0
;
virtual
QString
memberName
()
const
=
0
;
virtual
~
IMemberReference
()
{}
};
class
IMemberReferenceIterator
...
...
@@ -90,7 +88,6 @@ class IEnumValue
public
:
virtual
QString
name
()
const
=
0
;
virtual
QString
initializer
()
const
=
0
;
virtual
~
IEnumValue
()
{}
};
class
IEnumValueIterator
...
...
@@ -142,7 +139,6 @@ class IDoc
Root
// 30 -> IDocRoot
};
virtual
Kind
kind
()
const
=
0
;
virtual
~
IDoc
()
{}
};
class
IDocMarkup
:
public
IDoc
...
...
@@ -232,7 +228,8 @@ class IDocSimpleSect : public IDoc
Todo
,
Test
,
RCS
,
EnumValues
,
Examples
};
virtual
Types
sectionType
()
const
=
0
;
virtual
Types
type
()
const
=
0
;
virtual
QString
typeString
()
const
=
0
;
virtual
IDocTitle
*
title
()
const
=
0
;
virtual
IDocPara
*
description
()
const
=
0
;
};
...
...
@@ -411,7 +408,7 @@ class IChildNode
enum
NodeRelation
{
PublicInheritance
,
ProtectedInheritance
,
PrivateInheritance
,
Usage
,
TemplateInstance
};
virtual
QString
id
()
const
=
0
;
virtual
INode
*
node
()
const
=
0
;
virtual
NodeRelation
relation
()
const
=
0
;
virtual
QString
relationString
()
const
=
0
;
virtual
IEdgeLabelIterator
*
edgeLabels
()
const
=
0
;
...
...
@@ -452,7 +449,6 @@ class IGraph
{
public
:
virtual
INodeIterator
*
nodes
()
const
=
0
;
virtual
~
IGraph
()
{}
};
class
IMember
...
...
@@ -488,7 +484,6 @@ class IMember
virtual
IEnumValueIterator
*
enumValues
()
const
=
0
;
virtual
IDocRoot
*
briefDescription
()
const
=
0
;
virtual
IDocRoot
*
detailedDescription
()
const
=
0
;
virtual
~
IMember
()
{}
};
class
IMemberIterator
...
...
@@ -524,7 +519,6 @@ class ISection
virtual
bool
isPublic
()
const
=
0
;
virtual
bool
isPrivate
()
const
=
0
;
virtual
bool
isProtected
()
const
=
0
;
virtual
~
ISection
()
{}
};
class
ISectionIterator
...
...
@@ -541,19 +535,43 @@ class ISectionIterator
class
ICompound
{
public
:
/*! Represents the kind of compounds recognised by doxygen. */
enum
CompoundKind
{
Invalid
=
0
,
Class
,
Struct
,
Union
,
Interface
,
Exception
,
Namespace
,
File
,
Group
,
Page
,
Package
Namespace
,
File
,
Group
,
Page
};
/*! Returns the name of this compound */
virtual
QString
name
()
const
=
0
;
/*! Returns the id of this compound. The id is a
* unique string representing a specific compound object.
*/
virtual
QString
id
()
const
=
0
;
/*! Returns the kind of compound. See #CompoundKind for possible
* values.
*/
virtual
CompoundKind
kind
()
const
=
0
;
/*! Returns a string representation of the compound kind.
* @see kind()
*/
virtual
QString
kindString
()
const
=
0
;
/*! Returns an iterator for the different member sections in this
* compound.
*/
virtual
ISectionIterator
*
sections
()
const
=
0
;
/*! Returns a tree-structured representation of the brief
* description that is attached to this compound.
*/
virtual
IDocRoot
*
briefDescription
()
const
=
0
;
/*! Returns a tree-structured representation of the detailed
* description that is attached to this compound.
*/
virtual
IDocRoot
*
detailedDescription
()
const
=
0
;
virtual
IGraph
*
inheritanceGraph
()
const
=
0
;
virtual
IGraph
*
collaborationGraph
()
const
=
0
;
/*! Returns an interface to a member given its id.
* @param id The member id.
...
...
@@ -561,7 +579,8 @@ class ICompound
virtual
IMember
*
memberById
(
const
QString
&
id
)
const
=
0
;
/*! Returns a list of all members within the compound having a certain
* name. Overloading is the reason why there can be more than one member.
* name. Member overloading is the reason why there can be more than
* one member.
* @param name The name of the member.
*/
virtual
IMemberIterator
*
memberByName
(
const
QString
&
name
)
const
=
0
;
...
...
@@ -570,44 +589,105 @@ class ICompound
* zero, the memory for the compound will be released.
*/
virtual
void
release
()
=
0
;
};
class
ICompoundIterator
{
public
:
virtual
void
toFirst
()
=
0
;
virtual
void
toLast
()
=
0
;
virtual
void
toNext
()
=
0
;
virtual
void
toPrev
()
=
0
;
virtual
ICompound
*
current
()
const
=
0
;
virtual
void
release
()
=
0
;
};
class
IRelatedCompound
{
public
:
enum
Protection
{
Public
,
Protected
,
Private
};
enum
Kind
{
Normal
,
Virtual
};
virtual
ICompound
*
compound
()
const
=
0
;
virtual
Protection
protection
()
const
=
0
;
virtual
Kind
kind
()
const
=
0
;
};
class
IRelatedCompoundIterator
{
public
:
virtual
IRelatedCompound
*
toFirst
()
=
0
;
virtual
IRelatedCompound
*
toLast
()
=
0
;
virtual
IRelatedCompound
*
toNext
()
=
0
;
virtual
IRelatedCompound
*
toPrev
()
=
0
;
virtual
IRelatedCompound
*
current
()
const
=
0
;
virtual
void
release
()
=
0
;
};
class
IClass
:
public
ICompound
{
public
:
virtual
IGraph
*
inheritanceGraph
()
const
=
0
;
virtual
IGraph
*
collaborationGraph
()
const
=
0
;
virtual
IRelatedCompoundIterator
*
baseClasses
()
const
=
0
;
virtual
IRelatedCompoundIterator
*
derivedClasses
()
const
=
0
;
virtual
ICompoundIterator
*
nestedClasses
()
const
=
0
;
// TODO:
// class:
// IRelatedCompoundIterator *baseClasses()
// IRelatedCompoundIterator *derivedClasses()
// ICompoundIterator *innerClasses()
// ITemplateParamListIterator *templateParamLists()
// listOfAllMembers()
// IDotGraph *inheritanceGraph()
// IDotGraph *collaborationGraph()
// locationFile()
// locationLine()
// locationBodyStartLine()
// locationBodyEndLine()
};
class
IStruct
:
public
ICompound
{
};
class
IUnion
:
public
ICompound
{
};
class
IInterface
:
public
ICompound
{
};
class
IException
:
public
ICompound
{
};
class
INamespace
:
public
ICompound
{
// namespace:
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
};
class
IFile
:
public
ICompound
{
// file:
// includes()
// includedBy()
// IDotGraph *includeDependencyGraph()
// IDotGraph *includedByDependencyGraph()
// IDocProgramListing *source()
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
};
class
IGroup
:
public
ICompound
{
// group:
// Title()
// innerFile()
// innerPage()
// page:
};
class
I
CompoundIterator
class
I
Page
:
public
ICompound
{
public
:
virtual
void
toFirst
()
=
0
;
virtual
void
toLast
()
=
0
;
virtual
void
toNext
()
=
0
;
virtual
void
toPrev
()
=
0
;
virtual
ICompound
*
current
()
const
=
0
;
virtual
void
release
()
=
0
;
};
/*! Root node of the object model. */
...
...
addon/doxmlparser/src/basehandler.h
View file @
d8da737a
...
...
@@ -75,8 +75,8 @@ template<class T> class ElementMapper
Handler
m_handler
;
};
typedef
StartElementHandler
<
T
>
StartElementHandlerT
;
typedef
EndElementHandler
<
T
>
EndElementHandlerT
;
typedef
StartElementHandler
StartElementHandlerT
;
typedef
EndElementHandler
EndElementHandlerT
;
public
:
ElementMapper
()
:
m_startHandlers
(
67
),
m_endHandlers
(
67
)
...
...
addon/doxmlparser/src/baseiterator.h
View file @
d8da737a
...
...
@@ -32,4 +32,19 @@ template<class Intf,class ElemIntf,class ElemImpl> class BaseIterator :
virtual
void
release
()
{
delete
this
;
}
};
template
<
class
Intf
,
class
ElemIntf
,
class
ElemImpl
,
class
Intermediate
>
class
BaseIteratorVia
:
public
Intf
,
public
QListIterator
<
ElemImpl
>
{
public
:
BaseIteratorVia
(
const
QList
<
ElemImpl
>
&
list
)
:
QListIterator
<
ElemImpl
>
(
list
)
{}
virtual
~
BaseIteratorVia
()
{}
virtual
ElemIntf
*
toFirst
()
{
return
static_cast
<
Intermediate
*>
(
QListIterator
<
ElemImpl
>::
toFirst
());
}
virtual
ElemIntf
*
toLast
()
{
return
static_cast
<
Intermediate
*>
(
QListIterator
<
ElemImpl
>::
toLast
());
}
virtual
ElemIntf
*
toNext
()
{
return
static_cast
<
Intermediate
*>
(
QListIterator
<
ElemImpl
>::
operator
++
());
}
virtual
ElemIntf
*
toPrev
()
{
return
static_cast
<
Intermediate
*>
(
QListIterator
<
ElemImpl
>::
operator
--
());
}
virtual
ElemIntf
*
current
()
const
{
return
static_cast
<
Intermediate
*>
(
QListIterator
<
ElemImpl
>::
current
());
}
virtual
void
release
()
{
delete
this
;
}
};
#endif
addon/doxmlparser/src/compoundhandler.cpp
View file @
d8da737a
...
...
@@ -20,6 +20,53 @@
#include "graphhandler.h"
#include "sectionhandler.h"
//----------------------------------------------------------------------------
class
CompoundIdIterator
:
public
ICompoundIterator
,
public
QListIterator
<
QString
>
{
public
:
CompoundIdIterator
(
const
MainHandler
*
m
,
const
QList
<
QString
>
&
list
)
:
QListIterator
<
QString
>
(
list
),
m_mainHandler
(
m
)
{}
virtual
~
CompoundIdIterator
()
{}
virtual
void
toFirst
()
{
QListIterator
<
QString
>::
toFirst
();
}
virtual
void
toLast
()
{
QListIterator
<
QString
>::
toLast
();
}
virtual
void
toNext
()
{
QListIterator
<
QString
>::
operator
++
();
}
virtual
void
toPrev
()
{
QListIterator
<
QString
>::
operator
--
();
}
virtual
ICompound
*
current
()
const
{
QString
*
id
=
QListIterator
<
QString
>::
current
();
return
id
?
m_mainHandler
->
compoundById
(
*
id
)
:
0
;
}
virtual
void
release
()
{
delete
this
;
}
private
:
const
MainHandler
*
m_mainHandler
;
};
//----------------------------------------------------------------------------
ICompound
*
RelatedCompound
::
compound
()
const
{
return
m_parent
->
m_mainHandler
->
compoundById
(
m_id
);
}
//----------------------------------------------------------------------------
class
CompoundErrorHandler
:
public
QXmlErrorHandler
{
public
:
...
...
@@ -62,7 +109,6 @@ class CompoundTypeMap
m_map
.
insert
(
"file"
,
new
int
(
ICompound
::
File
));
m_map
.
insert
(
"group"
,
new
int
(
ICompound
::
Group
));
m_map
.
insert
(
"page"
,
new
int
(
ICompound
::
Page
));
m_map
.
insert
(
"package"
,
new
int
(
ICompound
::
Package
));
}
virtual
~
CompoundTypeMap
()
{
...
...
@@ -104,6 +150,7 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
m_subClasses
.
setAutoDelete
(
TRUE
);
m_sections
.
setAutoDelete
(
TRUE
);
m_memberNameDict
.
setAutoDelete
(
TRUE
);
m_innerClasses
.
setAutoDelete
(
TRUE
);
addStartHandler
(
"doxygen"
);
addEndHandler
(
"doxygen"
);
...
...
@@ -135,6 +182,9 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
addStartHandler
(
"collaborationgraph"
,
this
,
&
CompoundHandler
::
startCollaborationGraph
);
addStartHandler
(
"innerclass"
,
this
,
&
CompoundHandler
::
startInnerClass
);
addEndHandler
(
"innerclass"
);
}
CompoundHandler
::~
CompoundHandler
()
...
...
@@ -143,6 +193,8 @@ CompoundHandler::~CompoundHandler()
delete
m_brief
;
delete
m_detailed
;
delete
m_programListing
;
delete
m_inheritanceGraph
;
delete
m_collaborationGraph
;
}
void
CompoundHandler
::
startSection
(
const
QXmlAttributes
&
attrib
)
...
...
@@ -198,31 +250,56 @@ void CompoundHandler::endCompoundName()
debug
(
2
,
"Compound name `%s'
\n
"
,
m_name
.
data
());
}
void
CompoundHandler
::
startInnerClass
(
const
QXmlAttributes
&
attrib
)
{
m_innerClasses
.
append
(
new
QString
(
attrib
.
value
(
"refid"
)));
}
void
CompoundHandler
::
addSuperClass
(
const
QXmlAttributes
&
attrib
)
{
RelatedClass
*
sc
=
new
RelatedClass
(
IRelatedCompound
::
Protection
prot
=
IRelatedCompound
::
Public
;
QString
protString
=
attrib
.
value
(
"prot"
);
if
(
protString
==
"protected"
)
prot
=
IRelatedCompound
::
Protected
;
else
if
(
protString
==
"private"
)
prot
=
IRelatedCompound
::
Private
;
IRelatedCompound
::
Kind
kind
=
IRelatedCompound
::
Normal
;
QString
kindString
=
attrib
.
value
(
"virt"
);
if
(
kindString
==
"virtual"
)
kind
=
IRelatedCompound
::
Virtual
;
RelatedCompound
*
sc
=
new
RelatedCompound
(
this
,
attrib
.
value
(
"refid"
),
attrib
.
value
(
"prot"
)
,
attrib
.
value
(
"virt"
)
prot
,
kind
);
debug
(
2
,
"super class id=`%s' prot=`%s' virt=`%s'
\n
"
,
sc
->
m_id
.
data
(),
sc
->
m_protection
.
data
(),
sc
->
m_virtualness
.
data
());
attrib
.
value
(
"refid"
)
.
data
(),
protString
.
data
(),
kindString
.
data
());
m_superClasses
.
append
(
sc
);
}
void
CompoundHandler
::
addSubClass
(
const
QXmlAttributes
&
attrib
)
{
RelatedClass
*
sc
=
new
RelatedClass
(
IRelatedCompound
::
Protection
prot
=
IRelatedCompound
::
Public
;
QString
protString
=
attrib
.
value
(
"prot"
);
if
(
protString
==
"protected"
)
prot
=
IRelatedCompound
::
Protected
;
else
if
(
protString
==
"private"
)
prot
=
IRelatedCompound
::
Private
;
IRelatedCompound
::
Kind
kind
=
IRelatedCompound
::
Normal
;
QString
kindString
=
attrib
.
value
(
"virt"
);
if
(
kindString
==
"virtual"
)
kind
=
IRelatedCompound
::
Virtual
;
RelatedCompound
*
sc
=
new
RelatedCompound
(
this
,
attrib
.
value
(
"refid"
),
attrib
.
value
(
"prot"
)
,
attrib
.
value
(
"virt"
)
prot
,
kind
);
debug
(
2
,
"sub class id=`%s' prot=`%s' virt=`%s'
\n
"
,
sc
->
m_id
.
data
(),
sc
->
m_protection
.
data
(),
sc
->
m_virtualness
.
data
());
attrib
.
value
(
"refid"
)
.
data
(),
protString
.
data
(),
kindString
.
data
());
m_subClasses
.
append
(
sc
);
}
...
...
@@ -242,9 +319,9 @@ bool CompoundHandler::parseXML(const QString &compId)
void
CompoundHandler
::
initialize
(
MainHandler
*
mh
)
{
m_mainHandler
=
mh
;
QListIterator
<
ISection
>
msi
(
m_sections
);
QListIterator
<
SectionHandler
>
msi
(
m_sections
);
SectionHandler
*
sec
;
for
(;(
sec
=
(
SectionHandler
*
)
msi
.
current
());
++
msi
)
for
(;(
sec
=
msi
.
current
());
++
msi
)
{
sec
->
initialize
(
this
);
}
...
...
@@ -262,6 +339,24 @@ void CompoundHandler::insertMember(MemberHandler *mh)
mhl
->
append
(
mh
);
}
ICompound
*
CompoundHandler
::
toICompound
()
const
{
switch
(
m_kind
)
{
case
IClass
:
:
Class
:
return
(
IClass
*
)
this
;
case
IStruct
:
:
Struct
:
return
(
IStruct
*
)
this
;
case
IUnion
:
:
Union
:
return
(
IUnion
*
)
this
;
case
IException
:
:
Exception
:
return
(
IException
*
)
this
;
case
IInterface
:
:
Interface
:
return
(
IInterface
*
)
this
;
case
INamespace
:
:
Namespace
:
return
(
INamespace
*
)
this
;
case
IFile
:
:
File
:
return
(
IFile
*
)
this
;
case
IGroup
:
:
Group
:
return
(
IGroup
*
)
this
;
case
IPage
:
:
Page
:
return
(
IPage
*
)
this
;
default
:
return
0
;
}
return
0
;
}
void
CompoundHandler
::
release
()
{
debug
(
2
,
"CompoundHandler::release() %d->%d
\n
"
,
m_refCount
,
m_refCount
-
1
);
...
...
@@ -321,3 +416,18 @@ IGraph *CompoundHandler::collaborationGraph() const
return
m_collaborationGraph
;
}
IRelatedCompoundIterator
*
CompoundHandler
::
baseClasses
()
const
{
return
new
RelatedCompoundIterator
(
m_superClasses
);
}
IRelatedCompoundIterator
*
CompoundHandler
::
derivedClasses
()
const
{
return
new
RelatedCompoundIterator
(
m_subClasses
);
}
ICompoundIterator
*
CompoundHandler
::
nestedClasses
()
const
{
return
new
CompoundIdIterator
(
m_mainHandler
,
m_innerClasses
);
}
addon/doxmlparser/src/compoundhandler.h
View file @
d8da737a
...
...
@@ -28,9 +28,52 @@ class DocHandler;
class
ProgramListingHandler
;
class
GraphHandler
;
class
MemberHandler
;
class
CompoundHandler
;
class
SectionHandler
;
class
CompoundHandler
:
public
ICompound
,
public
BaseHandler
<
CompoundHandler
>
class
RelatedCompound
:
public
IRelatedCompound
{
public
:
RelatedCompound
(
CompoundHandler
*
parent
,
const
QString
&
id
,
Protection
prot
,
Kind
kind
)
:
m_parent
(
parent
),
m_id
(
id
),
m_protection
(
prot
),
m_kind
(
kind
)
{}
virtual
~
RelatedCompound
()
{}
virtual
ICompound
*
compound
()
const
;
virtual
Protection
protection
()
const
{
return
m_protection
;
}
virtual
Kind
kind
()
const
{
return
m_kind
;
}
private
:
CompoundHandler
*
m_parent
;
QString
m_id
;
Protection
m_protection
;
Kind
m_kind
;
};
class
RelatedCompoundIterator
:
public
BaseIterator
<
IRelatedCompoundIterator
,
IRelatedCompound
,
RelatedCompound
>
{
public
:
RelatedCompoundIterator
(
const
QList
<
RelatedCompound
>
&
list
)
:
BaseIterator
<
IRelatedCompoundIterator
,
IRelatedCompound
,
RelatedCompound
>
(
list
)
{}
};
class
CompoundHandler
:
public
IClass
,
public
IStruct
,
public
IUnion
,
public
IException
,
public
IInterface
,
public
INamespace
,
public
IFile
,
public
IGroup
,
public
IPage
,
public
BaseHandler
<
CompoundHandler
>
{
friend
class
RelatedCompound
;
public
:
virtual
void
startSection
(
const
QXmlAttributes
&
attrib
);
virtual
void
startCompound
(
const
QXmlAttributes
&
attrib
);
...
...
@@ -44,6 +87,7 @@ class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
virtual
void
startProgramListing
(
const
QXmlAttributes
&
attrib
);
virtual
void
startInheritanceGraph
(
const
QXmlAttributes
&
attrib
);
virtual
void
startCollaborationGraph
(
const
QXmlAttributes
&
attrib
);
virtual
void
startInnerClass
(
const
QXmlAttributes
&
attrib
);
virtual
void
addref
()
{
m_refCount
++
;
}
CompoundHandler
(
const
QString
&
dirName
);
...
...
@@ -51,6 +95,7 @@ class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
bool
parseXML
(
const
QString
&
compId
);
void
initialize
(
MainHandler
*
mh
);
void
insertMember
(
MemberHandler
*
mh
);
ICompound
*
toICompound
()
const
;
// ICompound implementation
QString
name
()
const
{
return
m_name
;
}
...
...
@@ -60,25 +105,21 @@ class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
ISectionIterator
*
sections
()
const
;
IDocRoot
*
briefDescription
()
const
;
IDocRoot
*
detailedDescription
()
const
;
IGraph
*
inheritanceGraph
()
const
;
IGraph
*
collaborationGraph
()
const
;
IMember
*
memberById
(
const
QString
&
id
)
const
;
IMemberIterator
*
memberByName
(
const
QString
&
name
)
const
;
void
release
();
// IClass implementation
IGraph
*
inheritanceGraph
()
const
;
IGraph
*
collaborationGraph
()
const
;
IRelatedCompoundIterator
*
baseClasses
()
const
;
IRelatedCompoundIterator
*
derivedClasses
()
const
;
ICompoundIterator
*
nestedClasses
()
const
;
private
:
struct
RelatedClass
{
RelatedClass
(
const
QString
&
id
,
const
QString
&
prot
,
const
QString
&
virt
)
:
m_id
(
id
),
m_protection
(
prot
),
m_virtualness
(
virt
)
{}
QString
m_id
;
QString
m_protection
;
QString
m_virtualness
;
};
QList
<
RelatedClass
>
m_superClasses
;
QList
<
RelatedClass
>
m_subClasses
;
QList
<
ISection
>
m_sections
;
QList
<
RelatedCompound
>
m_superClasses
;
QList
<
RelatedCompound
>
m_subClasses
;
QList
<
SectionHandler
>
m_sections
;
DocHandler
*
m_brief
;
DocHandler
*
m_detailed
;
ProgramListingHandler
*
m_programListing
;
...
...
@@ -95,6 +136,7 @@ class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
MainHandler
*
m_mainHandler
;
GraphHandler
*
m_inheritanceGraph
;
GraphHandler
*
m_collaborationGraph
;
QList
<
QString
>
m_innerClasses
;
};
...
...
addon/doxmlparser/src/dochandler.cpp
View file @
d8da737a
...
...
@@ -94,7 +94,7 @@ void dochandler_exit()
// MarkupHandler
//----------------------------------------------------------------------
MarkupHandler
::
MarkupHandler
(
QList
<
IDoc
>
&
children
,
QString
&
curString
)
MarkupHandler
::
MarkupHandler
(
QList
<
DocImpl
>
&
children
,
QString
&
curString
)
:
m_children
(
children
),
m_curString
(
curString
),
m_curMarkup
(
IDocMarkup
::
Normal
)
{
addStartHandler
(
"bold"
,
this
,
&
MarkupHandler
::
startBold
);
...
...
@@ -700,8 +700,9 @@ SimpleSectHandler::~SimpleSectHandler()
void
SimpleSectHandler
::
startSimpleSect
(
const
QXmlAttributes
&
attrib
)
{
m_type
=
s_typeMapper
->
stringToType
(
attrib
.
value
(
"kind"
));
debug
(
2
,
"start simple section %s
\n
"
,
attrib
.
value
(
"kind"
).
data
());
m_typeString
=
attrib
.
value
(
"kind"
);
m_type
=
s_typeMapper
->
stringToType
(
m_typeString
);
debug
(
2
,
"start simple section %s
\n
"
,
m_typeString
.
data
());
m_parent
->
setDelegate
(
this
);
}
...
...
@@ -846,7 +847,7 @@ HighlightHandler::HighlightHandler(IBaseHandler *parent)
m_children
.
setAutoDelete
(
TRUE
);
addEndHandler
(
"highlight"
,
this
,
&
HighlightHandler
::
endHighlight
);
addStartHandler
(
"ref"
,
this
,
&
HighlightHandler
::
startRef
);
m_hl
=
Invalid
;
m_hl
=
I
DocHighlight
::
I
nvalid
;
}
HighlightHandler
::~
HighlightHandler
()
...
...
addon/doxmlparser/src/dochandler.h
View file @
d8da737a
This diff is collapsed.
Click to expand it.
addon/doxmlparser/src/doxmlintf.h
View file @
d8da737a
...
...
@@ -7,13 +7,13 @@ class IMember;
class
IDocIterator
;
class
ICompound
;
class
ISection
;
class
INode
;
class
ILinkedText
{
public
:
enum
Kind
{
Kind_Text
,
Kind_Ref
};
virtual
Kind
kind
()
const
=
0
;
virtual
~
ILinkedText
()
{}
};
class
ILT_Text
:
public
ILinkedText
...
...
@@ -52,7 +52,6 @@ class IParam
virtual
QString
attrib
()
const
=
0
;
virtual
QString
arraySpecifier
()
const
=
0
;
virtual
ILinkedTextIterator
*
defaultValue
()
const
=
0
;
virtual
~
IParam
()
{}
};
class
IParamIterator
...
...
@@ -71,7 +70,6 @@ class IMemberReference
public
:
virtual
IMember
*
member
()
const
=
0
;
virtual
QString
memberName
()
const
=
0
;
virtual
~
IMemberReference
()
{}
};
class
IMemberReferenceIterator
...
...
@@ -90,7 +88,6 @@ class IEnumValue
public
:
virtual
QString
name
()
const
=
0
;
virtual
QString
initializer
()
const
=
0
;
virtual
~
IEnumValue
()
{}
};
class
IEnumValueIterator
...
...
@@ -142,7 +139,6 @@ class IDoc
Root
// 30 -> IDocRoot
};
virtual
Kind
kind
()
const
=
0
;
virtual
~
IDoc
()
{}
};
class
IDocMarkup
:
public
IDoc
...
...
@@ -232,7 +228,8 @@ class IDocSimpleSect : public IDoc
Todo
,
Test
,
RCS
,
EnumValues
,
Examples
};
virtual
Types
sectionType
()
const
=
0
;
virtual
Types
type
()
const
=
0
;
virtual
QString
typeString
()
const
=
0
;
virtual
IDocTitle
*
title
()
const
=
0
;
virtual
IDocPara
*
description
()
const
=
0
;
};
...
...
@@ -411,7 +408,7 @@ class IChildNode
enum
NodeRelation
{
PublicInheritance
,
ProtectedInheritance
,
PrivateInheritance
,
Usage
,
TemplateInstance
};
virtual
QString
id
()
const
=
0
;
virtual
INode
*
node
()
const
=
0
;
virtual
NodeRelation
relation
()
const
=
0
;
virtual
QString
relationString
()
const
=
0
;
virtual
IEdgeLabelIterator
*
edgeLabels
()
const
=
0
;
...
...
@@ -452,7 +449,6 @@ class IGraph
{
public
:
virtual
INodeIterator
*
nodes
()
const
=
0
;
virtual
~
IGraph
()
{}
};
class
IMember
...
...
@@ -488,7 +484,6 @@ class IMember
virtual
IEnumValueIterator
*
enumValues
()
const
=
0
;
virtual
IDocRoot
*
briefDescription
()
const
=
0
;
virtual
IDocRoot
*
detailedDescription
()
const
=
0
;
virtual
~
IMember
()
{}
};
class
IMemberIterator
...
...
@@ -524,7 +519,6 @@ class ISection
virtual
bool
isPublic
()
const
=
0
;
virtual
bool
isPrivate
()
const
=
0
;
virtual
bool
isProtected
()
const
=
0
;
virtual
~
ISection
()
{}
};
class
ISectionIterator
...
...
@@ -541,19 +535,43 @@ class ISectionIterator
class
ICompound
{
public
:
/*! Represents the kind of compounds recognised by doxygen. */
enum
CompoundKind
{
Invalid
=
0
,
Class
,
Struct
,
Union
,
Interface
,
Exception
,
Namespace
,
File
,
Group
,
Page
,
Package
Namespace
,
File
,
Group
,
Page
};
/*! Returns the name of this compound */
virtual
QString
name
()
const
=
0
;
/*! Returns the id of this compound. The id is a
* unique string representing a specific compound object.
*/
virtual
QString
id
()
const
=
0
;
/*! Returns the kind of compound. See #CompoundKind for possible
* values.
*/
virtual
CompoundKind
kind
()
const
=
0
;
/*! Returns a string representation of the compound kind.
* @see kind()
*/
virtual
QString
kindString
()
const
=
0
;
/*! Returns an iterator for the different member sections in this
* compound.
*/
virtual
ISectionIterator
*
sections
()
const
=
0
;
/*! Returns a tree-structured representation of the brief
* description that is attached to this compound.
*/
virtual
IDocRoot
*
briefDescription
()
const
=
0
;
/*! Returns a tree-structured representation of the detailed
* description that is attached to this compound.
*/
virtual
IDocRoot
*
detailedDescription
()
const
=
0
;
virtual
IGraph
*
inheritanceGraph
()
const
=
0
;
virtual
IGraph
*
collaborationGraph
()
const
=
0
;
/*! Returns an interface to a member given its id.
* @param id The member id.
...
...
@@ -561,7 +579,8 @@ class ICompound
virtual
IMember
*
memberById
(
const
QString
&
id
)
const
=
0
;
/*! Returns a list of all members within the compound having a certain
* name. Overloading is the reason why there can be more than one member.
* name. Member overloading is the reason why there can be more than
* one member.
* @param name The name of the member.
*/
virtual
IMemberIterator
*
memberByName
(
const
QString
&
name
)
const
=
0
;
...
...
@@ -570,44 +589,105 @@ class ICompound
* zero, the memory for the compound will be released.
*/
virtual
void
release
()
=
0
;
};
class
ICompoundIterator
{
public
:
virtual
void
toFirst
()
=
0
;
virtual
void
toLast
()
=
0
;
virtual
void
toNext
()
=
0
;
virtual
void
toPrev
()
=
0
;
virtual
ICompound
*
current
()
const
=
0
;
virtual
void
release
()
=
0
;
};
class
IRelatedCompound
{
public
:
enum
Protection
{
Public
,
Protected
,
Private
};
enum
Kind
{
Normal
,
Virtual
};
virtual
ICompound
*
compound
()
const
=
0
;
virtual
Protection
protection
()
const
=
0
;
virtual
Kind
kind
()
const
=
0
;
};
class
IRelatedCompoundIterator
{
public
:
virtual
IRelatedCompound
*
toFirst
()
=
0
;
virtual
IRelatedCompound
*
toLast
()
=
0
;
virtual
IRelatedCompound
*
toNext
()
=
0
;
virtual
IRelatedCompound
*
toPrev
()
=
0
;
virtual
IRelatedCompound
*
current
()
const
=
0
;
virtual
void
release
()
=
0
;
};
class
IClass
:
public
ICompound
{
public
:
virtual
IGraph
*
inheritanceGraph
()
const
=
0
;
virtual
IGraph
*
collaborationGraph
()
const
=
0
;
virtual
IRelatedCompoundIterator
*
baseClasses
()
const
=
0
;
virtual
IRelatedCompoundIterator
*
derivedClasses
()
const
=
0
;
virtual
ICompoundIterator
*
nestedClasses
()
const
=
0
;
// TODO:
// class:
// IRelatedCompoundIterator *baseClasses()
// IRelatedCompoundIterator *derivedClasses()
// ICompoundIterator *innerClasses()
// ITemplateParamListIterator *templateParamLists()
// listOfAllMembers()
// IDotGraph *inheritanceGraph()
// IDotGraph *collaborationGraph()
// locationFile()
// locationLine()
// locationBodyStartLine()
// locationBodyEndLine()
};
class
IStruct
:
public
ICompound
{
};
class
IUnion
:
public
ICompound
{
};
class
IInterface
:
public
ICompound
{
};
class
IException
:
public
ICompound
{
};
class
INamespace
:
public
ICompound
{
// namespace:
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
};
class
IFile
:
public
ICompound
{
// file:
// includes()
// includedBy()
// IDotGraph *includeDependencyGraph()
// IDotGraph *includedByDependencyGraph()
// IDocProgramListing *source()
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
};
class
IGroup
:
public
ICompound
{
// group:
// Title()
// innerFile()
// innerPage()
// page:
};
class
I
CompoundIterator
class
I
Page
:
public
ICompound
{
public
:
virtual
void
toFirst
()
=
0
;
virtual
void
toLast
()
=
0
;
virtual
void
toNext
()
=
0
;
virtual
void
toPrev
()
=
0
;
virtual
ICompound
*
current
()
const
=
0
;
virtual
void
release
()
=
0
;
};
/*! Root node of the object model. */
...
...
addon/doxmlparser/src/graphhandler.cpp
View file @
d8da737a
...
...
@@ -39,19 +39,23 @@ GraphHandler::GraphHandler(IBaseHandler *parent,const char *endTag)
addEndHandler
(
endTag
,
this
,
&
GraphHandler
::
endGraph
);
addStartHandler
(
"node"
,
this
,
&
GraphHandler
::
startNode
);
m_nodes
.
setAutoDelete
(
TRUE
);
m_nodeDict
=
new
QDict
<
NodeHandler
>
(
1009
);
}
GraphHandler
::~
GraphHandler
()
{
delete
m_nodeDict
;
}
void
GraphHandler
::
startGraph
(
const
QXmlAttributes
&
)
{
debug
(
2
,
"startGraph
\n
"
);
m_parent
->
setDelegate
(
this
);
}
void
GraphHandler
::
endGraph
()
{
debug
(
2
,
"endGraph
\n
"
);
m_parent
->
setDelegate
(
0
);
}
...
...
@@ -60,6 +64,7 @@ void GraphHandler::startNode(const QXmlAttributes &attrib)
NodeHandler
*
n
=
new
NodeHandler
(
this
);
n
->
startNode
(
attrib
);
m_nodes
.
append
(
n
);
m_nodeDict
->
insert
(
attrib
.
value
(
"id"
),
n
);
}
INodeIterator
*
GraphHandler
::
nodes
()
const
...
...
@@ -67,10 +72,15 @@ INodeIterator *GraphHandler::nodes() const
return
new
NodeIterator
(
*
this
);
}
NodeHandler
*
GraphHandler
::
getNodeById
(
const
QString
&
id
)
const
{
return
m_nodeDict
->
find
(
id
);
}
//------------------------------------------------------------------------
NodeHandler
::
NodeHandler
(
IBaseHandler
*
parent
)
:
m_parent
(
parent
)
NodeHandler
::
NodeHandler
(
GraphHandler
*
gh
)
:
m_parent
(
gh
),
m_graph
(
gh
)
{
addEndHandler
(
"node"
,
this
,
&
NodeHandler
::
endNode
);
addStartHandler
(
"link"
,
this
,
&
NodeHandler
::
startLink
);
...
...
@@ -87,12 +97,14 @@ NodeHandler::~NodeHandler()
void
NodeHandler
::
startNode
(
const
QXmlAttributes
&
attrib
)
{
debug
(
2
,
"startNode
\n
"
);
m_parent
->
setDelegate
(
this
);
m_id
=
attrib
.
value
(
"id"
);
}
void
NodeHandler
::
endNode
()
{
debug
(
2
,
"endNode
\n
"
);
m_parent
->
setDelegate
(
0
);
}
...
...
@@ -117,7 +129,7 @@ void NodeHandler::endLabel()
void
NodeHandler
::
startChildNode
(
const
QXmlAttributes
&
attrib
)
{
ChildNodeHandler
*
cnh
=
new
ChildNodeHandler
(
this
);
ChildNodeHandler
*
cnh
=
new
ChildNodeHandler
(
this
,
m_graph
);
cnh
->
startChildNode
(
attrib
);
m_children
.
append
(
cnh
);
}
...
...
@@ -129,9 +141,10 @@ IChildNodeIterator *NodeHandler::children() const
//------------------------------------------------------------------------
ChildNodeHandler
::
ChildNodeHandler
(
IBaseHandler
*
parent
)
:
m_parent
(
parent
)
ChildNodeHandler
::
ChildNodeHandler
(
IBaseHandler
*
parent
,
GraphHandler
*
gh
)
:
m_parent
(
parent
)
,
m_graph
(
gh
)
{
addEndHandler
(
"childnode"
,
this
,
&
ChildNodeHandler
::
endChildNode
);
addStartHandler
(
"edgelabel"
,
this
,
&
ChildNodeHandler
::
startEdgeLabel
);
m_edgeLabels
.
setAutoDelete
(
TRUE
);
}
...
...
@@ -142,6 +155,7 @@ ChildNodeHandler::~ChildNodeHandler()
void
ChildNodeHandler
::
startChildNode
(
const
QXmlAttributes
&
attrib
)
{
debug
(
2
,
"startChildNode
\n
"
);
m_id
=
attrib
.
value
(
"id"
);
m_relationString
=
attrib
.
value
(
"relation"
);
m_relation
=
s_edgeRelationMapper
->
stringToNodeRelation
(
m_relationString
);
...
...
@@ -150,6 +164,7 @@ void ChildNodeHandler::startChildNode(const QXmlAttributes &attrib)
void
ChildNodeHandler
::
endChildNode
()
{
debug
(
2
,
"endChildNode
\n
"
);
m_parent
->
setDelegate
(
0
);
}
...
...
@@ -166,12 +181,17 @@ IEdgeLabelIterator *ChildNodeHandler::edgeLabels() const
return
new
EdgeLabelIterator
(
*
this
);
}
INode
*
ChildNodeHandler
::
node
()
const
{
return
m_graph
->
getNodeById
(
m_id
);
}
//-----------------------------------------------------------------------
EdgeLabelHandler
::
EdgeLabelHandler
(
IBaseHandler
*
parent
)
:
m_parent
(
parent
)
{
addEndHandler
(
"edgelabel"
,
this
,
&
EdgeLabelHandler
::
endEdgeLabel
);
}
EdgeLabelHandler
::~
EdgeLabelHandler
()
...
...
addon/doxmlparser/src/graphhandler.h
View file @
d8da737a
...
...
@@ -34,6 +34,7 @@ class GraphHandler : public IGraph, public BaseHandler<GraphHandler>
void
startGraph
(
const
QXmlAttributes
&
attrib
);
void
endGraph
();
void
startNode
(
const
QXmlAttributes
&
attrib
);
NodeHandler
*
getNodeById
(
const
QString
&
id
)
const
;
// IGraph
virtual
INodeIterator
*
nodes
()
const
;
...
...
@@ -41,6 +42,7 @@ class GraphHandler : public IGraph, public BaseHandler<GraphHandler>
private
:
IBaseHandler
*
m_parent
;
QList
<
NodeHandler
>
m_nodes
;
QDict
<
NodeHandler
>
*
m_nodeDict
;
};
//----------------------------------------------------------------------
...
...
@@ -49,7 +51,7 @@ class NodeHandler : public INode, public BaseHandler<NodeHandler>
{
friend
class
ChildNodeIterator
;
public
:
NodeHandler
(
IBaseHandler
*
parent
);
NodeHandler
(
GraphHandler
*
gh
);
virtual
~
NodeHandler
();
void
startNode
(
const
QXmlAttributes
&
attrib
);
...
...
@@ -72,6 +74,7 @@ class NodeHandler : public INode, public BaseHandler<NodeHandler>
QString
m_label
;
QString
m_link
;
QList
<
ChildNodeHandler
>
m_children
;
GraphHandler
*
m_graph
;
};
class
NodeIterator
:
public
BaseIterator
<
INodeIterator
,
INode
,
NodeHandler
>
...
...
@@ -87,7 +90,7 @@ class ChildNodeHandler : public IChildNode, public BaseHandler<ChildNodeHandler>
{
friend
class
EdgeLabelIterator
;
public
:
ChildNodeHandler
(
IBaseHandler
*
parent
);
ChildNodeHandler
(
IBaseHandler
*
parent
,
GraphHandler
*
gh
);
virtual
~
ChildNodeHandler
();
void
startChildNode
(
const
QXmlAttributes
&
attrib
);
...
...
@@ -95,17 +98,18 @@ class ChildNodeHandler : public IChildNode, public BaseHandler<ChildNodeHandler>
void
startEdgeLabel
(
const
QXmlAttributes
&
attrib
);
// IChildNode
virtual
QString
id
()
const
{
return
m_id
;
}
virtual
INode
*
node
()
const
;
virtual
NodeRelation
relation
()
const
{
return
m_relation
;
}
virtual
QString
relationString
()
const
{
return
m_relationString
;
}
virtual
IEdgeLabelIterator
*
edgeLabels
()
const
;
private
:
IBaseHandler
*
m_parent
;
QString
m_id
;
NodeRelation
m_relation
;
QString
m_relationString
;
IBaseHandler
*
m_parent
;
QString
m_id
;
NodeRelation
m_relation
;
QString
m_relationString
;
QList
<
EdgeLabelHandler
>
m_edgeLabels
;
GraphHandler
*
m_graph
;
};
class
ChildNodeIterator
:
public
BaseIterator
<
IChildNodeIterator
,
IChildNode
,
ChildNodeHandler
>
...
...
addon/doxmlparser/src/linkedtexthandler.cpp
View file @
d8da737a
...
...
@@ -16,7 +16,7 @@
#include "debug.h"
#include <doxmlintf.h>
class
LT_Text
:
public
ILT_Text
class
LT_Text
:
public
LinkedTextImpl
,
public
ILT_Text
{
public
:
LT_Text
(
const
QString
&
text
)
:
m_text
(
text
)
{}
...
...
@@ -24,12 +24,12 @@ class LT_Text : public ILT_Text
// ILT_Text
virtual
QString
text
()
const
{
return
m_text
;
}
virtual
Kind
kind
()
const
{
return
Kind_Text
;
}
virtual
Kind
kind
()
const
{
return
LinkedTextImpl
::
Kind_Text
;
}
private
:
QString
m_text
;
};
class
LT_Ref
:
public
ILT_Ref
class
LT_Ref
:
public
LinkedTextImpl
,
public
ILT_Ref
{
public
:
LT_Ref
()
{}
...
...
@@ -44,7 +44,7 @@ class LT_Ref : public ILT_Ref
virtual
QString
id
()
const
{
return
m_refId
;
}
virtual
TargetKind
targetKind
()
const
{
return
m_targetKind
;
}
virtual
QString
external
()
const
{
return
m_extId
;
}
virtual
Kind
kind
()
const
{
return
Kind_Ref
;
}
virtual
Kind
kind
()
const
{
return
LinkedTextImpl
::
Kind_Ref
;
}
private
:
QString
m_refId
;
...
...
@@ -54,7 +54,7 @@ class LT_Ref : public ILT_Ref
};
LinkedTextHandler
::
LinkedTextHandler
(
IBaseHandler
*
parent
,
QList
<
ILinkedText
>
&
children
QList
<
LinkedTextImpl
>
&
children
)
:
m_parent
(
parent
),
m_children
(
children
)
{
...
...
@@ -110,11 +110,11 @@ void LinkedTextHandler::endRef()
m_ref
=
0
;
}
QString
LinkedTextHandler
::
toString
(
const
QList
<
ILinkedText
>
&
list
)
QString
LinkedTextHandler
::
toString
(
const
QList
<
LinkedTextImpl
>
&
list
)
{
QListIterator
<
ILinkedText
>
li
(
list
);
QListIterator
<
LinkedTextImpl
>
li
(
list
);
QString
result
;
ILinkedText
*
lt
;
LinkedTextImpl
*
lt
;
for
(
li
.
toFirst
();(
lt
=
li
.
current
());
++
li
)
{
switch
(
lt
->
kind
())
...
...
addon/doxmlparser/src/linkedtexthandler.h
View file @
d8da737a
...
...
@@ -19,29 +19,36 @@
#include "basehandler.h"
class
LT_Ref
;
class
LinkedTextIterator
:
public
BaseIterator
<
ILinkedTextIterator
,
ILinkedText
,
ILinkedText
>
class
LinkedTextImpl
:
public
ILinkedText
{
public
:
LinkedTextIterator
(
const
QList
<
ILinkedText
>
&
list
)
:
BaseIterator
<
ILinkedTextIterator
,
ILinkedText
,
ILinkedText
>
(
list
)
{}
virtual
~
LinkedTextImpl
()
{}
};
class
LinkedTextHandler
:
public
BaseHandler
<
LinkedTextHandler
>
{
public
:
LinkedTextHandler
(
IBaseHandler
*
parent
,
QList
<
ILinkedText
>
&
children
);
LinkedTextHandler
(
IBaseHandler
*
parent
,
QList
<
LinkedTextImpl
>
&
children
);
virtual
~
LinkedTextHandler
();
virtual
void
start
(
const
char
*
endTag
);
virtual
void
end
();
virtual
void
startRef
(
const
QXmlAttributes
&
attrib
);
virtual
void
endRef
();
static
QString
toString
(
const
QList
<
ILinkedText
>
&
list
);
static
QString
toString
(
const
QList
<
LinkedTextImpl
>
&
list
);
// ILinkedText
private
:
IBaseHandler
*
m_parent
;
QList
<
ILinkedText
>
&
m_children
;
QList
<
LinkedTextImpl
>
&
m_children
;
LT_Ref
*
m_ref
;
};
class
LinkedTextIterator
:
public
BaseIterator
<
ILinkedTextIterator
,
ILinkedText
,
LinkedTextImpl
>
{
public
:
LinkedTextIterator
(
const
QList
<
LinkedTextImpl
>
&
list
)
:
BaseIterator
<
ILinkedTextIterator
,
ILinkedText
,
LinkedTextImpl
>
(
list
)
{}
};
#endif
addon/doxmlparser/src/mainhandler.cpp
View file @
d8da737a
...
...
@@ -201,7 +201,7 @@ ICompound *MainHandler::compoundById(const QString &id) const
if
(
ch
)
// compound already in memory
{
ch
->
addref
();
// returning alias -> increase reference counter
return
ch
;
return
ch
->
toICompound
();
}
CompoundEntry
*
ce
=
m_compoundDict
.
find
(
id
);
if
(
ce
==
0
)
return
0
;
// id not found
...
...
@@ -219,7 +219,7 @@ ICompound *MainHandler::compoundById(const QString &id) const
MainHandler
*
that
=
(
MainHandler
*
)
this
;
ch
->
initialize
(
that
);
that
->
m_compoundsLoaded
.
insert
(
id
,
ch
);
return
ch
;
return
ch
->
toICompound
()
;
}
void
MainHandler
::
unloadCompound
(
CompoundHandler
*
ch
)
...
...
addon/doxmlparser/src/memberhandler.cpp
View file @
d8da737a
...
...
@@ -360,7 +360,7 @@ void MemberHandler::setCompoundHandler(CompoundHandler *c)
ICompound
*
MemberHandler
::
compound
()
const
{
m_compound
->
addref
();
return
m_compound
;
return
m_compound
->
toICompound
()
;
}
void
MemberHandler
::
setSectionHandler
(
SectionHandler
*
c
)
...
...
addon/doxmlparser/src/memberhandler.h
View file @
d8da737a
...
...
@@ -175,13 +175,13 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
QString
m_id
;
QString
m_protection
;
QString
m_virtualness
;
QList
<
ILinkedText
>
m_type
;
QList
<
ILinkedText
>
m_initializer
;
QList
<
ILinkedText
>
m_exception
;
QList
<
LinkedTextImpl
>
m_type
;
QList
<
LinkedTextImpl
>
m_initializer
;
QList
<
LinkedTextImpl
>
m_exception
;
QString
m_name
;
DocHandler
*
m_brief
;
DocHandler
*
m_detailed
;
QList
<
IParam
>
m_params
;
QList
<
ParamHandler
>
m_params
;
QList
<
MemberReference
>
m_references
;
QList
<
MemberReference
>
m_referencedBy
;
MemberReference
*
m_reimplements
;
...
...
addon/doxmlparser/src/paramhandler.h
View file @
d8da737a
...
...
@@ -25,13 +25,6 @@
#include "baseiterator.h"
#include "linkedtexthandler.h"
class
ParamIterator
:
public
BaseIterator
<
IParamIterator
,
IParam
,
IParam
>
{
public
:
ParamIterator
(
const
QList
<
IParam
>
&
list
)
:
BaseIterator
<
IParamIterator
,
IParam
,
IParam
>
(
list
)
{}
};
class
ParamHandler
:
public
IParam
,
public
BaseHandler
<
ParamHandler
>
{
public
:
...
...
@@ -59,13 +52,21 @@ class ParamHandler : public IParam, public BaseHandler<ParamHandler>
private
:
IBaseHandler
*
m_parent
;
QList
<
ILinkedText
>
m_type
;
QList
<
LinkedTextImpl
>
m_type
;
QString
m_declName
;
QString
m_defName
;
QString
m_attrib
;
QString
m_array
;
QList
<
ILinkedText
>
m_defVal
;
QList
<
LinkedTextImpl
>
m_defVal
;
LinkedTextHandler
*
m_linkedTextHandler
;
};
class
ParamIterator
:
public
BaseIterator
<
IParamIterator
,
IParam
,
ParamHandler
>
{
public
:
ParamIterator
(
const
QList
<
ParamHandler
>
&
list
)
:
BaseIterator
<
IParamIterator
,
IParam
,
ParamHandler
>
(
list
)
{}
};
#endif
addon/doxmlparser/src/sectionhandler.h
View file @
d8da737a
...
...
@@ -26,13 +26,12 @@
class
MainHandler
;
class
SectionIterator
:
public
BaseIterator
<
ISectionIterator
,
ISection
,
ISection
>
public
BaseIterator
<
ISectionIterator
,
ISection
,
SectionHandler
>
{
public
:
SectionIterator
(
const
QList
<
ISection
>
&
list
)
:
BaseIterator
<
ISectionIterator
,
ISection
,
ISection
>
(
list
)
{}
SectionIterator
(
const
QList
<
SectionHandler
>
&
list
)
:
BaseIterator
<
ISectionIterator
,
ISection
,
SectionHandler
>
(
list
)
{}
};
...
...
addon/doxmlparser/test/main.cpp
View file @
d8da737a
...
...
@@ -140,6 +140,10 @@ void DumpDoc(IDoc *doc)
{
IDocSimpleSect
*
ss
=
dynamic_cast
<
IDocSimpleSect
*>
(
doc
);
ASSERT
(
ss
!=
0
);
printf
(
" --- simplesect type=%s ---
\n
"
,
ss
->
typeString
().
data
());
DumpDoc
(
ss
->
title
());
DumpDoc
(
ss
->
description
());
printf
(
" --- end simplesect ---
\n
"
);
}
break
;
case
IDoc
:
:
Title
:
...
...
@@ -158,8 +162,12 @@ void DumpDoc(IDoc *doc)
break
;
case
IDoc
:
:
Ref
:
{
IDocRef
*
ref
=
dynamic_cast
<
IDocRef
*>
(
ref
);
IDocRef
*
ref
=
dynamic_cast
<
IDocRef
*>
(
doc
);
ASSERT
(
ref
!=
0
);
printf
(
" ref=%p
\n
"
,
ref
);
printf
(
" --- ref id=%s text=%s ---
\n
"
,
ref
->
refId
().
data
(),
ref
->
text
().
data
());
printf
(
" --- end ref ---
\n
"
);
}
break
;
case
IDoc
:
:
VariableList
:
...
...
@@ -312,6 +320,43 @@ void DumpDoc(IDoc *doc)
}
}
void
DumpGraph
(
IGraph
*
graph
)
{
if
(
graph
==
0
)
{
printf
(
" --- no graph ---
\n
"
);
return
;
}
printf
(
" --- graph ----
\n
"
);
INodeIterator
*
ni
=
graph
->
nodes
();
INode
*
node
;
for
(
ni
->
toFirst
();(
node
=
ni
->
current
());
ni
->
toNext
())
{
printf
(
" --- node id=%s label=%s linkId=%s
\n
"
,
node
->
id
().
data
(),
node
->
label
().
data
(),
node
->
linkId
().
data
()
);
IChildNodeIterator
*
cni
=
node
->
children
();
IChildNode
*
cn
;
for
(
cni
->
toFirst
();(
cn
=
cni
->
current
());
cni
->
toNext
())
{
printf
(
" + child id=%s label=%s relation=%s
\n
"
,
cn
->
node
()
->
id
().
data
(),
cn
->
node
()
->
label
().
data
(),
cn
->
relationString
().
data
()
);
IEdgeLabelIterator
*
eli
=
cn
->
edgeLabels
();
IEdgeLabel
*
el
;
for
(
eli
->
toFirst
();(
el
=
eli
->
current
());
eli
->
toNext
())
{
printf
(
" edgeLabel=%s
\n
"
,
el
->
label
().
data
());
}
eli
->
release
();
}
cni
->
release
();
}
ni
->
release
();
printf
(
" --- end graph ----
\n
"
);
}
int
main
(
int
argc
,
char
**
argv
)
{
if
(
argc
!=
2
)
...
...
@@ -322,6 +367,8 @@ int main(int argc,char **argv)
IDoxygen
*
dox
=
createObjectModel
();
dox
->
setDebugLevel
(
0
);
if
(
!
dox
->
readXMLDir
(
argv
[
1
]))
{
printf
(
"Error reading %s/index.xml
\n
"
,
argv
[
1
]);
...
...
@@ -422,6 +469,41 @@ int main(int argc,char **argv)
printf
(
"===== detailed description ====
\n
"
);
DumpDoc
(
doc
);
}
if
(
comp
->
kind
()
==
ICompound
::
Class
)
{
IClass
*
cls
=
dynamic_cast
<
IClass
*>
(
comp
);
ASSERT
(
cls
!=
0
);
printf
(
"==== inheritance graph ====
\n
"
);
DumpGraph
(
cls
->
inheritanceGraph
());
printf
(
"==== collabration graph ====
\n
"
);
DumpGraph
(
cls
->
collaborationGraph
());
printf
(
"==== base classes ====
\n
"
);
IRelatedCompoundIterator
*
bcli
=
cls
->
baseClasses
();
IRelatedCompound
*
bClass
;
for
(
bcli
->
toFirst
();(
bClass
=
bcli
->
current
());
bcli
->
toNext
())
{
ICompound
*
bc
=
bClass
->
compound
();
printf
(
" + class %s
\n
"
,
bc
->
name
().
data
());
bc
->
release
();
}
bcli
->
release
();
printf
(
"==== derived classes ====
\n
"
);
IRelatedCompoundIterator
*
dcli
=
cls
->
derivedClasses
();
IRelatedCompound
*
dClass
;
for
(
dcli
->
toFirst
();(
dClass
=
dcli
->
current
());
dcli
->
toNext
())
{
ICompound
*
dc
=
dClass
->
compound
();
printf
(
" + class %s
\n
"
,
dc
->
name
().
data
());
dc
->
release
();
}
dcli
->
release
();
}
comp
->
release
();
}
cli
->
release
();
...
...
examples/enum.h
View file @
d8da737a
...
...
@@ -2,6 +2,13 @@ class Test
{
public
:
enum
TEnum
{
Val1
,
Val2
};
/*! Another enum, with inline docs */
enum
AnotherEnum
{
V1
,
/*!< value 1 */
V2
/*!< value 2 */
};
};
/*! \class Test
...
...
make.bat
View file @
d8da737a
...
...
@@ -30,6 +30,8 @@ type makeconfig > doc\Makefile
type doc\Makefile.win_%MAKE%.in >>doc\Makefile
type makeconfig > addon\doxywizard\Makefile
type addon\doxywizard\Makefile.win_%MAKE%.in >>addon\doxywizard\Makefile
type makeconfig > addon\doxmlparser\src\Makefile
type addon\doxmlparser\src\Makefile.in >>addon\doxmlparser\src\Makefile
REM build in release or debug mode
REM sed is used to replace $extraopts by either debug or release while copying
...
...
packages/rpm/doxygen.spec
View file @
d8da737a
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.2.1
4_20020324
Version: 1.2.1
5
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
...
...
src/code.l
View file @
d8da737a
...
...
@@ -606,6 +606,7 @@ static void addDocCrossReference(MemberDef *src,MemberDef *dst)
{
src->addSourceReferences(dst);
}
}
static void generateClassOrGlobalLink(OutputDocInterface &ol,char *clName,int *clNameLen=0)
...
...
@@ -752,6 +753,22 @@ static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const c
// xmd->typeString(),xmd->argsString(),
// xmd->getClassDef()->name().data());
if (g_exampleBlock)
{
QCString anchor;
anchor.sprintf("a%d",g_anchorCount);
//printf("addExampleFile(%s,%s,%s)\n",anchor.data(),g_exampleName.data(),
// g_exampleFile.data());
if (xmd->addExample(anchor,g_exampleName,g_exampleFile))
{
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.writeAnchor(0,anchor);
ol.popGeneratorState();
g_anchorCount++;
}
}
g_theCallContext.setClass(stripClassName(xmd->typeString()));
Definition *xd = xmd->getOuterScope()==Doxygen::globalScope ?
...
...
@@ -771,6 +788,7 @@ static bool generateClassMemberLink(OutputDocInterface &ol,ClassDef *mcd,const c
xd->getOutputFileBase(),xmd->getBodyAnchor(),memName);
return TRUE;
}
}
}
...
...
@@ -1081,7 +1099,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_type.resize(0);
g_name.resize(0);
}
<Body
>"}"
{
<Body
,MemberCall,MemberCall2>"}"
{
g_theVarContext.popScope();
if (g_scopeStack.pop()==SCOPEBLOCK)
...
...
@@ -1099,6 +1117,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_currentMemberDef=0;
g_currentDefinition=0;
}
BEGIN(Body);
}
<ClassName,ClassVar>";" {
g_code->codify(yytext);
...
...
@@ -1629,7 +1648,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
generateClassOrGlobalLink(*g_code,yytext);
BEGIN( MemberCall2 );
}
<FuncCall,MemberCall2>("("{B}*("*"{B}*)
*
[a-z_A-Z][a-z_A-Z0-9]*{B}*")"{B}*)/("."|"->") {
<FuncCall,MemberCall2>("("{B}*("*"{B}*)
+
[a-z_A-Z][a-z_A-Z0-9]*{B}*")"{B}*)/("."|"->") {
g_code->codify(yytext);
int s=0;while (!isId(yytext[s])) s++;
int e=yyleng-1;while (!isId(yytext[e])) e--;
...
...
src/doxygen.cpp
View file @
d8da737a
...
...
@@ -3077,7 +3077,8 @@ static void computeClassRelations()
{
findBaseClassesForClass
(
root
,
cd
,
cd
,
DocumentedOnly
,
FALSE
);
}
if
((
cd
==
0
||
!
cd
->
hasDocumentation
())
&&
bName
.
right
(
2
)
!=
"::"
)
if
((
cd
==
0
||
(
!
cd
->
hasDocumentation
()
&&
!
cd
->
isReference
()))
&&
bName
.
right
(
2
)
!=
"::"
)
{
if
(
!
root
->
name
.
isEmpty
()
&&
root
->
name
[
0
]
!=
'@'
)
warn_undoc
(
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment