Commit 7c34dd2b authored by dimitri's avatar dimitri

Release-1.2.18-20021020

parent 2c6d31c8
DOXYGEN Version 1.2.18-20021013 DOXYGEN Version 1.2.18-20021020
Please read the installation section of the manual for instructions. Please read the installation section of the manual for instructions.
-------- --------
Dimitri van Heesch (13 October 2002) Dimitri van Heesch (20 October 2002)
DOXYGEN Version 1.2.18_20021013 DOXYGEN Version 1.2.18_20021020
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) (13 October 2002) Dimitri van Heesch (dimitri@stack.nl) (20 October 2002)
1.2.18-20021013 1.2.18-20021020
...@@ -131,8 +131,8 @@ class IDoc ...@@ -131,8 +131,8 @@ class IDoc
enum Kind enum Kind
{ {
Invalid = 0, // 0 Invalid = 0, // 0
Para = 1, // 1 -> IDocPara Para, // 1 -> IDocPara
Text = 2, // 2 -> IDocText Text, // 2 -> IDocText
MarkupModifier, // 3 -> IDocMarkupModifier MarkupModifier, // 3 -> IDocMarkupModifier
ItemizedList, // 4 -> IDocItemizedList ItemizedList, // 4 -> IDocItemizedList
OrderedList, // 5 -> IDocOrderedList OrderedList, // 5 -> IDocOrderedList
...@@ -160,7 +160,9 @@ class IDoc ...@@ -160,7 +160,9 @@ class IDoc
Row, // 27 -> IDocRow Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection Section, // 29 -> IDocSection
Root, // 30 -> IDocRoot Preformatted, // 30 -> IDocPreformatted
Symbol, // 31 -> IDocSymbol
Root // 32 -> IDocRoot
}; };
virtual Kind kind() const = 0; virtual Kind kind() const = 0;
}; };
...@@ -177,10 +179,8 @@ class IDocMarkup : public IDoc ...@@ -177,10 +179,8 @@ class IDocMarkup : public IDoc
Subscript = 0x08, Subscript = 0x08,
Superscript = 0x10, Superscript = 0x10,
SmallFont = 0x20, SmallFont = 0x20,
Center = 0x40, Center = 0x40
Preformatted = 0x80
}; };
}; };
class IDocPara : public IDoc class IDocPara : public IDoc
...@@ -393,6 +393,24 @@ class IDocSection : public IDoc ...@@ -393,6 +393,24 @@ class IDocSection : public IDoc
virtual IDocIterator *title() const = 0; virtual IDocIterator *title() const = 0;
}; };
class IDocPreformatted : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
};
class IDocSymbol : public IDoc
{
public:
enum Types
{ Invalid = 0,
Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy
};
virtual Types type() const = 0;
virtual const IString * typeString() const = 0;
virtual char letter() const = 0;
};
class IDocRoot : public IDoc class IDocRoot : public IDoc
{ {
public: public:
...@@ -737,15 +755,15 @@ class IClass : public ICompound ...@@ -737,15 +755,15 @@ class IClass : public ICompound
virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
virtual ICompoundIterator *nestedCompounds() const = 0; virtual ICompoundIterator *nestedCompounds() const = 0;
virtual IParamIterator *templateParameters() const = 0;
virtual const IString *locationFile() const = 0;
virtual int locationLine() const = 0;
virtual int locationBodyStartLine() const = 0;
virtual int locationBodyEndLine() const = 0;
// TODO: // TODO:
// class: // class:
// ITemplateParamListIterator *templateParamLists()
// listOfAllMembers() // listOfAllMembers()
// locationFile()
// locationLine()
// locationBodyStartLine()
// locationBodyEndLine()
}; };
/*! \brief The interface to a struct in the object model. /*! \brief The interface to a struct in the object model.
...@@ -756,6 +774,10 @@ class IStruct : public ICompound ...@@ -756,6 +774,10 @@ class IStruct : public ICompound
virtual ICompoundIterator *nestedCompounds() const = 0; virtual ICompoundIterator *nestedCompounds() const = 0;
virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
virtual const IString *locationFile() const = 0;
virtual int locationLine() const = 0;
virtual int locationBodyStartLine() const = 0;
virtual int locationBodyEndLine() const = 0;
}; };
/*! \brief The interface to a union in the object model. /*! \brief The interface to a union in the object model.
...@@ -822,6 +844,8 @@ class IGroup : public ICompound ...@@ -822,6 +844,8 @@ class IGroup : public ICompound
*/ */
class IPage : public ICompound class IPage : public ICompound
{ {
public:
virtual const IDocTitle *title() const = 0;
}; };
/*! Root node of the object model. */ /*! Root node of the object model. */
......
...@@ -75,10 +75,10 @@ template<class T> class ElementMapper ...@@ -75,10 +75,10 @@ template<class T> class ElementMapper
Handler m_handler; Handler m_handler;
}; };
public:
typedef StartElementHandler StartElementHandlerT; typedef StartElementHandler StartElementHandlerT;
typedef EndElementHandler EndElementHandlerT; typedef EndElementHandler EndElementHandlerT;
public:
ElementMapper() : m_startHandlers(67), m_endHandlers(67) ElementMapper() : m_startHandlers(67), m_endHandlers(67)
{ {
m_startHandlers.setAutoDelete(TRUE); m_startHandlers.setAutoDelete(TRUE);
......
...@@ -145,15 +145,15 @@ CompoundHandler::CompoundHandler(const QString &xmlDir) ...@@ -145,15 +145,15 @@ 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_includeDependencyGraph(0), m_includedByDependencyGraph(0), m_templateParamList(0),
m_hasTemplateParams(FALSE) m_titleHandler(0)
{ {
m_superClasses.setAutoDelete(TRUE); m_superClasses.setAutoDelete(TRUE);
m_subClasses.setAutoDelete(TRUE); m_subClasses.setAutoDelete(TRUE);
m_sections.setAutoDelete(TRUE); m_sections.setAutoDelete(TRUE);
m_memberNameDict.setAutoDelete(TRUE); m_memberNameDict.setAutoDelete(TRUE);
m_innerCompounds.setAutoDelete(TRUE); m_innerCompounds.setAutoDelete(TRUE);
m_templateParams.setAutoDelete(TRUE); m_params.setAutoDelete(TRUE);
addStartHandler("doxygen"); addStartHandler("doxygen");
addEndHandler("doxygen"); addEndHandler("doxygen");
...@@ -201,16 +201,19 @@ CompoundHandler::CompoundHandler(const QString &xmlDir) ...@@ -201,16 +201,19 @@ CompoundHandler::CompoundHandler(const QString &xmlDir)
addStartHandler("innergroup",this,&CompoundHandler::startInnerGroup); addStartHandler("innergroup",this,&CompoundHandler::startInnerGroup);
addEndHandler("innergroup"); addEndHandler("innergroup");
addStartHandler("templateparamlist"); addStartHandler("templateparamlist",this,&CompoundHandler::startTemplateParamList);
addEndHandler("templateparamlist"); addEndHandler("templateparamlist");
addStartHandler("param",this,&CompoundHandler::startParam); addStartHandler("param",this,&CompoundHandler::startParam);
addEndHandler("param"); addEndHandler("param");
addStartHandler("title",this,&CompoundHandler::startTitle);
} }
CompoundHandler::~CompoundHandler() CompoundHandler::~CompoundHandler()
{ {
debug(2,"CompoundHandler::~CompoundHandler()\n"); debug(2,"CompoundHandler::~CompoundHandler()\n");
delete m_titleHandler;
delete m_brief; delete m_brief;
delete m_detailed; delete m_detailed;
delete m_programListing; delete m_programListing;
...@@ -265,6 +268,8 @@ void CompoundHandler::startLocation(const QXmlAttributes& attrib) ...@@ -265,6 +268,8 @@ void CompoundHandler::startLocation(const QXmlAttributes& attrib)
{ {
m_defFile = attrib.value("file"); m_defFile = attrib.value("file");
m_defLine = attrib.value("line").toInt(); m_defLine = attrib.value("line").toInt();
m_defBodyStart = attrib.value("bodystart").toInt();
m_defBodyEnd = attrib.value("bodyend").toInt();
} }
void CompoundHandler::endCompoundName() void CompoundHandler::endCompoundName()
...@@ -295,10 +300,15 @@ void CompoundHandler::startInnerGroup(const QXmlAttributes& attrib) ...@@ -295,10 +300,15 @@ void CompoundHandler::startInnerGroup(const QXmlAttributes& attrib)
void CompoundHandler::startParam(const QXmlAttributes& attrib) void CompoundHandler::startParam(const QXmlAttributes& attrib)
{ {
m_hasTemplateParams = TRUE;
ParamHandler *ph = new ParamHandler(this); ParamHandler *ph = new ParamHandler(this);
ph->startParam(attrib); ph->startParam(attrib);
m_templateParams.append(ph); m_params.append(ph);
}
void CompoundHandler::startTemplateParamList(const QXmlAttributes& attrib)
{
m_templateParamList = new TemplateParamListHandler(this);
m_templateParamList->startParam(attrib);
} }
void CompoundHandler::addSuperClass(const QXmlAttributes& attrib) void CompoundHandler::addSuperClass(const QXmlAttributes& attrib)
...@@ -349,6 +359,13 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib) ...@@ -349,6 +359,13 @@ void CompoundHandler::addSubClass(const QXmlAttributes& attrib)
m_subClasses.append(sc); m_subClasses.append(sc);
} }
void CompoundHandler::startTitle(const QXmlAttributes& attrib)
{
ASSERT(m_titleHandler==0);
m_titleHandler = new TitleHandler(this);
m_titleHandler->startTitle(attrib);
}
bool CompoundHandler::parseXML(const char *compId) bool CompoundHandler::parseXML(const char *compId)
{ {
QFile xmlFile(m_xmlDir+"/"+compId+".xml"); QFile xmlFile(m_xmlDir+"/"+compId+".xml");
...@@ -506,6 +523,10 @@ IDocProgramListing *CompoundHandler::source() const ...@@ -506,6 +523,10 @@ IDocProgramListing *CompoundHandler::source() const
IParamIterator *CompoundHandler::templateParameters() const IParamIterator *CompoundHandler::templateParameters() const
{ {
return m_hasTemplateParams ? new ParamIterator(m_templateParams) : 0; return m_templateParamList ? m_templateParamList->templateParams() : 0;
} }
const IDocTitle *CompoundHandler::title() const
{
return m_titleHandler;
}
...@@ -32,7 +32,8 @@ class MemberHandler; ...@@ -32,7 +32,8 @@ class MemberHandler;
class CompoundHandler; class CompoundHandler;
class SectionHandler; class SectionHandler;
class ParamHandler; class ParamHandler;
class TemplateParamListHandler;
class TitleHandler;
class RelatedCompound : public IRelatedCompound class RelatedCompound : public IRelatedCompound
{ {
...@@ -97,6 +98,8 @@ class CompoundHandler : public IClass, ...@@ -97,6 +98,8 @@ class CompoundHandler : public IClass,
virtual void startInnerFile(const QXmlAttributes& attrib); virtual void startInnerFile(const QXmlAttributes& attrib);
virtual void startInnerGroup(const QXmlAttributes& attrib); virtual void startInnerGroup(const QXmlAttributes& attrib);
virtual void startParam(const QXmlAttributes& attrib); virtual void startParam(const QXmlAttributes& attrib);
virtual void startTitle(const QXmlAttributes& attrib);
virtual void startTemplateParamList(const QXmlAttributes& attrib);
virtual void addref() { m_refCount++; } virtual void addref() { m_refCount++; }
CompoundHandler(const QString &dirName); CompoundHandler(const QString &dirName);
...@@ -126,39 +129,48 @@ class CompoundHandler : public IClass, ...@@ -126,39 +129,48 @@ class CompoundHandler : public IClass,
IRelatedCompoundIterator *derivedCompounds() const; IRelatedCompoundIterator *derivedCompounds() const;
ICompoundIterator *nestedCompounds() const; ICompoundIterator *nestedCompounds() const;
ICompoundIterator *nestedGroup() const; ICompoundIterator *nestedGroup() const;
const IString *locationFile() const { return &m_defFile; }
int locationLine() const { return m_defLine; }
int locationBodyStartLine() const { return m_defBodyStart; }
int locationBodyEndLine() const { return m_defBodyEnd; }
// IFile implementation // IFile implementation
IGraph *includeDependencyGraph() const; IGraph *includeDependencyGraph() const;
IGraph *includedByDependencyGraph() const; IGraph *includedByDependencyGraph() const;
IDocProgramListing *source() const; IDocProgramListing *source() const;
// IPage implementation
const IDocTitle *title() const;
private: private:
QList<RelatedCompound> m_superClasses; QList<RelatedCompound> m_superClasses;
QList<RelatedCompound> m_subClasses; QList<RelatedCompound> m_subClasses;
QList<SectionHandler> m_sections; QList<SectionHandler> m_sections;
QList<ParamHandler> m_templateParams; QList<ParamHandler> m_params;
DocHandler *m_brief; DocHandler* m_brief;
DocHandler *m_detailed; DocHandler* m_detailed;
ProgramListingHandler *m_programListing; ProgramListingHandler* m_programListing;
StringImpl m_id; StringImpl m_id;
StringImpl m_kindString; StringImpl m_kindString;
CompoundKind m_kind; CompoundKind m_kind;
StringImpl m_name; StringImpl m_name;
QString m_defFile; StringImpl m_defFile;
int m_defLine; int m_defLine;
int m_defBodyStart;
int m_defBodyEnd;
QString m_xmlDir; QString m_xmlDir;
int m_refCount; int m_refCount;
QDict<MemberHandler> m_memberDict; QDict<MemberHandler> m_memberDict;
QDict<QList<MemberHandler> > m_memberNameDict; QDict<QList<MemberHandler> > m_memberNameDict;
MainHandler *m_mainHandler; MainHandler* m_mainHandler;
GraphHandler *m_inheritanceGraph; GraphHandler* m_inheritanceGraph;
GraphHandler *m_collaborationGraph; GraphHandler* m_collaborationGraph;
GraphHandler *m_includeDependencyGraph; GraphHandler* m_includeDependencyGraph;
GraphHandler *m_includedByDependencyGraph; GraphHandler* m_includedByDependencyGraph;
QList<QString> m_innerCompounds; QList<QString> m_innerCompounds;
ProgramListingHandler *m_source; ProgramListingHandler* m_source;
bool m_hasTemplateParams; TemplateParamListHandler* m_templateParamList;
TitleHandler* m_titleHandler;
}; };
void compoundhandler_init(); void compoundhandler_init();
......
...@@ -117,9 +117,6 @@ MarkupHandler::MarkupHandler(QList<DocImpl> &children,QString &curString) ...@@ -117,9 +117,6 @@ 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()
...@@ -234,20 +231,6 @@ void MarkupHandler::endSuperscript() ...@@ -234,20 +231,6 @@ 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
//---------------------------------------------------------------------- //----------------------------------------------------------------------
...@@ -1314,6 +1297,69 @@ IDocIterator *TableHandler::rows() const ...@@ -1314,6 +1297,69 @@ IDocIterator *TableHandler::rows() const
return new TableIterator(*this); return new TableIterator(*this);
} }
//----------------------------------------------------------------------
// PreformattedHandler
//----------------------------------------------------------------------
PreformattedHandler::PreformattedHandler(IBaseHandler *parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
addEndHandler("preformatted",this,&PreformattedHandler::endPreformatted);
}
PreformattedHandler::~PreformattedHandler()
{
}
void PreformattedHandler::startPreformatted(const QXmlAttributes&)
{
m_parent->setDelegate(this);
}
void PreformattedHandler::endPreformatted()
{
m_parent->setDelegate(0);
}
IDocIterator *PreformattedHandler::contents() const
{
return new PreformattedIterator(*this);
}
//----------------------------------------------------------------------
// SymbolHandler
//----------------------------------------------------------------------
SymbolHandler::SymbolHandler(IBaseHandler *parent,Types type)
: m_parent(parent), m_letter('\0'), m_type(type)
{
addEndHandler("symbol");
switch (type)
{
case IDocSymbol::Invalid: m_typeString="invalid"; break;
case IDocSymbol::Umlaut: m_typeString="umlaut"; break;
case IDocSymbol::Acute: m_typeString="acute"; break;
case IDocSymbol::Grave: m_typeString="grave"; break;
case IDocSymbol::Circ: m_typeString="circ"; break;
case IDocSymbol::Tilde: m_typeString="tilde"; break;
case IDocSymbol::Szlig: m_typeString="szlig"; break;
case IDocSymbol::Cedil: m_typeString="cedil"; break;
case IDocSymbol::Ring: m_typeString="ring"; break;
case IDocSymbol::Nbsp: m_typeString="nbsp"; break;
case IDocSymbol::Copy: m_typeString="copy"; break;
}
}
SymbolHandler::~SymbolHandler()
{
}
void SymbolHandler::startSymbol(const QXmlAttributes& attrib)
{
QString ls = attrib.value("char");
if (!ls.isEmpty()) m_letter = ls.latin1()[0];
}
//---------------------------------------------------------------------- //----------------------------------------------------------------------
// ParagraphHandler // ParagraphHandler
...@@ -1346,6 +1392,17 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent) ...@@ -1346,6 +1392,17 @@ ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
addStartHandler("dotfile",this,&ParagraphHandler::startDotFile); addStartHandler("dotfile",this,&ParagraphHandler::startDotFile);
addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry); addStartHandler("indexentry",this,&ParagraphHandler::startIndexEntry);
addStartHandler("table",this,&ParagraphHandler::startTable); addStartHandler("table",this,&ParagraphHandler::startTable);
addStartHandler("preformatted",this,&ParagraphHandler::startPreformatted);
addStartHandler("umlaut",this,&ParagraphHandler::startUmlaut);
addStartHandler("acute",this,&ParagraphHandler::startAcute);
addStartHandler("grave",this,&ParagraphHandler::startGrave);
addStartHandler("circ",this,&ParagraphHandler::startCirc);
addStartHandler("tilde",this,&ParagraphHandler::startTilde);
addStartHandler("szlig",this,&ParagraphHandler::startSzlig);
addStartHandler("cedil",this,&ParagraphHandler::startCedil);
addStartHandler("ring",this,&ParagraphHandler::startRing);
addStartHandler("nbsp",this,&ParagraphHandler::startNbsp);
addStartHandler("copy",this,&ParagraphHandler::startCopy);
} }
ParagraphHandler::~ParagraphHandler() ParagraphHandler::~ParagraphHandler()
...@@ -1502,6 +1559,94 @@ void ParagraphHandler::startTable(const QXmlAttributes& attrib) ...@@ -1502,6 +1559,94 @@ void ParagraphHandler::startTable(const QXmlAttributes& attrib)
m_children.append(th); m_children.append(th);
} }
void ParagraphHandler::startPreformatted(const QXmlAttributes& attrib)
{
addTextNode();
PreformattedHandler *ph = new PreformattedHandler(this);
ph->startPreformatted(attrib);
m_children.append(ph);
}
void ParagraphHandler::startUmlaut(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Umlaut);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startAcute(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Acute);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startGrave(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Grave);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startCirc(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Circ);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startTilde(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Tilde);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startSzlig(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Szlig);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startCedil(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Cedil);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startRing(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Ring);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startNbsp(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Nbsp);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::startCopy(const QXmlAttributes& attrib)
{
addTextNode();
SymbolHandler *sh = new SymbolHandler(this,IDocSymbol::Copy);
sh->startSymbol(attrib);
m_children.append(sh);
}
void ParagraphHandler::addTextNode() void ParagraphHandler::addTextNode()
{ {
if (!m_curString.isEmpty()) if (!m_curString.isEmpty())
...@@ -1587,12 +1732,17 @@ DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent) ...@@ -1587,12 +1732,17 @@ DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent)
addEndHandler("briefdescription",this,&DocHandler::endDoc); addEndHandler("briefdescription",this,&DocHandler::endDoc);
addEndHandler("detaileddescription",this,&DocHandler::endDoc); addEndHandler("detaileddescription",this,&DocHandler::endDoc);
addEndHandler("internal");
addStartHandler("para",this,&DocHandler::startParagraph); addStartHandler("para",this,&DocHandler::startParagraph);
addStartHandler("sect1",this,&DocHandler::startSect1); addStartHandler("sect1",this,&DocHandler::startSect1);
addStartHandler("sect2",this,&DocHandler::startSect2); addStartHandler("sect2",this,&DocHandler::startSect2);
addStartHandler("sect3",this,&DocHandler::startSect3); addStartHandler("sect3",this,&DocHandler::startSect3);
addStartHandler("sect4",this,&DocHandler::startSect4);
addStartHandler("sect5",this,&DocHandler::startSect5);
addStartHandler("sect6",this,&DocHandler::startSect6);
addStartHandler("title",this,&DocHandler::startTitle); addStartHandler("title",this,&DocHandler::startTitle);
addStartHandler("internal");
} }
DocHandler::~DocHandler() DocHandler::~DocHandler()
...@@ -1639,6 +1789,27 @@ void DocHandler::startSect3(const QXmlAttributes& attrib) ...@@ -1639,6 +1789,27 @@ void DocHandler::startSect3(const QXmlAttributes& attrib)
m_children.append(secHandler); m_children.append(secHandler);
} }
void DocHandler::startSect4(const QXmlAttributes& attrib)
{
DocSectionHandler *secHandler = new DocSectionHandler(this,4);
secHandler->startDocSection(attrib);
m_children.append(secHandler);
}
void DocHandler::startSect5(const QXmlAttributes& attrib)
{
DocSectionHandler *secHandler = new DocSectionHandler(this,5);
secHandler->startDocSection(attrib);
m_children.append(secHandler);
}
void DocHandler::startSect6(const QXmlAttributes& attrib)
{
DocSectionHandler *secHandler = new DocSectionHandler(this,6);
secHandler->startDocSection(attrib);
m_children.append(secHandler);
}
void DocHandler::startTitle(const QXmlAttributes& attrib) void DocHandler::startTitle(const QXmlAttributes& attrib)
{ {
TitleHandler *titleHandler = new TitleHandler(this); TitleHandler *titleHandler = new TitleHandler(this);
......
...@@ -64,6 +64,8 @@ DEFINE_CLS_IMPL(DocTable); ...@@ -64,6 +64,8 @@ DEFINE_CLS_IMPL(DocTable);
DEFINE_CLS_IMPL(DocRow); DEFINE_CLS_IMPL(DocRow);
DEFINE_CLS_IMPL(DocEntry); DEFINE_CLS_IMPL(DocEntry);
DEFINE_CLS_IMPL(DocSection); DEFINE_CLS_IMPL(DocSection);
DEFINE_CLS_IMPL(DocPreformatted);
DEFINE_CLS_IMPL(DocSymbol);
DEFINE_CLS_IMPL(DocRoot); DEFINE_CLS_IMPL(DocRoot);
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -138,8 +140,6 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler> ...@@ -138,8 +140,6 @@ 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:
...@@ -189,6 +189,17 @@ class ParagraphHandler : public DocParaImpl, ...@@ -189,6 +189,17 @@ class ParagraphHandler : public DocParaImpl,
virtual void startDotFile(const QXmlAttributes& attrib); virtual void startDotFile(const QXmlAttributes& attrib);
virtual void startIndexEntry(const QXmlAttributes& attrib); virtual void startIndexEntry(const QXmlAttributes& attrib);
virtual void startTable(const QXmlAttributes& attrib); virtual void startTable(const QXmlAttributes& attrib);
virtual void startPreformatted(const QXmlAttributes& attrib);
virtual void startUmlaut(const QXmlAttributes& attrib);
virtual void startAcute(const QXmlAttributes& attrib);
virtual void startGrave(const QXmlAttributes& attrib);
virtual void startCirc(const QXmlAttributes& attrib);
virtual void startTilde(const QXmlAttributes& attrib);
virtual void startSzlig(const QXmlAttributes& attrib);
virtual void startCedil(const QXmlAttributes& attrib);
virtual void startRing(const QXmlAttributes& attrib);
virtual void startNbsp(const QXmlAttributes& attrib);
virtual void startCopy(const QXmlAttributes& attrib);
ParagraphHandler(IBaseHandler *parent); ParagraphHandler(IBaseHandler *parent);
virtual ~ParagraphHandler(); virtual ~ParagraphHandler();
...@@ -975,6 +986,64 @@ class TableIterator : public BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImp ...@@ -975,6 +986,64 @@ class TableIterator : public BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImp
BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl>(handler.m_children) {} BaseIteratorVia<IDocIterator,IDoc,RowHandler,DocImpl>(handler.m_children) {}
}; };
//-----------------------------------------------------------------------------
/*! \brief Node representing an preformatted section
*/
class PreformattedHandler : public DocPreformattedImpl,
public BaseHandler<PreformattedHandler>
{
friend class PreformattedIterator;
public:
PreformattedHandler(IBaseHandler *parent);
virtual ~PreformattedHandler();
void startPreformatted(const QXmlAttributes& attrib);
void endPreformatted();
// IDocPreformatted
virtual IDocIterator *contents() const;
virtual Kind kind() const { return DocImpl::Preformatted; }
private:
IBaseHandler *m_parent;
QList<DocImpl> m_children;
};
class PreformattedIterator :
public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
{
public:
PreformattedIterator(const PreformattedHandler &handler) :
BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
};
//-----------------------------------------------------------------------------
/*! \brief Node representing an special symbol.
*
*/
// children: -
class SymbolHandler : public DocSymbolImpl, public BaseHandler<SymbolHandler>
{
public:
SymbolHandler(IBaseHandler *parent,Types type);
virtual ~SymbolHandler();
void startSymbol(const QXmlAttributes& attrib);
void endSymbol();
// IDocSymbol
virtual Kind kind() const { return DocImpl::Symbol; }
virtual Types type() const { return m_type; }
virtual const IString *typeString() const { return &m_typeString; }
virtual char letter() const { return m_letter; }
private:
IBaseHandler *m_parent;
char m_letter;
Types m_type;
StringImpl m_typeString;
};
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
...@@ -1033,6 +1102,9 @@ class DocHandler : public DocRootImpl, public BaseHandler<DocHandler> ...@@ -1033,6 +1102,9 @@ class DocHandler : public DocRootImpl, public BaseHandler<DocHandler>
virtual void startSect1(const QXmlAttributes& attrib); virtual void startSect1(const QXmlAttributes& attrib);
virtual void startSect2(const QXmlAttributes& attrib); virtual void startSect2(const QXmlAttributes& attrib);
virtual void startSect3(const QXmlAttributes& attrib); virtual void startSect3(const QXmlAttributes& attrib);
virtual void startSect4(const QXmlAttributes& attrib);
virtual void startSect5(const QXmlAttributes& attrib);
virtual void startSect6(const QXmlAttributes& attrib);
virtual void startTitle(const QXmlAttributes& attrib); virtual void startTitle(const QXmlAttributes& attrib);
DocHandler(IBaseHandler *parent); DocHandler(IBaseHandler *parent);
...@@ -1054,6 +1126,8 @@ class DocIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl> ...@@ -1054,6 +1126,8 @@ class DocIterator : public BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>
BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {} BaseIteratorVia<IDocIterator,IDoc,DocImpl,DocImpl>(handler.m_children) {}
}; };
//-----------------------------------------------------------------------------
void dochandler_init(); void dochandler_init();
void dochandler_exit(); void dochandler_exit();
......
...@@ -131,8 +131,8 @@ class IDoc ...@@ -131,8 +131,8 @@ class IDoc
enum Kind enum Kind
{ {
Invalid = 0, // 0 Invalid = 0, // 0
Para = 1, // 1 -> IDocPara Para, // 1 -> IDocPara
Text = 2, // 2 -> IDocText Text, // 2 -> IDocText
MarkupModifier, // 3 -> IDocMarkupModifier MarkupModifier, // 3 -> IDocMarkupModifier
ItemizedList, // 4 -> IDocItemizedList ItemizedList, // 4 -> IDocItemizedList
OrderedList, // 5 -> IDocOrderedList OrderedList, // 5 -> IDocOrderedList
...@@ -160,7 +160,9 @@ class IDoc ...@@ -160,7 +160,9 @@ class IDoc
Row, // 27 -> IDocRow Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection Section, // 29 -> IDocSection
Root, // 30 -> IDocRoot Preformatted, // 30 -> IDocPreformatted
Symbol, // 31 -> IDocSymbol
Root // 32 -> IDocRoot
}; };
virtual Kind kind() const = 0; virtual Kind kind() const = 0;
}; };
...@@ -177,10 +179,8 @@ class IDocMarkup : public IDoc ...@@ -177,10 +179,8 @@ class IDocMarkup : public IDoc
Subscript = 0x08, Subscript = 0x08,
Superscript = 0x10, Superscript = 0x10,
SmallFont = 0x20, SmallFont = 0x20,
Center = 0x40, Center = 0x40
Preformatted = 0x80
}; };
}; };
class IDocPara : public IDoc class IDocPara : public IDoc
...@@ -393,6 +393,24 @@ class IDocSection : public IDoc ...@@ -393,6 +393,24 @@ class IDocSection : public IDoc
virtual IDocIterator *title() const = 0; virtual IDocIterator *title() const = 0;
}; };
class IDocPreformatted : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
};
class IDocSymbol : public IDoc
{
public:
enum Types
{ Invalid = 0,
Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy
};
virtual Types type() const = 0;
virtual const IString * typeString() const = 0;
virtual char letter() const = 0;
};
class IDocRoot : public IDoc class IDocRoot : public IDoc
{ {
public: public:
...@@ -737,15 +755,15 @@ class IClass : public ICompound ...@@ -737,15 +755,15 @@ class IClass : public ICompound
virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
virtual ICompoundIterator *nestedCompounds() const = 0; virtual ICompoundIterator *nestedCompounds() const = 0;
virtual IParamIterator *templateParameters() const = 0;
virtual const IString *locationFile() const = 0;
virtual int locationLine() const = 0;
virtual int locationBodyStartLine() const = 0;
virtual int locationBodyEndLine() const = 0;
// TODO: // TODO:
// class: // class:
// ITemplateParamListIterator *templateParamLists()
// listOfAllMembers() // listOfAllMembers()
// locationFile()
// locationLine()
// locationBodyStartLine()
// locationBodyEndLine()
}; };
/*! \brief The interface to a struct in the object model. /*! \brief The interface to a struct in the object model.
...@@ -756,6 +774,10 @@ class IStruct : public ICompound ...@@ -756,6 +774,10 @@ class IStruct : public ICompound
virtual ICompoundIterator *nestedCompounds() const = 0; virtual ICompoundIterator *nestedCompounds() const = 0;
virtual IRelatedCompoundIterator *baseCompounds() const = 0; virtual IRelatedCompoundIterator *baseCompounds() const = 0;
virtual IRelatedCompoundIterator *derivedCompounds() const = 0; virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
virtual const IString *locationFile() const = 0;
virtual int locationLine() const = 0;
virtual int locationBodyStartLine() const = 0;
virtual int locationBodyEndLine() const = 0;
}; };
/*! \brief The interface to a union in the object model. /*! \brief The interface to a union in the object model.
...@@ -822,6 +844,8 @@ class IGroup : public ICompound ...@@ -822,6 +844,8 @@ class IGroup : public ICompound
*/ */
class IPage : public ICompound class IPage : public ICompound
{ {
public:
virtual const IDocTitle *title() const = 0;
}; };
/*! Root node of the object model. */ /*! Root node of the object model. */
......
...@@ -228,13 +228,16 @@ ICompound *MainHandler::compoundById(const char *id) const ...@@ -228,13 +228,16 @@ ICompound *MainHandler::compoundById(const char *id) const
// unchanged. // unchanged.
MainHandler *that = (MainHandler *)this; MainHandler *that = (MainHandler *)this;
ch->initialize(that); ch->initialize(that);
printf("loading compound %s in memory\n",id);
that->m_compoundsLoaded.insert(id,ch); that->m_compoundsLoaded.insert(id,ch);
return ch->toICompound(); return ch->toICompound();
} }
void MainHandler::unloadCompound(CompoundHandler *ch) void MainHandler::unloadCompound(CompoundHandler *ch)
{ {
m_compoundsLoaded.remove(ch->id()->latin1()); printf("unloading compound %s from memory\n",ch->id()->latin1());
bool result = m_compoundsLoaded.remove(ch->id()->latin1());
if (!result) printf("Failed to unload!\n");
} }
ICompound *MainHandler::compoundByName(const char *name) const ICompound *MainHandler::compoundByName(const char *name) const
...@@ -276,6 +279,7 @@ IDoxygen *createObjectModel() ...@@ -276,6 +279,7 @@ IDoxygen *createObjectModel()
void MainHandler::release() void MainHandler::release()
{ {
//printf("MainHandler::release()\n");
QDictIterator<CompoundHandler> chi(m_compoundsLoaded); QDictIterator<CompoundHandler> chi(m_compoundsLoaded);
CompoundHandler *ch; CompoundHandler *ch;
for (chi.toFirst();(ch=chi.current());++chi) for (chi.toFirst();(ch=chi.current());++chi)
......
...@@ -82,7 +82,7 @@ IMember *MemberReference::member() const ...@@ -82,7 +82,7 @@ IMember *MemberReference::member() const
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent) EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent), m_brief(0), m_detailed(0)
{ {
addEndHandler("enumvalue",this,&EnumValueHandler::endEnumValue); addEndHandler("enumvalue",this,&EnumValueHandler::endEnumValue);
...@@ -90,6 +90,11 @@ EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent) ...@@ -90,6 +90,11 @@ EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent)
addEndHandler("name",this,&EnumValueHandler::endName); addEndHandler("name",this,&EnumValueHandler::endName);
addStartHandler("initializer",this,&EnumValueHandler::startInitializer); addStartHandler("initializer",this,&EnumValueHandler::startInitializer);
addEndHandler("initializer",this,&EnumValueHandler::endInitializer); addEndHandler("initializer",this,&EnumValueHandler::endInitializer);
addStartHandler("briefdescription",this,&EnumValueHandler::startBriefDesc);
addStartHandler("detaileddescription",this,&EnumValueHandler::startDetailedDesc);
} }
void EnumValueHandler::startEnumValue(const QXmlAttributes& /*attrib*/) void EnumValueHandler::startEnumValue(const QXmlAttributes& /*attrib*/)
...@@ -122,6 +127,21 @@ void EnumValueHandler::endInitializer() ...@@ -122,6 +127,21 @@ void EnumValueHandler::endInitializer()
m_initializer = m_curString; m_initializer = m_curString;
} }
void EnumValueHandler::startBriefDesc(const QXmlAttributes& attrib)
{
DocHandler *docHandler = new DocHandler(this);
docHandler->startDoc(attrib);
m_brief = docHandler;
}
void EnumValueHandler::startDetailedDesc(const QXmlAttributes& attrib)
{
DocHandler *docHandler = new DocHandler(this);
docHandler->startDoc(attrib);
m_detailed = docHandler;
}
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
MemberHandler::MemberHandler(IBaseHandler *parent) MemberHandler::MemberHandler(IBaseHandler *parent)
......
...@@ -30,6 +30,7 @@ ...@@ -30,6 +30,7 @@
class MainHandler; class MainHandler;
class CompoundHandler; class CompoundHandler;
class SectionHandler; class SectionHandler;
class ParamHandler;
struct MemberReference : public IMemberReference struct MemberReference : public IMemberReference
{ {
...@@ -59,6 +60,8 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler> ...@@ -59,6 +60,8 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler>
virtual void endInitializer(); virtual void endInitializer();
virtual void startEnumValue(const QXmlAttributes& attrib); virtual void startEnumValue(const QXmlAttributes& attrib);
virtual void endEnumValue(); virtual void endEnumValue();
virtual void startBriefDesc(const QXmlAttributes& attrib);
virtual void startDetailedDesc(const QXmlAttributes& attrib);
// IEnumValue // IEnumValue
virtual const IString *name() const { return &m_name; } virtual const IString *name() const { return &m_name; }
...@@ -67,13 +70,20 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler> ...@@ -67,13 +70,20 @@ class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler>
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; }
virtual ~EnumValueHandler() {} virtual ~EnumValueHandler() { delete m_brief; delete m_detailed; }
EnumValueHandler(IBaseHandler *parent); EnumValueHandler(IBaseHandler *parent);
virtual IDocRoot *briefDescription() const
{ return m_brief; }
virtual IDocRoot *detailedDescription() const
{ return m_detailed; }
private: private:
StringImpl m_name; StringImpl m_name;
StringImpl m_initializer; StringImpl m_initializer;
IBaseHandler *m_parent; IBaseHandler *m_parent;
DocHandler *m_brief;
DocHandler *m_detailed;
}; };
class EnumValueIterator : public BaseIterator<IEnumValueIterator,IEnumValue,EnumValueHandler> class EnumValueIterator : public BaseIterator<IEnumValueIterator,IEnumValue,EnumValueHandler>
......
...@@ -17,6 +17,39 @@ ...@@ -17,6 +17,39 @@
#include "memberhandler.h" #include "memberhandler.h"
#include "debug.h" #include "debug.h"
TemplateParamListHandler::TemplateParamListHandler(IBaseHandler *parent) : m_parent(parent)
{
addStartHandler("param",this,&TemplateParamListHandler::startParam);
//addEndHandler("param",this,&TemplateParamListHandler::endParam);
addEndHandler("templateparamlist",this,&TemplateParamListHandler::endTemplateParamList);
}
void TemplateParamListHandler::startParam(const QXmlAttributes& attrib)
{
ParamHandler *ph = new ParamHandler(this);
ph->startParam(attrib);
m_templateParams.append(ph);
}
void TemplateParamListHandler::endParam()
{
}
void TemplateParamListHandler::startTemplateParamList(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
debug(2,"templateparamlist\n");
}
void TemplateParamListHandler::endTemplateParamList()
{
m_parent->setDelegate(0);
}
///////////////////////////////////////////////////////////////////////////////////////////////////////
ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent) ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent)
{ {
addEndHandler("param",this,&ParamHandler::endParam); addEndHandler("param",this,&ParamHandler::endParam);
......
...@@ -26,6 +26,7 @@ ...@@ -26,6 +26,7 @@
#include "baseiterator.h" #include "baseiterator.h"
#include "linkedtexthandler.h" #include "linkedtexthandler.h"
class ParamHandler : public IParam, public BaseHandler<ParamHandler> class ParamHandler : public IParam, public BaseHandler<ParamHandler>
{ {
public: public:
...@@ -69,5 +70,25 @@ class ParamIterator : public BaseIterator<IParamIterator,IParam,ParamHandler> ...@@ -69,5 +70,25 @@ class ParamIterator : public BaseIterator<IParamIterator,IParam,ParamHandler>
BaseIterator<IParamIterator,IParam,ParamHandler>(list) {} BaseIterator<IParamIterator,IParam,ParamHandler>(list) {}
}; };
class TemplateParamListHandler : public BaseHandler<TemplateParamListHandler>
{
public:
virtual void startParam(const QXmlAttributes& attrib);
virtual void endParam();
virtual void startTemplateParamList(const QXmlAttributes& attrib);
virtual void endTemplateParamList();
TemplateParamListHandler(IBaseHandler *parent);
virtual ~TemplateParamListHandler() {}
ParamIterator* templateParams() { return new ParamIterator(m_templateParams); }
protected:
IBaseHandler *m_parent;
QList<ParamHandler> m_templateParams;
};
#endif #endif
...@@ -9,6 +9,8 @@ class StringImpl : public QString, public IString ...@@ -9,6 +9,8 @@ class StringImpl : public QString, public IString
public: public:
StringImpl() {} StringImpl() {}
StringImpl(const QString &str) : QString(str) {} StringImpl(const QString &str) : QString(str) {}
StringImpl &operator=(const QString &str)
{ QString::operator=(str); return *this; }
virtual ~StringImpl() {} virtual ~StringImpl() {}
// IString // IString
......
...@@ -47,6 +47,7 @@ QString linkedTextToString(ILinkedTextIterator *ti) ...@@ -47,6 +47,7 @@ QString linkedTextToString(ILinkedTextIterator *ti)
*/ */
void DumpDoc(IDoc *doc,int level) void DumpDoc(IDoc *doc,int level)
{ {
if (doc==0) return;
QString indent; QString indent;
indent.fill(' ',level); indent.fill(' ',level);
//printf(" doc node kind=`%d'\n",doc->kind()); //printf(" doc node kind=`%d'\n",doc->kind());
...@@ -374,6 +375,29 @@ void DumpDoc(IDoc *doc,int level) ...@@ -374,6 +375,29 @@ void DumpDoc(IDoc *doc,int level)
InPrint(("<section/>\n")); InPrint(("<section/>\n"));
} }
break; break;
case IDoc::Preformatted:
{
InPrint(("<preformatted>\n"));
IDocPreformatted *pf = dynamic_cast<IDocPreformatted*>(doc);
ASSERT(pf!=0);
IDocIterator *di = pf->contents();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc,level+1);
}
di->release();
InPrint(("<preformatted/>\n"));
}
break;
case IDoc::Symbol:
{
IDocSymbol *sym = dynamic_cast<IDocSymbol*>(doc);
ASSERT(sym!=0);
InPrint(("<symbol type=%s letter=%c/>\n",
sym->typeString()->latin1(),sym->letter()));
}
break;
case IDoc::Root: case IDoc::Root:
{ {
InPrint(("<root>\n")); InPrint(("<root>\n"));
...@@ -391,6 +415,7 @@ void DumpDoc(IDoc *doc,int level) ...@@ -391,6 +415,7 @@ void DumpDoc(IDoc *doc,int level)
break; break;
default: default:
printf("Found unsupported node type %d!\n",doc->kind());
break; break;
} }
} }
...@@ -463,7 +488,7 @@ int main(int argc,char **argv) ...@@ -463,7 +488,7 @@ int main(int argc,char **argv)
IDoxygen *dox = createObjectModel(); IDoxygen *dox = createObjectModel();
dox->setDebugLevel(0); dox->setDebugLevel(4);
if (!dox->readXMLDir(argv[1])) if (!dox->readXMLDir(argv[1]))
{ {
...@@ -478,6 +503,7 @@ int main(int argc,char **argv) ...@@ -478,6 +503,7 @@ int main(int argc,char **argv)
{ {
printf("Compound name=%s id=%s kind=%s\n", printf("Compound name=%s id=%s kind=%s\n",
comp->name()->latin1(),comp->id()->latin1(),comp->kindString()->latin1()); comp->name()->latin1(),comp->id()->latin1(),comp->kindString()->latin1());
ISectionIterator *sli = comp->sections(); ISectionIterator *sli = comp->sections();
ISection *sec; ISection *sec;
for (sli->toFirst();(sec=sli->current());sli->toNext()) for (sli->toFirst();(sec=sli->current());sli->toNext())
......
Summary: A documentation system for C/C++. Summary: A documentation system for C/C++.
Name: doxygen Name: doxygen
Version: 1.2.18_20021013 Version: 1.2.18_20021020
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
......
...@@ -485,6 +485,7 @@ void ClassDef::internalInsertMember(MemberDef *md, ...@@ -485,6 +485,7 @@ void ClassDef::internalInsertMember(MemberDef *md,
if (addToAllList) if (addToAllList)
{ {
//printf("=======> adding member %s to class %s\n",md->name().data(),name().data());
MemberInfo *mi = new MemberInfo((MemberDef *)md, MemberInfo *mi = new MemberInfo((MemberDef *)md,
prot,md->virtualness(),FALSE); prot,md->virtualness(),FALSE);
MemberNameInfo *mni=0; MemberNameInfo *mni=0;
...@@ -2505,6 +2506,7 @@ MemberDef *ClassDef::getMemberByName(const QCString &name) ...@@ -2505,6 +2506,7 @@ MemberDef *ClassDef::getMemberByName(const QCString &name)
{ {
MemberDef *xmd = 0; MemberDef *xmd = 0;
MemberNameInfo *mni = m_allMemberNameInfoSDict->find(name); MemberNameInfo *mni = m_allMemberNameInfoSDict->find(name);
//printf("getMemberByName(%s)=%p\n",name.data(),mni);
if (mni) if (mni)
{ {
const int maxInheritanceDepth = 100000; const int maxInheritanceDepth = 100000;
...@@ -2514,6 +2516,7 @@ MemberDef *ClassDef::getMemberByName(const QCString &name) ...@@ -2514,6 +2516,7 @@ MemberDef *ClassDef::getMemberByName(const QCString &name)
for (mnii.toFirst();(mi=mnii.current());++mnii) for (mnii.toFirst();(mi=mnii.current());++mnii)
{ {
ClassDef *mcd=mi->memberDef->getClassDef(); ClassDef *mcd=mi->memberDef->getClassDef();
//printf("found member in %s\n",mcd->name().data());
int m=minClassDistance(this,mcd); int m=minClassDistance(this,mcd);
if (m<mdist && mcd->isLinkable()) if (m<mdist && mcd->isLinkable())
{ {
......
...@@ -175,6 +175,9 @@ CommandMap htmlTagMap[] = ...@@ -175,6 +175,9 @@ CommandMap htmlTagMap[] =
{ "h1", HTML_H1 }, { "h1", HTML_H1 },
{ "h2", HTML_H2 }, { "h2", HTML_H2 },
{ "h3", HTML_H3 }, { "h3", HTML_H3 },
{ "h4", HTML_H4 },
{ "h5", HTML_H5 },
{ "h6", HTML_H6 },
{ 0, 0 } { 0, 0 }
}; };
......
...@@ -131,7 +131,10 @@ enum HtmlTagType ...@@ -131,7 +131,10 @@ enum HtmlTagType
HTML_P = 24, HTML_P = 24,
HTML_H1 = 25, HTML_H1 = 25,
HTML_H2 = 26, HTML_H2 = 26,
HTML_H3 = 27 HTML_H3 = 27,
HTML_H4 = 28,
HTML_H5 = 29,
HTML_H6 = 30
}; };
class CmdMapper class CmdMapper
......
...@@ -65,6 +65,7 @@ static const char * g_inputString; //!< the code fragment as text ...@@ -65,6 +65,7 @@ static const char * g_inputString; //!< the code fragment as text
static int g_inputPosition; //!< read offset during parsing static int g_inputPosition; //!< read offset during parsing
static int g_inputLines; //!< number of line in the code fragment static int g_inputLines; //!< number of line in the code fragment
static int g_yyLineNr; //!< current line number static int g_yyLineNr; //!< current line number
static bool g_needsTermination;
static bool g_exampleBlock; static bool g_exampleBlock;
static QCString g_exampleName; static QCString g_exampleName;
...@@ -923,7 +924,17 @@ static int countLines() ...@@ -923,7 +924,17 @@ static int countLines()
const char *p=g_inputString; const char *p=g_inputString;
char c; char c;
int count=1; int count=1;
while ((c=*p++)) if (c=='\n') count++; while ((c=*p))
{
p++ ;
if (c=='\n') count++;
}
if (p>g_inputString && *(p-1)!='\n')
{ // last line does not end with a \n, so we add an extra
// line and explicitly terminate the line after parsing.
count++,
g_needsTermination=TRUE;
}
return count; return count;
} }
...@@ -1989,14 +2000,17 @@ void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s, ...@@ -1989,14 +2000,17 @@ void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s,
g_inputString = s; g_inputString = s;
g_inputPosition = 0; g_inputPosition = 0;
g_currentFontClass = 0; g_currentFontClass = 0;
g_needsTermination = FALSE;
if (endLine!=-1) if (endLine!=-1)
g_inputLines = endLine+1; g_inputLines = endLine+1;
else else
g_inputLines = countLines(); g_inputLines = countLines();
if (startLine!=-1) if (startLine!=-1)
g_yyLineNr = startLine; g_yyLineNr = startLine;
else else
g_yyLineNr = 1; g_yyLineNr = 1;
g_curlyCount = 0; g_curlyCount = 0;
g_bodyCurlyCount = 0; g_bodyCurlyCount = 0;
g_bracketCount = 0; g_bracketCount = 0;
...@@ -2027,7 +2041,7 @@ void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s, ...@@ -2027,7 +2041,7 @@ void parseCode(BaseCodeDocInterface &od,const char *className,const QCString &s,
codeYYrestart( codeYYin ); codeYYrestart( codeYYin );
BEGIN( Body ); BEGIN( Body );
codeYYlex(); codeYYlex();
if (g_inputLines==1) if (g_needsTermination)
{ {
endFontClass(); endFontClass();
g_code->endCodeLine(); g_code->endCodeLine();
......
...@@ -255,6 +255,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]* ...@@ -255,6 +255,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
if (*yytext==')' && g_curArgTypeName.stripWhiteSpace().isEmpty()) if (*yytext==')' && g_curArgTypeName.stripWhiteSpace().isEmpty())
{ {
g_curArgTypeName+=*yytext; g_curArgTypeName+=*yytext;
BEGIN(FuncQual);
} }
else else
{ {
......
/******************************************************************************
*
*
*
* 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.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#ifndef DOC_H
#define DOC_H
#include "qtbc.h"
class OutputDocInterface;
class MemberDef;
extern void parseDoc(OutputDocInterface &ol,
const char *fileName,int startLine,
const char *clName, MemberDef *md,
const QCString &docString);
extern void parseExample(OutputDocInterface &ol,const QCString &docString,
const char *fileName);
extern void parseText(OutputDocInterface &ol,const QCString &txtString);
#endif
This diff is collapsed.
...@@ -1740,6 +1740,33 @@ int DocHtmlHeader::parse() ...@@ -1740,6 +1740,33 @@ int DocHtmlHeader::parse()
} }
goto endheader; goto endheader;
} }
else if (tagId==HTML_H4 && g_token->endTag) // found </h4> tag
{
if (m_level!=4)
{
warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h4>",
m_level);
}
goto endheader;
}
else if (tagId==HTML_H5 && g_token->endTag) // found </h5> tag
{
if (m_level!=5)
{
warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h5>",
m_level);
}
goto endheader;
}
else if (tagId==HTML_H6 && g_token->endTag) // found </h6> tag
{
if (m_level!=6)
{
warn(g_fileName,doctokenizerYYlineno,"Error: <h%d> ended with </h6>",
m_level);
}
goto endheader;
}
else else
{ {
warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within <h%d> context", warn(g_fileName,doctokenizerYYlineno,"Error: Unexpected html tag <%s%s> found within <h%d> context",
...@@ -3504,6 +3531,27 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag ...@@ -3504,6 +3531,27 @@ int DocPara::handleHtmlStartTag(const QString &tagName,const HtmlAttribList &tag
retval = header->parse(); retval = header->parse();
} }
break; break;
case HTML_H4:
{
DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,4);
m_children.append(header);
retval = header->parse();
}
break;
case HTML_H5:
{
DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,5);
m_children.append(header);
retval = header->parse();
}
break;
case HTML_H6:
{
DocHtmlHeader *header = new DocHtmlHeader(this,tagHtmlAttribs,6);
m_children.append(header);
retval = header->parse();
}
break;
case HTML_IMG: case HTML_IMG:
{ {
HtmlAttribListIterator li(tagHtmlAttribs); HtmlAttribListIterator li(tagHtmlAttribs);
......
...@@ -987,7 +987,7 @@ class DocSimpleListItem : public DocNode ...@@ -987,7 +987,7 @@ class DocSimpleListItem : public DocNode
DocPara *m_paragraph; DocPara *m_paragraph;
}; };
/*! @brief Node representing a Html list item */ /*! @brief Node representing a HTML list item */
class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
{ {
public: public:
...@@ -1006,7 +1006,7 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode ...@@ -1006,7 +1006,7 @@ class DocHtmlListItem : public CompAccept<DocHtmlListItem>, public DocNode
int m_itemNum; int m_itemNum;
}; };
/*! @brief Node representing a Html description data */ /*! @brief Node representing a HTML description data */
class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
{ {
public: public:
...@@ -1024,7 +1024,7 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode ...@@ -1024,7 +1024,7 @@ class DocHtmlDescData : public CompAccept<DocHtmlDescData>, public DocNode
}; };
/*! @brief Node representing a Html list item */ /*! @brief Node representing a preformatted HTML section */
class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
{ {
public: public:
...@@ -1041,7 +1041,7 @@ class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode ...@@ -1041,7 +1041,7 @@ class DocHtmlPre : public CompAccept<DocHtmlPre>, public DocNode
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table cell */ /*! @brief Node representing a HTML table cell */
class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
{ {
public: public:
...@@ -1067,7 +1067,7 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode ...@@ -1067,7 +1067,7 @@ class DocHtmlCell : public CompAccept<DocHtmlCell>, public DocNode
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table caption */ /*! @brief Node representing a HTML table caption */
class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode
{ {
public: public:
...@@ -1084,7 +1084,7 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode ...@@ -1084,7 +1084,7 @@ class DocHtmlCaption : public CompAccept<DocHtmlCaption>, public DocNode
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table row */ /*! @brief Node representing a HTML table row */
class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode
{ {
public: public:
...@@ -1102,7 +1102,7 @@ class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode ...@@ -1102,7 +1102,7 @@ class DocHtmlRow : public CompAccept<DocHtmlRow>, public DocNode
HtmlAttribList m_attribs; HtmlAttribList m_attribs;
}; };
/*! @brief Node representing a Html table */ /*! @brief Node representing a HTML table */
class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode class DocHtmlTable : public CompAccept<DocHtmlTable>, public DocNode
{ {
public: public:
......
...@@ -234,13 +234,17 @@ OPDEL {BLANK}+"delete"({BLANK}*"[]")? ...@@ -234,13 +234,17 @@ OPDEL {BLANK}+"delete"({BLANK}*"[]")?
OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()" OPNORM {OPNEW}|{OPDEL}|"+"|"-"|"*"|"/"|"%"|"^"|"&"|"|"|"~"|"!"|"="|"<"|">"|"+="|"-="|"*="|"/="|"%="|"^="|"&="|"|="|"<<"|">>"|"<<="|">>="|"=="|"!="|"<="|">="|"&&"|"||"|"++"|"--"|","|"->*"|"->"|"[]"|"()"
OPCAST {BLANK}+[^(\r\n.,]+ OPCAST {BLANK}+[^(\r\n.,]+
OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG}) OPMASK ({BLANK}*{OPNORM}({FUNCARG}?))|({OPCAST}{FUNCARG})
LNKWORD1 {SCOPEMASK}({FUNCARG}({BLANK}*("const"|"volatile"))?)? LNKWORD1 {SCOPEMASK}
CVSPEC {BLANK}*("const"|"volatile")
LNKWORD2 {SCOPEPRE}*"operator"{OPMASK} LNKWORD2 {SCOPEPRE}*"operator"{OPMASK}
WORD1 [^ \t\n\r\\@<>&$#,.]+ WORD1 [^ \t\n\r\\@<>&$#,.]+
WORD2 "."|"," WORD2 "."|","
WORD1NQ [^ \t\n\r\\@<>&$#,."]+ WORD1NQ [^ \t\n\r\\@<>&$#,."]+
WORD2NQ "."|"," WORD2NQ "."|","
HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
HTMLKEYL "strong"|"center"|"table"|"caption"|"small"|"code"|"dfn"|"var"|"img"|"pre"|"sub"|"tr"|"td"|"th"|"ol"|"ul"|"li"|"tt"|"kbd"|"em"|"hr"|"dl"|"dt"|"dd"|"br"|"i"|"a"|"b"|"p"
HTMLKEYU "STRONG"|"CENTER"|"TABLE"|"CAPTION"|"SMALL"|"CODE"|"DFN"|"VAR"|"IMG"|"PRE"|"SUB"|"TR"|"TD"|"TH"|"OL"|"UL"|"LI"|"TT"|"KBD"|"EM"|"HR"|"DL"|"DT"|"DD"|"BR"|"I"|"A"|"B"|"P"
HTMLKEYW {HTMLKEYL}|{HTMLKEYU}
%option noyywrap %option noyywrap
%option yylineno %option yylineno
...@@ -354,11 +358,29 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" ...@@ -354,11 +358,29 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
g_token->name = yytext; g_token->name = yytext;
return TK_SYMBOL; return TK_SYMBOL;
} }
<St_Para>{LNKWORD1}/[^a-z_A-Z0-9] |
/********* patterns for linkable words ******************/
<St_Para>{ID}/"<"{HTMLKEYW}">" { /* this rule is to prevent opening html
* tag to be recognized as a templated classes
*/
g_token->name = yytext;
return TK_LNKWORD;
}
<St_Para>{LNKWORD1} |
<St_Para>{LNKWORD1}{FUNCARG} |
<St_Para>{LNKWORD2} { <St_Para>{LNKWORD2} {
g_token->name = yytext; g_token->name = yytext;
return TK_LNKWORD; return TK_LNKWORD;
} }
<St_Para>{LNKWORD1}{FUNCARG}{CVSPEC}[^a-z_A-Z0-9] {
g_token->name = yytext;
g_token->name = g_token->name.left(g_token->name.length()-1);
unput(yytext[yyleng-1]);
return TK_LNKWORD;
}
/********* patterns for normal words ******************/
<St_Para,St_Text>{WORD1} | <St_Para,St_Text>{WORD1} |
<St_Para,St_Text>{WORD2} { /* function call */ <St_Para,St_Text>{WORD2} { /* function call */
g_token->name = yytext; g_token->name = yytext;
...@@ -370,6 +392,9 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">" ...@@ -370,6 +392,9 @@ HTMLTAG "<"(("/")?){ID}({WS}+{ATTRIB})*">"
*/ */
goto find_rule; goto find_rule;
} }
/*******************************************************/
<St_Para,St_Text>{BLANK}+ | <St_Para,St_Text>{BLANK}+ |
<St_Para,St_Text>{BLANK}*\n{BLANK}* { /* white space */ <St_Para,St_Text>{BLANK}*\n{BLANK}* { /* white space */
g_token->chars=yytext; g_token->chars=yytext;
......
...@@ -76,7 +76,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName) ...@@ -76,7 +76,7 @@ static bool convertMapFile(QTextStream &t,const char *mapName)
if (strncmp(buf,"rect",4)==0) if (strncmp(buf,"rect",4)==0)
{ {
// obtain the url and the coordinates in the order used by graphviz-1.5 // obtain the url and the coordinates in the order used by graphviz-1.5
sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y2,&x2,&y1); sscanf(buf,"rect %s %d,%d %d,%d",url,&x1,&y1,&x2,&y2);
// later versions of graphviz corrected the y coordinate order // later versions of graphviz corrected the y coordinate order
// the rule is that y2>=y1, so test and switch if needed // the rule is that y2>=y1, so test and switch if needed
if (y2<y1) if (y2<y1)
......
...@@ -696,7 +696,8 @@ static void addClassToContext(Entry *root) ...@@ -696,7 +696,8 @@ static void addClassToContext(Entry *root)
QCString namespaceName; QCString namespaceName;
extractNamespaceName(fullName,className,namespaceName); extractNamespaceName(fullName,className,namespaceName);
//printf("New class: namespace `%s' name=`%s'\n",className.data(),namespaceName.data()); //printf("New class: namespace `%s' name=`%s' brief=`%s' docs=`%s'\n",
// className.data(),namespaceName.data(),root->brief.data(),root->doc.data());
QCString tagName; QCString tagName;
QCString refFileName; QCString refFileName;
...@@ -1777,6 +1778,10 @@ void addMethodToClass(Entry *root,ClassDef *cd, ...@@ -1777,6 +1778,10 @@ void addMethodToClass(Entry *root,ClassDef *cd,
name=name.left(i); name=name.left(i);
} }
//printf("root->name=`%s; root->args=`%s' root->argList=`%s'\n",
// root->name.data(),root->args.data(),argListToString(root->argList).data()
// );
// adding class member // adding class member
MemberDef *md=new MemberDef( MemberDef *md=new MemberDef(
root->fileName,root->startLine, root->fileName,root->startLine,
...@@ -2043,6 +2048,7 @@ static void buildFunctionList(Entry *root) ...@@ -2043,6 +2048,7 @@ static void buildFunctionList(Entry *root)
//} //}
if (root->proto) if (root->proto)
{ {
//printf("setDeclArgumentList to %p\n",argList);
md->setDeclArgumentList(argList); md->setDeclArgumentList(argList);
} }
else else
...@@ -4463,7 +4469,6 @@ static void findMember(Entry *root, ...@@ -4463,7 +4469,6 @@ static void findMember(Entry *root,
// ); // );
md->setDefinitionTemplateParameterLists(root->tArgLists); md->setDefinitionTemplateParameterLists(root->tArgLists);
//md->setMemberDefTemplateArguments(root->mtArgList);
md->setArgumentList(argList); md->setArgumentList(argList);
} }
else // no match -> delete argument list else // no match -> delete argument list
...@@ -5377,7 +5382,7 @@ static void buildCompleteMemberLists() ...@@ -5377,7 +5382,7 @@ static void buildCompleteMemberLists()
ClassSDict::Iterator cli(Doxygen::classSDict); ClassSDict::Iterator cli(Doxygen::classSDict);
for (cli.toFirst();(cd=cli.current());++cli) for (cli.toFirst();(cd=cli.current());++cli)
{ {
if (!cd->isReference() && // not an external class if (// !cd->isReference() && // not an external class
cd->subClasses()->count()==0 && // is a root of the hierarchy cd->subClasses()->count()==0 && // is a root of the hierarchy
cd->baseClasses()->count()>0) // and has at least one base class cd->baseClasses()->count()>0) // and has at least one base class
{ {
......
...@@ -110,11 +110,11 @@ HtmlGenerator::~HtmlGenerator() ...@@ -110,11 +110,11 @@ HtmlGenerator::~HtmlGenerator()
//printf("HtmlGenerator::~HtmlGenerator()\n"); //printf("HtmlGenerator::~HtmlGenerator()\n");
} }
void HtmlGenerator::append(const OutputGenerator *g) //void HtmlGenerator::append(const OutputGenerator *g)
{ //{
t << g->getContents(); // t << g->getContents();
col+=((HtmlGenerator *)g)->col; // col+=((HtmlGenerator *)g)->col;
} //}
void HtmlGenerator::init() void HtmlGenerator::init()
{ {
......
...@@ -33,9 +33,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -33,9 +33,6 @@ class HtmlGenerator : public OutputGenerator
static void writeHeaderFile(QFile &f); static void writeHeaderFile(QFile &f);
static void writeFooterFile(QFile &f); static void writeFooterFile(QFile &f);
OutputGenerator *copy() { return new HtmlGenerator; }
//OutputGenerator *clone() { return new HtmlGenerator(*this); }
void append(const OutputGenerator *o);
void enable() { active=TRUE; } void enable() { active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Html) active=TRUE; } void enableIf(OutputType o) { if (o==Html) active=TRUE; }
...@@ -46,15 +43,12 @@ class HtmlGenerator : public OutputGenerator ...@@ -46,15 +43,12 @@ class HtmlGenerator : public OutputGenerator
void printDoc(DocNode *); void printDoc(DocNode *);
//void generateExternalIndex();
void startFile(const char *name,const char *manName, void startFile(const char *name,const char *manName,
const char *title,bool external); const char *title,bool external);
void writeFooter(int,bool); void writeFooter(int,bool);
void endFile(); void endFile();
void clearBuffer(); void clearBuffer();
//void writeIndex();
void startIndexSection(IndexSections) {} void startIndexSection(IndexSections) {}
void endIndexSection(IndexSections) {} void endIndexSection(IndexSections) {}
void startProjectNumber(); void startProjectNumber();
...@@ -75,11 +69,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -75,11 +69,6 @@ class HtmlGenerator : public OutputGenerator
void endIndexValue(const char *,bool); void endIndexValue(const char *,bool);
void startItemList() { t << "<ul>" << endl; } void startItemList() { t << "<ul>" << endl; }
void endItemList() { t << "</ul>" << endl; } void endItemList() { t << "</ul>" << endl; }
//void startEnumList() { t << "<ol>" << endl; }
//void endEnumList() { t << "</ol>" << endl; }
//void startAlphabeticalIndexList();
//void endAlphabeticalIndexList();
//void writeIndexHeading(const char *s);
void writeIndexItem(const char *ref,const char *file,const char *name); void writeIndexItem(const char *ref,const char *file,const char *name);
void docify(const char *text); void docify(const char *text);
void codify(const char *text); void codify(const char *text);
...@@ -91,7 +80,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -91,7 +80,6 @@ class HtmlGenerator : public OutputGenerator
void endTextLink(); void endTextLink();
void startHtmlLink(const char *url); void startHtmlLink(const char *url);
void endHtmlLink(); void endHtmlLink();
//void writeMailLink(const char *url);
void startTypewriter() { t << "<code>"; } void startTypewriter() { t << "<code>"; }
void endTypewriter() { t << "</code>"; } void endTypewriter() { t << "</code>"; }
void startGroupHeader(); void startGroupHeader();
...@@ -125,15 +113,9 @@ class HtmlGenerator : public OutputGenerator ...@@ -125,15 +113,9 @@ class HtmlGenerator : public OutputGenerator
{ t << "<a name=\"" << name <<"\"></a>"; } { t << "<a name=\"" << name <<"\"></a>"; }
void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; } void startCodeFragment() { t << "<div class=\"fragment\"><pre>"; }
void endCodeFragment() { t << "</pre></div>"; } void endCodeFragment() { t << "</pre></div>"; }
//void startPreFragment() { 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"); }
//void writeBoldString(const char *text)
// { t << "<b>"; docify(text); t << "</b>"; }
void startEmphasis() { t << "<em>"; } void startEmphasis() { t << "<em>"; }
void endEmphasis() { t << "</em>"; } void endEmphasis() { t << "</em>"; }
void startBold() { t << "<b>"; } void startBold() { t << "<b>"; }
...@@ -146,15 +128,12 @@ class HtmlGenerator : public OutputGenerator ...@@ -146,15 +128,12 @@ class HtmlGenerator : public OutputGenerator
void writeChar(char c); void writeChar(char c);
void startMemberDoc(const char *,const char *,const char *,const char *); void startMemberDoc(const char *,const char *,const char *,const char *);
void endMemberDoc(); void endMemberDoc();
//void writeDoxyAnchor(const char *fName,const char *clName,
// const char *anchor,const char *name);
void startDoxyAnchor(const char *fName,const char *manName, void startDoxyAnchor(const char *fName,const char *manName,
const char *anchor,const char *name); const char *anchor,const char *name);
void endDoxyAnchor(const char *fName,const char *anchor); void endDoxyAnchor(const char *fName,const char *anchor);
void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; } void startCodeAnchor(const char *label) { t << "<a name=\"" << label << "\"></a>"; }
void endCodeAnchor() { } void endCodeAnchor() { }
void writeLatexSpacing() {} void writeLatexSpacing() {}
//void writeLatexLabel(const char *,const char *) {}
void writeStartAnnoItem(const char *type,const char *file, void writeStartAnnoItem(const char *type,const char *file,
const char *path,const char *name); const char *path,const char *name);
void writeEndAnnoItem(const char *) { t << endl; } void writeEndAnnoItem(const char *) { t << endl; }
...@@ -166,63 +145,26 @@ class HtmlGenerator : public OutputGenerator ...@@ -166,63 +145,26 @@ class HtmlGenerator : public OutputGenerator
void endCenter() { t << "</center>" << endl; } void endCenter() { t << "</center>" << endl; }
void startSmall() { t << "<small>" << endl; } void startSmall() { t << "<small>" << endl; }
void endSmall() { t << "</small>" << endl; } void endSmall() { t << "</small>" << endl; }
//void startSubscript() { t << "<sub>"; }
//void endSubscript() { t << "</sub>"; }
//void startSuperscript() { t << "<sup>"; }
//void endSuperscript() { t << "</sup>"; }
//void startTable(bool,int)
// { t << "<table border=1 cellspacing=3 cellpadding=3>"; }
//void endTable(bool hasCaption)
// { if (!hasCaption) t << "</tr>";
// t << "</table>" << endl;
// }
//void startCaption() { t << "</tr><caption align=\"bottom\">"; }
//void endCaption() { t << "</caption>" << endl; }
//void nextTableRow() { t << "<tr><td>"; }
//void endTableRow() { t << "</tr>" << endl; }
//void nextTableColumn() { t << "<td>"; }
//void endTableColumn() { t << "</td>"; }
//void writeCopyright() { t << "&copy;"; }
//void writeQuote() { t << "&quot;"; }
//void writeUmlaut(char c) { t << "&" << c << "uml;"; }
//void writeAcute(char c) { t << "&" << c << "acute;"; }
//void writeGrave(char c) { t << "&" << c << "grave;"; }
//void writeCirc(char c) { t << "&" << c << "circ;"; }
//void writeTilde(char c) { t << "&" << c << "tilde;"; }
//void writeRing(char c) { t << "&" << c << "ring;"; }
//void writeSharpS() { t << "&szlig;"; }
//void writeCCedil(char c) { t << "&" << c << "cedil;"; }
void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; } void startDescList(SectionTypes) { t << "<dl compact><dt><b>" << endl; }
void endDescList() { t << "</dl>"; } void endDescList() { t << "</dl>"; }
void startSimpleSect(SectionTypes,const char *,const char *,const char *); void startSimpleSect(SectionTypes,const char *,const char *,const char *);
void endSimpleSect(); void endSimpleSect();
void startParamList(ParamListTypes,const char *); void startParamList(ParamListTypes,const char *);
void endParamList(); void endParamList();
//void endDescTitle() { t << "</b>"; }
void writeDescItem() { t << "<dd>" << endl; } void writeDescItem() { t << "<dd>" << endl; }
void startSection(const char *,const char *,SectionInfo::SectionType); void startSection(const char *,const char *,SectionInfo::SectionType);
void endSection(const char *,SectionInfo::SectionType); void endSection(const char *,SectionInfo::SectionType);
//void writeSectionRef(const char *,const char *,const char *,const char *);
//void writeSectionRefItem(const char *,const char *,const char *);
//void writeSectionRefAnchor(const char *,const char *,const char *);
void addIndexItem(const char *,const char *); void addIndexItem(const char *,const char *);
void startIndent(); void startIndent();
void endIndent(); void endIndent();
void writeSynopsis() {} void writeSynopsis() {}
void startClassDiagram(); void startClassDiagram();
void endClassDiagram(ClassDiagram &,const char *,const char *); void endClassDiagram(ClassDiagram &,const char *,const char *);
//void startColorFont(uchar r,uchar g,uchar b);
//void endColorFont();
void startPageRef() {} void startPageRef() {}
void endPageRef(const char *,const char *) {} void endPageRef(const char *,const char *) {}
void startQuickIndexItem(const char *,const char *); void startQuickIndexItem(const char *,const char *);
void endQuickIndexItem(); void endQuickIndexItem();
//void writeFormula(const char *,const char *);
void writeNonBreakableSpace(int); void writeNonBreakableSpace(int);
//void startImage(const char *,const char *,bool);
//void endImage(bool);
//void startDotFile(const char *,bool);
//void endDotFile(bool);
void startDescTable() void startDescTable()
{ t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; } { t << "<table border=0 cellspacing=2 cellpadding=0>" << endl; }
...@@ -236,7 +178,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -236,7 +178,6 @@ class HtmlGenerator : public OutputGenerator
{ t << "<td>" << endl; } { t << "<td>" << endl; }
void endDescTableData() void endDescTableData()
{ t << "</td></tr>" << endl; } { t << "</td></tr>" << endl; }
//static void docifyStatic(QTextStream &t,const char *str);
void startDotGraph(); void startDotGraph();
void endDotGraph(DotClassGraph &g); void endDotGraph(DotClassGraph &g);
...@@ -262,14 +203,6 @@ class HtmlGenerator : public OutputGenerator ...@@ -262,14 +203,6 @@ class HtmlGenerator : public OutputGenerator
void startFontClass(const char *s) { t << "<span class=\"" << s << "\">"; } void startFontClass(const char *s) { t << "<span class=\"" << s << "\">"; }
void endFontClass() { t << "</span>"; } void endFontClass() { t << "</span>"; }
//void startHtmlOnly() {}
//void endHtmlOnly() {}
//void startLatexOnly() {}
//void endLatexOnly() {}
//void startSectionRefList();
//void endSectionRefList();
void writeCodeAnchor(const char *anchor) void writeCodeAnchor(const char *anchor)
{ t << "<a name=\"" << anchor << "\"></a>"; } { t << "<a name=\"" << anchor << "\"></a>"; }
......
...@@ -626,6 +626,7 @@ void LatexDocVisitor::visitPre(DocHtmlHeader *header) ...@@ -626,6 +626,7 @@ void LatexDocVisitor::visitPre(DocHtmlHeader *header)
case 1: m_t << "\\subsection*{"; break; case 1: m_t << "\\subsection*{"; break;
case 2: m_t << "\\subsubsection*{"; break; case 2: m_t << "\\subsubsection*{"; break;
case 3: m_t << "\\paragraph*{"; break; case 3: m_t << "\\paragraph*{"; break;
default: m_t << "\\subparagraph*{"; break;
} }
} }
else else
...@@ -635,6 +636,8 @@ void LatexDocVisitor::visitPre(DocHtmlHeader *header) ...@@ -635,6 +636,8 @@ void LatexDocVisitor::visitPre(DocHtmlHeader *header)
case 1: m_t << "\\section*{"; break; case 1: m_t << "\\section*{"; break;
case 2: m_t << "\\subsection*{"; break; case 2: m_t << "\\subsection*{"; break;
case 3: m_t << "\\subsubsection*{"; break; case 3: m_t << "\\subsubsection*{"; break;
case 4: m_t << "\\paragraph*{"; break;
default: m_t << "\\subparagraph*{"; break;
} }
} }
} }
......
...@@ -113,24 +113,24 @@ LatexGenerator::~LatexGenerator() ...@@ -113,24 +113,24 @@ LatexGenerator::~LatexGenerator()
// col=g.col; // col=g.col;
//} //}
void LatexGenerator::append(const OutputGenerator *g) //void LatexGenerator::append(const OutputGenerator *g)
{ //{
t << g->getContents(); // t << g->getContents();
col+=((LatexGenerator *)g)->col; // col+=((LatexGenerator *)g)->col;
insideTabbing=insideTabbing || ((LatexGenerator *)g)->insideTabbing; // insideTabbing=insideTabbing || ((LatexGenerator *)g)->insideTabbing;
firstDescItem = ((LatexGenerator *)g)->firstDescItem; // firstDescItem = ((LatexGenerator *)g)->firstDescItem;
insidePre = insidePre || ((LatexGenerator *)g)->insidePre; // insidePre = insidePre || ((LatexGenerator *)g)->insidePre;
//printf("LatexGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), // //printf("LatexGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(),
// insideTabbing ? "TRUE" : "FALSE" ); // // insideTabbing ? "TRUE" : "FALSE" );
} //}
OutputGenerator *LatexGenerator::copy() //OutputGenerator *LatexGenerator::copy()
{ //{
LatexGenerator *result = new LatexGenerator; // LatexGenerator *result = new LatexGenerator;
result->insideTabbing=insideTabbing; // result->insideTabbing=insideTabbing;
result->insidePre=insidePre; // result->insidePre=insidePre;
return result; // return result;
} //}
void LatexGenerator::init() void LatexGenerator::init()
{ {
...@@ -1295,62 +1295,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType) ...@@ -1295,62 +1295,6 @@ void LatexGenerator::endSection(const char *lab,SectionInfo::SectionType)
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str) //void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str) void LatexGenerator::docify(const char *str)
{ {
#if 0
//static bool isCzech = theTranslator->idLanguage()=="czech";
static bool isJapanese = theTranslator->idLanguage()=="japanese";
//static bool isKorean = theTranslator->idLanguage()=="korean";
//static bool isRussian = theTranslator->idLanguage()=="russian";
//static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
//static bool isChinese = theTranslator->idLanguage()=="chinese" ||
// theTranslator->idLanguage()=="chinese-traditional";
//static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2";
//static bool isGreek = theTranslator->idLanguage()=="greek";
if (str)
{
const unsigned char *p=(const unsigned char *)str;
unsigned char c;
unsigned char pc='\0';
bool multiByte = FALSE;
while (*p)
{
c=*p++;
if( isJapanese)
{
if (multiByte)
{
t << (char)c;
multiByte = FALSE;
pc = c;
continue;
}
if (c>=0x80)
{
multiByte = TRUE;
t << (char)c;
pc = c;
continue;
}
}
if (insidePre)
{
switch(c)
{
case '\\': t << "\\(\\backslash\\)"; break;
case '{': t << "\\{"; break;
case '}': t << "\\}"; break;
default: t << (char)c; break;
}
}
else
{
filterLatexChar(t,c,insideTabbing);
}
pc = c;
}
}
#endif
filterLatexString(t,str,insideTabbing,insidePre); filterLatexString(t,str,insideTabbing,insidePre);
} }
...@@ -1377,7 +1321,7 @@ void LatexGenerator::codify(const char *str) ...@@ -1377,7 +1321,7 @@ void LatexGenerator::codify(const char *str)
MultiByte = FALSE; MultiByte = FALSE;
continue; continue;
} }
if ( c<0 ) // char in range [0x80..0xff] if ( (uchar)c>=0x80 || (uchar)c<=0xff) // char in range [0x80..0xff]
{ {
t << (char)c; t << (char)c;
MultiByte = TRUE; MultiByte = TRUE;
......
...@@ -31,9 +31,9 @@ class LatexGenerator : public OutputGenerator ...@@ -31,9 +31,9 @@ class LatexGenerator : public OutputGenerator
static void writeStyleSheetFile(QFile &f); static void writeStyleSheetFile(QFile &f);
static void writeHeaderFile(QFile &f); static void writeHeaderFile(QFile &f);
OutputGenerator *copy(); //OutputGenerator *copy();
//OutputGenerator *clone() { return new LatexGenerator(*this); } //OutputGenerator *clone() { return new LatexGenerator(*this); }
void append(const OutputGenerator *o); //void append(const OutputGenerator *o);
void enable() { active=TRUE; } void enable() { active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Latex) active=TRUE; } void enableIf(OutputType o) { if (o==Latex) active=TRUE; }
......
...@@ -62,21 +62,21 @@ ManGenerator::~ManGenerator() ...@@ -62,21 +62,21 @@ ManGenerator::~ManGenerator()
{ {
} }
void ManGenerator::append(const OutputGenerator *g) //void ManGenerator::append(const OutputGenerator *g)
{ //{
QCString r=g->getContents(); // QCString r=g->getContents();
if (upperCase) // if (upperCase)
t << r.upper(); // t << r.upper();
else // else
t << r; // t << r;
if (!r.isEmpty()) // if (!r.isEmpty())
firstCol = r.at(r.length()-1)=='\n'; // firstCol = r.at(r.length()-1)=='\n';
else // else
firstCol = ((ManGenerator *)g)->firstCol; // firstCol = ((ManGenerator *)g)->firstCol;
col+=((ManGenerator *)g)->col; // col+=((ManGenerator *)g)->col;
inHeader=((ManGenerator *)g)->inHeader; // inHeader=((ManGenerator *)g)->inHeader;
paragraph=FALSE; // paragraph=FALSE;
} //}
void ManGenerator::init() void ManGenerator::init()
{ {
......
...@@ -28,9 +28,9 @@ class ManGenerator : public OutputGenerator ...@@ -28,9 +28,9 @@ class ManGenerator : public OutputGenerator
ManGenerator(); ManGenerator();
~ManGenerator(); ~ManGenerator();
OutputGenerator *copy() { return new ManGenerator; } //OutputGenerator *copy() { return new ManGenerator; }
//OutputGenerator *clone() { return new ManGenerator(*this); } //OutputGenerator *clone() { return new ManGenerator(*this); }
void append(const OutputGenerator *o); //void append(const OutputGenerator *o);
void enable() { active=TRUE; } void enable() { active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==Man) active=TRUE; } void enableIf(OutputType o) { if (o==Man) active=TRUE; }
......
...@@ -262,7 +262,8 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -262,7 +262,8 @@ MemberDef::MemberDef(const char *df,int dl,
const ArgumentList *tal,const ArgumentList *al const ArgumentList *tal,const ArgumentList *al
) : Definition(df,dl,na) ) : Definition(df,dl,na)
{ {
//printf("++++++ MemberDef(%s file=%s,line=%d static=%d) ++++++ \n",na,df,dl,s); //printf("++++++ MemberDef(%s file=%s,line=%d static=%d) ++++++ \n",
// na,df,dl,s);
classDef=0; classDef=0;
fileDef=0; fileDef=0;
redefines=0; redefines=0;
...@@ -345,6 +346,7 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -345,6 +346,7 @@ MemberDef::MemberDef(const char *df,int dl,
defArgList->constSpecifier = al->constSpecifier; defArgList->constSpecifier = al->constSpecifier;
defArgList->volatileSpecifier = al->volatileSpecifier; defArgList->volatileSpecifier = al->volatileSpecifier;
defArgList->pureSpecifier = al->pureSpecifier; defArgList->pureSpecifier = al->pureSpecifier;
//printf("defArgList(%p)->constSpecifier=%d\n",defArgList,defArgList->constSpecifier);
} }
else else
{ {
...@@ -355,6 +357,8 @@ MemberDef::MemberDef(const char *df,int dl, ...@@ -355,6 +357,8 @@ MemberDef::MemberDef(const char *df,int dl,
{ {
declArgList = new ArgumentList; declArgList = new ArgumentList;
stringToArgumentList(args,declArgList); stringToArgumentList(args,declArgList);
//printf("setDeclArgList %s to %p const=%d\n",args.data(),
// declArgList,declArgList->constSpecifier);
} }
else else
{ {
...@@ -1922,3 +1926,13 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl, ...@@ -1922,3 +1926,13 @@ void MemberDef::writeEnumDeclaration(OutputList &typeDecl,
} }
} }
void MemberDef::setArgumentList(ArgumentList *al)
{
if (defArgList) delete defArgList;
defArgList = al;
}
void MemberDef::setDeclArgumentList(ArgumentList *al)
{
if (declArgList) delete declArgList;
declArgList = al;
}
...@@ -200,16 +200,8 @@ class MemberDef : public Definition ...@@ -200,16 +200,8 @@ class MemberDef : public Definition
// argument related members // argument related members
ArgumentList *argumentList() const { return defArgList; } ArgumentList *argumentList() const { return defArgList; }
ArgumentList *declArgumentList() const { return declArgList; } ArgumentList *declArgumentList() const { return declArgList; }
void setArgumentList(ArgumentList *al) void setArgumentList(ArgumentList *al);
{ void setDeclArgumentList(ArgumentList *al);
if (defArgList) delete defArgList;
defArgList = al;
}
void setDeclArgumentList(ArgumentList *al)
{
if (declArgList) delete declArgList;
declArgList = al;
}
ArgumentList *templateArguments() const { return tArgList; } ArgumentList *templateArguments() const { return tArgList; }
void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists); void setDefinitionTemplateParameterLists(QList<ArgumentList> *lists);
QList<ArgumentList> *definitionTemplateParameterLists() const QList<ArgumentList> *definitionTemplateParameterLists() const
......
...@@ -254,8 +254,6 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -254,8 +254,6 @@ class OutputGenerator : public BaseOutputDocInterface
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
// generic generator methods // generic generator methods
/////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////
virtual OutputGenerator *copy() = 0;
//virtual void append(const OutputGenerator *) = 0;
virtual void enable() = 0; virtual void enable() = 0;
virtual void disable() = 0; virtual void disable() = 0;
virtual void enableIf(OutputType o) = 0; virtual void enableIf(OutputType o) = 0;
...@@ -263,8 +261,6 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -263,8 +261,6 @@ class OutputGenerator : public BaseOutputDocInterface
virtual void disableIfNot(OutputType o) = 0; virtual void disableIfNot(OutputType o) = 0;
virtual bool isEnabled(OutputType o) = 0; virtual bool isEnabled(OutputType o) = 0;
virtual OutputGenerator *get(OutputType o) = 0; virtual OutputGenerator *get(OutputType o) = 0;
//void clear() { b.close(); a.resize(0); b.setBuffer(a);
// b.open(IO_WriteOnly); t.setDevice(&b); }
void startPlainFile(const char *name); void startPlainFile(const char *name);
void endPlainFile(); void endPlainFile();
QCString getContents() const; QCString getContents() const;
...@@ -370,8 +366,8 @@ class OutputGenerator : public BaseOutputDocInterface ...@@ -370,8 +366,8 @@ class OutputGenerator : public BaseOutputDocInterface
/*! \brief Interface used for generating documentation. /*! \brief Interface used for generating documentation.
* *
* This abstract class is used by the documentation block * This abstract class is used by several functions
* parser to generate the output for a specific format. * to generate the output for a specific format.
* This interface contains some state saving and changing * This interface contains some state saving and changing
* functions for dealing with format specific output. * functions for dealing with format specific output.
*/ */
...@@ -383,7 +379,7 @@ class OutputDocInterface : public BaseOutputDocInterface ...@@ -383,7 +379,7 @@ class OutputDocInterface : public BaseOutputDocInterface
/*! Create a new output generator. This can later by appended /*! Create a new output generator. This can later by appended
* to the current one using append(). * to the current one using append().
*/ */
virtual OutputDocInterface *clone() = 0; //virtual OutputDocInterface *clone() = 0;
/*! Disables all output formats except format \a o /*! Disables all output formats except format \a o
* (useful for OutputList only) * (useful for OutputList only)
......
...@@ -36,23 +36,23 @@ OutputList::OutputList(bool) ...@@ -36,23 +36,23 @@ OutputList::OutputList(bool)
outputs->setAutoDelete(TRUE); outputs->setAutoDelete(TRUE);
} }
OutputList::OutputList(const OutputList *olist) //OutputList::OutputList(const OutputList *olist)
{ //{
//printf("OutputList::OutputList() deep copy\n"); // //printf("OutputList::OutputList() deep copy\n");
outputs = new QList<OutputGenerator>; // outputs = new QList<OutputGenerator>;
outputs->setAutoDelete(TRUE); // outputs->setAutoDelete(TRUE);
//
QList<OutputGenerator> *ol=olist->outputs; // QList<OutputGenerator> *ol=olist->outputs;
OutputGenerator *og=ol->first(); // OutputGenerator *og=ol->first();
while (og) // while (og)
{ // {
OutputGenerator *ogc=og->copy(); // OutputGenerator *ogc=og->copy();
outputs->append(ogc); // outputs->append(ogc);
if (og->isEnabled()) ogc->enable(); else ogc->disable(); // if (og->isEnabled()) ogc->enable(); else ogc->disable();
og=ol->next(); // og=ol->next();
} // }
//printf("OutputList::OutputList dst=%d res=%d\n",ol->count(),outputs->count()); // //printf("OutputList::OutputList dst=%d res=%d\n",ol->count(),outputs->count());
} //}
OutputList::~OutputList() OutputList::~OutputList()
{ {
...@@ -60,23 +60,23 @@ OutputList::~OutputList() ...@@ -60,23 +60,23 @@ OutputList::~OutputList()
delete outputs; delete outputs;
} }
OutputList &OutputList::operator=(const OutputList &olist) //OutputList &OutputList::operator=(const OutputList &olist)
{ //{
if (this!=&olist) // if (this!=&olist)
{ // {
QList<OutputGenerator> *ol=olist.outputs; // QList<OutputGenerator> *ol=olist.outputs;
OutputGenerator *ogsrc=ol->first(); // OutputGenerator *ogsrc=ol->first();
OutputGenerator *ogdst=outputs->first(); // OutputGenerator *ogdst=outputs->first();
//printf("OutputList::operator= src=%d dst=%d\n",outputs->count(),ol->count()); // //printf("OutputList::operator= src=%d dst=%d\n",outputs->count(),ol->count());
while (ogdst) // while (ogdst)
{ // {
ogdst=ogsrc->copy(); // ogdst=ogsrc->copy();
ogsrc=ol->next(); // ogsrc=ol->next();
ogdst=outputs->next(); // ogdst=outputs->next();
} // }
} // }
return *this; // return *this;
} //}
void OutputList::add(const OutputGenerator *og) void OutputList::add(const OutputGenerator *og)
{ {
......
This diff is collapsed.
...@@ -65,25 +65,25 @@ RTFGenerator::~RTFGenerator() ...@@ -65,25 +65,25 @@ RTFGenerator::~RTFGenerator()
{ {
} }
void RTFGenerator::append(const OutputGenerator *g) //void RTFGenerator::append(const OutputGenerator *g)
{ //{
t << g->getContents(); // t << g->getContents();
col+=((RTFGenerator *)g)->col; // col+=((RTFGenerator *)g)->col;
//insideTabbing=insideTabbing || ((RTFGenerator *)g)->insideTabbing; // //insideTabbing=insideTabbing || ((RTFGenerator *)g)->insideTabbing;
m_listLevel=((RTFGenerator *)g)->m_listLevel; // m_listLevel=((RTFGenerator *)g)->m_listLevel;
m_omitParagraph=((RTFGenerator *)g)->m_omitParagraph; // m_omitParagraph=((RTFGenerator *)g)->m_omitParagraph;
//printf("RTFGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(), // //printf("RTFGenerator::append(%s) insideTabbing=%s\n", g->getContents().data(),
// insideTabbing ? "TRUE" : "FALSE" ); // // insideTabbing ? "TRUE" : "FALSE" );
} //}
OutputGenerator *RTFGenerator::copy() //OutputGenerator *RTFGenerator::copy()
{ //{
RTFGenerator *result = new RTFGenerator; // RTFGenerator *result = new RTFGenerator;
//result->insideTabbing=insideTabbing; // //result->insideTabbing=insideTabbing;
result->m_listLevel=m_listLevel; // result->m_listLevel=m_listLevel;
result->m_omitParagraph=m_omitParagraph; // result->m_omitParagraph=m_omitParagraph;
return result; // return result;
} //}
void RTFGenerator::writeStyleSheetFile(QFile &file) void RTFGenerator::writeStyleSheetFile(QFile &file)
{ {
......
...@@ -31,9 +31,9 @@ class RTFGenerator : public OutputGenerator ...@@ -31,9 +31,9 @@ class RTFGenerator : public OutputGenerator
static void writeStyleSheetFile(QFile &f); static void writeStyleSheetFile(QFile &f);
static void writeExtensionsFile(QFile &file); static void writeExtensionsFile(QFile &file);
OutputGenerator *copy(); //OutputGenerator *copy();
//OutputGenerator *clone() { return new RTFGenerator(*this); } //OutputGenerator *clone() { return new RTFGenerator(*this); }
void append(const OutputGenerator *o); //void append(const OutputGenerator *o);
void enable() { active=TRUE; } void enable() { active=TRUE; }
void disable() { active=FALSE; } void disable() { active=FALSE; }
void enableIf(OutputType o) { if (o==RTF) active=TRUE; } void enableIf(OutputType o) { if (o==RTF) active=TRUE; }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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