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

Release-1.2.15-20020512

parent 758291b1
DOXYGEN Version 1.2.15-20020430
DOXYGEN Version 1.2.15-20020512
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (30 April 2002)
Dimitri van Heesch (12 May 2002)
DOXYGEN Version 1.2.15_20020430
DOXYGEN Version 1.2.15_20020512
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) (30 April 2002)
Dimitri van Heesch (dimitri@stack.nl) (12 May 2002)
1.2.15-20020430
1.2.15-20020512
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2002 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef _DOXMLINTF_H
#define _DOXMLINTF_H
......@@ -480,7 +495,8 @@ class IMember
virtual const IString * name() const = 0;
virtual bool isConst() const = 0;
virtual bool isVolatile() const = 0;
virtual IParamIterator *params() const = 0;
virtual IParamIterator *parameters() const = 0;
virtual IParamIterator *templateParameters() const = 0;
virtual ILinkedTextIterator *initializer() const = 0;
virtual ILinkedTextIterator *exceptions() const = 0;
virtual IMemberReferenceIterator *references() const = 0;
......@@ -507,27 +523,79 @@ class IMemberIterator
virtual void release() = 0;
};
/*! \brief The interface to a section in the object model.
*
* A compound can have a number of sections, where each
* section contains a set of members with the properties implied by
* the section kind. The kind() method returns the kind of the section.
* The members of the section can be accessed via members(). Apart
* from using kind(), some of the individual properties of the section can
* also be inspected via isStatic(), isPublic(), isProtected() and
* isPrivate().
*/
class ISection
{
public:
enum SectionKind { Invalid=0,
UserDefined,
PubTypes, PubFuncs, PubAttribs, PubSlots,
Signals, DCOPFuncs, Properties,
PubStatFuncs, PubStatAttribs,
ProTypes, ProFuncs, ProAttribs, ProSlots,
ProStatFuncs, ProStatAttribs,
PriTypes, PriFuncs, PriAttribs, PriSlots,
PriStatFuncs, PriStatAttribs,
Friend, Related, Defines, Prototypes, Typedefs,
Enums, Functions, Variables
};
/*! Possible section types */
enum SectionKind
{ Invalid=0,
UserDefined, //!< A user defined member group
PubTypes, //!< Public member typedefs
PubFuncs, //!< Public member functions
PubAttribs, //!< Public member attributes
PubSlots, //!< Public Qt Slots
Signals, //!< Qt Signals
DCOPFuncs, //!< KDE-DCOP interface functions
Properties, //!< IDL properties
PubStatFuncs, //!< Public static member functions
PubStatAttribs, //!< Public static attributes
ProTypes, //!< Protected member typedefs
ProFuncs, //!< Protected member functions
ProAttribs, //!< Protected member attributes
ProSlots, //!< Protected slots
ProStatFuncs, //!< Protected static member functions
ProStatAttribs, //!< Protected static member attributes
PriTypes, //!< Private member typedefs
PriFuncs, //!< Private member functions
PriAttribs, //!< Private member attributes
PriSlots, //!< Private Qt slots
PriStatFuncs, //!< Private static member functions
PriStatAttribs, //!< Private static member attributes
Friend, //!< Friends
Related, //!< Function marked as related
Defines, //!< Preprocessor defines
Prototypes, //!< Global function prototypes
Typedefs, //!< Global typedefs
Enums, //!< Enumerations
Functions, //!< Global functions
Variables //!< Global variables
};
/*! Returns a string representation of the value returned by kind() */
virtual const IString * kindString() const = 0;
/*! Returns what kind of section this is */
virtual SectionKind kind() const = 0;
/*! Returns an iterator for the members of this section */
virtual IMemberIterator *members() const = 0;
/*! Returns \c true if this section contains statics */
virtual bool isStatic() const = 0;
/*! Returns \c true if this section belongs to a
* public section of a class
*/
virtual bool isPublic() const = 0;
/*! Returns \c true if this section belongs to a
* private section of a class
*/
virtual bool isPrivate() const = 0;
/*! Returns \c true if this section belongs to a
* protected section of a class
* */
virtual bool isProtected() const = 0;
};
......@@ -542,6 +610,31 @@ class ISectionIterator
virtual void release() = 0;
};
/*! \brief The interface to a compound in the object model.
*
* A compound has a name which can be obtained via the name() method
* and a unique id, which is return via the id() method.
* A compound consists zero or more members which are grouped into sections.
* The sections() method can be used to access the individual sections.
* Alternatively, members can be obtained by name or id. There are
* different types of compounds. The kind() method returns what kind of
* compound this is. Depending on the return value one can dynamically
* cast an interface pointer to an more specialised interface that provides
* additional methods.
* Example:
* \code
* ICompound *comp=...;
* if (comp->kind()==ICompound::Class)
* {
* IClass *cls = dynamic_cast<IClass*>(comp);
* // use methods of IClass
* }
* \endcode
* The documentation that is provided by a compound is available via
* the briefDescription() and detailedDescription() methods.
* To avoid excessive memory usage, release() should be called (once) on each
* compound interface pointer that is no longer needed.
*/
class ICompound
{
public:
......@@ -634,14 +727,16 @@ class IRelatedCompoundIterator
virtual void release() = 0;
};
/*! \brief The interface to a class in the object model.
*/
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;
virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
virtual ICompoundIterator *nestedCompounds() const = 0;
// TODO:
// class:
......@@ -653,35 +748,56 @@ class IClass : public ICompound
// locationBodyEndLine()
};
/*! \brief The interface to a struct in the object model.
*/
class IStruct : public ICompound
{
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
};
/*! \brief The interface to a union in the object model.
*/
class IUnion : public ICompound
{
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
};
/*! \brief The interface to a Java/IDL interface in the object model.
*/
class IInterface : public ICompound
{
public:
virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
};
/*! \brief The interface to a Java/IDL exception in the object model.
*/
class IException : public ICompound
{
};
/*! \brief The interface to a namespace in the object model.
*/
class INamespace : public ICompound
{
// namespace:
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
};
/*! \brief The interface to a file in the object model.
*/
class IFile : public ICompound
{
public:
virtual IGraph *includeDependencyGraph() const = 0;
virtual IGraph *includedByDependencyGraph() const = 0;
virtual IDocProgramListing *source() const = 0;
virtual ICompoundIterator *nestedCompounds() const = 0;
// file:
// includes()
......@@ -690,14 +806,20 @@ class IFile : public ICompound
// ICompoundIterator *innerClasses()
};
/*! \brief The interface to a group in the object model.
*/
class IGroup : public ICompound
{
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
// group:
// Title()
// innerFile()
// innerPage()
};
/*! \brief The interface to a page in the object model.
*/
class IPage : public ICompound
{
};
......
......@@ -145,13 +145,15 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
: m_brief(0), m_detailed(0), m_programListing(0),
m_xmlDir(xmlDir), m_refCount(1), m_memberDict(257), m_memberNameDict(257),
m_mainHandler(0), m_inheritanceGraph(0), m_collaborationGraph(0),
m_includeDependencyGraph(0), m_includedByDependencyGraph(0)
m_includeDependencyGraph(0), m_includedByDependencyGraph(0),
m_hasTemplateParams(FALSE)
{
m_superClasses.setAutoDelete(TRUE);
m_subClasses.setAutoDelete(TRUE);
m_sections.setAutoDelete(TRUE);
m_memberNameDict.setAutoDelete(TRUE);
m_innerClasses.setAutoDelete(TRUE);
m_innerCompounds.setAutoDelete(TRUE);
m_templateParams.setAutoDelete(TRUE);
addStartHandler("doxygen");
addEndHandler("doxygen");
......@@ -190,6 +192,20 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
addStartHandler("innerclass",this,&CompoundHandler::startInnerClass);
addEndHandler("innerclass");
addStartHandler("innernamespace",this,&CompoundHandler::startInnerNamespace);
addEndHandler("innernamespace");
addStartHandler("innerfile",this,&CompoundHandler::startInnerFile);
addEndHandler("innerfile");
addStartHandler("innergroup",this,&CompoundHandler::startInnerGroup);
addEndHandler("innergroup");
addStartHandler("templateparamlist");
addEndHandler("templateparamlist");
addStartHandler("param",this,&CompoundHandler::startParam);
addEndHandler("param");
}
CompoundHandler::~CompoundHandler()
......@@ -259,7 +275,30 @@ void CompoundHandler::endCompoundName()
void CompoundHandler::startInnerClass(const QXmlAttributes& attrib)
{
m_innerClasses.append(new QString(attrib.value("refid")));
m_innerCompounds.append(new QString(attrib.value("refid")));
}
void CompoundHandler::startInnerNamespace(const QXmlAttributes& attrib)
{
m_innerCompounds.append(new QString(attrib.value("refid")));
}
void CompoundHandler::startInnerFile(const QXmlAttributes& attrib)
{
m_innerCompounds.append(new QString(attrib.value("refid")));
}
void CompoundHandler::startInnerGroup(const QXmlAttributes& attrib)
{
m_innerCompounds.append(new QString(attrib.value("refid")));
}
void CompoundHandler::startParam(const QXmlAttributes& attrib)
{
m_hasTemplateParams = TRUE;
ParamHandler *ph = new ParamHandler(this);
ph->startParam(attrib);
m_templateParams.append(ph);
}
void CompoundHandler::addSuperClass(const QXmlAttributes& attrib)
......@@ -445,19 +484,19 @@ IGraph *CompoundHandler::includedByDependencyGraph() const
return m_includedByDependencyGraph;
}
IRelatedCompoundIterator *CompoundHandler::baseClasses() const
IRelatedCompoundIterator *CompoundHandler::baseCompounds() const
{
return new RelatedCompoundIterator(m_superClasses);
}
IRelatedCompoundIterator *CompoundHandler::derivedClasses() const
IRelatedCompoundIterator *CompoundHandler::derivedCompounds() const
{
return new RelatedCompoundIterator(m_subClasses);
}
ICompoundIterator *CompoundHandler::nestedClasses() const
ICompoundIterator *CompoundHandler::nestedCompounds() const
{
return new CompoundIdIterator(m_mainHandler,m_innerClasses);
return new CompoundIdIterator(m_mainHandler,m_innerCompounds);
}
IDocProgramListing *CompoundHandler::source() const
......@@ -465,3 +504,8 @@ IDocProgramListing *CompoundHandler::source() const
return m_programListing;
}
IParamIterator *CompoundHandler::templateParameters() const
{
return m_hasTemplateParams ? new ParamIterator(m_templateParams) : 0;
}
......@@ -31,6 +31,7 @@ class GraphHandler;
class MemberHandler;
class CompoundHandler;
class SectionHandler;
class ParamHandler;
class RelatedCompound : public IRelatedCompound
......@@ -92,6 +93,10 @@ class CompoundHandler : public IClass,
virtual void startIncludeDependencyGraph(const QXmlAttributes& attrib);
virtual void startIncludedByDependencyGraph(const QXmlAttributes& attrib);
virtual void startInnerClass(const QXmlAttributes& attrib);
virtual void startInnerNamespace(const QXmlAttributes& attrib);
virtual void startInnerFile(const QXmlAttributes& attrib);
virtual void startInnerGroup(const QXmlAttributes& attrib);
virtual void startParam(const QXmlAttributes& attrib);
virtual void addref() { m_refCount++; }
CompoundHandler(const QString &dirName);
......@@ -111,14 +116,16 @@ class CompoundHandler : public IClass,
IDocRoot *detailedDescription() const;
IMember *memberById(const char *id) const;
IMemberIterator *memberByName(const char *name) const;
IParamIterator *templateParameters() const;
void release();
// IClass implementation
IGraph *inheritanceGraph() const;
IGraph *collaborationGraph() const;
IRelatedCompoundIterator *baseClasses() const;
IRelatedCompoundIterator *derivedClasses() const;
ICompoundIterator *nestedClasses() const;
IRelatedCompoundIterator *baseCompounds() const;
IRelatedCompoundIterator *derivedCompounds() const;
ICompoundIterator *nestedCompounds() const;
ICompoundIterator *nestedGroup() const;
// IFile implementation
IGraph *includeDependencyGraph() const;
......@@ -129,6 +136,7 @@ class CompoundHandler : public IClass,
QList<RelatedCompound> m_superClasses;
QList<RelatedCompound> m_subClasses;
QList<SectionHandler> m_sections;
QList<ParamHandler> m_templateParams;
DocHandler *m_brief;
DocHandler *m_detailed;
ProgramListingHandler *m_programListing;
......@@ -147,8 +155,9 @@ class CompoundHandler : public IClass,
GraphHandler *m_collaborationGraph;
GraphHandler *m_includeDependencyGraph;
GraphHandler *m_includedByDependencyGraph;
QList<QString> m_innerClasses;
QList<QString> m_innerCompounds;
ProgramListingHandler *m_source;
bool m_hasTemplateParams;
};
......
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2002 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef _DOXMLINTF_H
#define _DOXMLINTF_H
......@@ -480,7 +495,8 @@ class IMember
virtual const IString * name() const = 0;
virtual bool isConst() const = 0;
virtual bool isVolatile() const = 0;
virtual IParamIterator *params() const = 0;
virtual IParamIterator *parameters() const = 0;
virtual IParamIterator *templateParameters() const = 0;
virtual ILinkedTextIterator *initializer() const = 0;
virtual ILinkedTextIterator *exceptions() const = 0;
virtual IMemberReferenceIterator *references() const = 0;
......@@ -507,27 +523,79 @@ class IMemberIterator
virtual void release() = 0;
};
/*! \brief The interface to a section in the object model.
*
* A compound can have a number of sections, where each
* section contains a set of members with the properties implied by
* the section kind. The kind() method returns the kind of the section.
* The members of the section can be accessed via members(). Apart
* from using kind(), some of the individual properties of the section can
* also be inspected via isStatic(), isPublic(), isProtected() and
* isPrivate().
*/
class ISection
{
public:
enum SectionKind { Invalid=0,
UserDefined,
PubTypes, PubFuncs, PubAttribs, PubSlots,
Signals, DCOPFuncs, Properties,
PubStatFuncs, PubStatAttribs,
ProTypes, ProFuncs, ProAttribs, ProSlots,
ProStatFuncs, ProStatAttribs,
PriTypes, PriFuncs, PriAttribs, PriSlots,
PriStatFuncs, PriStatAttribs,
Friend, Related, Defines, Prototypes, Typedefs,
Enums, Functions, Variables
};
/*! Possible section types */
enum SectionKind
{ Invalid=0,
UserDefined, //!< A user defined member group
PubTypes, //!< Public member typedefs
PubFuncs, //!< Public member functions
PubAttribs, //!< Public member attributes
PubSlots, //!< Public Qt Slots
Signals, //!< Qt Signals
DCOPFuncs, //!< KDE-DCOP interface functions
Properties, //!< IDL properties
PubStatFuncs, //!< Public static member functions
PubStatAttribs, //!< Public static attributes
ProTypes, //!< Protected member typedefs
ProFuncs, //!< Protected member functions
ProAttribs, //!< Protected member attributes
ProSlots, //!< Protected slots
ProStatFuncs, //!< Protected static member functions
ProStatAttribs, //!< Protected static member attributes
PriTypes, //!< Private member typedefs
PriFuncs, //!< Private member functions
PriAttribs, //!< Private member attributes
PriSlots, //!< Private Qt slots
PriStatFuncs, //!< Private static member functions
PriStatAttribs, //!< Private static member attributes
Friend, //!< Friends
Related, //!< Function marked as related
Defines, //!< Preprocessor defines
Prototypes, //!< Global function prototypes
Typedefs, //!< Global typedefs
Enums, //!< Enumerations
Functions, //!< Global functions
Variables //!< Global variables
};
/*! Returns a string representation of the value returned by kind() */
virtual const IString * kindString() const = 0;
/*! Returns what kind of section this is */
virtual SectionKind kind() const = 0;
/*! Returns an iterator for the members of this section */
virtual IMemberIterator *members() const = 0;
/*! Returns \c true if this section contains statics */
virtual bool isStatic() const = 0;
/*! Returns \c true if this section belongs to a
* public section of a class
*/
virtual bool isPublic() const = 0;
/*! Returns \c true if this section belongs to a
* private section of a class
*/
virtual bool isPrivate() const = 0;
/*! Returns \c true if this section belongs to a
* protected section of a class
* */
virtual bool isProtected() const = 0;
};
......@@ -542,6 +610,31 @@ class ISectionIterator
virtual void release() = 0;
};
/*! \brief The interface to a compound in the object model.
*
* A compound has a name which can be obtained via the name() method
* and a unique id, which is return via the id() method.
* A compound consists zero or more members which are grouped into sections.
* The sections() method can be used to access the individual sections.
* Alternatively, members can be obtained by name or id. There are
* different types of compounds. The kind() method returns what kind of
* compound this is. Depending on the return value one can dynamically
* cast an interface pointer to an more specialised interface that provides
* additional methods.
* Example:
* \code
* ICompound *comp=...;
* if (comp->kind()==ICompound::Class)
* {
* IClass *cls = dynamic_cast<IClass*>(comp);
* // use methods of IClass
* }
* \endcode
* The documentation that is provided by a compound is available via
* the briefDescription() and detailedDescription() methods.
* To avoid excessive memory usage, release() should be called (once) on each
* compound interface pointer that is no longer needed.
*/
class ICompound
{
public:
......@@ -634,14 +727,16 @@ class IRelatedCompoundIterator
virtual void release() = 0;
};
/*! \brief The interface to a class in the object model.
*/
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;
virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
virtual ICompoundIterator *nestedCompounds() const = 0;
// TODO:
// class:
......@@ -653,35 +748,56 @@ class IClass : public ICompound
// locationBodyEndLine()
};
/*! \brief The interface to a struct in the object model.
*/
class IStruct : public ICompound
{
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
};
/*! \brief The interface to a union in the object model.
*/
class IUnion : public ICompound
{
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
};
/*! \brief The interface to a Java/IDL interface in the object model.
*/
class IInterface : public ICompound
{
public:
virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
};
/*! \brief The interface to a Java/IDL exception in the object model.
*/
class IException : public ICompound
{
};
/*! \brief The interface to a namespace in the object model.
*/
class INamespace : public ICompound
{
// namespace:
// ICompound *innerNamespaces()
// ICompoundIterator *innerClasses()
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
};
/*! \brief The interface to a file in the object model.
*/
class IFile : public ICompound
{
public:
virtual IGraph *includeDependencyGraph() const = 0;
virtual IGraph *includedByDependencyGraph() const = 0;
virtual IDocProgramListing *source() const = 0;
virtual ICompoundIterator *nestedCompounds() const = 0;
// file:
// includes()
......@@ -690,14 +806,20 @@ class IFile : public ICompound
// ICompoundIterator *innerClasses()
};
/*! \brief The interface to a group in the object model.
*/
class IGroup : public ICompound
{
public:
virtual ICompoundIterator *nestedCompounds() const = 0;
// group:
// Title()
// innerFile()
// innerPage()
};
/*! \brief The interface to a page in the object model.
*/
class IPage : public ICompound
{
};
......
......@@ -159,6 +159,9 @@ MemberHandler::MemberHandler(IBaseHandler *parent)
addStartHandler("location",this,&MemberHandler::startLocation);
addEndHandler("location");
addStartHandler("templateparamlist",this,&MemberHandler::startTemplateParamList);
addEndHandler("templateparamlist",this,&MemberHandler::endTemplateParamList);
m_type.setAutoDelete(TRUE);
m_initializer.setAutoDelete(TRUE);
m_exception.setAutoDelete(TRUE);
......@@ -172,6 +175,8 @@ MemberHandler::MemberHandler(IBaseHandler *parent)
m_defLine=0;
m_bodyStart=0;
m_bodyEnd=0;
m_insideTemplateParamList=FALSE;
m_hasTemplateParamList=FALSE;
}
MemberHandler::~MemberHandler()
......@@ -313,7 +318,14 @@ void MemberHandler::startParam(const QXmlAttributes& attrib)
{
ParamHandler *paramHandler = new ParamHandler(this);
paramHandler->startParam(attrib);
m_params.append(paramHandler);
if (m_insideTemplateParamList)
{
m_templateParams.append(paramHandler);
}
else
{
m_params.append(paramHandler);
}
}
void MemberHandler::startEnumValue(const QXmlAttributes& attrib)
......@@ -323,6 +335,17 @@ void MemberHandler::startEnumValue(const QXmlAttributes& attrib)
m_enumValues.append(evh);
}
void MemberHandler::startTemplateParamList(const QXmlAttributes&)
{
m_insideTemplateParamList = TRUE;
m_hasTemplateParamList = TRUE;
}
void MemberHandler::endTemplateParamList()
{
m_insideTemplateParamList = FALSE;
}
void MemberHandler::initialize(MainHandler *mh)
{
{
......
......@@ -106,6 +106,8 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
virtual void startInitializer(const QXmlAttributes& attrib);
virtual void startException(const QXmlAttributes& attrib);
virtual void startEnumValue(const QXmlAttributes& attrib);
virtual void startTemplateParamList(const QXmlAttributes &attrib);
virtual void endTemplateParamList();
MemberHandler(IBaseHandler *parent);
virtual ~MemberHandler();
......@@ -136,8 +138,10 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
that->m_typeString = LinkedTextHandler::toString(m_type);
return &m_typeString;
}
virtual IParamIterator *params() const
virtual IParamIterator *parameters() const
{ return new ParamIterator(m_params); }
virtual IParamIterator *templateParameters() const
{ return m_hasTemplateParamList ? new ParamIterator(m_templateParams) : 0; }
virtual IMemberReferenceIterator *references() const
{ return new MemberReferenceIterator(m_references); }
virtual IMemberReferenceIterator *referencedBy() const
......@@ -186,6 +190,7 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
DocHandler *m_brief;
DocHandler *m_detailed;
QList<ParamHandler> m_params;
QList<ParamHandler> m_templateParams;
QList<MemberReference> m_references;
QList<MemberReference> m_referencedBy;
MemberReference *m_reimplements;
......@@ -198,6 +203,8 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
bool m_isVolatile;
LinkedTextHandler *m_linkedTextHandler;
QList<EnumValueHandler> m_enumValues;
bool m_insideTemplateParamList;
bool m_hasTemplateParamList;
};
class MemberIterator : public BaseIterator<IMemberIterator,IMember,MemberHandler>
......
......@@ -432,6 +432,27 @@ void DumpGraph(IGraph *graph)
}
void DumpParamList(IParamIterator *pli,int indent)
{
QString indentStr;
indentStr.fill(' ',indent);
IParam *par;
for (pli->toFirst();(par=pli->current());pli->toNext())
{
ILinkedTextIterator *lti = par->type();
QString parType = linkedTextToString(lti);
lti->release();
lti = par->defaultValue();
QString defVal = linkedTextToString(lti);
lti->release();
printf("%sParam type=%s decl_name=%s def_name=%s defvalue=%s\n",
indentStr.data(), parType.latin1(),
par->declarationName()->latin1(),
par->definitionName()->latin1(),
defVal.latin1());
}
}
int main(int argc,char **argv)
{
if (argc!=2)
......@@ -471,19 +492,8 @@ int main(int argc,char **argv)
linkedTextToString(lti).latin1(),mem->name()->latin1());
lti->release();
IParamIterator *pli = mem->params();
IParam *par;
for (pli->toFirst();(par=pli->current());pli->toNext())
{
lti = par->type();
QString parType = linkedTextToString(lti);
lti->release();
lti = par->defaultValue();
QString defVal = linkedTextToString(lti);
lti->release();
printf(" Param type=%s name=%s defvalue=%s\n",
parType.latin1(), par->definitionName()->latin1(),defVal.latin1());
}
IParamIterator *pli = mem->parameters();
DumpParamList(pli,6);
pli->release();
IMemberReferenceIterator *mri = mem->references();
IMemberReference *mr;
......@@ -513,6 +523,14 @@ int main(int argc,char **argv)
}
evi->release();
pli = mem->templateParameters();
if (pli)
{
printf(" Template parameters\n");
DumpParamList(pli,8);
pli->release();
}
IDoc *doc = mem->briefDescription();
if (doc)
{
......@@ -557,7 +575,7 @@ int main(int argc,char **argv)
DumpGraph(cls->collaborationGraph());
printf("==== base classes ==== \n");
IRelatedCompoundIterator *bcli = cls->baseClasses();
IRelatedCompoundIterator *bcli = cls->baseCompounds();
IRelatedCompound *bClass;
for (bcli->toFirst();(bClass=bcli->current());bcli->toNext())
{
......@@ -568,7 +586,7 @@ int main(int argc,char **argv)
bcli->release();
printf("==== derived classes ==== \n");
IRelatedCompoundIterator *dcli = cls->derivedClasses();
IRelatedCompoundIterator *dcli = cls->derivedCompounds();
IRelatedCompound *dClass;
for (dcli->toFirst();(dClass=dcli->current());dcli->toNext())
{
......
......@@ -120,7 +120,7 @@ Here is an example:
<li>If \ref cfg_javadoc_autobrief "JAVADOC_AUTOBRIEF" is set to YES in the configuration file,
then using JavaDoc style comment
blocks will automatically start a brief description which ends at the
first dot. Here is an example:
first dot followed by a space or new line. Here is an example:
\verbatim
/** Brief description which ends at this dot. Details follow
......
......@@ -25,7 +25,7 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.15-20020421), 26 languages
Currently (version 1.2.15-20020430), 26 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Chinesetraditional, Croatian, Czech,
Danish, Dutch, English, Finnish, French,
......
......@@ -198,9 +198,9 @@ During parsing the following steps take place:
<ul>
<li> The special commands inside the documentation are executed. See
section \ref commands for an overview of all commands.
<li> If a line starts with some whitespace followed by one or more asterixes
<li> If a line starts with some whitespace followed by one or more asterisks
(<tt>*</tt>) and then optionally more whitespace,
then all whitespace and asterixes are removed.
then all whitespace and asterisks are removed.
<li> All resulting blank lines are treated as a paragraph separators.
This saves you from placing new-paragraph commands yourself
in order to make the generated documentation readable.
......
Summary: A documentation system for C/C++.
Name: doxygen
Version: 1.2.15_20020430
Version: 1.2.15_20020512
Release: 1
Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
......@@ -53,6 +53,6 @@ clean: Makefile.libdoxygen Makefile.doxygen Makefile.doxytag Makefile.doxysearch
distclean: clean
-$(RM) scanner.cpp doc.cpp code.cpp config.cpp pre.cpp ce_lex.cpp \
ce_parse.cpp ce_parse.h doxytag.cpp tag.cpp \
declinfo.cpp defargs.cpp
declinfo.cpp defargs.cpp commentcnv.cpp
FORCE:
......@@ -596,22 +596,22 @@ void ClassDef::setIncludeFile(FileDef *fd,const char *includeName,bool local)
}
// TODO: fix this: a nested template class can have multiple outer templates
ArgumentList *ClassDef::outerTemplateArguments() const
{
int ti;
ClassDef *pcd=0;
int pi=0;
if (m_tempArgs) return m_tempArgs;
// find the outer most class scope
while ((ti=name().find("::",pi))!=-1 &&
(pcd=getClass(name().left(ti)))==0
) pi=ti+2;
if (pcd)
{
return pcd->templateArguments();
}
return 0;
}
//ArgumentList *ClassDef::outerTemplateArguments() const
//{
// int ti;
// ClassDef *pcd=0;
// int pi=0;
// if (m_tempArgs) return m_tempArgs;
// // find the outer most class scope
// while ((ti=name().find("::",pi))!=-1 &&
// (pcd=getClass(name().left(ti)))==0
// ) pi=ti+2;
// if (pcd)
// {
// return pcd->templateArguments();
// }
// return 0;
//}
static void searchTemplateSpecs(/*in*/ Definition *d,
/*out*/ QList<ArgumentList> &result,
......@@ -684,6 +684,68 @@ static void writeTemplateSpec(OutputList &ol,Definition *d,
ol.writeString("\n");
}
}
// write the detailed description for this class
void ClassDef::writeDetailedDescription(OutputList &ol, OutputList &briefOutput, const QCString &pageType, bool exampleFlag)
{
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty() ||
/*(Config_getBool("SOURCE_BROWSER") && startBodyLine!=-1 && bodyDef) ||*/
exampleFlag)
{
ol.writeRuler();
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.writeAnchor(0,"_details");
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
ol.startTextBlock();
writeTemplateSpec(ol,this,pageType);
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol+=briefOutput;
}
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.newParagraph();
}
// write documentation
if (!documentation().isEmpty())
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.popGeneratorState();
parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
}
// write examples
if (exampleFlag)
{
ol.startDescList(BaseOutputDocInterface::Examples);
parseText(ol,theTranslator->trExamples()+": ");
ol.endDescTitle();
ol.writeDescItem();
ol.newParagraph();
writeExample(ol,m_exampleSDict);
//ol.endDescItem();
ol.endDescList();
}
ol.newParagraph();
writeSourceDef(ol,name());
ol.endTextBlock();
}
else
{
writeTemplateSpec(ol,this,pageType);
}
}
// write all documentation for this class
void ClassDef::writeDocumentation(OutputList &ol)
......@@ -691,16 +753,15 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write title
QCString pageTitle=name().copy();
QCString pageType;
ArgumentList *outerTempArgList = outerTemplateArguments();
QCString cType=compoundTypeString();
toupper(cType.at(0));
pageType+=" ";
pageType+=cType;
pageTitle+=pageType+" Reference";
if (outerTempArgList) pageTitle.prepend(" Template");
if (m_tempArgs) pageTitle.prepend(" Template");
startFile(ol,getOutputFileBase(),name(),pageTitle);
startTitle(ol,getOutputFileBase());
parseText(ol,theTranslator->trCompoundReference(displayName(),m_compType,outerTempArgList!=0));
parseText(ol,theTranslator->trCompoundReference(displayName(),m_compType,m_tempArgs!=0));
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),name());
......@@ -714,24 +775,27 @@ void ClassDef::writeDocumentation(OutputList &ol)
if (!briefDescription().isEmpty())
{
parseDoc(briefOutput,m_defFileName,m_defLine,name(),0,briefDescription());
ol+=briefOutput;
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
if (Config_getBool("REPEAT_BRIEF") ||
!documentation().isEmpty() ||
exampleFlag
)
if (!Config_getBool("DETAILS_AT_TOP"))
{
parseText(ol,theTranslator->trMore());
ol+=briefOutput;
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
if (Config_getBool("REPEAT_BRIEF") ||
!documentation().isEmpty() ||
exampleFlag
)
{
parseText(ol,theTranslator->trMore());
}
ol.endTextLink();
ol.popGeneratorState();
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.enable(OutputGenerator::Man);
}
ol.endTextLink();
ol.popGeneratorState();
ol.disable(OutputGenerator::Man);
ol.newParagraph();
ol.enable(OutputGenerator::Man);
}
ol.writeSynopsis();
......@@ -990,6 +1054,11 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endTextBlock();
// write detailed description if the user wants it near the top
if (Config_getBool("DETAILS_AT_TOP")) {
writeDetailedDescription(ol,briefOutput,pageType,exampleFlag);
}
// write member groups
ol.startMemberSections();
......@@ -1062,64 +1131,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.endMemberSections();
// write detailed description
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty() ||
/*(Config_getBool("SOURCE_BROWSER") && startBodyLine!=-1 && bodyDef) ||*/
exampleFlag)
{
ol.writeRuler();
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.writeAnchor(0,"_details");
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
ol.startTextBlock();
writeTemplateSpec(ol,this,pageType);
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol+=briefOutput;
}
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.newParagraph();
}
// write documentation
if (!documentation().isEmpty())
{
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
ol.popGeneratorState();
parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
}
// write examples
if (exampleFlag)
{
ol.startDescList(BaseOutputDocInterface::Examples);
parseText(ol,theTranslator->trExamples()+": ");
ol.endDescTitle();
ol.writeDescItem();
ol.newParagraph();
writeExample(ol,m_exampleSDict);
//ol.endDescItem();
ol.endDescList();
}
ol.newParagraph();
writeSourceDef(ol,name());
ol.endTextBlock();
if (!Config_getBool("DETAILS_AT_TOP")) {
writeDetailedDescription(ol,briefOutput,pageType,exampleFlag);
}
else
{
writeTemplateSpec(ol,this,pageType);
}
typedefMembers.writeDocumentation(ol,name(),this,
......
......@@ -102,6 +102,7 @@ class ClassDef : public Definition
void writeDocumentationForInnerClasses(OutputList &ol);
void writeMemberList(OutputList &ol);
void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup);
void writeDetailedDescription(OutputList &ol,OutputList &briefOutput,const QCString &pageType,bool exampleFlag);
/*! Return the protection level (Public,Protected,Private) in which
* this compound was found.
......@@ -129,7 +130,7 @@ class ClassDef : public Definition
* from its outer class (doxygen assumes there is only one!).
* Will return 0 if not applicable.
*/
ArgumentList *outerTemplateArguments() const;
//ArgumentList *outerTemplateArguments() const;
/*! Returns the namespace this compound is in, or 0 if it has a global
* scope.
......
......@@ -1480,6 +1480,14 @@ void Config::create()
"explict @brief command for a brief description. \n",
FALSE
);
cb = addBool(
"DETAILS_AT_TOP",
"If the DETAILS_AT_TOP tag is set to YES then Doxygen \n"
"will output the detailed description near the top, like JavaDoc.\n"
"If set to NO, the detailed description appears after the member \n"
"documentation. \n",
FALSE
);
cb = addBool(
"INHERIT_DOCS",
"If the INHERIT_DOCS tag is set to YES (the default) then an undocumented \n"
......
......@@ -1753,6 +1753,18 @@ void writeDotGraphFromFile(const char *inFile,const char *outFile,
{
err("Problems running dot. Check your installation!\n");
}
// Added by Nils Strom
if ( (format==EPS) && (Config_getBool("USE_PDFLATEX")) )
{
QCString epstopdfArgs(4096);
epstopdfArgs.sprintf("\"%s.eps\" --outfile=\"%s.pdf\"",
outFile,outFile);
if (iSystem("epstopdf",epstopdfArgs,TRUE)!=0)
{
err("Error: Problems running epstopdf. Check your TeX installation!\n");
}
}
if (format==BITMAP) checkDotResult(imgName);
}
......@@ -58,7 +58,7 @@
#include "defgen.h"
#include "reflist.h"
#include "page.h"
#include "packagedef.h"
//#include "packagedef.h"
#include "bufstr.h"
#include "commentcnv.h"
......@@ -88,7 +88,7 @@ FormulaList Doxygen::formulaList; // all formulas
FormulaDict Doxygen::formulaDict(1009); // all formulas
FormulaDict Doxygen::formulaNameDict(1009); // the label name of all formulas
PackageSDict Doxygen::packageDict(257); // java packages
//PackageSDict Doxygen::packageDict(257); // java packages
PageSDict *Doxygen::pageSDict = new PageSDict(1009); // all doc pages
PageSDict *Doxygen::exampleSDict = new PageSDict(1009); // all examples
......@@ -889,6 +889,7 @@ static void buildNamespaceList(Entry *root)
// also add namespace to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
//printf("adding namespace %s to context %s\n",nd->name().data(),d?d->name().data():"none");
if (d==0)
{
// TODO: Due to the order in which the tag file is written
......@@ -5646,16 +5647,16 @@ static void findMainPage(Entry *root)
//----------------------------------------------------------------------------
/*! Add Java classes to their respective packages */
static void addClassesToPackages()
{
ClassDef *cd;
ClassSDict::Iterator cli(Doxygen::classSDict);
for (;(cd=cli.current());++cli)
{
PackageDef *pd = cd->packageDef();
if (pd) pd->addClass(cd);
}
}
//static void addClassesToPackages()
//{
// ClassDef *cd;
// ClassSDict::Iterator cli(Doxygen::classSDict);
// for (;(cd=cli.current());++cli)
// {
// PackageDef *pd = cd->packageDef();
// if (pd) pd->addClass(cd);
// }
//}
//----------------------------------------------------------------------------
......@@ -7336,8 +7337,8 @@ void parseInput()
msg("Computing member relations...\n");
computeMemberRelations();
msg("Adding classes to their packages...\n");
addClassesToPackages();
//msg("Adding classes to their packages...\n");
//addClassesToPackages();
msg("Building full member lists recursively...\n");
buildCompleteMemberLists();
......
......@@ -32,7 +32,7 @@
#include "formula.h"
#include "section.h"
#include "membergroup.h"
#include "packagedef.h"
//#include "packagedef.h"
class PageSList;
class PageSDict;
......@@ -92,7 +92,7 @@ class Doxygen
static QIntDict<QCString> memberHeaderDict; // dictionary of the member groups heading
static QIntDict<QCString> memberDocDict; // dictionary of the member groups heading
static QDict<void> expandAsDefinedDict;
static PackageSDict packageDict;
//static PackageSDict packageDict;
static NamespaceDef *globalScope;
};
......
......@@ -98,6 +98,57 @@ void FileDef::distributeMemberGroupDocumentation()
}
}
void FileDef::writeDetailedDocumentation(OutputList &ol)
{
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty()
)
{
ol.writeRuler();
ol.pushGeneratorState();
//bool latexOn = ol.isEnabled(OutputGenerator::Latex);
//if (latexOn) ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.writeAnchor(0,"_details");
//if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
parseDoc(ol,filepath,1,0,0,briefDescription());
}
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.newParagraph();
}
if (!documentation().isEmpty())
{
//if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
// doc+='.';
parseDoc(ol,filepath,1,0,0,documentation()+"\n");
}
//printf("Writing source ref for file %s\n",name().data());
if (Config_getBool("SOURCE_BROWSER"))
{
ol.newParagraph();
QCString refText = theTranslator->trDefinedInSourceFile();
int fileMarkerPos = refText.find("@0");
if (fileMarkerPos!=-1) // should always pass this.
{
parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1
ol.writeObjectLink(0,getSourceFileBase(),
0,name());
parseText(ol,refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
}
}
}
/*! Write the documentation page for this file to the file of output
generators \a ol.
*/
......@@ -132,15 +183,13 @@ void FileDef::writeDocumentation(OutputList &ol)
}
ol.startTextBlock();
//brief=brief.stripWhiteSpace();
//int bl=brief.length();
OutputList briefOutput(&ol);
if (briefDescription())
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDocumentation(ol);
}
else if (briefDescription())
{
//if (brief.at(bl-1)!='.' && brief.at(bl-1)!='!' && brief.at(bl!='?'))
// brief+='.';
parseDoc(briefOutput,filepath,1,0,0,briefDescription());
ol+=briefOutput;
parseDoc(ol,filepath,1,0,0,briefDescription());
ol.writeString(" \n");
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(0,"_details");
......@@ -198,6 +247,8 @@ void FileDef::writeDocumentation(OutputList &ol)
const char *locStr = (ii->local || isIDLorJava) ? "yes" : "no";
Doxygen::tagFile << " <includes id=\""
<< convertToXML(fd->getOutputFileBase())
<< "\" name=\""
<< convertToXML(fd->name())
<< "\" local=\"" << locStr << "\">"
<< convertToXML(ii->includeName)
<< "</includes>"
......@@ -347,56 +398,9 @@ void FileDef::writeDocumentation(OutputList &ol)
decVarMembers.writeDeclarations(ol,0,0,this,0,theTranslator->trVariables(),0);
ol.endMemberSections();
//doc=doc.stripWhiteSpace();
//int bl=brief.length();
//int dl=doc.length();
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty()
/* || startBodyLine!=-1 */
)
if (!Config_getBool("DETAILS_AT_TOP"))
{
ol.writeRuler();
ol.pushGeneratorState();
//bool latexOn = ol.isEnabled(OutputGenerator::Latex);
//if (latexOn) ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.writeAnchor(0,"_details");
//if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol+=briefOutput;
}
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.newParagraph();
}
if (!documentation().isEmpty())
{
//if (doc.at(dl-1)!='.' && doc.at(dl-1)!='!' && doc.at(dl-1)!='?')
// doc+='.';
parseDoc(ol,filepath,1,0,0,documentation()+"\n");
}
//printf("Writing source ref for file %s\n",name().data());
if (Config_getBool("SOURCE_BROWSER"))
{
ol.newParagraph();
QCString refText = theTranslator->trDefinedInSourceFile();
int fileMarkerPos = refText.find("@0");
if (fileMarkerPos!=-1) // should always pass this.
{
parseText(ol,refText.left(fileMarkerPos)); //text left from marker 1
ol.writeObjectLink(0,getSourceFileBase(),
0,name());
parseText(ol,refText.right(
refText.length()-fileMarkerPos-2)); // text right from marker 2
}
}
writeDetailedDocumentation(ol);
}
docDefineMembers.writeDocumentation(ol,name(),this,
......
......@@ -119,6 +119,7 @@ class FileDef : public Definition
}
bool isIncluded(const QCString &name) const;
void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
void writeSource(OutputList &ol);
friend void generatedFileNames();
......
......@@ -336,6 +336,40 @@ void GroupDef::computeAnchors()
setAnchors(0,'a',allMemberList);
}
void GroupDef::writeDetailedDocumentation(OutputList &ol)
{
if (!briefDescription().isEmpty() || !documentation().isEmpty())
{
if (pageDict->count()!=countMembers()) // classical layout
{
ol.writeRuler();
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.writeAnchor(0,"_details");
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
ol.newParagraph();
}
}
// write documentation
if (!documentation().isEmpty())
{
parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
}
}
}
void GroupDef::writeDocumentation(OutputList &ol)
{
ol.pushGeneratorState();
......@@ -346,13 +380,13 @@ void GroupDef::writeDocumentation(OutputList &ol)
addGroupListToTitle(ol,this);
endTitle(ol,getOutputFileBase(),title);
//brief=brief.stripWhiteSpace();
//int bl=brief.length();
OutputList briefOutput(&ol);
if (!briefDescription().isEmpty())
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDocumentation(ol);
}
else if (!briefDescription().isEmpty())
{
parseDoc(briefOutput,m_defFileName,m_defLine,name(),0,briefDescription());
ol+=briefOutput;
parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
......@@ -490,36 +524,11 @@ void GroupDef::writeDocumentation(OutputList &ol)
}
ol.endMemberSections();
if (!briefDescription().isEmpty() || !documentation().isEmpty())
if (!Config_getBool("DETAILS_AT_TOP"))
{
if (pageDict->count()!=countMembers()) // classical layout
{
ol.writeRuler();
ol.pushGeneratorState();
ol.disable(OutputGenerator::Latex);
ol.disable(OutputGenerator::RTF);
ol.writeAnchor(0,"_details");
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
// repeat brief description
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol+=briefOutput;
ol.newParagraph();
}
}
// write documentation
if (!documentation().isEmpty())
{
parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
}
writeDetailedDocumentation(ol);
}
PageInfo *pi=0;
PageSDict::Iterator pdi(*pageDict);
for (pdi.toFirst();(pi=pdi.current());++pdi)
......
......@@ -58,6 +58,7 @@ class GroupDef : public Definition
void insertMember(MemberDef *def,bool docOnly=FALSE);
void removeMember(MemberDef *md);
bool containsGroup(const GroupDef *def); // true if def is already a subgroup
void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
int countMembers() const;
bool isLinkableInProject() const
......
......@@ -36,7 +36,7 @@
#include "ftvhelp.h"
#include "dot.h"
#include "page.h"
#include "packagedef.h"
//#include "packagedef.h"
int annotatedClasses;
int hierarchyClasses;
......@@ -50,7 +50,7 @@ int documentedNamespaceMembers;
int documentedIncludeFiles;
int documentedPages;
int indexedPages;
int documentedPackages;
//int documentedPackages;
int countClassHierarchy();
int countClassMembers();
......@@ -62,7 +62,7 @@ int countAnnotatedClasses();
int countNamespaceMembers();
int countIncludeFiles();
void countRelatedPages(int &docPages,int &indexPages);
int countPackages();
//int countPackages();
void countDataStructures()
{
......@@ -75,7 +75,7 @@ void countDataStructures()
documentedGroups = countGroups();
documentedNamespaces = countNamespaces();
documentedNamespaceMembers = countNamespaceMembers();
documentedPackages = countPackages();
//documentedPackages = countPackages();
}
static void startIndexHierarchy(OutputList &ol,int level)
......@@ -2116,20 +2116,20 @@ void countRelatedPages(int &docPages,int &indexPages)
//----------------------------------------------------------------------------
int countPackages()
{
int count=0;
PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=0;
for (pdi.toFirst();(pd=pdi.current());++pdi)
{
if (!pd->isReference())
{
count++;
}
}
return count;
}
//int countPackages()
//{
// int count=0;
// PackageSDict::Iterator pdi(Doxygen::packageDict);
// PackageDef *pd=0;
// for (pdi.toFirst();(pd=pdi.current());++pdi)
// {
// if (!pd->isReference())
// {
// count++;
// }
// }
// return count;
//}
//----------------------------------------------------------------------------
......@@ -2808,12 +2808,12 @@ void writeIndex(OutputList &ol)
}
if (documentedPackages>0)
{
ol.startIndexSection(isPackageIndex);
parseText(ol,projPrefix+theTranslator->trPackageList());
ol.endIndexSection(isPackageIndex);
}
//if (documentedPackages>0)
//{
// ol.startIndexSection(isPackageIndex);
// parseText(ol,projPrefix+theTranslator->trPackageList());
// ol.endIndexSection(isPackageIndex);
//}
if (documentedGroups>0)
{
ol.startIndexSection(isModuleIndex);
......@@ -2851,12 +2851,12 @@ void writeIndex(OutputList &ol)
ol.endIndexSection(isPageIndex);
}
ol.lastIndexPage();
if (documentedPackages>0)
{
ol.startIndexSection(isPackageDocumentation);
parseText(ol,projPrefix+theTranslator->trPackageDocumentation());
ol.endIndexSection(isPackageDocumentation);
}
//if (documentedPackages>0)
//{
// ol.startIndexSection(isPackageDocumentation);
// parseText(ol,projPrefix+theTranslator->trPackageDocumentation());
// ol.endIndexSection(isPackageDocumentation);
//}
if (documentedGroups>0)
{
ol.startIndexSection(isModuleDocumentation);
......
......@@ -26,14 +26,14 @@ enum IndexSections
isTitlePageStart,
isTitlePageAuthor,
isMainPage,
isPackageIndex,
// isPackageIndex,
isModuleIndex,
isNamespaceIndex,
isClassHierarchyIndex,
isCompoundIndex,
isFileIndex,
isPageIndex,
isPackageDocumentation,
// isPackageDocumentation,
isModuleDocumentation,
isNamespaceDocumentation,
isClassDocumentation,
......@@ -82,7 +82,7 @@ extern int documentedNamespaceMembers;
extern int documentedIncludeFiles;
extern int documentedPages;
extern int indexedPages;
extern int documentedPackages;
//extern int documentedPackages;
void startTitle(OutputList &ol,const char *fileName);
void endTitle(OutputList &ol,const char *fileName,const char *name);
......
......@@ -473,10 +473,10 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Introduction}\n"
break;
case isPackageIndex:
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Package Index}\n"
break;
//case isPackageIndex:
// if (compactLatex) t << "\\section"; else t << "\\chapter";
// t << "{"; //Package Index}\n"
// break;
case isModuleIndex:
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Module Index}\n"
......@@ -501,21 +501,21 @@ void LatexGenerator::startIndexSection(IndexSections is)
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{"; //Annotated Page Index}\n"
break;
case isPackageDocumentation:
{
PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst();
bool found=FALSE;
while (pd && !found)
{
if (compactLatex) t << "\\section"; else t << "\\chapter";
t << "{";
found=TRUE;
++pdi;
pd=pdi.current();
}
}
break;
// case isPackageDocumentation:
// {
// PackageSDict::Iterator pdi(Doxygen::packageDict);
// PackageDef *pd=pdi.toFirst();
// bool found=FALSE;
// while (pd && !found)
// {
// if (compactLatex) t << "\\section"; else t << "\\chapter";
// t << "{";
// found=TRUE;
// ++pdi;
// pd=pdi.current();
// }
// }
// break;
case isModuleDocumentation:
{
GroupSDict::Iterator gli(Doxygen::groupSDict);
......@@ -629,9 +629,9 @@ void LatexGenerator::endIndexSection(IndexSections is)
t << "\\input{" << indexName << "}\n";
}
break;
case isPackageIndex:
t << "}\n\\input{packages}\n";
break;
//case isPackageIndex:
// t << "}\n\\input{packages}\n";
// break;
case isModuleIndex:
t << "}\n\\input{modules}\n";
break;
......@@ -650,27 +650,27 @@ void LatexGenerator::endIndexSection(IndexSections is)
case isPageIndex:
t << "}\n\\input{pages}\n";
break;
case isPackageDocumentation:
{
PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst();
bool found=FALSE;
while (pd && !found)
{
t << "}\n\\input{" << pd->getOutputFileBase() << "}\n";
found=TRUE;
++pdi;
pd=pdi.current();
}
while (pd)
{
if (compactLatex) t << "\\input"; else t << "\\include";
t << "{" << pd->getOutputFileBase() << "}\n";
++pdi;
pd=pdi.current();
}
}
break;
//case isPackageDocumentation:
// {
// PackageSDict::Iterator pdi(Doxygen::packageDict);
// PackageDef *pd=pdi.toFirst();
// bool found=FALSE;
// while (pd && !found)
// {
// t << "}\n\\input{" << pd->getOutputFileBase() << "}\n";
// found=TRUE;
// ++pdi;
// pd=pdi.current();
// }
// while (pd)
// {
// if (compactLatex) t << "\\input"; else t << "\\include";
// t << "{" << pd->getOutputFileBase() << "}\n";
// ++pdi;
// pd=pdi.current();
// }
// }
// break;
case isModuleDocumentation:
{
GroupSDict::Iterator gli(Doxygen::groupSDict);
......@@ -1761,7 +1761,15 @@ void LatexGenerator::startDotFile(const char *name,bool hasCaption)
else
t << "\\mbox{";
t << "\\includegraphics";
t << "{" << baseName << ".eps}";
if( Config_getBool("USE_PDFLATEX") )
{
t << "{" << baseName << ".pdf}";
}
else
{
t << "{" << baseName << ".eps}";
}
if (hasCaption)
t << "\\caption{";
else
......
......@@ -872,7 +872,6 @@ void MemberDef::writeDeclaration(OutputList &ol,
{
ol.startTextLink(0,anchor());
}
parseText(ol,theTranslator->trMore());
ol.endTextLink();
ol.startEmphasis();
ol.popGeneratorState();
......@@ -1049,7 +1048,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
{
bool first=TRUE;
if (m_defTmpArgLists)
// definition has explicate template parameter declarations
// definition has explicit template parameter declarations
{
QListIterator<ArgumentList> ali(*m_defTmpArgLists);
ArgumentList *tal;
......@@ -1064,7 +1063,8 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
}
}
}
else
else // definition gets it template parameters from its class
// (since no definition was found)
{
if (cd)
{
......
......@@ -72,6 +72,19 @@ void NamespaceDef::insertUsedFile(const char *f)
}
}
void NamespaceDef::addInnerCompound(Definition *d)
{
m_innerCompounds->append(d->localName(),d);
if (d->definitionType()==Definition::TypeNamespace)
{
insertNamespace((NamespaceDef *)d);
}
else if (d->definitionType()==Definition::TypeClass)
{
insertClass((ClassDef *)d);
}
}
void NamespaceDef::insertClass(ClassDef *cd)
{
if (classSDict->find(cd->name())==0)
......@@ -170,6 +183,41 @@ void NamespaceDef::computeAnchors()
setAnchors(0,'a',&allMemberList);
}
void NamespaceDef::writeDetailedDocumentation(OutputList &ol)
{
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty())
{
ol.writeRuler();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
//bool latexOn = ol.isEnabled(OutputGenerator::Latex);
//if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor(0,"_details");
//if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
ol.startTextBlock();
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
}
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.newParagraph();
}
if (!documentation().isEmpty())
{
parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
ol.newParagraph();
}
ol.endTextBlock();
}
}
void NamespaceDef::writeDocumentation(OutputList &ol)
{
QCString pageTitle=name()+" Namespace Reference";
......@@ -196,11 +244,13 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
ol.startTextBlock();
OutputList briefOutput(&ol);
if (!briefDescription().isEmpty())
if (Config_getBool("DETAILS_AT_TOP"))
{
writeDetailedDocumentation(ol);
}
else if (!briefDescription().isEmpty())
{
parseDoc(briefOutput,m_defFileName,m_defLine,name(),0,briefDescription());
ol+=briefOutput;
parseDoc(ol,m_defFileName,m_defLine,name(),0,briefDescription());
ol.writeString(" \n");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
......@@ -226,7 +276,6 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
{
mg->writeDeclarations(ol,0,this,0,0);
}
//allMemberList.writeDeclarations(ol,0,this,0,0,0,0);
decDefineMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trDefines(),0);
......@@ -237,36 +286,9 @@ void NamespaceDef::writeDocumentation(OutputList &ol)
decVarMembers.writeDeclarations(ol,0,this,0,0,theTranslator->trVariables(),0);
ol.endMemberSections();
if ((!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF")) ||
!documentation().isEmpty())
if (!Config_getBool("DETAILS_AT_TOP"))
{
ol.writeRuler();
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::Html);
//bool latexOn = ol.isEnabled(OutputGenerator::Latex);
//if (latexOn) ol.disable(OutputGenerator::Latex);
ol.writeAnchor(0,"_details");
//if (latexOn) ol.enable(OutputGenerator::Latex);
ol.popGeneratorState();
ol.startGroupHeader();
parseText(ol,theTranslator->trDetailedDescription());
ol.endGroupHeader();
ol.startTextBlock();
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF"))
{
ol+=briefOutput;
}
if (!briefDescription().isEmpty() && Config_getBool("REPEAT_BRIEF") &&
!documentation().isEmpty())
{
ol.newParagraph();
}
if (!documentation().isEmpty())
{
parseDoc(ol,m_defFileName,m_defLine,name(),0,documentation()+"\n");
ol.newParagraph();
}
ol.endTextBlock();
writeDetailedDocumentation(ol);
}
docDefineMembers.writeDocumentation(ol,name(),this,
......@@ -340,11 +362,6 @@ Definition *NamespaceDef::findInnerCompound(const char *n)
return m_innerCompounds->find(n);
}
void NamespaceDef::addInnerCompound(Definition *d)
{
m_innerCompounds->append(d->localName(),d);
}
void NamespaceDef::addListReferences()
{
addRefItem(todoId(),testId(),bugId(),
......
......@@ -43,6 +43,8 @@ class NamespaceDef : public Definition
DefType definitionType() { return TypeNamespace; }
QCString getOutputFileBase() const;
void insertUsedFile(const char *fname);
void writeDetailedDocumentation(OutputList &ol);
void writeDocumentation(OutputList &ol);
void insertClass(ClassDef *cd);
......
......@@ -167,6 +167,26 @@ static FILE *checkAndOpenFile(const QCString &absName)
QFileInfo fi(absName);
if (fi.exists() && fi.isFile())
{
// check include stack for absFileName
QStack<FileState> tmpStack;
g_includeStack.setAutoDelete(FALSE);
FileState *fs;
bool alreadyIncluded=FALSE;
while ((fs=g_includeStack.pop()))
{
if (fs->fileName==absName) alreadyIncluded=TRUE;
tmpStack.push(fs);
}
while ((fs=tmpStack.pop()))
{
g_includeStack.push(fs);
}
g_includeStack.setAutoDelete(TRUE);
if (alreadyIncluded) return 0;
if (!Config_getString("INPUT_FILTER").isEmpty())
{
QCString cmd = Config_getString("INPUT_FILTER")+" "+absName;
......@@ -934,6 +954,7 @@ static void readIncludeFile(const QCString &inc)
// add included by dependency
if (g_yyFileDef)
{
//printf("Adding include dependency %s->%s\n",oldFileDef->name().data(),incFileName.data());
g_yyFileDef->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
}
}
......@@ -952,6 +973,7 @@ static void readIncludeFile(const QCString &inc)
//lineStr.sprintf("# 1 \"%s\" 1\n",g_yyFileName.data());
//outputArray(lineStr.data(),lineStr.length());
//fprintf(stderr,"Switching to include file %s\n",incFileName.data());
preYYin=f;
yy_switch_to_buffer(yy_create_buffer(preYYin, YY_BUF_SIZE));
}
......@@ -966,12 +988,13 @@ static void readIncludeFile(const QCString &inc)
// add included by dependency
if (fd)
{
//printf("Adding include dependency (2) %s->%s ambig=%d\n",oldFileDef->name().data(),fd->name().data(),ambig);
fd->addIncludedByDependency(oldFileDef,oldFileDef->name(),localInclude);
}
}
if (Debug::isFlagSet(Debug::Preprocessor))
{
msg("#include %s: not found! skipping...\n",incFileName.data());
msg("#include %s: not found or already included! skipping...\n",incFileName.data());
//printf("Error: include file %s not found\n",yytext);
}
}
......@@ -1751,11 +1774,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
<SkipSingleQuote>. { g_defText += *yytext; g_defLitText+=yytext; }
<DefineText>. { g_defText += *yytext; g_defLitText+=yytext; }
<<EOF>> {
//printf("End of include file\n");
//fprintf(stderr,"End of include file\n");
//printf("Include stack depth=%d\n",g_includeStack.count());
if (g_includeStack.isEmpty())
{
//printf("Terminating scanner!\n");
//fprintf(stderr,"Terminating scanner!\n");
yyterminate();
}
else
......@@ -1771,7 +1794,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
yy_delete_buffer( oldBuf );
g_yyLineNr=fs->lineNr;
setFileName(fs->fileName.copy());
//printf("######## FileName %s\n",g_yyFileName.data());
//fprintf(stderr,"######## FileName %s\n",g_yyFileName.data());
// TODO: Enable this to deal with file changes due to
// #include's within { .. } blocks
......@@ -1780,8 +1803,6 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
//outputArray(lineStr.data(),lineStr.length());
delete fs; fs=0;
}
}
<*>"/*" {
......
......@@ -926,10 +926,10 @@ void RTFGenerator::startIndexSection(IndexSections is)
//Introduction
beginRTFChapter();
break;
case isPackageIndex:
//Package Index
beginRTFChapter();
break;
//case isPackageIndex:
// //Package Index
// beginRTFChapter();
// break;
case isModuleIndex:
//Module Index
beginRTFChapter();
......@@ -955,21 +955,21 @@ void RTFGenerator::startIndexSection(IndexSections is)
//Related Page Index
beginRTFChapter();
break;
case isPackageDocumentation:
{
//Package Documentation
PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst();
bool found=FALSE;
while (pd && !found)
{
beginRTFChapter();
found=TRUE;
++pdi;
pd=pdi.current();
}
}
break;
//case isPackageDocumentation:
// {
// //Package Documentation
// PackageSDict::Iterator pdi(Doxygen::packageDict);
// PackageDef *pd=pdi.toFirst();
// bool found=FALSE;
// while (pd && !found)
// {
// beginRTFChapter();
// found=TRUE;
// ++pdi;
// pd=pdi.current();
// }
// }
// break;
case isModuleDocumentation:
{
//Module Documentation
......@@ -1136,11 +1136,11 @@ void RTFGenerator::endIndexSection(IndexSections is)
if (Config_getBool("GENERATE_TREEVIEW")) t << "main"; else t << "index";
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isPackageIndex:
t << "\\par " << Rtf_Style_Reset << endl;
t << "{\\tc \\v " << theTranslator->trPackageList() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"packages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
//case isPackageIndex:
// t << "\\par " << Rtf_Style_Reset << endl;
// t << "{\\tc \\v " << theTranslator->trPackageList() << "}"<< endl;
// t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"packages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
// break;
case isModuleIndex:
t << "\\par " << Rtf_Style_Reset << endl;
t << "{\\tc \\v " << theTranslator->trModuleIndex() << "}"<< endl;
......@@ -1171,22 +1171,22 @@ void RTFGenerator::endIndexSection(IndexSections is)
t << "{\\tc \\v " << theTranslator->trPageIndex() << "}"<< endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"pages.rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
break;
case isPackageDocumentation:
{
PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd=pdi.toFirst();
t << "{\\tc \\v " << theTranslator->trPackageDocumentation() << "}"<< endl;
while (pd)
{
t << "\\par " << Rtf_Style_Reset << endl;
t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
t << pd->getOutputFileBase();
t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
++pdi;
pd=pdi.current();
}
}
break;
//case isPackageDocumentation:
// {
// PackageSDict::Iterator pdi(Doxygen::packageDict);
// PackageDef *pd=pdi.toFirst();
// t << "{\\tc \\v " << theTranslator->trPackageDocumentation() << "}"<< endl;
// while (pd)
// {
// t << "\\par " << Rtf_Style_Reset << endl;
// t << "{\\field\\fldedit{\\*\\fldinst INCLUDETEXT \"";
// t << pd->getOutputFileBase();
// t << ".rtf\" \\\\*MERGEFORMAT}{\\fldrslt includedstuff}}\n";
// ++pdi;
// pd=pdi.current();
// }
// }
// break;
case isModuleDocumentation:
{
GroupSDict::Iterator gli(Doxygen::groupSDict);
......
......@@ -96,6 +96,7 @@ class TagIncludeInfo
public:
QString id;
QString name;
QString text;
bool isLocal;
};
......@@ -446,6 +447,7 @@ class TagFileParser : public QXmlDefaultHandler
{
m_curIncludes = new TagIncludeInfo;
m_curIncludes->id = attrib.value("id");
m_curIncludes->name = attrib.value("name");
m_curIncludes->isLocal = attrib.value("local")=="yes" ? TRUE : FALSE;
m_curFile->includes.append(m_curIncludes);
}
......@@ -457,7 +459,7 @@ class TagFileParser : public QXmlDefaultHandler
}
void endIncludes()
{
m_curIncludes->name = m_curString;
m_curIncludes->text = m_curString;
}
void endTemplateArg()
{
......@@ -1170,16 +1172,21 @@ void TagFileParser::addIncludes()
TagIncludeInfo *ii;
for (;(ii=mii.current());++mii)
{
//printf("ii->name=`%s'\n",ii->name.data());
FileName *ifn = Doxygen::inputNameDict->find(ii->name);
FileNameIterator ifni(*ifn);
FileDef *ifd;
for (;(ifd=ifni.current());++ifni)
ASSERT(ifn!=0);
if (ifn)
{
printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
ifd->getOutputFileBase().data(),ii->id.data());
if (ifd->getOutputFileBase()==QCString(ii->id))
FileNameIterator ifni(*ifn);
FileDef *ifd;
for (;(ifd=ifni.current());++ifni)
{
fd->addIncludeDependency(ifd,ii->name,ii->isLocal);
//printf("ifd->getOutputFileBase()=%s ii->id=%s\n",
// ifd->getOutputFileBase().data(),ii->id.data());
if (ifd->getOutputFileBase()==QCString(ii->id))
{
fd->addIncludeDependency(ifd,ii->text,ii->isLocal);
}
}
}
}
......
......@@ -13,7 +13,12 @@
* Brazilian Portuguese version by
* Fabio "FJTC" Jun Takada Chino <chino@icmc.sc.usp.br>
* http://www.icmc.sc.usp.br/~chino
* Version: 1.2.13 (2002/01/24)
* Version: 1.2.13.2 (2002/05/10)
*
* History:
* 1.2.13.2 (2002/05/10):
* - Latex Babel package language name fixed.
* - "Estrura" bug identified and fixed (Thanks to Jorge Ramos).
*/
#ifndef TRANSLATOR_BR_H
#define TRANSLATOR_BR_H
......@@ -33,9 +38,7 @@ class TranslatorBrazilian: public Translator
*/
virtual QCString idLanguage()
{
/* I'm not sure if it is correct. I did not found the documentation
of BabelPackage. If you know the right string, please contact me. */
return "portuges";
return "brazil";
}
/*! Used to get the command(s) for the language support. This method
......@@ -737,7 +740,7 @@ class TranslatorBrazilian: public Translator
switch(compType)
{
case ClassDef::Class: result+="classe "; break;
case ClassDef::Struct: result+="estrura "; break;
case ClassDef::Struct: result+="estrutura "; break;
case ClassDef::Union: result+="união "; break;
case ClassDef::Interface: result+="interface "; break;
case ClassDef::Exception: result+="exceção "; break;
......
......@@ -292,11 +292,11 @@ class TranslatorChinesetraditional : public Translator
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+="這些結構/聯合型態是屬於:";
result+="這些結構/聯合型態所屬:";
}
else
{
result+="這些類別是屬於:";
result+="這些類別所屬:";
}
}
return result;
......@@ -647,7 +647,7 @@ class TranslatorChinesetraditional : public Translator
case ClassDef::Exception: result+=" 例外"; break;
}
if (isTemplate) result+=" 樣版";
result+=" 參考";
result+=" 參考文件";
return result;
}
......@@ -1192,7 +1192,7 @@ class TranslatorChinesetraditional : public Translator
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
return ":";
return "巨集內容:";
}
//////////////////////////////////////////////////////////////////////////
......
This diff is collapsed.
......@@ -76,6 +76,7 @@ QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t)
return "illegal";
}
inline void writeXMLString(QTextStream &t,const char *s)
{
t << convertToXML(s);
......@@ -707,14 +708,14 @@ class XMLGenerator : public OutputDocInterface
{
XML_DB(("(writeAnchor)\n"));
startParMode();
m_t << "<anchor id=\"" << id << "_" << name << "\"/>";
m_t << "<anchor id=\"" << id << "_1" << name << "\"/>";
}
void writeSectionRef(const char *,const char *id,
const char *name,const char *text)
{
XML_DB(("(writeSectionRef)\n"));
startParMode();
m_t << "<link linkend=\"" << id << "_" << name << "\">";
m_t << "<link linkend=\"" << id << "_1" << name << "\">";
docify(text);
m_t << "</link>";
}
......@@ -773,7 +774,7 @@ class XMLGenerator : public OutputDocInterface
void endTextLink()
{
XML_DB(("(endTextLink)\n"));
m_t << "<ulink>";
m_t << "</ulink>";
}
void startPageRef()
{
......@@ -938,6 +939,56 @@ class XMLGenerator : public OutputDocInterface
friend void writeXMLCodeBlock(QTextStream &t,FileDef *fd);
};
static void writeTemplateArgumentList(ArgumentList *al,QTextStream &t,const char *name,int indent)
{
QCString indentStr;
indentStr.fill(' ',indent);
if (al)
{
t << indentStr << "<templateparamlist>" << endl;
ArgumentListIterator ali(*al);
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
t << indentStr << " <param>" << endl;
if (!a->type.isEmpty())
{
t << indentStr << " <type>";
linkifyText(TextGeneratorXMLImpl(t),name,0,a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
{
t << indentStr << " <declname>" << a->name << "</declname>" << endl;
t << indentStr << " <defname>" << a->name << "</defname>" << endl;
}
if (!a->defval.isEmpty())
{
t << indentStr << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),name,0,a->defval);
t << "</defval>" << endl;
}
t << indentStr << " </param>" << endl;
}
t << indentStr << "</templateparamlist>" << endl;
}
}
static void writeMemberTemplateLists(MemberDef *md,QTextStream &t)
{
ClassDef *cd = md->getClassDef();
const char *cname = cd ? cd->name().data() : 0;
if (md->templateArguments()) // function template prefix
{
writeTemplateArgumentList(md->templateArguments(),t,cname,8);
}
}
static void writeTemplateList(ClassDef *cd,QTextStream &t)
{
writeTemplateArgumentList(cd->templateArguments(),t,cd->name(),4);
}
static void writeXMLDocBlock(QTextStream &t,
const QCString &fileName,
int lineNr,
......@@ -1021,7 +1072,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
// + source references
// + source referenced by
// - body code
// - template arguments
// + template arguments
// (templateArguments(), definitionTemplateParameterLists())
if (md->memberType()==MemberDef::EnumValue) return;
......@@ -1091,6 +1142,10 @@ static void generateXMLForMember(MemberDef *md,QTextStream &ti,QTextStream &t,De
md->memberType()!=MemberDef::Enumeration
)
{
if (md->memberType()!=MemberDef::Typedef)
{
writeMemberTemplateLists(md,t);
}
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),typeStr);
......@@ -1278,44 +1333,6 @@ static void generateXMLSection(Definition *d,QTextStream &ti,QTextStream &t,
t << " </sectiondef>" << endl;
}
static void writeTemplateLists(Definition *d,QTextStream &t)
{
if (d->definitionType()==Definition::TypeClass)
{
if (d->getOuterScope()) writeTemplateLists(d->getOuterScope(),t);
ClassDef *cd = (ClassDef *)d;
ArgumentList *al = cd->templateArguments();
if (al)
{
t << " <templateparamlist>" << endl;
ArgumentListIterator ali(*al);
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
t << " <param>" << endl;
if (!a->type.isEmpty())
{
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),d->name(),0,a->type);
t << "</type>" << endl;
}
if (!a->name.isEmpty())
{
t << " <name>" << a->name << "</name>" << endl;
}
if (!a->defval.isEmpty())
{
t << " <defval>";
linkifyText(TextGeneratorXMLImpl(t),d->name(),0,a->defval);
t << "</defval>" << endl;
}
t << " </param>" << endl;
}
t << " </templateparamlist>" << endl;
}
}
}
static void writeListOfAllMembers(ClassDef *cd,QTextStream &t)
{
t << " <listofallmembers>" << endl;
......@@ -1333,7 +1350,7 @@ static void writeListOfAllMembers(ClassDef *cd,QTextStream &t)
if (d==0) d = cd;
Protection prot = mi->prot;
Specifier virt=md->virtualness();
t << " <member refid=\"" << d->getOutputFileBase() << "_" <<
t << " <member refid=\"" << d->getOutputFileBase() << "_1" <<
md->anchor() << "\" prot=\"";
switch (prot)
{
......@@ -1351,7 +1368,7 @@ static void writeListOfAllMembers(ClassDef *cd,QTextStream &t)
t << "\"";
if (!mi->ambiguityResolutionScope.isEmpty())
{
t << " ambiguityscope=\"" << mi->ambiguityResolutionScope << "\"";
t << " ambiguityscope=\"" << convertToXML(mi->ambiguityResolutionScope) << "\"";
}
t << "><scope>" << convertToXML(cd->name()) << "</scope><name>" <<
convertToXML(md->name()) << "</name></member>" << endl;
......@@ -1425,7 +1442,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
case Virtual: t << "virtual"; break;
case Pure: t <<"pure-virtual"; break;
}
t << "\"/>" << endl;
t << "\">" << convertToXML(bcd->classDef->displayName())
<< "</basecompoundref>" << endl;
}
}
if (cd->subClasses()->count()>0)
......@@ -1450,7 +1468,8 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
case Virtual: t << "virtual"; break;
case Pure: t << "pure-virtual"; break;
}
t << "\"/>" << endl;
t << "\">" << convertToXML(bcd->classDef->displayName())
<< "</basecompoundref>" << endl;
}
}
......@@ -1465,7 +1484,7 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &ti)
<< "\">" << convertToXML(cd->name()) << "</innerclass>" << endl;
}
}
writeTemplateLists(cd,t);
writeTemplateList(cd,t);
writeListOfAllMembers(cd,t);
MemberGroupSDict::Iterator mgli(*cd->memberGroupSDict);
MemberGroup *mg;
......@@ -1834,6 +1853,18 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &ti)
}
}
GroupList *gl = gd->getSubGroups();
if (gl)
{
GroupListIterator gli(*gl);
GroupDef *sgd;
for (gli.toFirst();(sgd=gli.current());++gli)
{
t << " <innergroup refid=\"" << gd->getOutputFileBase()
<< "\"/>" << convertToXML(sgd->groupTitle()) << "</innergroup>" << endl;
}
}
MemberGroupSDict::Iterator mgli(*gd->memberGroupSDict);
MemberGroup *mg;
for (;(mg=mgli.current());++mgli)
......
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