Commit ff31b2f1 authored by dimitri's avatar dimitri

Release-1.2.15-20020421

parent bc629c90
DOXYGEN Version 1.2.15-20020407 DOXYGEN Version 1.2.15-20020421
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (07 April 2002) Dimitri van Heesch (21 April 2002)
DOXYGEN Version 1.2.15_20020407 DOXYGEN Version 1.2.15_20020421
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) (07 April 2002) Dimitri van Heesch (dimitri@stack.nl) (21 April 2002)
1.2.15-20020407 1.2.15-20020421
This diff is collapsed.
...@@ -144,7 +144,8 @@ void compoundhandler_exit() ...@@ -144,7 +144,8 @@ void compoundhandler_exit()
CompoundHandler::CompoundHandler(const QString &xmlDir) CompoundHandler::CompoundHandler(const QString &xmlDir)
: m_brief(0), m_detailed(0), m_programListing(0), : m_brief(0), m_detailed(0), m_programListing(0),
m_xmlDir(xmlDir), m_refCount(1), m_memberDict(257), m_memberNameDict(257), m_xmlDir(xmlDir), m_refCount(1), m_memberDict(257), m_memberNameDict(257),
m_mainHandler(0), m_inheritanceGraph(0), m_collaborationGraph(0) m_mainHandler(0), m_inheritanceGraph(0), m_collaborationGraph(0),
m_includeDependencyGraph(0), m_includedByDependencyGraph(0)
{ {
m_superClasses.setAutoDelete(TRUE); m_superClasses.setAutoDelete(TRUE);
m_subClasses.setAutoDelete(TRUE); m_subClasses.setAutoDelete(TRUE);
...@@ -182,9 +183,14 @@ CompoundHandler::CompoundHandler(const QString &xmlDir) ...@@ -182,9 +183,14 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
addStartHandler("collaborationgraph",this,&CompoundHandler::startCollaborationGraph); addStartHandler("collaborationgraph",this,&CompoundHandler::startCollaborationGraph);
addStartHandler("incdepgraph",this,&CompoundHandler::startIncludeDependencyGraph);
addStartHandler("invincdepgraph",this,&CompoundHandler::startIncludedByDependencyGraph);
addStartHandler("innerclass",this,&CompoundHandler::startInnerClass); addStartHandler("innerclass",this,&CompoundHandler::startInnerClass);
addEndHandler("innerclass"); addEndHandler("innerclass");
} }
CompoundHandler::~CompoundHandler() CompoundHandler::~CompoundHandler()
...@@ -195,6 +201,8 @@ CompoundHandler::~CompoundHandler() ...@@ -195,6 +201,8 @@ CompoundHandler::~CompoundHandler()
delete m_programListing; delete m_programListing;
delete m_inheritanceGraph; delete m_inheritanceGraph;
delete m_collaborationGraph; delete m_collaborationGraph;
delete m_includeDependencyGraph;
delete m_includedByDependencyGraph;
} }
void CompoundHandler::startSection(const QXmlAttributes& attrib) void CompoundHandler::startSection(const QXmlAttributes& attrib)
...@@ -303,7 +311,7 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib) ...@@ -303,7 +311,7 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib)
m_subClasses.append(sc); m_subClasses.append(sc);
} }
bool CompoundHandler::parseXML(const QString &compId) bool CompoundHandler::parseXML(const char *compId)
{ {
QFile xmlFile(m_xmlDir+"/"+compId+".xml"); QFile xmlFile(m_xmlDir+"/"+compId+".xml");
if (!xmlFile.exists()) return FALSE; if (!xmlFile.exists()) return FALSE;
...@@ -329,12 +337,12 @@ void CompoundHandler::initialize(MainHandler *mh) ...@@ -329,12 +337,12 @@ void CompoundHandler::initialize(MainHandler *mh)
void CompoundHandler::insertMember(MemberHandler *mh) void CompoundHandler::insertMember(MemberHandler *mh)
{ {
m_memberDict.insert(mh->id(),mh); m_memberDict.insert(mh->id()->latin1(),mh);
QList<MemberHandler> *mhl = m_memberNameDict.find(mh->id()); QList<MemberHandler> *mhl = m_memberNameDict.find(mh->id()->latin1());
if (mhl==0) if (mhl==0)
{ {
mhl = new QList<MemberHandler>; mhl = new QList<MemberHandler>;
m_memberNameDict.insert(mh->name(),mhl); m_memberNameDict.insert(mh->name()->latin1(),mhl);
} }
mhl->append(mh); mhl->append(mh);
} }
...@@ -372,7 +380,7 @@ ISectionIterator *CompoundHandler::sections() const ...@@ -372,7 +380,7 @@ ISectionIterator *CompoundHandler::sections() const
return new SectionIterator(m_sections); return new SectionIterator(m_sections);
} }
IMemberIterator *CompoundHandler::memberByName(const QString &name) const IMemberIterator *CompoundHandler::memberByName(const char *name) const
{ {
QList<MemberHandler> *ml = m_memberNameDict[name]; QList<MemberHandler> *ml = m_memberNameDict[name];
if (ml==0) return 0; if (ml==0) return 0;
...@@ -391,6 +399,18 @@ void CompoundHandler::startCollaborationGraph(const QXmlAttributes &attrib) ...@@ -391,6 +399,18 @@ void CompoundHandler::startCollaborationGraph(const QXmlAttributes &attrib)
m_collaborationGraph->startGraph(attrib); m_collaborationGraph->startGraph(attrib);
} }
void CompoundHandler::startIncludeDependencyGraph(const QXmlAttributes &attrib)
{
m_includeDependencyGraph = new GraphHandler(this,"incdepgraph");
m_includeDependencyGraph->startGraph(attrib);
}
void CompoundHandler::startIncludedByDependencyGraph(const QXmlAttributes &attrib)
{
m_includedByDependencyGraph = new GraphHandler(this,"invincdepgraph");
m_includedByDependencyGraph->startGraph(attrib);
}
IDocRoot *CompoundHandler::briefDescription() const IDocRoot *CompoundHandler::briefDescription() const
{ {
return m_brief; return m_brief;
...@@ -401,7 +421,7 @@ IDocRoot *CompoundHandler::detailedDescription() const ...@@ -401,7 +421,7 @@ IDocRoot *CompoundHandler::detailedDescription() const
return m_detailed; return m_detailed;
} }
IMember *CompoundHandler::memberById(const QString &id) const IMember *CompoundHandler::memberById(const char *id) const
{ {
return m_memberDict[id]; return m_memberDict[id];
} }
...@@ -416,6 +436,16 @@ IGraph *CompoundHandler::collaborationGraph() const ...@@ -416,6 +436,16 @@ IGraph *CompoundHandler::collaborationGraph() const
return m_collaborationGraph; return m_collaborationGraph;
} }
IGraph *CompoundHandler::includeDependencyGraph() const
{
return m_includeDependencyGraph;
}
IGraph *CompoundHandler::includedByDependencyGraph() const
{
return m_includedByDependencyGraph;
}
IRelatedCompoundIterator *CompoundHandler::baseClasses() const IRelatedCompoundIterator *CompoundHandler::baseClasses() const
{ {
return new RelatedCompoundIterator(m_superClasses); return new RelatedCompoundIterator(m_superClasses);
......
...@@ -20,6 +20,7 @@ ...@@ -20,6 +20,7 @@
#include <qxml.h> #include <qxml.h>
#include <doxmlintf.h> #include <doxmlintf.h>
#include "stringimpl.h"
#include "basehandler.h" #include "basehandler.h"
#include "baseiterator.h" #include "baseiterator.h"
...@@ -74,6 +75,7 @@ class CompoundHandler : public IClass, ...@@ -74,6 +75,7 @@ class CompoundHandler : public IClass,
public BaseHandler<CompoundHandler> public BaseHandler<CompoundHandler>
{ {
friend class RelatedCompound; friend class RelatedCompound;
public: public:
virtual void startSection(const QXmlAttributes& attrib); virtual void startSection(const QXmlAttributes& attrib);
virtual void startCompound(const QXmlAttributes& attrib); virtual void startCompound(const QXmlAttributes& attrib);
...@@ -87,26 +89,28 @@ class CompoundHandler : public IClass, ...@@ -87,26 +89,28 @@ class CompoundHandler : public IClass,
virtual void startProgramListing(const QXmlAttributes& attrib); virtual void startProgramListing(const QXmlAttributes& attrib);
virtual void startInheritanceGraph(const QXmlAttributes& attrib); virtual void startInheritanceGraph(const QXmlAttributes& attrib);
virtual void startCollaborationGraph(const QXmlAttributes& attrib); virtual void startCollaborationGraph(const QXmlAttributes& attrib);
virtual void startIncludeDependencyGraph(const QXmlAttributes& attrib);
virtual void startIncludedByDependencyGraph(const QXmlAttributes& attrib);
virtual void startInnerClass(const QXmlAttributes& attrib); virtual void startInnerClass(const QXmlAttributes& attrib);
virtual void addref() { m_refCount++; } virtual void addref() { m_refCount++; }
CompoundHandler(const QString &dirName); CompoundHandler(const QString &dirName);
virtual ~CompoundHandler(); virtual ~CompoundHandler();
bool parseXML(const QString &compId); bool parseXML(const char *compId);
void initialize(MainHandler *mh); void initialize(MainHandler *mh);
void insertMember(MemberHandler *mh); void insertMember(MemberHandler *mh);
ICompound *toICompound() const; ICompound *toICompound() const;
// ICompound implementation // ICompound implementation
QString name() const { return m_name; } const IString *name() const { return &m_name; }
QString id() const { return m_id; } const IString *id() const { return &m_id; }
CompoundKind kind() const { return m_kind; } CompoundKind kind() const { return m_kind; }
QString kindString() const { return m_kindString; } const IString *kindString() const { return &m_kindString; }
ISectionIterator *sections() const; ISectionIterator *sections() const;
IDocRoot *briefDescription() const; IDocRoot *briefDescription() const;
IDocRoot *detailedDescription() const; IDocRoot *detailedDescription() const;
IMember *memberById(const QString &id) const; IMember *memberById(const char *id) const;
IMemberIterator *memberByName(const QString &name) const; IMemberIterator *memberByName(const char *name) const;
void release(); void release();
// IClass implementation // IClass implementation
...@@ -116,6 +120,10 @@ class CompoundHandler : public IClass, ...@@ -116,6 +120,10 @@ class CompoundHandler : public IClass,
IRelatedCompoundIterator *derivedClasses() const; IRelatedCompoundIterator *derivedClasses() const;
ICompoundIterator *nestedClasses() const; ICompoundIterator *nestedClasses() const;
// IFile implementation
IGraph *includeDependencyGraph() const;
IGraph *includedByDependencyGraph() const;
private: private:
QList<RelatedCompound> m_superClasses; QList<RelatedCompound> m_superClasses;
QList<RelatedCompound> m_subClasses; QList<RelatedCompound> m_subClasses;
...@@ -123,10 +131,10 @@ class CompoundHandler : public IClass, ...@@ -123,10 +131,10 @@ class CompoundHandler : public IClass,
DocHandler *m_brief; DocHandler *m_brief;
DocHandler *m_detailed; DocHandler *m_detailed;
ProgramListingHandler *m_programListing; ProgramListingHandler *m_programListing;
QString m_id; StringImpl m_id;
QString m_kindString; StringImpl m_kindString;
CompoundKind m_kind; CompoundKind m_kind;
QString m_name; StringImpl m_name;
QString m_defFile; QString m_defFile;
int m_defLine; int m_defLine;
QString m_xmlDir; QString m_xmlDir;
...@@ -136,6 +144,8 @@ class CompoundHandler : public IClass, ...@@ -136,6 +144,8 @@ class CompoundHandler : public IClass,
MainHandler *m_mainHandler; MainHandler *m_mainHandler;
GraphHandler *m_inheritanceGraph; GraphHandler *m_inheritanceGraph;
GraphHandler *m_collaborationGraph; GraphHandler *m_collaborationGraph;
GraphHandler *m_includeDependencyGraph;
GraphHandler *m_includedByDependencyGraph;
QList<QString> m_innerClasses; QList<QString> m_innerClasses;
}; };
......
...@@ -117,6 +117,9 @@ MarkupHandler::MarkupHandler(QList<DocImpl> &children,QString &curString) ...@@ -117,6 +117,9 @@ MarkupHandler::MarkupHandler(QList<DocImpl> &children,QString &curString)
addStartHandler("superscript",this,&MarkupHandler::startSuperscript); addStartHandler("superscript",this,&MarkupHandler::startSuperscript);
addEndHandler("superscript",this,&MarkupHandler::endSuperscript); addEndHandler("superscript",this,&MarkupHandler::endSuperscript);
addStartHandler("preformatted",this,&MarkupHandler::startPreformatted);
addEndHandler("preformatted",this,&MarkupHandler::endPreformatted);
} }
MarkupHandler::~MarkupHandler() MarkupHandler::~MarkupHandler()
...@@ -231,6 +234,20 @@ void MarkupHandler::endSuperscript() ...@@ -231,6 +234,20 @@ void MarkupHandler::endSuperscript()
m_curMarkup &= ~IDocMarkup::Superscript; m_curMarkup &= ~IDocMarkup::Superscript;
} }
void MarkupHandler::startPreformatted(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,TRUE));
m_curMarkup |= IDocMarkup::Preformatted;
}
void MarkupHandler::endPreformatted()
{
addTextNode();
m_children.append(new MarkupModifierNode(IDocMarkup::Preformatted,FALSE));
m_curMarkup &= ~IDocMarkup::Preformatted;
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// ListItemHandler // ListItemHandler
//---------------------------------------------------------------------- //----------------------------------------------------------------------
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <qxml.h> #include <qxml.h>
#include <doxmlintf.h> #include <doxmlintf.h>
#include "stringimpl.h"
#include "basehandler.h" #include "basehandler.h"
#include "baseiterator.h" #include "baseiterator.h"
...@@ -80,11 +81,11 @@ class TextNode : public DocTextImpl ...@@ -80,11 +81,11 @@ class TextNode : public DocTextImpl
// IDocText // IDocText
virtual Kind kind() const { return DocImpl::Text; } virtual Kind kind() const { return DocImpl::Text; }
virtual QString text() const { return m_text; } virtual const IString *text() const { return &m_text; }
virtual int markup() const { return m_markup; } virtual int markup() const { return m_markup; }
private: private:
QString m_text; StringImpl m_text;
int m_markup; int m_markup;
}; };
...@@ -137,6 +138,8 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler> ...@@ -137,6 +138,8 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
virtual void endSubscript(); virtual void endSubscript();
virtual void startSuperscript(const QXmlAttributes &attrib); virtual void startSuperscript(const QXmlAttributes &attrib);
virtual void endSuperscript(); virtual void endSuperscript();
virtual void startPreformatted(const QXmlAttributes &attrib);
virtual void endPreformatted();
private: private:
...@@ -322,12 +325,12 @@ class ParameterHandler : public DocParameterImpl, ...@@ -322,12 +325,12 @@ class ParameterHandler : public DocParameterImpl,
// IDocParameter // IDocParameter
virtual Kind kind() const { return DocImpl::Parameter; } virtual Kind kind() const { return DocImpl::Parameter; }
virtual QString name() const { return m_name; } virtual const IString *name() const { return &m_name; }
virtual IDocPara *description() const { return m_description; } virtual IDocPara *description() const { return m_description; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_name; StringImpl m_name;
ParagraphHandler *m_description; ParagraphHandler *m_description;
}; };
...@@ -404,13 +407,13 @@ class LinkHandler : public DocLinkImpl, public BaseHandler<LinkHandler> ...@@ -404,13 +407,13 @@ class LinkHandler : public DocLinkImpl, public BaseHandler<LinkHandler>
// IDocLink // IDocLink
virtual Kind kind() const { return DocImpl::Link; } virtual Kind kind() const { return DocImpl::Link; }
virtual QString refId() const { return m_ref; } virtual const IString *refId() const { return &m_ref; }
virtual QString text() const { return m_text; } virtual const IString *text() const { return &m_text; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_ref; StringImpl m_ref;
QString m_text; StringImpl m_text;
}; };
...@@ -430,11 +433,11 @@ class EMailHandler : public DocEMailImpl, public BaseHandler<EMailHandler> ...@@ -430,11 +433,11 @@ class EMailHandler : public DocEMailImpl, public BaseHandler<EMailHandler>
// IDocEMail // IDocEMail
virtual Kind kind() const { return DocImpl::EMail; } virtual Kind kind() const { return DocImpl::EMail; }
virtual QString address() const { return m_address; } virtual const IString *address() const { return &m_address; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_address; StringImpl m_address;
}; };
...@@ -454,13 +457,13 @@ class ULinkHandler : public DocULinkImpl, public BaseHandler<ULinkHandler> ...@@ -454,13 +457,13 @@ class ULinkHandler : public DocULinkImpl, public BaseHandler<ULinkHandler>
// IDocULink // IDocULink
virtual Kind kind() const { return DocImpl::ULink; } virtual Kind kind() const { return DocImpl::ULink; }
virtual QString url() const { return m_url; } virtual const IString * url() const { return &m_url; }
virtual QString text() const { return m_text; } virtual const IString * text() const { return &m_text; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_url; StringImpl m_url;
QString m_text; StringImpl m_text;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -499,16 +502,16 @@ class RefHandler : public DocRefImpl, public BaseHandler<RefHandler> ...@@ -499,16 +502,16 @@ class RefHandler : public DocRefImpl, public BaseHandler<RefHandler>
// IDocRef // IDocRef
virtual Kind kind() const { return DocImpl::Ref; } virtual Kind kind() const { return DocImpl::Ref; }
virtual QString refId() const { return m_refId; } virtual const IString *refId() const { return &m_refId; }
virtual TargetKind targetKind() const { return m_targetKind; } virtual TargetKind targetKind() const { return m_targetKind; }
virtual QString external() const { return m_extId; } virtual const IString *external() const { return &m_extId; }
virtual QString text() const { return m_linkText; } virtual const IString *text() const { return &m_linkText; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_refId; StringImpl m_refId;
QString m_extId; StringImpl m_extId;
QString m_linkText; StringImpl m_linkText;
TargetKind m_targetKind; TargetKind m_targetKind;
}; };
...@@ -569,7 +572,7 @@ class SimpleSectHandler : public DocSimpleSectImpl, ...@@ -569,7 +572,7 @@ class SimpleSectHandler : public DocSimpleSectImpl,
// IDocSimpleSect // IDocSimpleSect
virtual Kind kind() const { return DocImpl::SimpleSect; } virtual Kind kind() const { return DocImpl::SimpleSect; }
virtual Types type() const { return m_type; } virtual Types type() const { return m_type; }
virtual QString typeString() const { return m_typeString; } virtual const IString *typeString() const { return &m_typeString; }
virtual IDocTitle *title() const { return m_title; } virtual IDocTitle *title() const { return m_title; }
virtual IDocPara *description() const { return m_paragraph; } virtual IDocPara *description() const { return m_paragraph; }
...@@ -577,7 +580,7 @@ class SimpleSectHandler : public DocSimpleSectImpl, ...@@ -577,7 +580,7 @@ class SimpleSectHandler : public DocSimpleSectImpl,
IBaseHandler *m_parent; IBaseHandler *m_parent;
ParagraphHandler *m_paragraph; ParagraphHandler *m_paragraph;
Types m_type; Types m_type;
QString m_typeString; StringImpl m_typeString;
TitleHandler *m_title; TitleHandler *m_title;
}; };
...@@ -603,12 +606,12 @@ class VariableListEntryHandler : public DocVariableListEntryImpl, ...@@ -603,12 +606,12 @@ class VariableListEntryHandler : public DocVariableListEntryImpl,
// IDocVariableListEntry // IDocVariableListEntry
virtual Kind kind() const { return DocImpl::VariableListEntry; } virtual Kind kind() const { return DocImpl::VariableListEntry; }
virtual QString term() const { return m_term; } virtual const IString *term() const { return &m_term; }
virtual IDocPara *description() const { return m_description; } virtual IDocPara *description() const { return m_description; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_term; StringImpl m_term;
ParagraphHandler *m_description; ParagraphHandler *m_description;
}; };
...@@ -710,7 +713,7 @@ class CodeLineHandler : public DocCodeLineImpl, public BaseHandler<CodeLineHandl ...@@ -710,7 +713,7 @@ class CodeLineHandler : public DocCodeLineImpl, public BaseHandler<CodeLineHandl
// IDocCodeLine // IDocCodeLine
virtual Kind kind() const { return DocImpl::CodeLine; } virtual Kind kind() const { return DocImpl::CodeLine; }
virtual int lineNumber() const { return m_lineNumber; } virtual int lineNumber() const { return m_lineNumber; }
virtual QString refId() const { return m_refId; } virtual const IString *refId() const { return &m_refId; }
virtual IDocIterator *codeElements() const; virtual IDocIterator *codeElements() const;
private: private:
...@@ -718,7 +721,7 @@ class CodeLineHandler : public DocCodeLineImpl, public BaseHandler<CodeLineHandl ...@@ -718,7 +721,7 @@ class CodeLineHandler : public DocCodeLineImpl, public BaseHandler<CodeLineHandl
IBaseHandler *m_parent; IBaseHandler *m_parent;
int m_lineNumber; int m_lineNumber;
QString m_refId; StringImpl m_refId;
QList<DocImpl> m_children; QList<DocImpl> m_children;
}; };
...@@ -782,13 +785,13 @@ class FormulaHandler : public DocFormulaImpl, public BaseHandler<FormulaHandler> ...@@ -782,13 +785,13 @@ class FormulaHandler : public DocFormulaImpl, public BaseHandler<FormulaHandler>
// IDocFormula // IDocFormula
virtual Kind kind() const { return DocImpl::Formula; } virtual Kind kind() const { return DocImpl::Formula; }
virtual QString id() const { return m_id; } virtual const IString *id() const { return &m_id; }
virtual QString text() const { return m_text; } virtual const IString *text() const { return &m_text; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_id; StringImpl m_id;
QString m_text; StringImpl m_text;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -807,13 +810,13 @@ class ImageHandler : public DocImageImpl, public BaseHandler<ImageHandler> ...@@ -807,13 +810,13 @@ class ImageHandler : public DocImageImpl, public BaseHandler<ImageHandler>
// IDocImage // IDocImage
virtual Kind kind() const { return DocImpl::Image; } virtual Kind kind() const { return DocImpl::Image; }
virtual QString name() const { return m_name; } virtual const IString *name() const { return &m_name; }
virtual QString caption() const { return m_caption; } virtual const IString *caption() const { return &m_caption; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_name; StringImpl m_name;
QString m_caption; StringImpl m_caption;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -832,13 +835,13 @@ class DotFileHandler : public DocDotFileImpl, public BaseHandler<DotFileHandler> ...@@ -832,13 +835,13 @@ class DotFileHandler : public DocDotFileImpl, public BaseHandler<DotFileHandler>
// IDocDotFile // IDocDotFile
virtual Kind kind() const { return DocImpl::DotFile; } virtual Kind kind() const { return DocImpl::DotFile; }
virtual QString name() const { return m_name; } virtual const IString *name() const { return &m_name; }
virtual QString caption() const { return m_caption; } virtual const IString *caption() const { return &m_caption; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_name; StringImpl m_name;
QString m_caption; StringImpl m_caption;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -861,13 +864,13 @@ class IndexEntryHandler : public DocIndexEntryImpl, public BaseHandler<IndexEntr ...@@ -861,13 +864,13 @@ class IndexEntryHandler : public DocIndexEntryImpl, public BaseHandler<IndexEntr
// IDocIndexEntry // IDocIndexEntry
virtual Kind kind() const { return DocImpl::IndexEntry; } virtual Kind kind() const { return DocImpl::IndexEntry; }
virtual QString primary() const { return m_primary; } virtual const IString *primary() const { return &m_primary; }
virtual QString secondary() const { return m_secondary; } virtual const IString *secondary() const { return &m_secondary; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_primary; StringImpl m_primary;
QString m_secondary; StringImpl m_secondary;
}; };
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -956,13 +959,13 @@ class TableHandler : public DocTableImpl, public BaseHandler<TableHandler> ...@@ -956,13 +959,13 @@ class TableHandler : public DocTableImpl, public BaseHandler<TableHandler>
virtual Kind kind() const { return DocImpl::Table; } virtual Kind kind() const { return DocImpl::Table; }
virtual IDocIterator *rows() const; virtual IDocIterator *rows() const;
virtual int numColumns() const { return m_numColumns; } virtual int numColumns() const { return m_numColumns; }
virtual QString caption() const { return m_caption; } virtual const IString *caption() const { return &m_caption; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QList<RowHandler> m_children; QList<RowHandler> m_children;
int m_numColumns; int m_numColumns;
QString m_caption; StringImpl m_caption;
}; };
class TableIterator : public BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl> class TableIterator : public BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl>
...@@ -995,7 +998,7 @@ class DocSectionHandler : public DocSectionImpl, public BaseHandler<DocSectionHa ...@@ -995,7 +998,7 @@ class DocSectionHandler : public DocSectionImpl, public BaseHandler<DocSectionHa
// IDocSection // IDocSection
virtual Kind kind() const { return DocImpl::Section; } virtual Kind kind() const { return DocImpl::Section; }
virtual QString id() const { return m_id; } virtual const IString *id() const { return &m_id; }
virtual int level() const { return m_level; } virtual int level() const { return m_level; }
virtual IDocIterator *title() const; virtual IDocIterator *title() const;
...@@ -1003,7 +1006,7 @@ class DocSectionHandler : public DocSectionImpl, public BaseHandler<DocSectionHa ...@@ -1003,7 +1006,7 @@ class DocSectionHandler : public DocSectionImpl, public BaseHandler<DocSectionHa
IBaseHandler *m_parent; IBaseHandler *m_parent;
QList<DocImpl> m_children; QList<DocImpl> m_children;
MarkupHandler *m_markupHandler; MarkupHandler *m_markupHandler;
QString m_id; StringImpl m_id;
int m_level; int m_level;
}; };
......
This diff is collapsed.
...@@ -4,7 +4,7 @@ HEADERS = basehandler.h mainhandler.h \ ...@@ -4,7 +4,7 @@ HEADERS = basehandler.h mainhandler.h \
compoundhandler.h sectionhandler.h \ compoundhandler.h sectionhandler.h \
memberhandler.h paramhandler.h \ memberhandler.h paramhandler.h \
dochandler.h linkedtexthandler.h \ dochandler.h linkedtexthandler.h \
debug.h graphhandler.h debug.h graphhandler.h stringimpl.h
SOURCES = mainhandler.cpp \ SOURCES = mainhandler.cpp \
compoundhandler.cpp sectionhandler.cpp \ compoundhandler.cpp sectionhandler.cpp \
memberhandler.cpp paramhandler.cpp \ memberhandler.cpp paramhandler.cpp \
......
...@@ -16,6 +16,7 @@ ...@@ -16,6 +16,7 @@
#ifndef _GRAPHHANDLER_H #ifndef _GRAPHHANDLER_H
#define _GRAPHHANDLER_H #define _GRAPHHANDLER_H
#include "stringimpl.h"
#include "doxmlintf.h" #include "doxmlintf.h"
#include "basehandler.h" #include "basehandler.h"
#include "baseiterator.h" #include "baseiterator.h"
...@@ -63,16 +64,16 @@ class NodeHandler : public INode, public BaseHandler<NodeHandler> ...@@ -63,16 +64,16 @@ class NodeHandler : public INode, public BaseHandler<NodeHandler>
void startChildNode(const QXmlAttributes &attrib); void startChildNode(const QXmlAttributes &attrib);
// INode // INode
virtual QString id() const { return m_id; } virtual const IString *id() const { return &m_id; }
virtual QString label() const { return m_label; } virtual const IString *label() const { return &m_label; }
virtual QString linkId() const { return m_link; } virtual const IString *linkId() const { return &m_link; }
virtual IChildNodeIterator *children() const; virtual IChildNodeIterator *children() const;
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_id; StringImpl m_id;
QString m_label; StringImpl m_label;
QString m_link; StringImpl m_link;
QList<ChildNodeHandler> m_children; QList<ChildNodeHandler> m_children;
GraphHandler *m_graph; GraphHandler *m_graph;
}; };
...@@ -100,14 +101,14 @@ class ChildNodeHandler : public IChildNode, public BaseHandler<ChildNodeHandler> ...@@ -100,14 +101,14 @@ class ChildNodeHandler : public IChildNode, public BaseHandler<ChildNodeHandler>
// IChildNode // IChildNode
virtual INode *node() const; virtual INode *node() const;
virtual NodeRelation relation() const { return m_relation; } virtual NodeRelation relation() const { return m_relation; }
virtual QString relationString() const { return m_relationString; } virtual const IString * relationString() const { return &m_relationString; }
virtual IEdgeLabelIterator *edgeLabels() const; virtual IEdgeLabelIterator *edgeLabels() const;
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_id; QString m_id;
NodeRelation m_relation; NodeRelation m_relation;
QString m_relationString; StringImpl m_relationString;
QList<EdgeLabelHandler> m_edgeLabels; QList<EdgeLabelHandler> m_edgeLabels;
GraphHandler *m_graph; GraphHandler *m_graph;
}; };
...@@ -132,11 +133,11 @@ class EdgeLabelHandler : public IEdgeLabel, public BaseHandler<EdgeLabelHandler> ...@@ -132,11 +133,11 @@ class EdgeLabelHandler : public IEdgeLabel, public BaseHandler<EdgeLabelHandler>
void endEdgeLabel(); void endEdgeLabel();
// IEdgeLabel // IEdgeLabel
virtual QString label() const { return m_label; } virtual const IString *label() const { return &m_label; }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QString m_label; StringImpl m_label;
}; };
class EdgeLabelIterator : public BaseIterator<IEdgeLabelIterator,IEdgeLabel,EdgeLabelHandler> class EdgeLabelIterator : public BaseIterator<IEdgeLabelIterator,IEdgeLabel,EdgeLabelHandler>
......
...@@ -15,6 +15,7 @@ ...@@ -15,6 +15,7 @@
#include "linkedtexthandler.h" #include "linkedtexthandler.h"
#include "debug.h" #include "debug.h"
#include <doxmlintf.h> #include <doxmlintf.h>
#include "stringimpl.h"
class LT_Text : public LinkedTextImpl, public ILT_Text class LT_Text : public LinkedTextImpl, public ILT_Text
{ {
...@@ -23,10 +24,10 @@ class LT_Text : public LinkedTextImpl, public ILT_Text ...@@ -23,10 +24,10 @@ class LT_Text : public LinkedTextImpl, public ILT_Text
virtual ~LT_Text() {} virtual ~LT_Text() {}
// ILT_Text // ILT_Text
virtual QString text() const { return m_text; } virtual const IString *text() const { return &m_text; }
virtual Kind kind() const { return LinkedTextImpl::Kind_Text; } virtual Kind kind() const { return LinkedTextImpl::Kind_Text; }
private: private:
QString m_text; StringImpl m_text;
}; };
class LT_Ref : public LinkedTextImpl, public ILT_Ref class LT_Ref : public LinkedTextImpl, public ILT_Ref
...@@ -40,16 +41,16 @@ class LT_Ref : public LinkedTextImpl, public ILT_Ref ...@@ -40,16 +41,16 @@ class LT_Ref : public LinkedTextImpl, public ILT_Ref
void setTargetKind(TargetKind k) { m_targetKind=k; } void setTargetKind(TargetKind k) { m_targetKind=k; }
// ILT_Ref // ILT_Ref
virtual QString text() const { return m_text; } virtual const IString *text() const { return &m_text; }
virtual QString id() const { return m_refId; } virtual const IString * id() const { return &m_refId; }
virtual TargetKind targetKind() const { return m_targetKind; } virtual TargetKind targetKind() const { return m_targetKind; }
virtual QString external() const { return m_extId; } virtual const IString *external() const { return &m_extId; }
virtual Kind kind() const { return LinkedTextImpl::Kind_Ref; } virtual Kind kind() const { return LinkedTextImpl::Kind_Ref; }
private: private:
QString m_refId; StringImpl m_refId;
QString m_extId; StringImpl m_extId;
QString m_text; StringImpl m_text;
TargetKind m_targetKind; TargetKind m_targetKind;
}; };
...@@ -106,7 +107,7 @@ void LinkedTextHandler::endRef() ...@@ -106,7 +107,7 @@ void LinkedTextHandler::endRef()
{ {
m_ref->setText(m_curString); m_ref->setText(m_curString);
m_children.append(m_ref); m_children.append(m_ref);
debug(2,"LinkedTextHandler: add ref `%s'\n",m_ref->text().data()); debug(2,"LinkedTextHandler: add ref `%s'\n",m_ref->text()->latin1());
m_ref=0; m_ref=0;
} }
...@@ -120,10 +121,10 @@ QString LinkedTextHandler::toString(const QList<LinkedTextImpl> &list) ...@@ -120,10 +121,10 @@ QString LinkedTextHandler::toString(const QList<LinkedTextImpl> &list)
switch(lt->kind()) switch(lt->kind())
{ {
case ILinkedText::Kind_Text: case ILinkedText::Kind_Text:
result+=dynamic_cast<ILT_Text*>(lt)->text(); result+=dynamic_cast<ILT_Text*>(lt)->text()->latin1();
break; break;
case ILinkedText::Kind_Ref: case ILinkedText::Kind_Ref:
result+=dynamic_cast<ILT_Ref *>(lt)->text(); result+=dynamic_cast<ILT_Ref *>(lt)->text()->latin1();
break; break;
} }
} }
......
...@@ -194,16 +194,17 @@ ICompoundIterator *MainHandler::compounds() const ...@@ -194,16 +194,17 @@ ICompoundIterator *MainHandler::compounds() const
return new CompoundEntryIterator(this,m_compounds); return new CompoundEntryIterator(this,m_compounds);
} }
ICompound *MainHandler::compoundById(const QString &id) const ICompound *MainHandler::compoundById(const char *id) const
{ {
if (id.isEmpty()) return 0; QString ids = id;
CompoundHandler *ch = m_compoundsLoaded[id]; if (ids.isEmpty()) return 0;
CompoundHandler *ch = m_compoundsLoaded[ids];
if (ch) // compound already in memory if (ch) // compound already in memory
{ {
ch->addref(); // returning alias -> increase reference counter ch->addref(); // returning alias -> increase reference counter
return ch->toICompound(); return ch->toICompound();
} }
CompoundEntry *ce = m_compoundDict.find(id); CompoundEntry *ce = m_compoundDict.find(ids);
if (ce==0) return 0; // id not found if (ce==0) return 0; // id not found
// create and load a new compound // create and load a new compound
ch = new CompoundHandler(m_xmlDirName); ch = new CompoundHandler(m_xmlDirName);
...@@ -224,28 +225,31 @@ ICompound *MainHandler::compoundById(const QString &id) const ...@@ -224,28 +225,31 @@ ICompound *MainHandler::compoundById(const QString &id) const
void MainHandler::unloadCompound(CompoundHandler *ch) void MainHandler::unloadCompound(CompoundHandler *ch)
{ {
m_compoundsLoaded.remove(ch->id()); m_compoundsLoaded.remove(ch->id()->latin1());
} }
ICompound *MainHandler::compoundByName(const QString &name) const ICompound *MainHandler::compoundByName(const char *name) const
{ {
if (name.isEmpty()) return 0; QString nameStr = name;
if (nameStr.isEmpty()) return 0;
CompoundEntry *ce = m_compoundNameDict[name]; CompoundEntry *ce = m_compoundNameDict[name];
if (ce==0) return 0; // name not found if (ce==0) return 0; // name not found
return compoundById(ce->id); return compoundById(ce->id);
} }
ICompound *MainHandler::memberById(const QString &id) const ICompound *MainHandler::memberById(const char *id) const
{ {
if (id.isEmpty()) return 0; QString ids = id;
if (ids.isEmpty()) return 0;
MemberEntry *me = m_memberDict[id]; MemberEntry *me = m_memberDict[id];
if (me==0) return 0; // id not found if (me==0) return 0; // id not found
return compoundById(me->id); return compoundById(me->id);
} }
ICompoundIterator *MainHandler::memberByName(const QString &name) const ICompoundIterator *MainHandler::memberByName(const char *name) const
{ {
if (name.isEmpty()) return 0; QString nameStr = name;
if (nameStr.isEmpty()) return 0;
QList<CompoundEntry> *cel = m_memberNameDict[name]; QList<CompoundEntry> *cel = m_memberNameDict[name];
if (cel==0) return 0; // name not found if (cel==0) return 0; // name not found
return new CompoundEntryIterator(this,*cel); return new CompoundEntryIterator(this,*cel);
...@@ -267,7 +271,7 @@ void MainHandler::release() ...@@ -267,7 +271,7 @@ void MainHandler::release()
CompoundHandler *ch; CompoundHandler *ch;
for (chi.toFirst();(ch=chi.current());++chi) for (chi.toFirst();(ch=chi.current());++chi)
{ {
debug(1,"Compound %s not released\n",ch->name().data()); debug(1,"Compound %s not released\n",ch->name()->latin1());
} }
graphhandler_exit(); graphhandler_exit();
dochandler_exit(); dochandler_exit();
......
...@@ -55,10 +55,10 @@ class MainHandler : public IDoxygen, public BaseHandler<MainHandler> ...@@ -55,10 +55,10 @@ class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
// IDoxygen // IDoxygen
ICompoundIterator *compounds() const; ICompoundIterator *compounds() const;
ICompound *compoundById(const QString &id) const; ICompound *compoundById(const char *id) const;
virtual ICompound *compoundByName(const QString &name) const; virtual ICompound *compoundByName(const char *name) const;
virtual ICompound *memberById(const QString &id) const; virtual ICompound *memberById(const char *id) const;
virtual ICompoundIterator *memberByName(const QString &name) const; virtual ICompoundIterator *memberByName(const char *name) const;
virtual void release(); virtual void release();
void setDebugLevel(int level); void setDebugLevel(int level);
......
...@@ -35,11 +35,11 @@ struct MemberReference : public IMemberReference ...@@ -35,11 +35,11 @@ struct MemberReference : public IMemberReference
{ {
virtual ~MemberReference() {} virtual ~MemberReference() {}
virtual IMember *member() const; virtual IMember *member() const;
virtual QString memberName() const { return m_name; } virtual const IString *memberName() const { return &m_name; }
void initialize(MainHandler *m); void initialize(MainHandler *m);
QString m_memId; QString m_memId;
QString m_name; StringImpl m_name;
MainHandler *m_mainHandler; MainHandler *m_mainHandler;
}; };
...@@ -61,8 +61,8 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler> ...@@ -61,8 +61,8 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler>
virtual void endEnumValue(); virtual void endEnumValue();
// IEnumValue // IEnumValue
virtual QString name() const { return m_name; } virtual const IString *name() const { return &m_name; }
virtual QString initializer() const { return m_initializer; } virtual const IString *initializer() const { return &m_initializer; }
void setName(const QString &name) { m_name=name; } void setName(const QString &name) { m_name=name; }
void setInitializer(const QString &init) { m_initializer=init; } void setInitializer(const QString &init) { m_initializer=init; }
...@@ -71,8 +71,8 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler> ...@@ -71,8 +71,8 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler>
EnumValueHandler(IBaseHandler *parent); EnumValueHandler(IBaseHandler *parent);
private: private:
QString m_name; StringImpl m_name;
QString m_initializer; StringImpl m_initializer;
IBaseHandler *m_parent; IBaseHandler *m_parent;
}; };
...@@ -115,24 +115,27 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler> ...@@ -115,24 +115,27 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
virtual ISection *section() const; virtual ISection *section() const;
virtual MemberKind kind() const virtual MemberKind kind() const
{ return m_kind; } { return m_kind; }
virtual QString kindString() const virtual const IString *kindString() const
{ return m_kindString; } { return &m_kindString; }
virtual QString id() const virtual const IString *id() const
{ return m_id; } { return &m_id; }
virtual QString protection() const virtual const IString *protection() const
{ return m_protection; } { return &m_protection; }
virtual QString virtualness() const virtual const IString *virtualness() const
{ return m_virtualness; } { return &m_virtualness; }
virtual QString name() const virtual const IString *name() const
{ return m_name; } { return &m_name; }
virtual bool isConst() const virtual bool isConst() const
{ return m_isConst; } { return m_isConst; }
virtual bool isVolatile() const virtual bool isVolatile() const
{ return m_isVolatile; } { return m_isVolatile; }
virtual ILinkedTextIterator *type() const virtual ILinkedTextIterator *type() const
{ return new LinkedTextIterator(m_type); } { return new LinkedTextIterator(m_type); }
virtual QString typeString() const virtual const IString *typeString() const
{ return LinkedTextHandler::toString(m_type); } { MemberHandler *that = (MemberHandler *)this;
that->m_typeString = LinkedTextHandler::toString(m_type);
return &m_typeString;
}
virtual IParamIterator *params() const virtual IParamIterator *params() const
{ return new ParamIterator(m_params); } { return new ParamIterator(m_params); }
virtual IMemberReferenceIterator *references() const virtual IMemberReferenceIterator *references() const
...@@ -147,8 +150,8 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler> ...@@ -147,8 +150,8 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
{ return m_bodyStart; } { return m_bodyStart; }
virtual int bodyEnd() const virtual int bodyEnd() const
{ return m_bodyEnd; } { return m_bodyEnd; }
virtual QString definitionFile() const virtual const IString *definitionFile() const
{ return m_defFile; } { return &m_defFile; }
virtual int definitionLine() const virtual int definitionLine() const
{ return m_defLine; } { return m_defLine; }
virtual IMemberReference *reimplements() const virtual IMemberReference *reimplements() const
...@@ -171,14 +174,15 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler> ...@@ -171,14 +174,15 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
CompoundHandler *m_compound; CompoundHandler *m_compound;
SectionHandler *m_section; SectionHandler *m_section;
MemberKind m_kind; MemberKind m_kind;
QString m_kindString; StringImpl m_kindString;
QString m_id; StringImpl m_id;
QString m_protection; StringImpl m_protection;
QString m_virtualness; StringImpl m_virtualness;
StringImpl m_typeString;
QList<LinkedTextImpl> m_type; QList<LinkedTextImpl> m_type;
QList<LinkedTextImpl> m_initializer; QList<LinkedTextImpl> m_initializer;
QList<LinkedTextImpl> m_exception; QList<LinkedTextImpl> m_exception;
QString m_name; StringImpl m_name;
DocHandler *m_brief; DocHandler *m_brief;
DocHandler *m_detailed; DocHandler *m_detailed;
QList<ParamHandler> m_params; QList<ParamHandler> m_params;
...@@ -186,7 +190,7 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler> ...@@ -186,7 +190,7 @@ class MemberHandler : public IMember, public BaseHandler<MemberHandler>
QList<MemberReference> m_referencedBy; QList<MemberReference> m_referencedBy;
MemberReference *m_reimplements; MemberReference *m_reimplements;
QList<MemberReference> m_reimplementedBy; QList<MemberReference> m_reimplementedBy;
QString m_defFile; StringImpl m_defFile;
int m_defLine; int m_defLine;
int m_bodyStart; int m_bodyStart;
int m_bodyEnd; int m_bodyEnd;
......
...@@ -21,6 +21,7 @@ ...@@ -21,6 +21,7 @@
#include <qxml.h> #include <qxml.h>
#include <doxmlintf.h> #include <doxmlintf.h>
#include "stringimpl.h"
#include "basehandler.h" #include "basehandler.h"
#include "baseiterator.h" #include "baseiterator.h"
#include "linkedtexthandler.h" #include "linkedtexthandler.h"
...@@ -43,20 +44,20 @@ class ParamHandler : public IParam, public BaseHandler<ParamHandler> ...@@ -43,20 +44,20 @@ class ParamHandler : public IParam, public BaseHandler<ParamHandler>
// IParam // IParam
virtual ILinkedTextIterator *type() const virtual ILinkedTextIterator *type() const
{ return new LinkedTextIterator(m_type); } { return new LinkedTextIterator(m_type); }
virtual QString declarationName() const { return m_declName; } virtual const IString * declarationName() const { return &m_declName; }
virtual QString definitionName() const { return m_defName; } virtual const IString * definitionName() const { return &m_defName; }
virtual QString attrib() const { return m_attrib; } virtual const IString * attrib() const { return &m_attrib; }
virtual QString arraySpecifier() const { return m_array; } virtual const IString * arraySpecifier() const { return &m_array; }
virtual ILinkedTextIterator *defaultValue() const virtual ILinkedTextIterator *defaultValue() const
{ return new LinkedTextIterator(m_defVal); } { return new LinkedTextIterator(m_defVal); }
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
QList<LinkedTextImpl> m_type; QList<LinkedTextImpl> m_type;
QString m_declName; StringImpl m_declName;
QString m_defName; StringImpl m_defName;
QString m_attrib; StringImpl m_attrib;
QString m_array; StringImpl m_array;
QList<LinkedTextImpl> m_defVal; QList<LinkedTextImpl> m_defVal;
LinkedTextHandler *m_linkedTextHandler; LinkedTextHandler *m_linkedTextHandler;
}; };
......
...@@ -46,8 +46,8 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler> ...@@ -46,8 +46,8 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler>
virtual ~SectionHandler(); virtual ~SectionHandler();
// ISection // ISection
virtual QString kindString() const virtual const IString *kindString() const
{ return m_kindString; } { return &m_kindString; }
virtual SectionKind kind() const virtual SectionKind kind() const
{ return m_kind; } { return m_kind; }
virtual IMemberIterator *members() const virtual IMemberIterator *members() const
...@@ -78,7 +78,7 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler> ...@@ -78,7 +78,7 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler>
private: private:
IBaseHandler *m_parent; IBaseHandler *m_parent;
SectionKind m_kind; SectionKind m_kind;
QString m_kindString; StringImpl m_kindString;
QList<MemberHandler> m_members; QList<MemberHandler> m_members;
}; };
......
#ifndef STRINGIMPL_H
#define STRINGIMPL_H
#include <qstring.h>
#include "doxmlintf.h"
class StringImpl : public QString, public IString
{
public:
StringImpl() {}
StringImpl(const QString &str) : QString(str) {}
virtual ~StringImpl() {}
// IString
const char *latin1() const
{ return QString::latin1(); }
unsigned short unicodeCharAt(int index) const
{ return QString::unicode()[index].unicode(); }
bool isEmpty() const
{ return QString::isEmpty(); }
int length() const
{ return QString::length(); }
};
#endif
This diff is collapsed.
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.15_20020407 Version: 1.2.15_20020421
Release: 1 Release: 1
Epoch: 1 Epoch: 1
Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz Source0: ftp://ftp.stack.nl/pub/users/dimitri/%{name}-%{version}.src.tar.gz
......
...@@ -923,7 +923,7 @@ void ClassDef::writeDocumentation(OutputList &ol) ...@@ -923,7 +923,7 @@ void ClassDef::writeDocumentation(OutputList &ol)
ol.pushGeneratorState(); ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); ol.disable(OutputGenerator::Man);
ol.startDotGraph(); ol.startDotGraph();
parseText(ol,theTranslator->trClassDiagram(name())); parseText(ol,theTranslator->trClassDiagram(displayName()));
ol.endDotGraph(inheritanceGraph); ol.endDotGraph(inheritanceGraph);
if (Config_getBool("GENERATE_LEGEND")) if (Config_getBool("GENERATE_LEGEND"))
{ {
......
...@@ -1103,7 +1103,8 @@ void Config::check() ...@@ -1103,7 +1103,8 @@ void Config::check()
exit(1); exit(1);
} }
else if (cgiURL.left(7)!="http://" && else if (cgiURL.left(7)!="http://" &&
cgiURL.left(8)!="https://" cgiURL.left(8)!="https://" &&
cgiURL.left(4)!="cgi:"
) )
{ {
config_err("Error: tag CGI_URL: URL to cgi directory is invalid (must " config_err("Error: tag CGI_URL: URL to cgi directory is invalid (must "
...@@ -2224,6 +2225,13 @@ void Config::create() ...@@ -2224,6 +2225,13 @@ void Config::create()
"recommended to install and use dot, since it yield more powerful graphs. \n", "recommended to install and use dot, since it yield more powerful graphs. \n",
TRUE TRUE
); );
cb = addBool(
"HIDE_UNDOC_RELATIONS",
"If set to YES, the inheritance and collaboration graphs will hide \n"
"inheritance and usage relations if the target is undocumented \n"
"or is not a class. \n",
TRUE
);
cb = addBool( cb = addBool(
"HAVE_DOT", "HAVE_DOT",
"If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is \n" "If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is \n"
...@@ -2257,14 +2265,6 @@ void Config::create() ...@@ -2257,14 +2265,6 @@ void Config::create()
TRUE TRUE
); );
cb->addDependency("HAVE_DOT"); cb->addDependency("HAVE_DOT");
cb = addBool(
"HIDE_UNDOC_RELATIONS",
"If set to YES, the inheritance and collaboration graphs will hide \n"
"inheritance and usage relations if the target is undocumented \n"
"or is not a class. \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"
......
...@@ -123,7 +123,9 @@ void Definition::setBriefDescription(const char *b,const char *briefFile,int bri ...@@ -123,7 +123,9 @@ void Definition::setBriefDescription(const char *b,const char *briefFile,int bri
switch(m_brief.at(bl-1)) switch(m_brief.at(bl-1))
{ {
case '.': case '!': case '?': break; case '.': case '!': case '?': break;
default: m_brief+='.'; break; default:
if (isupper(m_brief.at(0))) m_brief+='.';
break;
} }
} }
m_briefFile = briefFile; m_briefFile = briefFile;
......
...@@ -1161,12 +1161,12 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) ...@@ -1161,12 +1161,12 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
BEGIN( DocScan ); BEGIN( DocScan );
} }
<DocScan>{CMD}"verbatim"/[^a-z_A-Z0-9] { <DocScan>{CMD}"verbatim"/[^a-z_A-Z0-9] {
outDoc->startCodeFragment(); outDoc->startVerbatimFragment();
insideVerbatim=TRUE; insideVerbatim=TRUE;
BEGIN(DocVerbatim); BEGIN(DocVerbatim);
} }
<DocVerbatim>{CMD}"endverbatim"/[^a-z_A-Z0-9] { <DocVerbatim>{CMD}"endverbatim"/[^a-z_A-Z0-9] {
outDoc->endCodeFragment(); outDoc->endVerbatimFragment();
insideVerbatim=FALSE; insideVerbatim=FALSE;
BEGIN(DocScan); BEGIN(DocScan);
} }
...@@ -1225,7 +1225,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) ...@@ -1225,7 +1225,7 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
BEGIN( DocLinkText ); BEGIN( DocLinkText );
} }
<DocJavaLink>([a-z_A-Z0-9]+".")+ { /* Skip scope prefix (TODO: fix) */ } <DocJavaLink>([a-z_A-Z0-9]+".")+ { /* Skip scope prefix (TODO: fix) */ }
<DocJavaLink>([a-z_A-Z0-9]*"#")?[a-z_A-Z0-9]+("("[a-z_A-Z0-9.,:~&*()\[\]]*")")?({B}*("const"|"volatile"))? { // TODO: support operators as well! <DocJavaLink>([a-z_A-Z0-9]*"#")?[a-z_A-Z0-9]+("("[a-z_A-Z0-9.,:~&*()\ \[\]]*")")?({B}*("const"|"volatile"))? { // TODO: support operators as well!
linkRef = yytext; linkRef = yytext;
linkText = ""; linkText = "";
BEGIN( DocJavaLinkText ); BEGIN( DocJavaLinkText );
...@@ -1272,6 +1272,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG}) ...@@ -1272,6 +1272,10 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
BEGIN(DocScan); BEGIN(DocScan);
} }
<DocScan>{CMD}("arg"|"li")/{BN} { <DocScan>{CMD}("arg"|"li")/{BN} {
if (insideItemList)
{
forceEndItemList();
}
if (insideArgumentList) if (insideArgumentList)
{ {
outDoc->writeListItem(); outDoc->writeListItem();
......
...@@ -468,7 +468,7 @@ void DotNode::write(QTextStream &t, ...@@ -468,7 +468,7 @@ void DotNode::write(QTextStream &t,
} }
} }
void DotNode::writeXML(QTextStream &t) void DotNode::writeXML(QTextStream &t,bool isClassGraph)
{ {
t << " <node id=\"" << m_number << "\">" << endl; t << " <node id=\"" << m_number << "\">" << endl;
t << " <label>" << convertToXML(m_label) << "</label>" << endl; t << " <label>" << convertToXML(m_label) << "</label>" << endl;
...@@ -498,6 +498,8 @@ void DotNode::writeXML(QTextStream &t) ...@@ -498,6 +498,8 @@ void DotNode::writeXML(QTextStream &t)
{ {
edgeInfo=eli.current(); edgeInfo=eli.current();
t << " <childnode id=\"" << childNode->m_number << "\" relation=\""; t << " <childnode id=\"" << childNode->m_number << "\" relation=\"";
if (isClassGraph)
{
switch(edgeInfo->m_color) switch(edgeInfo->m_color)
{ {
case EdgeInfo::Blue: t << "public-inheritance"; break; case EdgeInfo::Blue: t << "public-inheritance"; break;
...@@ -507,6 +509,11 @@ void DotNode::writeXML(QTextStream &t) ...@@ -507,6 +509,11 @@ void DotNode::writeXML(QTextStream &t)
case EdgeInfo::Orange: t << "template-instance"; break; case EdgeInfo::Orange: t << "template-instance"; break;
case EdgeInfo::Grey: ASSERT(0); break; case EdgeInfo::Grey: ASSERT(0); break;
} }
}
else // include graph
{
t << "include";
}
t << "\">" << endl; t << "\">" << endl;
if (!edgeInfo->m_label.isEmpty()) if (!edgeInfo->m_label.isEmpty())
{ {
...@@ -1430,7 +1437,7 @@ void DotClassGraph::writeXML(QTextStream &t) ...@@ -1430,7 +1437,7 @@ void DotClassGraph::writeXML(QTextStream &t)
DotNode *node; DotNode *node;
for (;(node=dni.current());++dni) for (;(node=dni.current());++dni)
{ {
node->writeXML(t); node->writeXML(t,TRUE);
} }
} }
...@@ -1661,7 +1668,7 @@ void DotInclDepGraph::writeXML(QTextStream &t) ...@@ -1661,7 +1668,7 @@ void DotInclDepGraph::writeXML(QTextStream &t)
DotNode *node; DotNode *node;
for (;(node=dni.current());++dni) for (;(node=dni.current());++dni)
{ {
node->writeXML(t); node->writeXML(t,FALSE);
} }
} }
......
...@@ -76,7 +76,7 @@ class DotNode ...@@ -76,7 +76,7 @@ class DotNode
int maxDistance=1000,bool backArrows=TRUE); int maxDistance=1000,bool backArrows=TRUE);
int m_subgraphId; int m_subgraphId;
void clearWriteFlag(); void clearWriteFlag();
void writeXML(QTextStream &t); void writeXML(QTextStream &t,bool isClassGraph);
void writeDEF(QTextStream &t); void writeDEF(QTextStream &t);
QCString label() const { return m_label; } QCString label() const { return m_label; }
int number() const { return m_number; } int number() const { return m_number; }
......
/****************************************************************************** /******************************************************************************
* *
* $Id$ *
* *
* *
* Copyright (C) 1997-2002 by Dimitri van Heesch. * Copyright (C) 1997-2002 by Dimitri van Heesch.
...@@ -541,19 +541,8 @@ ArgumentList *getTemplateArgumentsFromName( ...@@ -541,19 +541,8 @@ ArgumentList *getTemplateArgumentsFromName(
return ali.current(); return ali.current();
} }
static void addClassToContext(Entry *root)
//----------------------------------------------------------------------
// build a list of all classes mentioned in the documentation
// and all classes that have a documentation block before their definition.
static void buildClassList(Entry *root)
{ {
if (
((root->section & Entry::COMPOUNDDOC_MASK) ||
((root->section & Entry::COMPOUND_MASK))
) &&
!root->name.isEmpty()
)
{
QCString fullName=removeRedundantWhiteSpace(root->name); QCString fullName=removeRedundantWhiteSpace(root->name);
if (fullName.isEmpty()) if (fullName.isEmpty())
{ {
...@@ -561,7 +550,7 @@ static void buildClassList(Entry *root) ...@@ -561,7 +550,7 @@ static void buildClassList(Entry *root)
warn(root->fileName,root->startLine, warn(root->fileName,root->startLine,
"Warning: invalid class name found!" "Warning: invalid class name found!"
); );
goto error; return;
} }
Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data()); Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data());
...@@ -765,8 +754,19 @@ static void buildClassList(Entry *root) ...@@ -765,8 +754,19 @@ static void buildClassList(Entry *root)
cd->setOuterScope(d); cd->setOuterScope(d);
} }
} }
}
//----------------------------------------------------------------------
// build a list of all classes mentioned in the documentation
// and all classes that have a documentation block before their definition.
static void buildClassList(Entry *root)
{
if (
(root->section & Entry::COMPOUND_MASK) && !root->name.isEmpty()
)
{
addClassToContext(root);
} }
error:
EntryListIterator eli(*root->sublist); EntryListIterator eli(*root->sublist);
Entry *e; Entry *e;
for (;(e=eli.current());++eli) for (;(e=eli.current());++eli)
...@@ -775,18 +775,41 @@ error: ...@@ -775,18 +775,41 @@ error:
} }
} }
static void buildClassDocList(Entry *root)
{
if (
(root->section & Entry::COMPOUNDDOC_MASK) && !root->name.isEmpty()
)
{
addClassToContext(root);
}
EntryListIterator eli(*root->sublist);
Entry *e;
for (;(e=eli.current());++eli)
{
buildClassDocList(e);
}
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// build a list of all namespaces mentioned in the documentation // build a list of all namespaces mentioned in the documentation
// and all namespaces that have a documentation block before their definition. // and all namespaces that have a documentation block before their definition.
static void buildNamespaceList(Entry *root) static void buildNamespaceList(Entry *root)
{ {
if ( if (
(root->section==Entry::NAMESPACE_SEC) || (root->section==Entry::NAMESPACE_SEC ||
(root->section==Entry::NAMESPACEDOC_SEC) && root->section==Entry::NAMESPACEDOC_SEC ||
root->section==Entry::PACKAGEDOC_SEC
) &&
!root->name.isEmpty() !root->name.isEmpty()
) )
{ {
QCString fullName=stripAnonymousNamespaceScope(root->name.copy()); QCString fullName = root->name;
if (root->section==Entry::PACKAGEDOC_SEC)
{
fullName=substitute(fullName,".","::");
}
fullName = stripAnonymousNamespaceScope(fullName);
if (!fullName.isEmpty()) if (!fullName.isEmpty())
{ {
//printf("Found namespace %s in %s at line %d\n",root->name.data(), //printf("Found namespace %s in %s at line %d\n",root->name.data(),
...@@ -5564,50 +5587,50 @@ static void findMainPage(Entry *root) ...@@ -5564,50 +5587,50 @@ static void findMainPage(Entry *root)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
/*! Search for all Java package statements ///*! Search for all Java package statements
*/ // */
static void buildPackageList(Entry *root) //static void buildPackageList(Entry *root)
{ //{
if (root->section == Entry::PACKAGE_SEC || root->section == Entry::PACKAGEDOC_SEC && !root->name.isEmpty()) // if (root->section == Entry::PACKAGE_SEC || root->section == Entry::PACKAGEDOC_SEC && !root->name.isEmpty())
{ // {
PackageDef *pd=0; // PackageDef *pd=0;
if ((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)
{ // {
tagName=root->tagInfo->tagName; // tagName=root->tagInfo->tagName;
} // }
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,root->docFile,root->docLine); // pd->setDocumentation(root->doc,root->docFile,root->docLine);
pd->setBriefDescription(root->brief,root->briefFile,root->briefLine); // pd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
} // }
else // else
{ // {
if (!pd->documentation() && !root->doc.isEmpty()) // if (!pd->documentation() && !root->doc.isEmpty())
{ // {
pd->setDocumentation(root->doc,root->docFile,root->docLine); // pd->setDocumentation(root->doc,root->docFile,root->docLine);
} // }
if (!pd->briefDescription() && !root->brief.isEmpty()) // if (!pd->briefDescription() && !root->brief.isEmpty())
{ // {
pd->setBriefDescription(root->brief,root->briefFile,root->briefLine); // pd->setBriefDescription(root->brief,root->briefFile,root->briefLine);
} // }
} // }
bool ambig; // bool ambig;
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig); // FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
if (fd) // if (fd)
{ // {
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)
{ // {
buildPackageList(e); // buildPackageList(e);
} // }
} //}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -5814,20 +5837,20 @@ static void generateGroupDocs() ...@@ -5814,20 +5837,20 @@ static void generateGroupDocs()
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
static void generatePackageDocs() //static void generatePackageDocs()
{ //{
writePackageIndex(*outputList); // writePackageIndex(*outputList);
//
if (Doxygen::packageDict.count()>0) // if (Doxygen::packageDict.count()>0)
{ // {
PackageSDict::Iterator pdi(Doxygen::packageDict); // PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd; // PackageDef *pd;
for (pdi.toFirst();(pd=pdi.current());++pdi) // for (pdi.toFirst();(pd=pdi.current());++pdi)
{ // {
pd->writeDocumentation(*outputList); // pd->writeDocumentation(*outputList);
} // }
} // }
} //}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// generate module pages // generate module pages
...@@ -7220,6 +7243,7 @@ void parseInput() ...@@ -7220,6 +7243,7 @@ void parseInput()
msg("Building class list...\n"); msg("Building class list...\n");
buildClassList(root); buildClassList(root);
buildClassDocList(root);
findUsingDeclarations(root); findUsingDeclarations(root);
msg("Building example list...\n"); msg("Building example list...\n");
...@@ -7268,8 +7292,8 @@ void parseInput() ...@@ -7268,8 +7292,8 @@ void parseInput()
msg("Building page list...\n"); msg("Building page list...\n");
buildPageList(root); buildPageList(root);
msg("Building package list...\n"); //msg("Building package list...\n");
buildPackageList(root); //buildPackageList(root);
msg("Search for main page...\n"); msg("Search for main page...\n");
findMainPage(root); findMainPage(root);
...@@ -7426,8 +7450,8 @@ void generateOutput() ...@@ -7426,8 +7450,8 @@ void generateOutput()
msg("Generating group index...\n"); msg("Generating group index...\n");
writeGroupIndex(*outputList); writeGroupIndex(*outputList);
msg("Generating package index...\n"); //msg("Generating package index...\n");
generatePackageDocs(); //generatePackageDocs();
msg("Generating example index...\n"); msg("Generating example index...\n");
writeExampleIndex(*outputList); writeExampleIndex(*outputList);
......
...@@ -124,6 +124,8 @@ class HtmlGenerator : public OutputGenerator ...@@ -124,6 +124,8 @@ class HtmlGenerator : public OutputGenerator
void endCodeFragment() { t << "</pre></div>"; } void endCodeFragment() { t << "</pre></div>"; }
void startPreFragment() { t << "<pre>"; } void startPreFragment() { t << "<pre>"; }
void endPreFragment() { t << "</pre>"; } void endPreFragment() { t << "</pre>"; }
void startVerbatimFragment() { t << "<div class=\"fragment\"><pre>"; }
void endVerbatimFragment() { t << "</pre></div>"; }
void writeLineNumber(const char *,const char *,const char *,int); void writeLineNumber(const char *,const char *,const char *,int);
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); } void endCodeLine() { codify("\n"); }
......
...@@ -1230,48 +1230,48 @@ void writeAnnotatedClassList(OutputList &ol) ...@@ -1230,48 +1230,48 @@ void writeAnnotatedClassList(OutputList &ol)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
// OBSOLETE // OBSOLETE
void writePackageList(OutputList &ol) //void writePackageList(OutputList &ol)
{ //{
bool &generateHtml = Config_getBool("GENERATE_HTML") ; // bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); // bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); // bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
ol.startIndexList(); // ol.startIndexList();
PackageSDict::Iterator pdi(Doxygen::packageDict); // PackageSDict::Iterator pdi(Doxygen::packageDict);
PackageDef *pd; // PackageDef *pd;
for (;(pd=pdi.current());++pdi) // for (;(pd=pdi.current());++pdi)
{ // {
if (!pd->isReference()) // if (!pd->isReference())
{ // {
//ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name()); // //ol.writeStartAnnoItem("package",pd->getOutputFileBase(),0,pd->name());
ol.startIndexKey(); // ol.startIndexKey();
ol.writeObjectLink(0,pd->getOutputFileBase(),0,pd->name()); // ol.writeObjectLink(0,pd->getOutputFileBase(),0,pd->name());
ol.endIndexKey(); // ol.endIndexKey();
bool hasBrief = !pd->briefDescription().isEmpty(); // bool hasBrief = !pd->briefDescription().isEmpty();
ol.startIndexValue(hasBrief); // ol.startIndexValue(hasBrief);
if (hasBrief) // if (hasBrief)
{ // {
//ol.docify(" ("); // //ol.docify(" (");
parseDoc(ol, // parseDoc(ol,
pd->getDefFileName(),pd->getDefLine(), // pd->getDefFileName(),pd->getDefLine(),
pd->name(),0, // pd->name(),0,
abbreviate(pd->briefDescription(),pd->name())); // abbreviate(pd->briefDescription(),pd->name()));
//ol.docify(")"); // //ol.docify(")");
} // }
ol.endIndexValue(pd->getOutputFileBase(),hasBrief); // ol.endIndexValue(pd->getOutputFileBase(),hasBrief);
//
//ol.writeEndAnnoItem(pd->getOutputFileBase()); // //ol.writeEndAnnoItem(pd->getOutputFileBase());
if (hasHtmlHelp) // if (hasHtmlHelp)
{ // {
HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase()); // HtmlHelp::getInstance()->addContentsItem(FALSE,pd->name(),pd->getOutputFileBase());
} // }
if (hasFtvHelp) // if (hasFtvHelp)
{ // {
FTVHelp::getInstance()->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name()); // FTVHelp::getInstance()->addContentsItem(FALSE,pd->getReference(),pd->getOutputFileBase(),0,pd->name());
} // }
} // }
} // }
ol.endIndexList(); // ol.endIndexList();
} //}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
...@@ -1496,54 +1496,54 @@ void writeAnnotatedIndex(OutputList &ol) ...@@ -1496,54 +1496,54 @@ void writeAnnotatedIndex(OutputList &ol)
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
void writePackageIndex(OutputList &ol) //void writePackageIndex(OutputList &ol)
{ //{
bool &generateHtml = Config_getBool("GENERATE_HTML") ; // bool &generateHtml = Config_getBool("GENERATE_HTML") ;
bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP"); // bool hasHtmlHelp = generateHtml && Config_getBool("GENERATE_HTMLHELP");
bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW"); // bool hasFtvHelp = generateHtml && Config_getBool("GENERATE_TREEVIEW");
//
if (documentedPackages==0) return; // if (documentedPackages==0) return;
//
ol.pushGeneratorState(); // ol.pushGeneratorState();
ol.disable(OutputGenerator::Man); // ol.disable(OutputGenerator::Man);
startFile(ol,"packages",0,"Package Index"); // startFile(ol,"packages",0,"Package Index");
startTitle(ol,0); // startTitle(ol,0);
QCString title = theTranslator->trPackageList(); // QCString title = theTranslator->trPackageList();
QCString htmlHelpTitle = title; // QCString htmlHelpTitle = title;
QCString ftvHelpTitle = title; // QCString ftvHelpTitle = title;
if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" "); // if (!Config_getString("PROJECT_NAME").isEmpty()) title.prepend(Config_getString("PROJECT_NAME")+" ");
parseText(ol,title); // parseText(ol,title);
endTitle(ol,0,0); // endTitle(ol,0,0);
ol.startTextBlock(); // ol.startTextBlock();
HtmlHelp *htmlHelp = 0; // HtmlHelp *htmlHelp = 0;
FTVHelp *ftvHelp = 0; // FTVHelp *ftvHelp = 0;
if (hasHtmlHelp) // if (hasHtmlHelp)
{ // {
htmlHelp = HtmlHelp::getInstance(); // htmlHelp = HtmlHelp::getInstance();
htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"packages"); // htmlHelp->addContentsItem(TRUE,htmlHelpTitle,"packages");
htmlHelp->incContentsDepth(); // htmlHelp->incContentsDepth();
} // }
if (hasFtvHelp) // if (hasFtvHelp)
{ // {
ftvHelp = FTVHelp::getInstance(); // ftvHelp = FTVHelp::getInstance();
ftvHelp->addContentsItem(TRUE,0,"packages",0,ftvHelpTitle); // ftvHelp->addContentsItem(TRUE,0,"packages",0,ftvHelpTitle);
ftvHelp->incContentsDepth(); // ftvHelp->incContentsDepth();
} // }
parseText(ol,theTranslator->trPackageListDescription()); // parseText(ol,theTranslator->trPackageListDescription());
ol.endTextBlock(); // ol.endTextBlock();
writePackageList(ol); // writePackageList(ol);
if (hasHtmlHelp) // if (hasHtmlHelp)
{ // {
htmlHelp->decContentsDepth(); // htmlHelp->decContentsDepth();
} // }
if (hasFtvHelp) // if (hasFtvHelp)
{ // {
ftvHelp->decContentsDepth(); // ftvHelp->decContentsDepth();
} // }
//
endFile(ol); // endFile(ol);
ol.popGeneratorState(); // ol.popGeneratorState();
} //}
//---------------------------------------------------------------------------- //----------------------------------------------------------------------------
......
...@@ -122,6 +122,8 @@ class LatexGenerator : public OutputGenerator ...@@ -122,6 +122,8 @@ class LatexGenerator : public OutputGenerator
void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl; void endPreFragment() { t << "\\end{alltt}\\normalsize " << endl;
insidePre=FALSE; insidePre=FALSE;
} }
void startVerbatimFragment() { t << endl << endl << "\\footnotesize\\begin{verbatim}"; }
void endVerbatimFragment() { t << "\\end{verbatim}\\normalsize " << endl; }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { codify("\n"); } void endCodeLine() { codify("\n"); }
......
...@@ -114,6 +114,8 @@ class ManGenerator : public OutputGenerator ...@@ -114,6 +114,8 @@ class ManGenerator : public OutputGenerator
void endCodeFragment(); void endCodeFragment();
void startPreFragment() { startCodeFragment(); } void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); } void endPreFragment() { endCodeFragment(); }
void startVerbatimFragment() { startCodeFragment(); }
void endVerbatimFragment() { endCodeFragment(); }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() {} void startCodeLine() {}
void endCodeLine() { codify("\n"); col=0; } void endCodeLine() { codify("\n"); col=0; }
......
...@@ -163,11 +163,19 @@ class BaseOutputDocInterface ...@@ -163,11 +163,19 @@ class BaseOutputDocInterface
/*! Starts a fragment of preformatted text. This means that /*! Starts a fragment of preformatted text. This means that
* spacing, tabs and newlines should be kept in the output * spacing, tabs and newlines should be kept in the output
*/ */
virtual void startPreFragment() = 0; virtual void startPreFragment() = 0;
/*! Ens a preformatted text fragment. */
/*! Ends a preformatted text fragment. */
virtual void endPreFragment() = 0; virtual void endPreFragment() = 0;
/*! Starts a fragment of verbatim test. This is preformatted text,
* without any special internal structure.
*/
virtual void startVerbatimFragment() = 0;
/*! Ends a verbatim text fragment. */
virtual void endVerbatimFragment() = 0;
/*! Writes a horizontal ruler to the output */ /*! Writes a horizontal ruler to the output */
virtual void writeRuler() = 0; virtual void writeRuler() = 0;
......
...@@ -210,6 +210,10 @@ class OutputList : public OutputDocInterface ...@@ -210,6 +210,10 @@ class OutputList : public OutputDocInterface
{ forall(&OutputGenerator::startPreFragment); } { forall(&OutputGenerator::startPreFragment); }
void endPreFragment() void endPreFragment()
{ forall(&OutputGenerator::endPreFragment); } { forall(&OutputGenerator::endPreFragment); }
void startVerbatimFragment()
{ forall(&OutputGenerator::startVerbatimFragment); }
void endVerbatimFragment()
{ forall(&OutputGenerator::endVerbatimFragment); }
void startCodeLine() void startCodeLine()
{ forall(&OutputGenerator::startCodeLine); } { forall(&OutputGenerator::startCodeLine); }
void endCodeLine() void endCodeLine()
......
...@@ -1518,7 +1518,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1518,7 +1518,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
g_defVarArgs = FALSE; g_defVarArgs = FALSE;
if ( g_defName!=g_lastGuardName ) if ( g_defName!=g_lastGuardName )
{ // define may appear in the output { // define may appear in the output
QCString tmp=(QCString)"#define "+g_defName+g_defArgsStr; QCString tmp=(QCString)"#define "+g_defName;
outputArray(tmp.data(),tmp.length()); outputArray(tmp.data(),tmp.length());
g_quoteArg=FALSE; g_quoteArg=FALSE;
BEGIN(DefineText); BEGIN(DefineText);
...@@ -1527,10 +1527,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1527,10 +1527,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
{ {
//printf("Found a guard %s\n",yytext); //printf("Found a guard %s\n",yytext);
Define *def=0; Define *def=0;
//if (g_includeStack.isEmpty()) if (g_includeStack.isEmpty())
//{ {
// addDefine(); addDefine();
//} }
if ((def=g_fileDefineDict->find(g_defName))==0) if ((def=g_fileDefineDict->find(g_defName))==0)
{ {
g_fileDefineDict->insert(g_defName,newDefine()); g_fileDefineDict->insert(g_defName,newDefine());
...@@ -1551,6 +1551,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -1551,6 +1551,8 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
//printf("Error: define %s is defined more than once!\n",g_defName.data()); //printf("Error: define %s is defined more than once!\n",g_defName.data());
} }
} }
QCString tmp=(QCString)"#define "+g_defName;
outputArray(tmp.data(),tmp.length());
//outputChar('\n'); //outputChar('\n');
g_lastGuardName.resize(0); g_lastGuardName.resize(0);
BEGIN(Start); BEGIN(Start);
......
...@@ -2076,6 +2076,14 @@ void RTFGenerator::writeSectionRefItem(const char *,const char *lab, ...@@ -2076,6 +2076,14 @@ void RTFGenerator::writeSectionRefItem(const char *,const char *lab,
// writeSectionRef(name,lab,title); // writeSectionRef(name,lab,title);
//} //}
char* RTFGenerator::getMultiByte(int c)
{
static char s[10];
sprintf(s,"\\'%X",c);
return s;
}
void RTFGenerator::docify(const char *str) void RTFGenerator::docify(const char *str)
{ {
if (str) if (str)
...@@ -2085,8 +2093,23 @@ void RTFGenerator::docify(const char *str) ...@@ -2085,8 +2093,23 @@ void RTFGenerator::docify(const char *str)
unsigned char pc='\0'; unsigned char pc='\0';
while (*p) while (*p)
{ {
static bool MultiByte = FALSE;
c=*p++; c=*p++;
switch(c)
if ( MultiByte )
{
t << getMultiByte( c );
MultiByte = FALSE;
continue;
}
if ( c >= 0x80 )
{
MultiByte = TRUE;
t << getMultiByte( c );
continue;
}
switch (c)
{ {
case '{': t << "\\{"; break; case '{': t << "\\{"; break;
case '}': t << "\\}"; break; case '}': t << "\\}"; break;
...@@ -2111,12 +2134,29 @@ void RTFGenerator::codify(const char *str) ...@@ -2111,12 +2134,29 @@ void RTFGenerator::codify(const char *str)
//static char spaces[]=" "; //static char spaces[]=" ";
if (str) if (str)
{ {
const char *p=str; const unsigned char *p=(const unsigned char *)str;
char c; unsigned char c;
int spacesToNextTabStop; int spacesToNextTabStop;
while (*p) while (*p)
{ {
static bool MultiByte = FALSE;
c=*p++; c=*p++;
if( MultiByte )
{
t << getMultiByte( c );
MultiByte = FALSE;
continue;
}
if( c >= 0x80 )
{
MultiByte = TRUE;
t << getMultiByte( c );
continue;
}
switch(c) switch(c)
{ {
case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE")); case '\t': spacesToNextTabStop = Config_getInt("TAB_SIZE") - (col%Config_getInt("TAB_SIZE"));
...@@ -2129,7 +2169,7 @@ void RTFGenerator::codify(const char *str) ...@@ -2129,7 +2169,7 @@ void RTFGenerator::codify(const char *str)
case '{': t << "\\{"; col++; break; case '{': t << "\\{"; col++; break;
case '}': t << "\\}"; col++; break; case '}': t << "\\}"; col++; break;
case '\\': t << "\\\\"; col++; break; case '\\': t << "\\\\"; col++; break;
default: t << c; col++; break; default: t << (char)c; col++; break;
} }
} }
} }
......
...@@ -114,6 +114,8 @@ class RTFGenerator : public OutputGenerator ...@@ -114,6 +114,8 @@ class RTFGenerator : public OutputGenerator
void endCodeFragment(); void endCodeFragment();
void startPreFragment() { startCodeFragment(); } void startPreFragment() { startCodeFragment(); }
void endPreFragment() { endCodeFragment(); } void endPreFragment() { endCodeFragment(); }
void startVerbatimFragment() { startVerbatimFragment(); }
void endVerbatimFragment() { endVerbatimFragment(); }
void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; } void writeLineNumber(const char *,const char *,const char *,int l) { t << l << " "; }
void startCodeLine() { col=0; } void startCodeLine() { col=0; }
void endCodeLine() { lineBreak(); } void endCodeLine() { lineBreak(); }
...@@ -275,6 +277,7 @@ class RTFGenerator : public OutputGenerator ...@@ -275,6 +277,7 @@ class RTFGenerator : public OutputGenerator
void RtfwriteRuler_thick() { t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}" << endl; }; void RtfwriteRuler_thick() { t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw75\\brsp20 \\adjustright \\par}" << endl; };
void RtfwriteRuler_thin() { t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl; }; void RtfwriteRuler_thin() { t << "{\\pard\\widctlpar\\brdrb\\brdrs\\brdrw5\\brsp20 \\adjustright \\par}" << endl; };
void WriteRTFReference(const char *label); void WriteRTFReference(const char *label);
char *getMultiByte(int c);
}; };
#endif #endif
...@@ -868,6 +868,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -868,6 +868,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
lineCount(); lineCount();
BEGIN( CompoundName ); BEGIN( CompoundName );
} }
<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"class{" |
<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"class"{BN}+ { <FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"class"{BN}+ {
isTypedef=((QCString)yytext).find("typedef")!=-1; isTypedef=((QCString)yytext).find("typedef")!=-1;
current->section = Entry::CLASS_SEC; current->section = Entry::CLASS_SEC;
...@@ -886,6 +887,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -886,6 +887,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
// current->mtArgList = 0; // current->mtArgList = 0;
//} //}
lineCount() ; lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ; BEGIN( CompoundName ) ;
} }
<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"struct{" | <FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"struct{" |
...@@ -907,6 +909,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -907,6 +909,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
// current->mtArgList = 0; // current->mtArgList = 0;
//} //}
lineCount() ; lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ; BEGIN( CompoundName ) ;
} }
<FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"union{" | <FindMembers>{B}*(("typedef"{BN}+)?)("volatile"{BN}+)?"union{" |
...@@ -919,6 +922,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -919,6 +922,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->startLine = yyLineNr; current->startLine = yyLineNr;
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
lineCount() ; lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ; BEGIN( CompoundName ) ;
} }
<FindMembers>{B}*(("typedef"{BN}+)?)"enum{" | <FindMembers>{B}*(("typedef"{BN}+)?)"enum{" |
...@@ -931,6 +935,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -931,6 +935,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->startLine = yyLineNr; current->startLine = yyLineNr;
current->bodyLine = yyLineNr; current->bodyLine = yyLineNr;
lineCount() ; lineCount() ;
if (yytext[yyleng-1]=='{') unput('{');
BEGIN( CompoundName ) ; BEGIN( CompoundName ) ;
} }
<Operator>"("{BN}*")"{BN}*/"(" { <Operator>"("{BN}*")"{BN}*/"(" {
...@@ -3622,6 +3627,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'")) ...@@ -3622,6 +3627,7 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
insideFormula=FALSE; insideFormula=FALSE;
BEGIN(lastFormulaContext); BEGIN(lastFormulaContext);
} }
<ReadFormulaLong>\n { formulaText+=*yytext; }
<ReadFormulaLong,ReadFormulaShort>. { formulaText+=*yytext; } <ReadFormulaLong,ReadFormulaShort>. { formulaText+=*yytext; }
<ExampleDoc,PageDoc,ClassDocBrief,ClassDoc,ReadFormulaShort,ReadFormulaLong>{B}*"*/" { <ExampleDoc,PageDoc,ClassDocBrief,ClassDoc,ReadFormulaShort,ReadFormulaLong>{B}*"*/" {
checkDocs(); checkDocs();
......
This diff is collapsed.
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
#define TRANSLATOR_SI_H #define TRANSLATOR_SI_H
class TranslatorSlovene : public TranslatorAdapter_1_2_13 class TranslatorSlovene : public Translator
{ {
public: public:
QCString idLanguage() QCString idLanguage()
...@@ -991,6 +991,26 @@ class TranslatorSlovene : public TranslatorAdapter_1_2_13 ...@@ -991,6 +991,26 @@ class TranslatorSlovene : public TranslatorAdapter_1_2_13
{ {
return "Reference"; return "Reference";
} }
//////////////////////////////////////////////////////////////////////////
// new since 1.2.13
//////////////////////////////////////////////////////////////////////////
/*! used in member documentation blocks to produce a list of
* members that are implemented by this one.
*/
virtual QCString trImplementedFromList(int numEntries)
{
return "Implementira "+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
* all members that implement this abstract member.
*/
virtual QCString trImplementedInList(int numEntries)
{
return "Implementirano v "+trWriteList(numEntries)+".";
}
}; };
#endif #endif
......
...@@ -343,12 +343,23 @@ class XMLGenerator : public OutputDocInterface ...@@ -343,12 +343,23 @@ class XMLGenerator : public OutputDocInterface
{ {
XML_DB(("(startPreFragment)\n")); XML_DB(("(startPreFragment)\n"));
startParMode(); startParMode();
m_t << "<programlisting>"; m_t << "<preformatted>";
} }
void endPreFragment() void endPreFragment()
{ {
XML_DB(("(endPreFragment)\n")); XML_DB(("(endPreFragment)\n"));
m_t << "</programlisting>"; m_t << "</preformatted>";
}
void startVerbatimFragment()
{
XML_DB(("(startVerbatimFragment)\n"));
startParMode();
m_t << "<preformatted>";
}
void endVerbatimFragment()
{
XML_DB(("(endVerbatimFragment)\n"));
m_t << "</preformatted>";
} }
void writeRuler() void writeRuler()
{ {
...@@ -616,20 +627,21 @@ class XMLGenerator : public OutputDocInterface ...@@ -616,20 +627,21 @@ class XMLGenerator : public OutputDocInterface
startParMode(); startParMode();
m_t << "<table cols=\"" << cols << "\">\n"; m_t << "<table cols=\"" << cols << "\">\n";
} }
void endTable(bool) void endTable(bool hasCaption)
{ {
XML_DB(("endTable\n")); XML_DB(("endTable\n"));
m_t << "</row>\n</table>"; if (!hasCaption) m_t << "</row>\n";
m_t << "</table>";
} }
void startCaption() void startCaption()
{ {
XML_DB(("startCaption")); XML_DB(("startCaption"));
m_t << "<caption>"; m_t << "</row><caption>";
} }
void endCaption() void endCaption()
{ {
XML_DB(("encCaption")); XML_DB(("encCaption"));
m_t << "</caption"; m_t << "</caption>";
} }
void nextTableRow() void nextTableRow()
{ {
...@@ -639,7 +651,7 @@ class XMLGenerator : public OutputDocInterface ...@@ -639,7 +651,7 @@ class XMLGenerator : public OutputDocInterface
// we need manually add a para here because cells are // we need manually add a para here because cells are
// parsed before the table is generated, and thus // parsed before the table is generated, and thus
// are already parsed as if they are inside a paragraph. // are already parsed as if they are inside a paragraph.
m_t << "<para>"; //m_t << "<para>";
} }
void endTableRow() void endTableRow()
{ {
......
...@@ -8,7 +8,7 @@ TEMPLATE = app ...@@ -8,7 +8,7 @@ TEMPLATE = app
CONFIG = qt warn_on release CONFIG = qt warn_on release
TMAKE_CC = cxx TMAKE_CC = cxx
TMAKE_CFLAGS = -x cxx -w -D_POSIX_SOURCE -D_OSF_SOURCE -D_AES_SOURCE TMAKE_CFLAGS = -x cc -w -D_POSIX_SOURCE -D_OSF_SOURCE -D_AES_SOURCE
TMAKE_CFLAGS_WARN_ON = TMAKE_CFLAGS_WARN_ON =
TMAKE_CFLAGS_WARN_OFF = TMAKE_CFLAGS_WARN_OFF =
TMAKE_CFLAGS_RELEASE = -O2 TMAKE_CFLAGS_RELEASE = -O2
......
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