Commit b5cbb79d authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.2.9-20010812

parent 490b7178
DOXYGEN Version 1.2.9.1 DOXYGEN Version 1.2.9-20010812
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (05 August 2001) Dimitri van Heesch (12 August 2001)
DOXYGEN Version 1.2.9.1 DOXYGEN Version 1.2.9_20010812
Please read INSTALL for compilation instructions. Please read INSTALL for compilation instructions.
...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives. ...@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy, Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (05 August 2001) Dimitri van Heesch (dimitri@stack.nl) (12 August 2001)
1.2.9.1 1.2.9-20010812
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
# General configuration options # General configuration options
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
PROJECT_NAME = dox2html PROJECT_NAME = xmlparse
PROJECT_NUMBER = PROJECT_NUMBER =
OUTPUT_DIRECTORY = doc OUTPUT_DIRECTORY = doc
OUTPUT_LANGUAGE = English OUTPUT_LANGUAGE = English
...@@ -145,8 +145,8 @@ INCLUDE_GRAPH = YES ...@@ -145,8 +145,8 @@ INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES GRAPHICAL_HIERARCHY = YES
DOT_PATH = DOT_PATH =
MAX_DOT_GRAPH_WIDTH = 3024 MAX_DOT_GRAPH_WIDTH = 1280
MAX_DOT_GRAPH_HEIGHT = 3024 MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES GENERATE_LEGEND = YES
DOT_CLEANUP = YES DOT_CLEANUP = YES
#--------------------------------------------------------------------------- #---------------------------------------------------------------------------
......
...@@ -115,7 +115,7 @@ template<class T> class BaseHandler : public IBaseHandler, ...@@ -115,7 +115,7 @@ template<class T> class BaseHandler : public IBaseHandler,
virtual ~BaseHandler() virtual ~BaseHandler()
{ {
delete m_fallBackHandler; ASSERT(m_delegateHandler==0);
} }
virtual bool startDocument() virtual bool startDocument()
......
...@@ -21,6 +21,8 @@ CompoundHandler::CompoundHandler(IBaseHandler *parent) ...@@ -21,6 +21,8 @@ CompoundHandler::CompoundHandler(IBaseHandler *parent)
: m_parent(parent), m_brief(0), m_detailed(0) : m_parent(parent), m_brief(0), m_detailed(0)
{ {
m_superClasses.setAutoDelete(TRUE); m_superClasses.setAutoDelete(TRUE);
m_subClasses.setAutoDelete(TRUE);
m_sections.setAutoDelete(TRUE);
addEndHandler("compounddef",this,&CompoundHandler::endCompound); addEndHandler("compounddef",this,&CompoundHandler::endCompound);
...@@ -42,6 +44,8 @@ CompoundHandler::CompoundHandler(IBaseHandler *parent) ...@@ -42,6 +44,8 @@ CompoundHandler::CompoundHandler(IBaseHandler *parent)
CompoundHandler::~CompoundHandler() CompoundHandler::~CompoundHandler()
{ {
delete m_brief;
delete m_detailed;
} }
void CompoundHandler::startSection(const QXmlAttributes& attrib) void CompoundHandler::startSection(const QXmlAttributes& attrib)
......
...@@ -163,6 +163,8 @@ void MarkupHandler::endSuperscript() ...@@ -163,6 +163,8 @@ void MarkupHandler::endSuperscript()
ListItemHandler::ListItemHandler(IBaseHandler *parent) ListItemHandler::ListItemHandler(IBaseHandler *parent)
: DocNode(ListItem), m_parent(parent) : DocNode(ListItem), m_parent(parent)
{ {
m_children.setAutoDelete(TRUE);
addEndHandler("listitem",this,&ListItemHandler::endListItem); addEndHandler("listitem",this,&ListItemHandler::endListItem);
addStartHandler("para",this,&ListItemHandler::startParagraph); addStartHandler("para",this,&ListItemHandler::startParagraph);
...@@ -236,6 +238,48 @@ void ListHandler::startListItem(const QXmlAttributes& attrib) ...@@ -236,6 +238,48 @@ void ListHandler::startListItem(const QXmlAttributes& attrib)
// ParameterHandler // ParameterHandler
//---------------------------------------------------------------------- //----------------------------------------------------------------------
ParameterHandler::ParameterHandler(IBaseHandler *parent) : DocNode(Parameter),
m_parent(parent), m_description(0)
{
addEndHandler("parametername",this,&ParameterHandler::endParameterName);
addEndHandler("parameterdescription",this,&ParameterHandler::endParameterDescription);
addStartHandler("para",this,&ParameterHandler::startParagraph);
}
ParameterHandler::~ParameterHandler()
{
delete m_description;
}
void ParameterHandler::startParameterName(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
}
void ParameterHandler::endParameterName()
{
m_name = m_curString;
printf("parameter %s\n",m_name.data());
m_curString="";
m_parent->setDelegate(0);
}
void ParameterHandler::startParameterDescription(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
}
void ParameterHandler::endParameterDescription()
{
m_parent->setDelegate(0);
}
void ParameterHandler::startParagraph(const QXmlAttributes& attrib)
{
ASSERT(m_description==0);
m_description = new ParagraphHandler(this);
m_description->startParagraph(attrib);
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// ParameterListHandler // ParameterListHandler
...@@ -245,6 +289,10 @@ ParameterListHandler::ParameterListHandler(IBaseHandler *parent) ...@@ -245,6 +289,10 @@ ParameterListHandler::ParameterListHandler(IBaseHandler *parent)
: DocNode(ParameterList), m_parent(parent) : DocNode(ParameterList), m_parent(parent)
{ {
addEndHandler("parameterlist",this,&ParameterListHandler::endParameterList); addEndHandler("parameterlist",this,&ParameterListHandler::endParameterList);
addStartHandler("parametername",this,&ParameterListHandler::startParameterName);
addStartHandler("parameterdescription",this,&ParameterListHandler::startParameterDescription);
addStartHandler("title");
addEndHandler("title");
m_parameters.setAutoDelete(TRUE); m_parameters.setAutoDelete(TRUE);
m_curParam=0; m_curParam=0;
} }
...@@ -253,8 +301,17 @@ ParameterListHandler::~ParameterListHandler() ...@@ -253,8 +301,17 @@ ParameterListHandler::~ParameterListHandler()
{ {
} }
void ParameterListHandler::startParameterList(const QXmlAttributes& /*attrib*/) void ParameterListHandler::startParameterList(const QXmlAttributes& attrib)
{ {
QString kind = attrib.value("kind");
if (kind=="retval") m_type=RetVal;
else if (kind=="exception") m_type=Exception;
else if (kind=="param") m_type=Param;
else
{
printf("Error: invalid parameterlist type: %s\n",kind.data());
}
printf("parameterlist kind=%s\n",kind.data());
m_parent->setDelegate(this); m_parent->setDelegate(this);
} }
...@@ -263,6 +320,19 @@ void ParameterListHandler::endParameterList() ...@@ -263,6 +320,19 @@ void ParameterListHandler::endParameterList()
m_parent->setDelegate(0); m_parent->setDelegate(0);
} }
void ParameterListHandler::startParameterName(const QXmlAttributes& attrib)
{
m_curParam = new ParameterHandler(this);
m_parameters.append(m_curParam);
m_curParam->startParameterName(attrib);
}
void ParameterListHandler::startParameterDescription(const QXmlAttributes& attrib)
{
ASSERT(m_curParam!=0);
m_curParam->startParameterDescription(attrib);
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// ParagraphHandler // ParagraphHandler
//---------------------------------------------------------------------- //----------------------------------------------------------------------
...@@ -279,10 +349,12 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent) ...@@ -279,10 +349,12 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("itemizedlist",this,&ParagraphHandler::startItemizedList); addStartHandler("itemizedlist",this,&ParagraphHandler::startItemizedList);
addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList); addStartHandler("orderedlist",this,&ParagraphHandler::startOrderedList);
addStartHandler("parameterlist",this,&ParagraphHandler::startParameterList);
} }
ParagraphHandler::~ParagraphHandler() ParagraphHandler::~ParagraphHandler()
{ {
delete m_markupHandler;
} }
void ParagraphHandler::startParagraph(const QXmlAttributes& /*attrib*/) void ParagraphHandler::startParagraph(const QXmlAttributes& /*attrib*/)
...@@ -339,6 +411,8 @@ void ParagraphHandler::addTextNode() ...@@ -339,6 +411,8 @@ void ParagraphHandler::addTextNode()
DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent) DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent)
{ {
m_children.setAutoDelete(TRUE);
addEndHandler("briefdescription",this,&DocHandler::endDoc); addEndHandler("briefdescription",this,&DocHandler::endDoc);
addEndHandler("detaileddescription",this,&DocHandler::endDoc); addEndHandler("detaileddescription",this,&DocHandler::endDoc);
......
...@@ -51,7 +51,8 @@ class DocNode ...@@ -51,7 +51,8 @@ class DocNode
ItemizedList, ItemizedList,
OrderedList, OrderedList,
ListItem, ListItem,
ParameterList ParameterList,
Parameter
}; };
DocNode(NodeKind k) : m_kind(k) {} DocNode(NodeKind k) : m_kind(k) {}
virtual ~DocNode() {} virtual ~DocNode() {}
...@@ -182,8 +183,11 @@ class ParameterHandler : public DocNode, ...@@ -182,8 +183,11 @@ class ParameterHandler : public DocNode,
public: public:
ParameterHandler(IBaseHandler *parent); ParameterHandler(IBaseHandler *parent);
virtual ~ParameterHandler(); virtual ~ParameterHandler();
virtual void startParameterList(const QXmlAttributes& attrib); virtual void startParameterName(const QXmlAttributes& attrib);
virtual void endParameterList(); virtual void endParameterName();
virtual void startParameterDescription(const QXmlAttributes& attrib);
virtual void endParameterDescription();
virtual void startParagraph(const QXmlAttributes& attrib);
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
...@@ -201,15 +205,45 @@ class ParameterListHandler : public DocNode, ...@@ -201,15 +205,45 @@ class ParameterListHandler : public DocNode,
public BaseHandler<ParameterListHandler> public BaseHandler<ParameterListHandler>
{ {
public: public:
enum Types { Param, RetVal, Exception };
ParameterListHandler(IBaseHandler *parent); ParameterListHandler(IBaseHandler *parent);
virtual ~ParameterListHandler(); virtual ~ParameterListHandler();
virtual void startParameterList(const QXmlAttributes& attrib); virtual void startParameterList(const QXmlAttributes& attrib);
virtual void endParameterList(); virtual void endParameterList();
virtual void startParameterName(const QXmlAttributes& attrib);
virtual void startParameterDescription(const QXmlAttributes& attrib);
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QList<ParameterHandler> m_parameters; QList<ParameterHandler> m_parameters;
ParameterHandler *m_curParam; ParameterHandler *m_curParam;
Types m_type;
};
//-----------------------------------------------------------------------------
/* \brief Node representing a simple section with an unnumbered header.
*
*/
class SimpleSectHandler : public DocNode,
public BaseHandler<SimpleSectHandler>
{
public:
enum Types { See, Return, Author, Version,
Since, Date, Bug, Note,
Warning, Par, Deprecated, Pre,
Post, Invar, Remark, Attention
};
SimpleSectHandler(IBaseHandler *parent);
virtual ~SimpleSectHandler();
virtual void startSimpleSect(const QXmlAttributes& attrib);
virtual void endSimpleSect();
private:
IBaseHandler *m_parent;
ParameterHandler *m_curParam;
Types m_type;
QString m_title;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -252,7 +286,7 @@ class DocHandler : public BaseHandler<DocHandler> ...@@ -252,7 +286,7 @@ class DocHandler : public BaseHandler<DocHandler>
virtual ~DocHandler(); virtual ~DocHandler();
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QList<DocNode> m_children; QList<ParagraphHandler> m_children;
}; };
#endif #endif
...@@ -55,6 +55,8 @@ int main(int argc,char **argv) ...@@ -55,6 +55,8 @@ int main(int argc,char **argv)
exit(1); exit(1);
} }
//for (;;)
//{
QFile xmlFile(argv[1]); QFile xmlFile(argv[1]);
MainHandler handler; MainHandler handler;
ErrorHandler errorHandler; ErrorHandler errorHandler;
...@@ -63,6 +65,7 @@ int main(int argc,char **argv) ...@@ -63,6 +65,7 @@ int main(int argc,char **argv)
reader.setContentHandler( &handler ); reader.setContentHandler( &handler );
reader.setErrorHandler( &errorHandler ); reader.setErrorHandler( &errorHandler );
reader.parse( source ); reader.parse( source );
//}
return 0; return 0;
} }
......
...@@ -34,10 +34,14 @@ MemberHandler::MemberHandler(IBaseHandler *parent) ...@@ -34,10 +34,14 @@ MemberHandler::MemberHandler(IBaseHandler *parent)
addStartHandler("detaileddescription",this,&MemberHandler::startDetailedDesc); addStartHandler("detaileddescription",this,&MemberHandler::startDetailedDesc);
m_params.setAutoDelete(TRUE);
} }
MemberHandler::~MemberHandler() MemberHandler::~MemberHandler()
{ {
delete m_brief;
delete m_detailed;
} }
void MemberHandler::startMember(const QXmlAttributes& attrib) void MemberHandler::startMember(const QXmlAttributes& attrib)
......
...@@ -101,6 +101,7 @@ documentation: ...@@ -101,6 +101,7 @@ documentation:
<li> \refitem cmdnote \note <li> \refitem cmdnote \note
<li> \refitem cmdoverload \overload <li> \refitem cmdoverload \overload
<li> \refitem cmdp \p <li> \refitem cmdp \p
<li> \refitem cmdpackage \package
<li> \refitem cmdpage \page <li> \refitem cmdpage \page
<li> \refitem cmdpar \par <li> \refitem cmdpar \par
<li> \refitem cmdparam \param <li> \refitem cmdparam \param
...@@ -406,6 +407,8 @@ doxygen. Unrecognized commands are treated as normal text. ...@@ -406,6 +407,8 @@ doxygen. Unrecognized commands are treated as normal text.
*/ */
\endverbatim \endverbatim
You can refer to the main page using \\ref index.
\sa section \ref cmdsection "\\section", \sa section \ref cmdsection "\\section",
section \ref cmdsubsection "\\subsection" and section \ref cmdsubsection "\\subsection" and
section \ref cmdpage "\\page". section \ref cmdpage "\\page".
...@@ -467,6 +470,13 @@ Public/Protected/Private/... section. ...@@ -467,6 +470,13 @@ Public/Protected/Private/... section.
for the corresponding HTML documentation that is generated by doxygen. for the corresponding HTML documentation that is generated by doxygen.
\endhtmlonly \endhtmlonly
<hr>
\subsection cmdpackage \package <name>
\addindex \package
Indicates that a comment block contains documentation for a
Java package with name \<name\>.
<hr> <hr>
\subsection cmdpage \page <name> (title) \subsection cmdpage \page <name> (title)
......
...@@ -171,6 +171,7 @@ followed by the descriptions of the tags grouped by category. ...@@ -171,6 +171,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_strip_from_path STRIP_FROM_PATH <li> \refitem cfg_strip_from_path STRIP_FROM_PATH
<li> \refitem cfg_tab_size TAB_SIZE <li> \refitem cfg_tab_size TAB_SIZE
<li> \refitem cfg_tagfiles TAGFILES <li> \refitem cfg_tagfiles TAGFILES
<li> \refitem cfg_template_relations TEMPLATE_RELATIONS
<li> \refitem cfg_toc_expand TOC_EXPAND <li> \refitem cfg_toc_expand TOC_EXPAND
<li> \refitem cfg_treeview_width TREEVIEW_WIDTH <li> \refitem cfg_treeview_width TREEVIEW_WIDTH
<li> \refitem cfg_verbatim_headers VERBATIM_HEADERS <li> \refitem cfg_verbatim_headers VERBATIM_HEADERS
...@@ -1149,6 +1150,12 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre> ...@@ -1149,6 +1150,12 @@ TAGFILES = file1=loc1 "file2 = loc2" ... </pre>
indirect implementation dependencies (inheritance, containment, and indirect implementation dependencies (inheritance, containment, and
class references variables) of the class with other documented classes. class references variables) of the class with other documented classes.
\anchor cfg_template_relations
<dt>\c TEMPLATE_RELATIONS <dd>
\addindex TEMPLATE_RELATIONS
If the \c TEMPLATE_RELATIONS and \c HAVE_DOT tags are set to \c YES then
doxygen will show the relations between templates and their instances.
\anchor cfg_include_graph \anchor cfg_include_graph
<dt>\c INCLUDE_GRAPH <dd> <dt>\c INCLUDE_GRAPH <dd>
\addindex INCLUDE_GRAPH \addindex INCLUDE_GRAPH
......
...@@ -173,8 +173,10 @@ Thanks go to: ...@@ -173,8 +173,10 @@ Thanks go to:
Boris Bralo, Nickolay Semyonov, Richard Kim, Földvári György, Boris Bralo, Nickolay Semyonov, Richard Kim, Földvári György,
Grzegorz Kowal, and Wang Weihan Grzegorz Kowal, and Wang Weihan
for providing translations into various languages. for providing translations into various languages.
<li>Erik Jan Lingen of <a href="http://www.habanera.nl/">Habanera</a> for
donating money.
<li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating <li>The Comms group of <a href="http://www.symbian.com">Symbian</a> for donating
me an ultra cool <a href="http://www.psion.com/revoplus>Revo plus</a> an ultra cool <a href="http://www.psion.com/revoplus>Revo plus</a>
organizer! organizer!
<li>The band <a href="http://www.porcupinetree.com">Porcupine Tree</a> for <li>The band <a href="http://www.porcupinetree.com">Porcupine Tree</a> for
providing hours of great music to listen to while coding. providing hours of great music to listen to while coding.
......
...@@ -152,26 +152,57 @@ for class QList is to define: ...@@ -152,26 +152,57 @@ for class QList is to define:
PREDEFINED = QListT:=QList PREDEFINED = QListT:=QList
\endverbatim \endverbatim
Here is example provided by Valter Minute that helps doxygen to Here is an example provided by Valter Minute & Reyes Ponce that helps
wade through the boilerplate code in Microsoft's ATL library: doxygen to wade through the boilerplate code in Microsoft's ATL & MFC
libraries:
\verbatim \verbatim
PREDEFINED = DECLARE_REGISTRY_RESOURCEID=// \ PREDEFINED = "DECLARE_INTERFACE(name)=class name" \
"STDMETHOD(result,name)=virtual result name" \
"PURE= = 0" \
THIS_= \
THIS= \
DECLARE_REGISTRY_RESOURCEID=// \
DECLARE_PROTECT_FINAL_CONSTRUCT=// \ DECLARE_PROTECT_FINAL_CONSTRUCT=// \
"DECLARE_AGGREGATABLE(Class)= " \
"DECLARE_REGISTRY_RESOURCEID(Id)= " \
DECLARE_MESSAGE_MAP = \
BEGIN_MESSAGE_MAP=/* \
END_MESSAGE_MAP=*/// \
BEGIN_COM_MAP=/* \ BEGIN_COM_MAP=/* \
END_COM_MAP=*/// \ END_COM_MAP=*/// \
BEGIN_PROP_MAP=/* \ BEGIN_PROP_MAP=/* \
END_PROP_MAP=*/// \ END_PROP_MAP=*/// \
BEGIN_MSG_MAP=/* \ BEGIN_MSG_MAP=/* \
END_MSG_MAP=*/// \ END_MSG_MAP=*/// \
BEGIN_PROPERTY_MAP=/* \
END_PROPERTY_MAP=*/// \
BEGIN_OBJECT_MAP=/* \
END_OBJECT_MAP()=*/// \
DECLARE_VIEW_STATUS=// \ DECLARE_VIEW_STATUS=// \
"STDMETHOD(a)=HRESULT a" \ "STDMETHOD(a)=HRESULT a" \
"ATL_NO_VTABLE= "\ "ATL_NO_VTABLE= " \
"__declspec(a)= "\ "__declspec(a)= " \
BEGIN_CONNECTION_POINT_MAP=/* \ BEGIN_CONNECTION_POINT_MAP=/* \
END_CONNECTION_POINT_MAP=*/// \ END_CONNECTION_POINT_MAP=*/// \
"DECLARE_AGGREGATABLE(Class)= " \ "DECLARE_DYNAMIC(class)= " \
"DECLARE_REGISTRY_RESOURCEID(id)= " "IMPLEMENT_DYNAMIC(class1, class2)= " \
"DECLARE_DYNCREATE(class)= " \
"IMPLEMENT_DYNCREATE(class1, class2)= " \
"IMPLEMENT_SERIAL(class1, class2, class3)= " \
"DECLARE_MESSAGE_MAP()= " \
TRY=try \
"CATCH_ALL(e)= catch(...)" \
END_CATCH_ALL= \
"THROW_LAST()= throw"\
"RUNTIME_CLASS(class)=class" \
"MAKEINTRESOURCE(nId)=nId" \
"IMPLEMENT_REGISTER(v, w, x, y, z)= " \
"ASSERT(x)=assert(x)" \
"ASSERT_VALID(x)=assert(x)" \
"TRACE0(x)=printf(x)" \
"OS_ERR(A,B)={ #A, B }" \
__cplusplus
\endverbatim \endverbatim
As you can see doxygen's preprocessor is quite powerful, but if you want As you can see doxygen's preprocessor is quite powerful, but if you want
......
Name: doxygen Name: doxygen
Version: 1.2.9.1 Version: 1.2.9_20010812
Summary: documentation system for C, C++ and IDL Summary: documentation system for C, C++ and IDL
Release: 4 Release: 4
Source: doxygen-%{version}.src.tar.gz Source: doxygen-%{version}.src.tar.gz
......
...@@ -72,7 +72,7 @@ win32:SOURCES += qfile_win32.cpp \ ...@@ -72,7 +72,7 @@ win32:SOURCES += qfile_win32.cpp \
qfileinfo_win32.cpp qfileinfo_win32.cpp
INCLUDEPATH = . INCLUDEPATH = .
TMAKE_CXXFLAGS = -DQT_NO_CODECS -DQT_LITE_UNICODE TMAKE_CXXFLAGS += -DQT_NO_CODECS -DQT_LITE_UNICODE
win32:TMAKE_CXXFLAGS += -DQT_NODLL win32:TMAKE_CXXFLAGS += -DQT_NODLL
OBJECTS_DIR = ../objects OBJECTS_DIR = ../objects
DESTDIR = ../lib DESTDIR = ../lib
...@@ -98,7 +98,7 @@ ClassDef::ClassDef( ...@@ -98,7 +98,7 @@ ClassDef::ClassDef(
// m_scopelessName=name().right(name().length()-i-2); // m_scopelessName=name().right(name().length()-i-2);
//} //}
m_subGrouping=TRUE; m_subGrouping=TRUE;
m_isTemplBaseClass=-1; //m_isTemplBaseClass=-1;
m_templateInstances = 0; m_templateInstances = 0;
m_templateMaster =0; m_templateMaster =0;
m_templBaseClassNames = 0; m_templBaseClassNames = 0;
...@@ -1408,13 +1408,34 @@ void ClassDef::setTemplateArguments(ArgumentList *al) ...@@ -1408,13 +1408,34 @@ void ClassDef::setTemplateArguments(ArgumentList *al)
} }
} }
/*! Returns \c TRUE iff this class or a class inheriting from this class
* is \e not defined in an external tag file.
*/
bool ClassDef::hasNonReferenceSuperClass() bool ClassDef::hasNonReferenceSuperClass()
{ {
bool found=!isReference(); bool found=!isReference();
if (found) return TRUE; // we're done if this class is not a reference
BaseClassListIterator bcli(*m_inheritedBy); BaseClassListIterator bcli(*m_inheritedBy);
for ( ; bcli.current() && !found ; ++bcli ) for ( ; bcli.current() && !found ; ++bcli ) // for each super class
found=found || bcli.current()->classDef->hasNonReferenceSuperClass(); {
ClassDef *bcd=bcli.current()->classDef;
// recurse into the super class branch
found = found || bcd->hasNonReferenceSuperClass();
if (!found)
{
// look for template instances that might have non-reference super classes
QDict<ClassDef> *cil = bcd->getTemplateInstances();
if (cil)
{
QDictIterator<ClassDef> tidi(*cil);
for ( ; tidi.current() && !found ; ++tidi) // for each template instance
{
// recurse into the template instance branch
found = found || tidi.current()->hasNonReferenceSuperClass();
}
}
}
}
return found; return found;
} }
...@@ -1512,28 +1533,50 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup) ...@@ -1512,28 +1533,50 @@ void ClassDef::writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup)
/*! a link to this class is possible within this project */ /*! a link to this class is possible within this project */
bool ClassDef::isLinkableInProject() const bool ClassDef::isLinkableInProject() const
{ {
if (m_templateMaster)
{
return m_templateMaster->isLinkableInProject();
}
else
{
return !name().isEmpty() && /* no name */ return !name().isEmpty() && /* no name */
m_isTemplBaseClass==-1 && /* template base class */ //m_isTemplBaseClass==-1 && /* template base class */
name().find('@')==-1 && /* anonymous compound */ name().find('@')==-1 && /* anonymous compound */
(m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */ (m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */
hasDocumentation() && /* documented */ hasDocumentation() && /* documented */
!isReference(); /* not an external reference */ !isReference(); /* not an external reference */
}
}
bool ClassDef::isLinkable() const
{
if (m_templateMaster)
{
return m_templateMaster->isLinkable();
}
else
{
return isLinkableInProject() || isReference();
}
} }
/*! the class is visible in a class diagram, or class hierarchy */ /*! the class is visible in a class diagram, or class hierarchy */
bool ClassDef::isVisibleInHierarchy() bool ClassDef::isVisibleInHierarchy()
{ return // show all classes or a subclass is visible {
return // show all classes or a subclass is visible
(Config_getBool("ALLEXTERNALS") || hasNonReferenceSuperClass()) && (Config_getBool("ALLEXTERNALS") || hasNonReferenceSuperClass()) &&
// and not an annonymous compound // and not an annonymous compound
name().find('@')==-1 && name().find('@')==-1 &&
// not an artifically introduced class // not an artifically introduced class
!m_artificial && !m_artificial &&
// and not an inherited template argument
//m_isTemplBaseClass==-1 &&
// and not privately inherited // and not privately inherited
(m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && (m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) &&
// documented or show anyway or documentation is external // documented or shown anyway or documentation is external
(hasDocumentation() || !Config_getBool("HIDE_UNDOC_CLASSES") || isReference()); (hasDocumentation() ||
!Config_getBool("HIDE_UNDOC_CLASSES") ||
isReference()
);
} }
bool ClassDef::hasDocumentation() const bool ClassDef::hasDocumentation() const
...@@ -1554,6 +1597,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd) ...@@ -1554,6 +1597,7 @@ bool ClassDef::isBaseClass(ClassDef *bcd)
for ( ; bcli.current() && !found ; ++bcli) for ( ; bcli.current() && !found ; ++bcli)
{ {
ClassDef *ccd=bcli.current()->classDef; ClassDef *ccd=bcli.current()->classDef;
if (ccd->templateMaster()) ccd=ccd->templateMaster();
//printf("isBaseClass() baseclass %s\n",ccd->name().data()); //printf("isBaseClass() baseclass %s\n",ccd->name().data());
if (ccd==bcd) if (ccd==bcd)
found=TRUE; found=TRUE;
...@@ -2212,6 +2256,18 @@ QCString ClassDef::getReference() const ...@@ -2212,6 +2256,18 @@ QCString ClassDef::getReference() const
} }
} }
bool ClassDef::isReference() const
{
if (m_templateMaster)
{
return m_templateMaster->getReference();
}
else
{
return Definition::isReference();
}
}
void ClassDef::getTemplateParameterLists(QList<ArgumentList> &lists) const void ClassDef::getTemplateParameterLists(QList<ArgumentList> &lists) const
{ {
Definition *d=getOuterScope(); Definition *d=getOuterScope();
...@@ -2273,4 +2329,23 @@ QCString ClassDef::qualifiedNameWithTemplateParameters( ...@@ -2273,4 +2329,23 @@ QCString ClassDef::qualifiedNameWithTemplateParameters(
return scName; return scName;
} }
QCString ClassDef::className() const
{
if (!m_className.isEmpty())
{
return m_className;
}
else
{
ClassDef *that = (ClassDef *)this;
// m_className is a cache value, so we fake that this function is "const".
that->m_className=m_localName.copy();
Definition *p=getOuterScope();
while (p && p->definitionType()==TypeClass)
{
that->m_className.prepend(p->localName()+"::");
p=p->getOuterScope();
}
return m_className;
}
};
...@@ -72,6 +72,7 @@ class ClassDef : public Definition ...@@ -72,6 +72,7 @@ class ClassDef : public Definition
QCString getFileBase() const; QCString getFileBase() const;
QCString getSourceFileBase() const; QCString getSourceFileBase() const;
QCString getReference() const; QCString getReference() const;
bool isReference() const;
bool hasDocumentation() const; bool hasDocumentation() const;
...@@ -114,10 +115,7 @@ class ClassDef : public Definition ...@@ -114,10 +115,7 @@ class ClassDef : public Definition
/*! return TRUE iff a link to this class is possible (either within /*! return TRUE iff a link to this class is possible (either within
* this project, or as a cross-reference to another project). * this project, or as a cross-reference to another project).
*/ */
bool isLinkable() const bool isLinkable() const;
{
return isLinkableInProject() || isReference();
}
/*! the class is visible in a class diagram, or class hierarchy */ /*! the class is visible in a class diagram, or class hierarchy */
bool isVisibleInHierarchy(); bool isVisibleInHierarchy();
...@@ -153,12 +151,6 @@ class ClassDef : public Definition ...@@ -153,12 +151,6 @@ class ClassDef : public Definition
*/ */
bool isBaseClass(ClassDef *bcd); bool isBaseClass(ClassDef *bcd);
/*! Is this an artificial class that is the template argument of
* a class. If so the argument number is returned, otherwise -1
* is returned.
*/
int isTemplateBaseClass() const { return m_isTemplBaseClass; }
/*! Returns a sorted dictionary with all template instances found for /*! Returns a sorted dictionary with all template instances found for
* this template class. Returns 0 if not a template or no instances. * this template class. Returns 0 if not a template or no instances.
*/ */
...@@ -200,6 +192,11 @@ class ClassDef : public Definition ...@@ -200,6 +192,11 @@ class ClassDef : public Definition
*/ */
bool isAbstract() const { return m_isAbstract; } bool isAbstract() const { return m_isAbstract; }
/*! returns the name of the class including outer classes, but not
* including namespaces.
*/
QCString className() const;
/* member lists by protection */ /* member lists by protection */
MemberList pubMembers; MemberList pubMembers;
MemberList proMembers; MemberList proMembers;
...@@ -262,7 +259,6 @@ class ClassDef : public Definition ...@@ -262,7 +259,6 @@ class ClassDef : public Definition
void setProtection(Protection p) { m_prot=p; } void setProtection(Protection p) { m_prot=p; }
void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs); void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void addInnerCompound(Definition *d); void addInnerCompound(Definition *d);
void setIsTemplateBaseClass(int num) { m_isTemplBaseClass = num; }
void addUsedClass(ClassDef *cd,const char *accessName); void addUsedClass(ClassDef *cd,const char *accessName);
//void initTemplateMapping(); //void initTemplateMapping();
//void setTemplateArgumentMapping(const char *formal,const char *actual); //void setTemplateArgumentMapping(const char *formal,const char *actual);
...@@ -384,13 +380,6 @@ class ClassDef : public Definition ...@@ -384,13 +380,6 @@ class ClassDef : public Definition
UsesClassDict *m_usesImplClassDict; UsesClassDict *m_usesImplClassDict;
UsesClassDict *m_usesIntfClassDict; UsesClassDict *m_usesIntfClassDict;
/*! Is this a class that exists because of template class that
* inherited one of it's template arguments. If so that this
* variable indicate the template argument number, otherwise
* this is -1
*/
int m_isTemplBaseClass;
/*! Template instances that exists of this class, the key in the /*! Template instances that exists of this class, the key in the
* dictionary is the template argument list. * dictionary is the template argument list.
*/ */
...@@ -410,6 +399,8 @@ class ClassDef : public Definition ...@@ -410,6 +399,8 @@ class ClassDef : public Definition
/*! Is this an abstact class? */ /*! Is this an abstact class? */
bool m_isAbstract; bool m_isAbstract;
QCString m_className;
}; };
/*! \brief Class that contains information about a usage relation. /*! \brief Class that contains information about a usage relation.
......
...@@ -2037,6 +2037,13 @@ void Config::create() ...@@ -2037,6 +2037,13 @@ void Config::create()
TRUE TRUE
); );
cb->addDependency("HAVE_DOT"); cb->addDependency("HAVE_DOT");
cb = addBool(
"TEMPLATE_RELATIONS",
"If set to YES, the inheritance and collaboration graphs will show the \n"
"relations between templates and their instances. \n",
TRUE
);
cb->addDependency("HAVE_DOT");
cb = addBool( cb = addBool(
"INCLUDE_GRAPH", "INCLUDE_GRAPH",
"If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT \n" "If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT \n"
......
...@@ -34,7 +34,11 @@ Definition::Definition(const char *df,int dl, ...@@ -34,7 +34,11 @@ Definition::Definition(const char *df,int dl,
m_defFileName = df; m_defFileName = df;
m_defLine = dl; m_defLine = dl;
m_name=name; m_name=name;
if (m_name!="<globalScope>")
m_localName=stripScope(name); m_localName=stripScope(name);
else
m_localName=name;
//printf("m_localName=%s\n",m_localName.data());
m_brief=b; m_brief=b;
m_doc=d; m_doc=d;
m_sectionDict=0, m_sectionDict=0,
......
...@@ -80,7 +80,7 @@ class Definition ...@@ -80,7 +80,7 @@ class Definition
virtual bool isLinkable() const = 0; virtual bool isLinkable() const = 0;
virtual QCString getReference() const { return m_ref; } virtual QCString getReference() const { return m_ref; }
bool isReference() const { return !m_ref.isEmpty(); } virtual bool isReference() const { return !m_ref.isEmpty(); }
void setReference(const char *r) { m_ref=r; } void setReference(const char *r) { m_ref=r; }
/*! Add the list of anchors that mark the sections that are found in the /*! Add the list of anchors that mark the sections that are found in the
......
...@@ -1504,7 +1504,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) ...@@ -1504,7 +1504,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock(); if (inBlock()) endBlock();
inParamBlock=TRUE; inParamBlock=TRUE;
currentListIndent.push("D"); currentListIndent.push("D");
outDoc->startParamList(); outDoc->startParamList(BaseOutputDocInterface::Param);
scanString(theTranslator->trParameters()+": "); scanString(theTranslator->trParameters()+": ");
outDoc->endDescTitle(); outDoc->endDescTitle();
outDoc->writeDescItem(); outDoc->writeDescItem();
...@@ -1528,7 +1528,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) ...@@ -1528,7 +1528,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock(); if (inBlock()) endBlock();
inRetValBlock=TRUE; inRetValBlock=TRUE;
currentListIndent.push("D"); currentListIndent.push("D");
outDoc->startParamList(); outDoc->startParamList(BaseOutputDocInterface::RetVal);
scanString(theTranslator->trReturnValues()+": "); scanString(theTranslator->trReturnValues()+": ");
outDoc->endDescTitle(); outDoc->endDescTitle();
outDoc->writeDescItem(); outDoc->writeDescItem();
...@@ -1552,7 +1552,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) ...@@ -1552,7 +1552,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
if (inBlock()) endBlock(); if (inBlock()) endBlock();
inExceptionBlock=TRUE; inExceptionBlock=TRUE;
currentListIndent.push("D"); currentListIndent.push("D");
outDoc->startParamList(); outDoc->startParamList(BaseOutputDocInterface::Exception);
scanString(theTranslator->trExceptions()+": "); scanString(theTranslator->trExceptions()+": ");
outDoc->endDescTitle(); outDoc->endDescTitle();
outDoc->writeDescItem(); outDoc->writeDescItem();
......
...@@ -40,7 +40,8 @@ static const char *edgeColorMap[] = ...@@ -40,7 +40,8 @@ static const char *edgeColorMap[] =
"darkgreen", // Protected "darkgreen", // Protected
"firebrick4", // Private "firebrick4", // Private
"darkorchid3", // "use" relation "darkorchid3", // "use" relation
"grey75" // Undocumented "grey75", // Undocumented
"orange" // template relation
}; };
static const char *edgeStyleMap[] = static const char *edgeStyleMap[] =
...@@ -177,153 +178,6 @@ static bool isLeaf(ClassDef *cd) ...@@ -177,153 +178,6 @@ static bool isLeaf(ClassDef *cd)
return TRUE; return TRUE;
} }
#if 0
/*! Builds a mapping from formal arguments of class \a tcd to the
* actual arguments stored in templSpec. To properly initialize
* the mapping with the default template values
* ClassDef::initTemplateMapping() is called once for each class graph
* (the ClassDef::visited flag is used for this).
*/
static void setTemplateInstance(QCString templSpec,ClassDef *tcd)
{
//printf("====== setTemplateInstance(templ=%s,class=%s)\n",templSpec.data(),tcd->name().data());
if (!templSpec.isEmpty())
{
//if (!tcd->visited)
//{
// tcd->visited=TRUE;
//}
ArgumentList *tempArgList = new ArgumentList;
stringToArgumentList(templSpec,tempArgList);
ArgumentListIterator ali(*tempArgList);
Argument *arg;
uint count=0;
for (ali.toFirst();(arg=ali.current());++ali,++count)
{
ArgumentList *formalArgList = tcd->templateArguments();
Argument *formalArg=0;
//printf("arg->type=%s count=%d formalArgList=%p\n",
// arg->type.data(),count,formalArgList);
if (formalArgList && formalArgList->count()>count &&
(formalArg=formalArgList->at(count)))
{
if (formalArg->name!=arg->type)
{
tcd->setTemplateArgumentMapping(formalArg->name,arg->type);
//printf("%s->setTemplateInstantation(%s,%s)\n",tcd->name().data(),
// formalArg->name.data(),arg->type.data());
}
}
}
delete tempArgList;
}
}
/*! Substitutes the formal template argument list \a templSpec
* of class \a cd with the actual template arguments.
* The mapping from formal to actual template is assumed to be stored
* in \a cd using setTemplateInstance().
*/
static QCString substituteTemplateSpec(ClassDef *cd,const QCString &templSpec)
{
QCString result;
if (!templSpec.isEmpty())
{
ArgumentList *tempArgList = new ArgumentList;
stringToArgumentList(templSpec,tempArgList);
ArgumentListIterator ali(*tempArgList);
Argument *arg;
bool first=TRUE;
for (ali.toFirst();(arg=ali.current());)
{
if (first) result="<",first=FALSE;
QCString actual = cd->getTemplateArgumentMapping(arg->type);
if (!actual.isEmpty())
{
result+=actual;
}
else
{
result+=arg->type;
}
++ali;
if (ali.current()) result+=","; else result+=">";
}
delete tempArgList;
}
//printf("substituteTemplateSpec(%s,%s)=`%s'\n",cd->name().data(),templSpec.data(),result.data());
return removeRedundantWhiteSpace(result);
}
/*! Determines the actual template instance of template class \a tcd that
* relates to class \a cd. The result is stored in \a tcd.
* \param cd A class
* \param tcd A template base class
* \param templSpec Actual template parameter list to be used for tcd
* \param result resulting instance class
* \param actualArg actual template instance name of the resulting class
*/
static void computeTemplateInstance(
ClassDef *cd,ClassDef *tcd,const QCString templSpec,
ClassDef *&result,QCString &actualArg
)
{
//printf("====== computeTemplateInstance(%s,base=%s,templ=%s)\n",
// cd->name().data(),tcd->name().data(),templSpec.data());
// store the specific instance inside the class
setTemplateInstance(templSpec,tcd);
int tArgNum = tcd->isTemplateBaseClass();
if (tArgNum!=-1)
{
//printf("tArgNum=%d\n",tArgNum);
ArgumentList *formalArgList = cd->templateArguments();
if (formalArgList)
{
//printf("formalArgList=%p\n",formalArgList);
Argument *formalArg=formalArgList->at(tArgNum);
if (formalArg)
{
//printf("formalArg=%s\n",formalArg->name.data());
actualArg = cd->getTemplateArgumentMapping(formalArg->name);
//printf("ActualArg=%s\n",actualArg.data());
int pos=0;
QCString name;
QCString templSpec;
while (extractClassNameFromType(actualArg,pos,name,templSpec))
{
Definition *scopeDef = cd->getOuterScope();
QCString scopeName;
if (scopeDef) scopeName = scopeDef->qualifiedName();
//printf("name=%s templSpec=%s\n",name.data(),templSpec.data());
ClassDef *acd=0;
// try with scope.
if (!scopeName.isEmpty())
acd = getResolvedClass(scopeName+"::"+name);
// try without scope.
// TODO: try intermediate scopes as well!
if (acd==0) acd = getResolvedClass(name);
if (acd && !templSpec.isEmpty())
{
// store specific template instance in the class
setTemplateInstance(templSpec,acd);
}
if (acd)
{
result = acd;
actualArg = acd->name()+templSpec;
return;
}
}
}
}
}
actualArg.resize(0);
result = 0;
}
#endif
//-------------------------------------------------------------------- //--------------------------------------------------------------------
class DotNodeList : public QList<DotNode> class DotNodeList : public QList<DotNode>
...@@ -932,7 +786,7 @@ int DotClassGraph::m_curNodeNumber; ...@@ -932,7 +786,7 @@ int DotClassGraph::m_curNodeNumber;
void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
const char *label,int distance,const char *usedName,const char *templSpec,bool base) const char *label,int distance,const char *usedName,const char *templSpec,bool base)
{ {
int edgeStyle = label ? EdgeInfo::Dashed : EdgeInfo::Solid; int edgeStyle = (label || prot==EdgeInfo::Orange) ? EdgeInfo::Dashed : EdgeInfo::Solid;
QCString className; QCString className;
if (usedName) // name is a typedef if (usedName) // name is a typedef
{ {
...@@ -997,34 +851,22 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot, ...@@ -997,34 +851,22 @@ void DotClassGraph::addClass(ClassDef *cd,DotNode *n,int prot,
void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
{ {
// ---- Add inheritance relations
BaseClassListIterator bcli(base ? *cd->baseClasses() : *cd->subClasses()); BaseClassListIterator bcli(base ? *cd->baseClasses() : *cd->subClasses());
BaseClassDef *bcd; BaseClassDef *bcd;
for ( ; (bcd=bcli.current()) ; ++bcli ) for ( ; (bcd=bcli.current()) ; ++bcli )
{ {
//printf("-------- inheritance relation %s->%s templ=`%s'\n", //printf("-------- inheritance relation %s->%s templ=`%s'\n",
// cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data()); // cd->name().data(),bcd->classDef->name().data(),bcd->templSpecifiers.data());
//QCString templSpec;
//if (base) templSpec = substituteTemplateSpec(
// cd,bcd->templSpecifiers);
//ClassDef *acd=0;
//QCString actualArg;
//computeTemplateInstance(cd,bcd->classDef,templSpec,acd,actualArg);
//printf("acd=%p actualArg=%s\n",acd,actualArg.data());
//if (acd)
//{
// addClass(acd,n,bcd->prot,0,distance,actualArg,
// templSpec,base);
//}
//else
//{
// addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,
// templSpec,base);
//}
addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName, addClass(bcd->classDef,n,bcd->prot,0,distance,bcd->usedName,
bcd->templSpecifiers,base); bcd->templSpecifiers,base);
} }
if (m_graphType != Inheritance) if (m_graphType != Inheritance)
{ {
// ---- Add usage relations
UsesClassDict *dict = UsesClassDict *dict =
m_graphType==Implementation ? cd->usedImplementationClasses() : m_graphType==Implementation ? cd->usedImplementationClasses() :
cd->usedInterfaceClasses(); cd->usedInterfaceClasses();
...@@ -1050,30 +892,48 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base) ...@@ -1050,30 +892,48 @@ void DotClassGraph::buildGraph(ClassDef *cd,DotNode *n,int distance,bool base)
label+=QCString("\\n")+s; label+=QCString("\\n")+s;
} }
} }
//QCString actualArg; addClass(ucd->classDef,n,EdgeInfo::Purple,label,distance,0,
//ClassDef *acd=0;
//printf("-------- usage relation %s->%s templ=`%s'\n",
// cd->name().data(),ucd->classDef->name().data(),
// ucd->templSpecifiers.data());
//QCString templSpec = substituteTemplateSpec(
// cd,ucd->templSpecifiers);
//computeTemplateInstance(cd,ucd->classDef, templSpec, acd,actualArg);
//if (acd)
//{
// addClass(acd,n,EdgeInfo::Black,label,distance,actualArg,
// templSpec,base);
//}
//else
//{
// //printf("Found label=`%s'\n",label.data());
// addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0,
// templSpec,base);
//}
addClass(ucd->classDef,n,EdgeInfo::Black,label,distance,0,
ucd->templSpecifiers,base); ucd->templSpecifiers,base);
} }
} }
} }
// ---- Add template instantiation relations
if (Config_getBool("TEMPLATE_RELATIONS"))
{
if (base) // template relations for base classes
{
ClassDef *templMaster=cd->templateMaster();
if (templMaster)
{
QDictIterator<ClassDef> cli(*templMaster->getTemplateInstances());
ClassDef *templInstance;
for (;(templInstance=cli.current());++cli)
{
if (templInstance==cd)
{
addClass(templMaster,n,EdgeInfo::Orange,cli.currentKey(),distance,0,
0,TRUE);
}
}
}
}
else // template relations for super classes
{
QDict<ClassDef> *templInstances = cd->getTemplateInstances();
if (templInstances)
{
QDictIterator<ClassDef> cli(*templInstances);
ClassDef *templInstance;
for (;(templInstance=cli.current());++cli)
{
addClass(templInstance,n,EdgeInfo::Orange,cli.currentKey(),distance,0,
0,FALSE);
}
}
}
}
} }
DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth) DotClassGraph::DotClassGraph(ClassDef *cd,GraphType t,int maxRecursionDepth)
......
...@@ -30,7 +30,7 @@ enum GraphOutputFormat { GIF , EPS }; ...@@ -30,7 +30,7 @@ enum GraphOutputFormat { GIF , EPS };
struct EdgeInfo struct EdgeInfo
{ {
enum Colors { Blue=0, Green=1, Red=2, Black=3, Grey=4 }; enum Colors { Blue=0, Green=1, Red=2, Purple=3, Grey=4, Orange=5 };
enum Styles { Solid=0, Dashed=1 }; enum Styles { Solid=0, Dashed=1 };
EdgeInfo() : m_color(0), m_style(0), m_labColor(0) {} EdgeInfo() : m_color(0), m_style(0), m_labColor(0) {}
~EdgeInfo() {} ~EdgeInfo() {}
...@@ -60,7 +60,7 @@ class DotNode ...@@ -60,7 +60,7 @@ class DotNode
DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE); DotNode(int n,const char *lab,const char *url,int distance = 0,bool rootNode=FALSE);
~DotNode(); ~DotNode();
void addChild(DotNode *n, void addChild(DotNode *n,
int edgeColor=EdgeInfo::Black, int edgeColor=EdgeInfo::Purple,
int edgeStyle=EdgeInfo::Solid, int edgeStyle=EdgeInfo::Solid,
const char *edgeLab=0, const char *edgeLab=0,
const char *edgeURL=0, const char *edgeURL=0,
......
...@@ -2527,7 +2527,7 @@ static void findUsedClassesForClass(Entry *root, ...@@ -2527,7 +2527,7 @@ static void findUsedClassesForClass(Entry *root,
usedCd = new ClassDef( usedCd = new ClassDef(
masterCd->getDefFileName(),masterCd->getDefLine(), masterCd->getDefFileName(),masterCd->getDefLine(),
usedName,ClassDef::Class); usedName,ClassDef::Class);
usedCd->setIsTemplateBaseClass(count); //usedCd->setIsTemplateBaseClass(count);
Doxygen::hiddenClasses.inSort(usedName,usedCd); Doxygen::hiddenClasses.inSort(usedName,usedCd);
} }
if (isArtificial) usedCd->setClassIsArtificial(); if (isArtificial) usedCd->setClassIsArtificial();
...@@ -2599,6 +2599,12 @@ static void findBaseClassesForClass( ...@@ -2599,6 +2599,12 @@ static void findBaseClassesForClass(
BaseInfo *bi=0; BaseInfo *bi=0;
for (bii.toFirst();(bi=bii.current());++bii) for (bii.toFirst();(bi=bii.current());++bii)
{ {
//printf("masterCd=%s bi->name=%s\n",masterCd->localName().data(),bi->name.data());
//if ( masterCd->localName()!=bi->name.left(masterCd->localName().length())
// || bi->name.at(masterCd->localName().length())!='<'
// ) // to avoid recursive lock-up in cases like
// // template<typename T> class A : public A<typename T::B>
//{
bool delTempNames=FALSE; bool delTempNames=FALSE;
if (templateNames==0) if (templateNames==0)
{ {
...@@ -2629,6 +2635,7 @@ static void findBaseClassesForClass( ...@@ -2629,6 +2635,7 @@ static void findBaseClassesForClass(
delete templateNames; delete templateNames;
templateNames=0; templateNames=0;
} }
//}
} }
} }
...@@ -2736,7 +2743,9 @@ static bool findClassRelation( ...@@ -2736,7 +2743,9 @@ static bool findClassRelation(
// baseClass?baseClass->name().data():"<none>", // baseClass?baseClass->name().data():"<none>",
// templSpec.data() // templSpec.data()
// ); // );
if (baseClassName!=root->name) // Check for base class with the same name. if (baseClassName.left(root->name.length())!=root->name ||
baseClassName.at(root->name.length())!='<'
) // Check for base class with the same name.
// If found then look in the outer scope for a match // If found then look in the outer scope for a match
// and prevent recursion. // and prevent recursion.
{ {
...@@ -2942,17 +2951,17 @@ static bool findClassRelation( ...@@ -2942,17 +2951,17 @@ static bool findClassRelation(
baseClass->insertUsedFile(root->fileName); baseClass->insertUsedFile(root->fileName);
// is this an inherited template argument? // is this an inherited template argument?
//printf("%s->setIsTemplateBaseClass(%d)\n",baseClass->name().data(),isTemplBaseClass); //printf("%s->setIsTemplateBaseClass(%d)\n",baseClass->name().data(),isTemplBaseClass);
if (isATemplateArgument) //if (isATemplateArgument)
{ //{
baseClass->setIsTemplateBaseClass(*templateNames->find(bi->name)); // baseClass->setIsTemplateBaseClass(*templateNames->find(bi->name));
} //}
// add class to the list // add class to the list
if (!isATemplateArgument) //if (!isATemplateArgument)
{ //{
} //}
else //else
{ //{
} //}
return TRUE; return TRUE;
} }
else else
...@@ -3117,10 +3126,6 @@ static void computeTemplateClassRelations() ...@@ -3117,10 +3126,6 @@ static void computeTemplateClassRelations()
for (tdi.toFirst();(tcd=tdi.current());++tdi) // for each template instance for (tdi.toFirst();(tcd=tdi.current());++tdi) // for each template instance
{ {
Debug::print(Debug::Classes,0," Template instance %s : \n",tcd->name().data()); Debug::print(Debug::Classes,0," Template instance %s : \n",tcd->name().data());
//QCString templName = tcd->name();
//int index = templName.find('<');
//ASSERT(index!=-1);
// templName.right(templName.length()-index);
QCString templSpec = tdi.currentKey().data(); QCString templSpec = tdi.currentKey().data();
ArgumentList *templArgs = new ArgumentList; ArgumentList *templArgs = new ArgumentList;
stringToArgumentList(templSpec,templArgs); stringToArgumentList(templSpec,templArgs);
...@@ -3214,7 +3219,7 @@ static void computeMemberReferences() ...@@ -3214,7 +3219,7 @@ static void computeMemberReferences()
//---------------------------------------------------------------------- //----------------------------------------------------------------------
static void addClassMemberTodoTestBufReferences(Definition *compound) static void addClassMemberTodoTestBugReferences(Definition *compound)
{ {
MemberNameListIterator mnli(Doxygen::memberNameList); MemberNameListIterator mnli(Doxygen::memberNameList);
MemberName *mn=0; MemberName *mn=0;
...@@ -3229,7 +3234,7 @@ static void addClassMemberTodoTestBufReferences(Definition *compound) ...@@ -3229,7 +3234,7 @@ static void addClassMemberTodoTestBufReferences(Definition *compound)
if (d) scopeName=d->name(); if (d) scopeName=d->name();
if (d==0) d=md->getGroupDef(); if (d==0) d=md->getGroupDef();
if (d==0) d=md->getFileDef(); if (d==0) d=md->getFileDef();
if (compound==d || (compound==0 && d!=0 && !md->visited)) if (d!=0 && ((compound==0 && !md->visited) || compound==d))
{ {
QCString memLabel; QCString memLabel;
md->visited=TRUE; md->visited=TRUE;
...@@ -3247,7 +3252,7 @@ static void addClassMemberTodoTestBufReferences(Definition *compound) ...@@ -3247,7 +3252,7 @@ static void addClassMemberTodoTestBufReferences(Definition *compound)
} }
} }
static void addFileMemberTodoTestBufReferences(Definition *compound) static void addFileMemberTodoTestBugReferences(Definition *compound)
{ {
MemberNameListIterator fnli(Doxygen::functionNameList); MemberNameListIterator fnli(Doxygen::functionNameList);
MemberName *mn=0; MemberName *mn=0;
...@@ -3262,7 +3267,7 @@ static void addFileMemberTodoTestBufReferences(Definition *compound) ...@@ -3262,7 +3267,7 @@ static void addFileMemberTodoTestBufReferences(Definition *compound)
if (d) scopeName=d->name(); if (d) scopeName=d->name();
if (d==0) d=md->getGroupDef(); if (d==0) d=md->getGroupDef();
if (d==0) d=md->getFileDef(); if (d==0) d=md->getFileDef();
if (compound==d || (compound==0 && d!=0 && !md->visited)) if (d!=0 && ((compound==0 && !md->visited) || compound==d))
{ {
QCString memLabel; QCString memLabel;
md->visited=TRUE; md->visited=TRUE;
...@@ -3312,7 +3317,7 @@ static void addTodoTestBugReferences() ...@@ -3312,7 +3317,7 @@ static void addTodoTestBugReferences()
theTranslator->trClass(TRUE,TRUE), theTranslator->trClass(TRUE,TRUE),
cd->getOutputFileBase(),cd->name() cd->getOutputFileBase(),cd->name()
); );
addClassMemberTodoTestBufReferences(cd); addClassMemberTodoTestBugReferences(cd);
} }
FileName *fn=Doxygen::inputNameList.first(); FileName *fn=Doxygen::inputNameList.first();
while (fn) while (fn)
...@@ -3323,7 +3328,7 @@ static void addTodoTestBugReferences() ...@@ -3323,7 +3328,7 @@ static void addTodoTestBugReferences()
addRefItem(fd->todoId(),fd->testId(),fd->bugId(), addRefItem(fd->todoId(),fd->testId(),fd->bugId(),
theTranslator->trFile(TRUE,TRUE), theTranslator->trFile(TRUE,TRUE),
fd->getOutputFileBase(),fd->name()); fd->getOutputFileBase(),fd->name());
addFileMemberTodoTestBufReferences(fd); addFileMemberTodoTestBugReferences(fd);
fd=fn->next(); fd=fn->next();
} }
fn=Doxygen::inputNameList.next(); fn=Doxygen::inputNameList.next();
...@@ -3334,7 +3339,7 @@ static void addTodoTestBugReferences() ...@@ -3334,7 +3339,7 @@ static void addTodoTestBugReferences()
addRefItem(nd->todoId(),nd->testId(),nd->bugId(), addRefItem(nd->todoId(),nd->testId(),nd->bugId(),
theTranslator->trNamespace(TRUE,TRUE), theTranslator->trNamespace(TRUE,TRUE),
nd->getOutputFileBase(),nd->name()); nd->getOutputFileBase(),nd->name());
addFileMemberTodoTestBufReferences(nd); addFileMemberTodoTestBugReferences(nd);
nd=Doxygen::namespaceList.next(); nd=Doxygen::namespaceList.next();
} }
GroupDef *gd=Doxygen::groupList.first(); GroupDef *gd=Doxygen::groupList.first();
...@@ -3343,7 +3348,7 @@ static void addTodoTestBugReferences() ...@@ -3343,7 +3348,7 @@ static void addTodoTestBugReferences()
addRefItem(gd->todoId(),gd->testId(),gd->bugId(), addRefItem(gd->todoId(),gd->testId(),gd->bugId(),
theTranslator->trGroup(TRUE,TRUE), theTranslator->trGroup(TRUE,TRUE),
gd->getOutputFileBase(),gd->groupTitle()); gd->getOutputFileBase(),gd->groupTitle());
addFileMemberTodoTestBufReferences(gd); addFileMemberTodoTestBugReferences(gd);
gd=Doxygen::groupList.next(); gd=Doxygen::groupList.next();
} }
PageSDictIterator pdi(*Doxygen::pageSDict); PageSDictIterator pdi(*Doxygen::pageSDict);
...@@ -3354,8 +3359,8 @@ static void addTodoTestBugReferences() ...@@ -3354,8 +3359,8 @@ static void addTodoTestBugReferences()
theTranslator->trPage(TRUE,TRUE), theTranslator->trPage(TRUE,TRUE),
pi->name,pi->title); pi->name,pi->title);
} }
addClassMemberTodoTestBufReferences(0); addClassMemberTodoTestBugReferences(0);
addFileMemberTodoTestBufReferences(0); addFileMemberTodoTestBugReferences(0);
} }
...@@ -5143,8 +5148,8 @@ static void generateClassDocs() ...@@ -5143,8 +5148,8 @@ static void generateClassDocs()
{ {
ClassDef *cd=cli.current(); ClassDef *cd=cli.current();
if ( cd->isLinkableInProject() && cd->templateMaster()==0 && if ( cd->isLinkableInProject() && cd->templateMaster()==0 &&
(cd->getOuterScope()==0 || (cd->getOuterScope()==0 || // <-- should not happen
cd->getOuterScope()->definitionType()!=Definition::TypeClass cd->getOuterScope()==Doxygen::globalScope
) )
) // skip external references, anonymous compounds and ) // skip external references, anonymous compounds and
// template instances and nested classes // template instances and nested classes
...@@ -5465,10 +5470,10 @@ static void findMainPage(Entry *root) ...@@ -5465,10 +5470,10 @@ static void findMainPage(Entry *root)
*/ */
static void buildPackageList(Entry *root) static void buildPackageList(Entry *root)
{ {
if (root->section == Entry::PACKAGE_SEC) if (root->section == Entry::PACKAGE_SEC || root->section == Entry::PACKAGEDOC_SEC && !root->name.isEmpty())
{ {
PackageDef *pd=0; PackageDef *pd=0;
if (!root->name.isEmpty() && (pd=Doxygen::packageDict.find(root->name))==0) if ((pd=Doxygen::packageDict.find(root->name))==0)
{ {
QCString tagName; QCString tagName;
if (root->tagInfo) if (root->tagInfo)
...@@ -5477,9 +5482,20 @@ static void buildPackageList(Entry *root) ...@@ -5477,9 +5482,20 @@ static void buildPackageList(Entry *root)
} }
pd = new PackageDef(root->fileName,root->startLine,root->name,tagName); pd = new PackageDef(root->fileName,root->startLine,root->name,tagName);
Doxygen::packageDict.inSort(root->name,pd); Doxygen::packageDict.inSort(root->name,pd);
pd->setDocumentation(root->doc);
pd->setBriefDescription(root->brief);
}
else
{
if (!pd->documentation() && !root->doc.isEmpty())
{
pd->setDocumentation(root->doc);
} }
if (pd) if (!pd->briefDescription() && !root->brief.isEmpty())
{ {
pd->setBriefDescription(root->brief);
}
}
bool ambig; bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
if (fd) if (fd)
...@@ -5487,7 +5503,6 @@ static void buildPackageList(Entry *root) ...@@ -5487,7 +5503,6 @@ static void buildPackageList(Entry *root)
fd->setPackageDef(pd); fd->setPackageDef(pd);
} }
} }
}
EntryListIterator eli(*root->sublist); EntryListIterator eli(*root->sublist);
Entry *e; Entry *e;
for (;(e=eli.current());++eli) for (;(e=eli.current());++eli)
...@@ -5498,6 +5513,8 @@ static void buildPackageList(Entry *root) ...@@ -5498,6 +5513,8 @@ static void buildPackageList(Entry *root)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
//----------------------------------------------------------------------------
/*! Add Java classes to their respective packages */ /*! Add Java classes to their respective packages */
static void addClassesToPackages() static void addClassesToPackages()
{ {
...@@ -5730,6 +5747,22 @@ static void generateNamespaceDocs() ...@@ -5730,6 +5747,22 @@ static void generateNamespaceDocs()
msg("Generating docs for namespace %s\n",nd->name().data()); msg("Generating docs for namespace %s\n",nd->name().data());
nd->writeDocumentation(*outputList); nd->writeDocumentation(*outputList);
} }
ClassSDict::Iterator cli(Doxygen::classSDict);
for ( ; cli.current() ; ++cli )
{
ClassDef *cd=cli.current();
if ( cd->getOuterScope()==nd &&
cd->isLinkableInProject() &&
cd->templateMaster()==0
) // skip external references, anonymous compounds and
// template instances and nested classes
{
msg("Generating docs for compound %s...\n",cd->name().data());
cd->writeDocumentation(*outputList);
cd->writeMemberList(*outputList);
}
}
} }
} }
......
...@@ -215,7 +215,8 @@ class Entry ...@@ -215,7 +215,8 @@ class Entry
MAINPAGEDOC_SEC = 0x01200000, MAINPAGEDOC_SEC = 0x01200000,
MEMBERGRP_SEC = 0x01300000, MEMBERGRP_SEC = 0x01300000,
USINGDECL_SEC = 0x01400000, USINGDECL_SEC = 0x01400000,
PACKAGE_SEC = 0x01500000 PACKAGE_SEC = 0x01500000,
PACKAGEDOC_SEC = 0x01600000,
}; };
enum MemberSpecifier enum MemberSpecifier
{ {
......
...@@ -899,7 +899,7 @@ void HtmlGenerator::endMemberDocName() ...@@ -899,7 +899,7 @@ void HtmlGenerator::endMemberDocName()
void HtmlGenerator::startParameterList() void HtmlGenerator::startParameterList()
{ {
DBG_HTML(t << "<!-- startParameterList -->" << endl;) DBG_HTML(t << "<!-- startParameterList -->" << endl;)
t << " <td class=\"md\">(&nbsp</td>" << endl; t << " <td class=\"md\">(&nbsp;</td>" << endl;
} }
void HtmlGenerator::startParameterType(bool first) void HtmlGenerator::startParameterType(bool first)
...@@ -948,7 +948,7 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList) ...@@ -948,7 +948,7 @@ void HtmlGenerator::endParameterName(bool last,bool emptyList)
t << " </tr>" << endl; t << " </tr>" << endl;
t << " <tr>" << endl; t << " <tr>" << endl;
t << " <td></td>" << endl; t << " <td></td>" << endl;
t << " <td class=\"md\">)&nbsp</td>" << endl; t << " <td class=\"md\">)&nbsp;</td>" << endl;
t << " <td class=\"md\" colspan=\"2\">"; t << " <td class=\"md\" colspan=\"2\">";
} }
} }
......
...@@ -176,11 +176,12 @@ class HtmlGenerator : public OutputGenerator ...@@ -176,11 +176,12 @@ class HtmlGenerator : public OutputGenerator
void writeRing(char c) { t << "&" << c << "ring;"; } void writeRing(char c) { t << "&" << c << "ring;"; }
void writeSharpS() { t << "&szlig;"; } void writeSharpS() { t << "&szlig;"; }
void writeCCedil(char c) { t << "&" << c << "cedil;"; } void writeCCedil(char c) { t << "&" << c << "cedil;"; }
void startDescList() { t << "<dl compact><dt>" << endl; } void startDescList() { t << "<dl compact><dt><b>" << endl; }
void endDescList() { t << "</dl>"; } void endDescList() { t << "</dl>"; }
void startParamList() { startDescList(); } void startParamList(ParamListTypes)
{ startDescList(); }
void endParamList() { endDescList(); } void endParamList() { endDescList(); }
void endDescTitle() {} void endDescTitle() { t << "</b>"; }
void writeDescItem() { t << "<dd>" << endl; } void writeDescItem() { t << "<dd>" << endl; }
void startSection(const char *,const char *,bool); void startSection(const char *,const char *,bool);
void endSection(const char *,bool); void endSection(const char *,bool);
......
...@@ -1194,10 +1194,10 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1194,10 +1194,10 @@ void writeAlphabeticalClassList(OutputList &ol)
{ {
if (cd->isLinkableInProject() && cd->templateMaster()==0) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
int index = getPrefixIndex(cd->localName()); int index = getPrefixIndex(cd->className());
if (toupper(cd->name().at(index))!=startLetter) // new begin letter => new header if (toupper(cd->className().at(index))!=startLetter) // new begin letter => new header
{ {
startLetter=toupper(cd->name().at(index)); startLetter=toupper(cd->className().at(index));
headerItems++; headerItems++;
} }
} }
...@@ -1227,11 +1227,11 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1227,11 +1227,11 @@ void writeAlphabeticalClassList(OutputList &ol)
{ {
if (cd->isLinkableInProject() && cd->templateMaster()==0) if (cd->isLinkableInProject() && cd->templateMaster()==0)
{ {
int index = getPrefixIndex(cd->localName()); int index = getPrefixIndex(cd->className());
if (toupper(cd->name().at(index))!=startLetter) if (toupper(cd->className().at(index))!=startLetter)
{ {
// insert a new header using a dummy class pointer. // insert a new header using a dummy class pointer.
startLetter=toupper(cd->name().at(index)); startLetter=toupper(cd->className().at(index));
colList[col].append((ClassDef *)8); // insert dummy for the header colList[col].append((ClassDef *)8); // insert dummy for the header
row++; row++;
if ( row >= rows + ((col<itemsInLastRow) ? 0 : -1)) if ( row >= rows + ((col<itemsInLastRow) ? 0 : -1))
...@@ -1275,8 +1275,8 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1275,8 +1275,8 @@ void writeAlphabeticalClassList(OutputList &ol)
if (cd) if (cd)
{ {
//printf("head ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>"); //printf("head ClassDef=%p %s\n",cd,cd ? cd->name().data() : "<none>");
int index = getPrefixIndex(cd->localName()); int index = getPrefixIndex(cd->className());
startLetter=toupper(cd->name().at(index)); startLetter=toupper(cd->className().at(index));
char s[2]; s[0]=startLetter; s[1]=0; char s[2]; s[0]=startLetter; s[1]=0;
ol.writeIndexHeading(s); ol.writeIndexHeading(s);
} }
...@@ -1291,7 +1291,7 @@ void writeAlphabeticalClassList(OutputList &ol) ...@@ -1291,7 +1291,7 @@ void writeAlphabeticalClassList(OutputList &ol)
} }
else else
{ {
extractNamespaceName(cd->name(),cname,namesp); cname=cd->className();
} }
ol.writeObjectLink(cd->getReference(), ol.writeObjectLink(cd->getReference(),
......
...@@ -185,7 +185,8 @@ class LatexGenerator : public OutputGenerator ...@@ -185,7 +185,8 @@ class LatexGenerator : public OutputGenerator
void endMemberDescription() { t << "\\item\\end{CompactList}"; } void endMemberDescription() { t << "\\item\\end{CompactList}"; }
void startDescList() { t << "\\begin{Desc}\n\\item["; } void startDescList() { t << "\\begin{Desc}\n\\item["; }
void endDescList() { t << "\\end{Desc}" << endl; } void endDescList() { t << "\\end{Desc}" << endl; }
void startParamList() { startDescList(); } void startParamList(ParamListTypes)
{ startDescList(); }
void endParamList() { endDescList(); } void endParamList() { endDescList(); }
void endDescTitle() { t << "]"; } void endDescTitle() { t << "]"; }
void writeDescItem() { t << "\\par" << endl; } void writeDescItem() { t << "\\par" << endl; }
......
...@@ -172,7 +172,7 @@ class ManGenerator : public OutputGenerator ...@@ -172,7 +172,7 @@ class ManGenerator : public OutputGenerator
void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; } void endMemberDescription() { t << "\\fP\""; firstCol=FALSE; }
void startDescList(); void startDescList();
void endDescList() {} void endDescList() {}
void startParamList() { startDescList(); } void startParamList(ParamListTypes) { startDescList(); }
void endParamList() { endDescList(); } void endParamList() { endDescList(); }
void endDescTitle(); void endDescTitle();
void writeDescItem(); void writeDescItem();
......
...@@ -359,10 +359,29 @@ MemberDef::~MemberDef() ...@@ -359,10 +359,29 @@ MemberDef::~MemberDef()
delete m_defTmpArgLists; delete m_defTmpArgLists;
} }
void MemberDef::setReimplements(MemberDef *md)
{
if (m_templateMaster)
{
m_templateMaster->setReimplements(md);
}
else
{
redefines=md;
}
}
void MemberDef::insertReimplementedBy(MemberDef *md) void MemberDef::insertReimplementedBy(MemberDef *md)
{ {
if (m_templateMaster)
{
m_templateMaster->insertReimplementedBy(md);
}
else
{
if (redefinedBy==0) redefinedBy = new MemberList; if (redefinedBy==0) redefinedBy = new MemberList;
redefinedBy->inSort(md); redefinedBy->inSort(md);
}
} }
void MemberDef::insertEnumField(MemberDef *md) void MemberDef::insertEnumField(MemberDef *md)
...@@ -1472,18 +1491,31 @@ void MemberDef::warnIfUndocumented() ...@@ -1472,18 +1491,31 @@ void MemberDef::warnIfUndocumented()
bool MemberDef::isLinkableInProject() const bool MemberDef::isLinkableInProject() const
{ {
if (m_templateMaster)
{
return m_templateMaster->isLinkableInProject();
}
else
{
return !name().isEmpty() && name().at(0)!='@' && return !name().isEmpty() && name().at(0)!='@' &&
((hasDocumentation() && !isReference()) (hasDocumentation() && !isReference()) &&
) &&
(prot!=Private || Config_getBool("EXTRACT_PRIVATE") || (prot!=Private || Config_getBool("EXTRACT_PRIVATE") ||
mtype==Friend) && // not a hidden member due to protection mtype==Friend) && // not a hidden member due to protection
(classDef!=0 || Config_getBool("EXTRACT_STATIC") || (classDef!=0 || Config_getBool("EXTRACT_STATIC") ||
!isStatic()); // not a static file/namespace member !isStatic()); // not a static file/namespace member
}
} }
bool MemberDef::isLinkable() const bool MemberDef::isLinkable() const
{ {
if (m_templateMaster)
{
return m_templateMaster->isLinkable();
}
else
{
return isLinkableInProject() || isReference(); return isLinkableInProject() || isReference();
}
} }
void MemberDef::setEnumDecl(OutputList &ed) void MemberDef::setEnumDecl(OutputList &ed)
......
...@@ -161,7 +161,7 @@ class MemberDef : public Definition ...@@ -161,7 +161,7 @@ class MemberDef : public Definition
void warnIfUndocumented(); void warnIfUndocumented();
// relation to other members // relation to other members
void setReimplements(MemberDef *md) { redefines=md; } void setReimplements(MemberDef *md);
void insertReimplementedBy(MemberDef *md); void insertReimplementedBy(MemberDef *md);
MemberDef *reimplements() const { return redefines; } MemberDef *reimplements() const { return redefines; }
MemberList *reimplementedBy() const { return redefinedBy; } MemberList *reimplementedBy() const { return redefinedBy; }
......
...@@ -40,6 +40,7 @@ class DotGfxHierarchyTable; ...@@ -40,6 +40,7 @@ class DotGfxHierarchyTable;
class BaseOutputDocInterface class BaseOutputDocInterface
{ {
public: public:
enum ParamListTypes { Param, RetVal, Exception };
/*! Start of a bullet list: e.g. \c <ul> in html. writeListItem() is /*! Start of a bullet list: e.g. \c <ul> in html. writeListItem() is
* Used for the bullet items. * Used for the bullet items.
...@@ -208,7 +209,7 @@ class BaseOutputDocInterface ...@@ -208,7 +209,7 @@ class BaseOutputDocInterface
virtual void writeCCedil(char) = 0; virtual void writeCCedil(char) = 0;
virtual void startDescList() = 0; virtual void startDescList() = 0;
virtual void endDescList() = 0; virtual void endDescList() = 0;
virtual void startParamList() = 0; virtual void startParamList(ParamListTypes t) = 0;
virtual void endParamList() = 0; virtual void endParamList() = 0;
virtual void endDescTitle() = 0; virtual void endDescTitle() = 0;
virtual void writeDescItem() = 0; virtual void writeDescItem() = 0;
......
...@@ -261,6 +261,7 @@ FORALL1(int a1,a1) ...@@ -261,6 +261,7 @@ FORALL1(int a1,a1)
FORALL1(DotClassGraph &a1,a1) FORALL1(DotClassGraph &a1,a1)
FORALL1(DotInclDepGraph &a1,a1) FORALL1(DotInclDepGraph &a1,a1)
FORALL1(DotGfxHierarchyTable &a1,a1) FORALL1(DotGfxHierarchyTable &a1,a1)
FORALL1(ParamListTypes a1,a1)
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE) #if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
FORALL1(bool a1,a1) FORALL1(bool a1,a1)
FORALL2(bool a1,int a2,a1,a2) FORALL2(bool a1,int a2,a1,a2)
......
...@@ -310,8 +310,8 @@ class OutputList : public OutputDocInterface ...@@ -310,8 +310,8 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startDescList); } { forall(&OutputGenerator::startDescList); }
void endDescList() void endDescList()
{ forall(&OutputGenerator::endDescList); } { forall(&OutputGenerator::endDescList); }
void startParamList() void startParamList(ParamListTypes t)
{ forall(&OutputGenerator::startParamList); } { forall(&OutputGenerator::startParamList,t); }
void endParamList() void endParamList()
{ forall(&OutputGenerator::endParamList); } { forall(&OutputGenerator::endParamList); }
void endDescTitle() void endDescTitle()
...@@ -455,6 +455,7 @@ class OutputList : public OutputDocInterface ...@@ -455,6 +455,7 @@ class OutputList : public OutputDocInterface
FORALLPROTO1(DotClassGraph &); FORALLPROTO1(DotClassGraph &);
FORALLPROTO1(DotInclDepGraph &); FORALLPROTO1(DotInclDepGraph &);
FORALLPROTO1(DotGfxHierarchyTable &); FORALLPROTO1(DotGfxHierarchyTable &);
FORALLPROTO1(ParamListTypes);
#if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE) #if defined(HAS_BOOL_TYPE) || defined(Q_HAS_BOOL_TYPE)
FORALLPROTO1(bool); FORALLPROTO1(bool);
FORALLPROTO2(bool,int); FORALLPROTO2(bool,int);
......
...@@ -168,7 +168,7 @@ class RTFGenerator : public OutputGenerator ...@@ -168,7 +168,7 @@ class RTFGenerator : public OutputGenerator
void endMemberDescription(); void endMemberDescription();
void startDescList(); void startDescList();
void endDescList(); void endDescList();
void startParamList() { startDescList(); } void startParamList(ParamListTypes) { startDescList(); }
void endParamList() { endDescList(); } void endParamList() { endDescList(); }
void endDescTitle(); void endDescTitle();
void writeDescItem(); void writeDescItem();
......
...@@ -468,6 +468,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -468,6 +468,7 @@ TITLE [tT][iI][tT][lL][eE]
%x Using %x Using
%x UsingDirective %x UsingDirective
%x NameSpaceDocArg1 %x NameSpaceDocArg1
%x PackageDocArg1
%x SkipCurly %x SkipCurly
%x SkipCurlyCpp %x SkipCurlyCpp
%x SkipCurlyEndDoc %x SkipCurlyEndDoc
...@@ -1086,21 +1087,12 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -1086,21 +1087,12 @@ TITLE [tT][iI][tT][lL][eE]
*currentTemplateSpec+=*yytext; *currentTemplateSpec+=*yytext;
} }
<FindMembers,FindMemberName>{SCOPENAME} { <FindMembers,FindMemberName>{SCOPENAME} {
// correct for misinterpreting return type as scope name: example: A<T> func()
//printf("YY_START=%d current->tArgList=%p current->mtArgList=%p\n",
// YY_START,current->tArgList,current->mtArgList);
//if (YY_START==FindMembers /*&& current->tArgList*/ && current->mtArgList==0)
//{
// current->mtArgList=current->tArgList;
// current->tArgList=0;
// current->scopeSpec.resize(0);
//}
lineCount(); lineCount();
if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0) if (insideIDL && yyleng==9 && strcmp(yytext,"cpp_quote")==0)
{ {
BEGIN(CppQuote); BEGIN(CppQuote);
} }
else if (insideIDL && yyleng==6 && strcmp(yytext,"import")==0) else if ((insideIDL || insideJava) && yyleng==6 && strcmp(yytext,"import")==0)
{ {
BEGIN(NextSemi); BEGIN(NextSemi);
} }
...@@ -2511,6 +2503,7 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -2511,6 +2503,7 @@ TITLE [tT][iI][tT][lL][eE]
<Specialization>{BN}+ { lineCount(); *specName +=' '; } <Specialization>{BN}+ { lineCount(); *specName +=' '; }
<Specialization>"<<" { *specName += yytext; } <Specialization>"<<" { *specName += yytext; }
<Specialization>">>" { *specName += yytext; } <Specialization>">>" { *specName += yytext; }
<Specialization>"typename"{BN}+ { lineCount(); }
<Specialization>. { <Specialization>. {
*specName += *yytext; *specName += *yytext;
} }
...@@ -2766,6 +2759,12 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -2766,6 +2759,12 @@ TITLE [tT][iI][tT][lL][eE]
current->startLine = yyLineNr; current->startLine = yyLineNr;
BEGIN( NameSpaceDocArg1 ); BEGIN( NameSpaceDocArg1 );
} }
<Doc,JavaDoc>{B}*{CMD}"package"{B}+ {
current->section = Entry::PACKAGEDOC_SEC;
current->fileName = yyFileName;
current->startLine = yyLineNr;
BEGIN( PackageDocArg1 );
}
<Doc,JavaDoc>{B}*{CMD}"class"{B}+ { <Doc,JavaDoc>{B}*{CMD}"class"{B}+ {
current->section = Entry::CLASSDOC_SEC; current->section = Entry::CLASSDOC_SEC;
current->fileName = yyFileName; current->fileName = yyFileName;
...@@ -2986,6 +2985,18 @@ TITLE [tT][iI][tT][lL][eE] ...@@ -2986,6 +2985,18 @@ TITLE [tT][iI][tT][lL][eE]
); );
yyLineNr++; yyLineNr++;
} }
<PackageDocArg1>{SCOPENAME} {
current->name = yytext;
newDocState();
}
<PackageDocArg1>"\\"{B}*"\n" { yyLineNr++; }
<PackageDocArg1>"\n" {
warn(yyFileName,yyLineNr,
"Warning: missing argument after "
"\\package."
);
yyLineNr++;
}
<ClassDocArg1>{SCOPENAME}/"<" { <ClassDocArg1>{SCOPENAME}/"<" {
current->name = yytext; current->name = yytext;
// prepend outer scope name // prepend outer scope name
......
...@@ -2819,7 +2819,7 @@ QCString convertNameToFile(const char *name,bool allowDots) ...@@ -2819,7 +2819,7 @@ QCString convertNameToFile(const char *name,bool allowDots)
} }
else else
{ {
num = (int)value; num = *(int*)&value;
} }
QCString result; QCString result;
result.sprintf("a%05d",num); result.sprintf("a%05d",num);
...@@ -3109,10 +3109,13 @@ bool extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCStr ...@@ -3109,10 +3109,13 @@ bool extractClassNameFromType(const QCString &type,int &pos,QCString &name,QCStr
/*! Substitutes any occurrence of a formal argument from argument list /*! Substitutes any occurrence of a formal argument from argument list
* \a formalArgs in \a name by the corresponding actual argument in * \a formalArgs in \a name by the corresponding actual argument in
* argument list \a actualArgs. The result after substitution * argument list \a actualArgs. The result after substitution
* is returned as a string. * is returned as a string. The argument \a className is used to
* prevent recursive substitution.
*/ */
QCString substituteTemplateArgumentsInString( QCString substituteTemplateArgumentsInString(
const QCString &name,ArgumentList *formalArgs,ArgumentList *actualArgs) const QCString &name,
ArgumentList *formalArgs,
ArgumentList *actualArgs)
{ {
//printf("substituteTemplateArgumentsInString(name=%s formal=%s actualArg=%s)\n", //printf("substituteTemplateArgumentsInString(name=%s formal=%s actualArg=%s)\n",
// name.data(),argListToString(formalArgs).data(),argListToString(actualArgs).data()); // name.data(),argListToString(formalArgs).data(),argListToString(actualArgs).data());
......
...@@ -153,7 +153,9 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupDict *memberGroupDict, ...@@ -153,7 +153,9 @@ void addMembersToMemberGroup(MemberList *ml,MemberGroupDict *memberGroupDict,
bool extractClassNameFromType(const QCString &type,int &pos, bool extractClassNameFromType(const QCString &type,int &pos,
QCString &name,QCString &templSpec); QCString &name,QCString &templSpec);
QCString substituteTemplateArgumentsInString( QCString substituteTemplateArgumentsInString(
const QCString &name,ArgumentList *formalArgs,ArgumentList *actualArgs); const QCString &name,
ArgumentList *formalArgs,
ArgumentList *actualArgs);
ArgumentList *copyArgumentList(const ArgumentList *src); ArgumentList *copyArgumentList(const ArgumentList *src);
QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists); QList<ArgumentList> *copyArgumentLists(const QList<ArgumentList> *srcLists);
......
...@@ -329,11 +329,16 @@ class XMLGenerator : public OutputDocInterface ...@@ -329,11 +329,16 @@ class XMLGenerator : public OutputDocInterface
endNestedPar(); endNestedPar();
m_t << "</simplesect>"; m_t << "</simplesect>";
} }
void startParamList() void startParamList(ParamListTypes t)
{ {
m_t << "<parameterlist><title>"; // non DocBook QCString kind;
// TODO: what kind of list switch(t)
// param, retval, exception {
case Param: kind="param"; break;
case RetVal: kind="retval"; break;
case Exception: kind="exception"; break;
}
m_t << "<parameterlist kind=\"" << kind << "\"><title>"; // non DocBook
m_inParamList = TRUE; m_inParamList = TRUE;
} }
void endParamList() void endParamList()
......
...@@ -67,7 +67,7 @@ ...@@ -67,7 +67,7 @@
if ( Config("moc") ) { if ( Config("moc") ) {
$moc_aware = 1; $moc_aware = 1;
} }
Project('TMAKE_LIBS += $$LIBS'); Project('TMAKE_LIBS = $$LIBS $$TMAKE_LIBS');
if ( !Project("TMAKE_RUN_CC") ) { if ( !Project("TMAKE_RUN_CC") ) {
Project('TMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src'); Project('TMAKE_RUN_CC = $(CC) -c $(CFLAGS) $(INCPATH) -o $obj $src');
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment