Commit ff11b7d9 authored by dimitri's avatar dimitri

Release-1.2.13

parent 414d7b3b
# Doxyfile 1.2.5-20010304
# Doxyfile 1.2.12-20011209
#---------------------------------------------------------------------------
# General configuration options
......@@ -8,21 +8,21 @@ PROJECT_NUMBER =
OUTPUT_DIRECTORY = doxygen_docs
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_PRIVATE = NO
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = NO
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = YES
STRIP_FROM_PATH = $(PWD)/
INTERNAL_DOCS = NO
CLASS_DIAGRAMS = NO
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = NO
SHORT_NAMES = NO
HIDE_SCOPE_NAMES = NO
VERBATIM_HEADERS = YES
SHOW_INCLUDE_FILES = YES
......@@ -32,11 +32,11 @@ INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
SHOW_USED_FILES = YES
......@@ -51,7 +51,7 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = src
INPUT = src
FILE_PATTERNS = *.h \
*.cpp
RECURSIVE = NO
......@@ -75,10 +75,18 @@ EXCLUDE = src/code.cpp \
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = YES
......@@ -121,12 +129,22 @@ RTF_OUTPUT =
COMPACT_RTF = NO
RTF_HYPERLINKS = NO
RTF_STYLESHEET_FILE =
RTF_EXTENSIONS_FILE =
#---------------------------------------------------------------------------
# configuration options related to the man page output
#---------------------------------------------------------------------------
GENERATE_MAN = NO
MAN_OUTPUT =
MAN_EXTENSION = .3
MAN_LINKS = NO
#---------------------------------------------------------------------------
# configuration options related to the XML output
#---------------------------------------------------------------------------
GENERATE_XML = NO
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
......@@ -138,6 +156,7 @@ INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
......@@ -148,13 +167,17 @@ PERL_PATH = /usr/bin/perl
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
HAVE_DOT = NO
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = NO
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1024
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
......
DOXYGEN Version 1.2.12-20011209
DOXYGEN Version 1.2.13
Please read the installation section of the manual for instructions.
--------
Dimitri van Heesch (09 December 2001)
Dimitri van Heesch (29 December 2001)
......@@ -8,14 +8,16 @@ clean: FORCE
cd qtools ; $(MAKE) clean
cd src ; $(MAKE) clean
cd addon/doxywizard ; $(MAKE) clean
cd addon/xmlparse ; $(MAKE) clean
cd addon/doxmlparser/src ; $(MAKE) clean
cd addon/doxmlparser/test ; $(MAKE) clean
-rm -f bin/doxy*
-rm -f objects/*.o
distclean: clean
cd src ; $(MAKE) distclean
cd addon/doxywizard ; $(MAKE) distclean
cd addon/xmlparse ; $(MAKE) distclean
cd addon/doxmlparser/src ; $(MAKE) distclean
cd addon/doxmlparser/test ; $(MAKE) distclean
-rm -f lib/lib*
-rm -f bin/doxy*
-rm -f html
......@@ -48,6 +50,7 @@ install_docs:
echo "DOXYGEN = $(INSTALL)" > $(DOCDIR)/doc/Makefile
echo "DOXYDOCS = .." >> $(DOCDIR)/doc/Makefile
echo "VERSION = $(VERSION)" >> $(DOCDIR)/doc/Makefile
echo "PERL = $(PERL)" >> $(DOCDIR)/doc/Makefile
cat doc/Makefile.in >> $(DOCDIR)/doc/Makefile
cd $(DOCDIR)/examples ; $(MAKE)
cd $(DOCDIR)/doc ; $(MAKE)
......
DOXYGEN Version 1.2.12_20011209
DOXYGEN Version 1.2.13
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (09 December 2001)
Dimitri van Heesch (dimitri@stack.nl) (29 December 2001)
1.2.12-20011209
1.2.13
# Doxyfile 1.2.8-20010715
# Doxyfile 1.2.12-20011209
#---------------------------------------------------------------------------
# General configuration options
#---------------------------------------------------------------------------
PROJECT_NAME = xmlparse
PROJECT_NAME = doxmlparser
PROJECT_NUMBER =
OUTPUT_DIRECTORY = doc
OUTPUT_LANGUAGE = English
EXTRACT_ALL = YES
EXTRACT_PRIVATE = YES
EXTRACT_STATIC = YES
EXTRACT_LOCAL_CLASSES = YES
HIDE_UNDOC_MEMBERS = NO
HIDE_UNDOC_CLASSES = NO
BRIEF_MEMBER_DESC = YES
REPEAT_BRIEF = YES
ALWAYS_DETAILED_SEC = NO
INLINE_INHERITED_MEMB = NO
FULL_PATH_NAMES = NO
STRIP_FROM_PATH =
INTERNAL_DOCS = NO
CLASS_DIAGRAMS = YES
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
STRIP_CODE_COMMENTS = YES
CASE_SENSE_NAMES = YES
SHORT_NAMES = NO
......@@ -33,18 +32,18 @@ INLINE_INFO = YES
SORT_MEMBER_DOCS = YES
DISTRIBUTE_GROUP_DOC = NO
TAB_SIZE = 8
ENABLED_SECTIONS =
GENERATE_TODOLIST = YES
GENERATE_TESTLIST = YES
GENERATE_BUGLIST = YES
ALIASES =
ENABLED_SECTIONS =
MAX_INITIALIZER_LINES = 30
OPTIMIZE_OUTPUT_FOR_C = NO
SHOW_USED_FILES = YES
#---------------------------------------------------------------------------
# configuration options related to warning and progress messages
#---------------------------------------------------------------------------
QUIET = NO
QUIET = YES
WARNINGS = YES
WARN_IF_UNDOCUMENTED = YES
WARN_FORMAT =
......@@ -52,17 +51,25 @@ WARN_LOGFILE =
#---------------------------------------------------------------------------
# configuration options related to the input files
#---------------------------------------------------------------------------
INPUT = .
FILE_PATTERNS = *.h *.cpp
INPUT = include
FILE_PATTERNS = *.h
RECURSIVE = NO
EXCLUDE =
EXCLUDE_PATTERNS =
EXAMPLE_PATH =
EXAMPLE_PATTERNS =
EXAMPLE_RECURSIVE = NO
IMAGE_PATH =
INPUT_FILTER =
FILTER_SOURCE_FILES = NO
#---------------------------------------------------------------------------
# configuration options related to source browsing
#---------------------------------------------------------------------------
SOURCE_BROWSER = YES
INLINE_SOURCES = NO
REFERENCED_BY_RELATION = YES
REFERENCES_RELATION = YES
#---------------------------------------------------------------------------
# configuration options related to the alphabetical class index
#---------------------------------------------------------------------------
ALPHABETICAL_INDEX = NO
......@@ -71,7 +78,7 @@ IGNORE_PREFIX =
#---------------------------------------------------------------------------
# configuration options related to the HTML output
#---------------------------------------------------------------------------
GENERATE_HTML = NO
GENERATE_HTML = YES
HTML_OUTPUT =
HTML_HEADER =
HTML_FOOTER =
......@@ -118,6 +125,10 @@ MAN_LINKS = NO
#---------------------------------------------------------------------------
GENERATE_XML = YES
#---------------------------------------------------------------------------
# configuration options for the AutoGen Definitions output
#---------------------------------------------------------------------------
GENERATE_AUTOGEN_DEF = NO
#---------------------------------------------------------------------------
# Configuration options related to the preprocessor
#---------------------------------------------------------------------------
ENABLE_PREPROCESSING = YES
......@@ -128,6 +139,7 @@ INCLUDE_PATH =
INCLUDE_FILE_PATTERNS =
PREDEFINED =
EXPAND_AS_DEFINED =
SKIP_FUNCTION_MACROS = YES
#---------------------------------------------------------------------------
# Configuration::addtions related to external references
#---------------------------------------------------------------------------
......@@ -138,13 +150,17 @@ PERL_PATH =
#---------------------------------------------------------------------------
# Configuration options related to the dot tool
#---------------------------------------------------------------------------
CLASS_DIAGRAMS = NO
HAVE_DOT = YES
CLASS_GRAPH = YES
COLLABORATION_GRAPH = YES
TEMPLATE_RELATIONS = YES
HIDE_UNDOC_RELATIONS = YES
INCLUDE_GRAPH = YES
INCLUDED_BY_GRAPH = YES
GRAPHICAL_HIERARCHY = YES
DOT_PATH =
DOTFILE_DIRS =
MAX_DOT_GRAPH_WIDTH = 1280
MAX_DOT_GRAPH_HEIGHT = 1024
GENERATE_LEGEND = YES
......
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<!-- NOTE: THIS DTD IS NOT UP TO DATE!!! DO NOT DEPEND ON IT -->
<!-- !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- DTD describing the grammar used in doxygen's XML output -->
<!-- standard character entities -->
<!ENTITY lt "&#38;#60;">
<!ENTITY gt "&#62;">
<!ENTITY amp "&#38;#38;">
<!ENTITY apos "&#39;">
<!ENTITY quot "&#34;">
<!-- required attributes for compounds -->
<!ENTITY % compound-req.att
'id ID #REQUIRED
type (group|file|namespace|
class|struct|union|
interface|dispinterface|
valuetype|library) #REQUIRED'
>
<!-- required attributes for references -->
<!ENTITY % ref-req.att 'idref IDREF #REQUIRED'
>
<!-- required attributes for inheritance relations -->
<!ENTITY % inheritcompref-req.att
'%ref-req.att;
prot (public|protected|private) #REQUIRED
virt (non-virtual|virtual) #REQUIRED'
>
<!-- required attributes for member sections -->
<!ENTITY % sec-req.att 'type (user
|public-type
|public-func
|public-attrib
|public-slot
|public-static-func
|public-static-attrib
|protected-type
|protected-func
|protected-attrib
|protected-slot
|protected-static-func
|protected-static-attrib
|private-type
|private-func
|private-attrib
|private-slot
|private-static-func
|private-static-attrib
|signal
|friend
|related
|define|prototype|typedef|enum|func|var
|dcop-func
|property
) #REQUIRED
'
>
<!-- required attributes for members -->
<!ENTITY % mem-req.att 'id ID #REQUIRED'>
<!-- optional attributes for function -->
<!ENTITY % func-opt.att 'virt (virtual|pure-virtual) #IMPLIED'>
<!-- elements -->
<!ELEMENT doxygen (compounddef)*>
<!ELEMENT compounddef (compoundname,
basecompoundref*,
derivedcompoundref*,
sectiondef*,
briefdescription,
detaileddescription,
inheritancegraph?,
collaborationgraph?,
sourcecode?
)
>
<!ATTLIST compounddef %compound-req.att;>
<!ELEMENT compoundref (#PCDATA)>
<!ATTLIST compoundref %ref-req.att;>
<!ELEMENT memberref (#PCDATA)>
<!ATTLIST memberref %ref-req.att;>
<!ELEMENT basecompoundref EMPTY>
<!ATTLIST basecompoundref %inheritcompref-req.att;>
<!ELEMENT derivedcompoundref EMPTY>
<!ATTLIST derivedcompoundref %inheritcompref-req.att;>
<!ELEMENT sectionlist (sectiondef)+>
<!ELEMENT sectiondef (memberlist)>
<!ATTLIST sectiondef %sec-req.att;>
<!ELEMENT memberlist (functiondef|variabledef|typedef|definedef|enumdef)+>
<!ELEMENT functiondef (type?,name,paramlist)>
<!ATTLIST functiondef %mem-req.att; %func-opt.att;>
<!ELEMENT variabledef (type,name,array?,initializer?)>
<!ATTLIST variabledef %mem-req.att;>
<!ELEMENT typedef (type,name)>
<!ATTLIST typedef %mem-req.att;>
<!ELEMENT definedef (name,defparamlist?,initializer?)>
<!ATTLIST definedef %mem-req.att;>
<!ELEMENT enumdef (name,enumvaluelist)>
<!ATTLIST enumdef %mem-req.att;>
<!ELEMENT slotdef (type,name,paramlist)>
<!ATTLIST slotdef %mem-req.att;>
<!ELEMENT signaldef (type,name,paramlist)>
<!ATTLIST signaldef %mem-req.att;>
<!ELEMENT paramlist (param)*>
<!ELEMENT param (attributes?,type,declname?,defname?,array?,defval?)>
<!ELEMENT defparamlist (defarg)*>
<!ELEMENT defarg (#PCDATA)>
<!ELEMENT enumvaluelist (enumvalue)*>
<!ELEMENT enumvalue (name,initializer?)>
<!ELEMENT name (#PCDATA)>
<!ELEMENT compoundname (#PCDATA)>
<!ELEMENT declname (#PCDATA)>
<!ELEMENT defname (#PCDATA)>
<!ELEMENT type (#PCDATA|memberref|compoundref|compounddef)*>
<!ELEMENT defval (#PCDATA|memberref|compoundref)*>
<!ELEMENT initializer (#PCDATA|memberref|compoundref)*>
<!ELEMENT array (#PCDATA)>
<!ELEMENT attributes (#PCDATA)>
#ifndef _DOXMLINTF_H
#define _DOXMLINTF_H
#include <qstring.h>
class IMember;
class IDocIterator;
class ILinkedText
{
public:
enum Kind { Kind_Text, Kind_Ref };
virtual Kind kind() const = 0;
};
class ILT_Text : public ILinkedText
{
public:
virtual QString text() const = 0;
};
class ILT_Ref : public ILinkedText
{
public:
virtual QString id() const = 0;
virtual QString external() const = 0;
virtual QString text() const = 0;
};
class ILinkedTextIterator
{
public:
virtual ILinkedText *toFirst() = 0;
virtual ILinkedText *toLast() = 0;
virtual ILinkedText *toNext() = 0;
virtual ILinkedText *toPrev() = 0;
virtual ILinkedText *current() const = 0;
virtual void release() = 0;
};
class IParam
{
public:
virtual ILinkedTextIterator *type() const = 0;
virtual QString declarationName() const = 0;
virtual QString definitionName() const = 0;
virtual QString attrib() const = 0;
virtual QString arraySpecifier() const = 0;
virtual ILinkedTextIterator *defaultValue() const = 0;
};
class IParamIterator
{
public:
virtual IParam *toFirst() = 0;
virtual IParam *toLast() = 0;
virtual IParam *toNext() = 0;
virtual IParam *toPrev() = 0;
virtual IParam *current() const = 0;
virtual void release() = 0;
};
class IMemberReference
{
public:
virtual IMember *member() const = 0;
virtual QString memberName() const = 0;
};
class IMemberReferenceIterator
{
public:
virtual IMemberReference *toFirst() = 0;
virtual IMemberReference *toLast() = 0;
virtual IMemberReference *toNext() = 0;
virtual IMemberReference *toPrev() = 0;
virtual IMemberReference *current() const = 0;
virtual void release() = 0;
};
class IEnumValue
{
public:
virtual QString name() const = 0;
virtual QString initializer() const = 0;
};
class IEnumValueIterator
{
public:
virtual IEnumValue *toFirst() = 0;
virtual IEnumValue *toLast() = 0;
virtual IEnumValue *toNext() = 0;
virtual IEnumValue *toPrev() = 0;
virtual IEnumValue *current() const = 0;
virtual void release() = 0;
};
class IDoc
{
public:
enum Kind
{
Para, // 0 -> IDocPara
Text, // 1 -> IDocText
MarkupModifier, // 2 -> IDocMarkupModifier
ItemizedList, // 3 -> IDocList
OrderedList, // 4 -> IDocList
ListItem, // 5 -> IDocListItem
ParameterList, // 6 -> IDocParameterList
Parameter, // 7 -> IDocParameter
SimpleSect, // 8 -> IDocSimpleSect
Title, // 9 -> IDocTitle
Ref, // 10 -> IDocRef
VariableList, // 11 -> IDocVariableList
VariableListEntry, // 12 -> IDocVariableListEntry
HRuler, // 13 -> IDocHRuler
LineBreak, // 14 -> IDocLineBreak
ULink, // 15 -> IDocULink
EMail, // 16 -> IDocEMail
Link, // 17 -> IDocLink
ProgramListing, // 18 -> IDocProgramListing
CodeLine, // 19 -> IDocCodeLine
Highlight, // 20 -> IDocHighlight
Anchor, // 21 -> IDocAnchor
Formula, // 22 -> IDocFormula
Image, // 23 -> IDocImage
DotFile, // 24 -> IDocDotFile
IndexEntry, // 25 -> IDocIndexEntry
Table, // 26 -> IDocTable
Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection
Root // 30 -> IDocRoot
};
virtual Kind kind() const = 0;
};
class IDocMarkup : public IDoc
{
public:
enum Markup
{
Normal = 0x00,
Bold = 0x01,
Emphasis = 0x02,
ComputerOutput = 0x04,
Subscript = 0x08,
Superscript = 0x10,
SmallFont = 0x20,
Center = 0x40
};
};
class IDocPara : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
};
class IDocText : public IDocMarkup
{
public:
virtual QString text() const = 0;
virtual int markup() const = 0;
};
class IDocMarkupModifier : public IDoc
{
};
class IDocList : public IDoc
{
};
class IDocListItem : public IDoc
{
};
class IDocParameterList : public IDoc
{
};
class IDocParameter : public IDoc
{
};
class IDocSimpleSect : public IDoc
{
};
class IDocTitle : public IDoc
{
public:
virtual IDocIterator *title() const = 0;
};
class IDocRef : public IDoc
{
};
class IDocVariableList : public IDoc
{
};
class IDocVariableListEntry : public IDoc
{
};
class IDocHRuler : public IDoc
{
};
class IDocLineBreak : public IDoc
{
};
class IDocULink : public IDoc
{
};
class IDocEMail : public IDoc
{
};
class IDocLink : public IDoc
{
};
class IDocProgramListing : public IDoc
{
};
class IDocCodeLine : public IDoc
{
};
class IDocHighlight : public IDoc
{
};
class IDocAnchor : public IDoc
{
};
class IDocFormula : public IDoc
{
};
class IDocImage : public IDoc
{
};
class IDocDotFile : public IDoc
{
};
class IDocIndexEntry : public IDoc
{
};
class IDocTable : public IDoc
{
};
class IDocRow : public IDoc
{
};
class IDocEntry : public IDoc
{
};
class IDocSection : public IDoc
{
public:
virtual QString id() const = 0;
virtual int level() const = 0;
virtual IDocIterator *title() const = 0;
};
class IDocRoot : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
};
class IDocIterator
{
public:
virtual IDoc *toFirst() = 0;
virtual IDoc *toLast() = 0;
virtual IDoc *toNext() = 0;
virtual IDoc *toPrev() = 0;
virtual IDoc *current() const = 0;
virtual void release() = 0;
};
class IMember
{
public:
virtual QString kind() const = 0;
virtual QString id() const = 0;
virtual QString protection() const = 0;
virtual QString virtualness() const = 0;
virtual ILinkedTextIterator *type() const = 0;
virtual QString name() const = 0;
virtual bool isConst() const = 0;
virtual bool isVolatile() const = 0;
virtual IParamIterator *params() const = 0;
virtual ILinkedTextIterator *initializer() const = 0;
virtual ILinkedTextIterator *exceptions() const = 0;
virtual IMemberReferenceIterator *references() const = 0;
virtual IMemberReferenceIterator *referencedBy() const = 0;
virtual int bodyStart() const = 0;
virtual int bodyEnd() const = 0;
virtual QString definitionFile() const = 0;
virtual int definitionLine() const = 0;
virtual IMemberReference *reimplements() const = 0;
virtual IMemberReferenceIterator *reimplementedBy() const = 0;
virtual IEnumValueIterator *enumValues() const = 0;
virtual IDocRoot *briefDescription() const = 0;
virtual IDocRoot *detailedDescription() const = 0;
};
class IMemberIterator
{
public:
virtual IMember *toFirst() = 0;
virtual IMember *toLast() = 0;
virtual IMember *toNext() = 0;
virtual IMember *toPrev() = 0;
virtual IMember *current() const = 0;
virtual void release() = 0;
};
class ISection
{
public:
virtual QString kind() const = 0;
virtual IMemberIterator *members() const = 0;
};
class ISectionIterator
{
public:
virtual ISection *toFirst() = 0;
virtual ISection *toLast() = 0;
virtual ISection *toNext() = 0;
virtual ISection *toPrev() = 0;
virtual ISection *current() const = 0;
virtual void release() = 0;
};
class ICompound
{
public:
virtual QString name() const = 0;
virtual QString id() const = 0;
virtual QString kind() const = 0;
virtual ISectionIterator *sections() const = 0;
virtual IDocRoot *briefDescription() const = 0;
virtual IDocRoot *detailedDescription() const = 0;
};
class ICompoundIterator
{
public:
virtual ICompound *toFirst() = 0;
virtual ICompound *toLast() = 0;
virtual ICompound *toNext() = 0;
virtual ICompound *toPrev() = 0;
virtual ICompound *current() const = 0;
virtual void release() = 0;
};
/*! Root node of the object model. */
class IDoxygen
{
public:
/*! Returns an iterator that can be used to iterate over the list
* of compounds found in the project.
*/
virtual ICompoundIterator *compounds() const = 0;
/*! Returns a compound given its unique \a id. If you have a
* compound id this function is much more efficient than iterating
* over the compound list. Returns 0 if the id is not valid.
*/
virtual ICompound *compoundById(const QString &id) const = 0;
/*! Returns a compound given its name (including the scope).
* Returns 0 if the name is not found in the project.
*/
virtual ICompound *compoundByName(const QString &name) const = 0;
/*! Returns an interface to a member given its id.
* @param id The member id.
*/
virtual IMember *memberById(const QString &id) const = 0;
/*! Returns a list of all members with a certain name.
* @param name The name of the member.
*/
virtual IMemberIterator *memberByName(const QString &name) const = 0;
/*! Releases the memory for the object hierarchy obtained by
* createdObjecModelFromXML(). First release all iterators before calling
* this function.
*/
virtual void release() = 0;
};
/*! Factory method that creates an object model given an XML file generated
* by doxygen.
* @param xmlFileName The name of the XML to parse.
* @returns An iterface to the object model.
*/
IDoxygen *createObjectModelFromXML(const char *xmlFileName);
#endif
all clean depend: Makefile.doxmlparser
$(MAKE) -f Makefile.doxmlparser $@
distclean: clean
$(RM) -rf Makefile.doxmlparser doxmlparser.pro Makefile obj
tmake:
$(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser
Makefile.doxmlparser: doxmlparser.pro
$(ENV) $(PERL) $(TMAKE) doxmlparser.pro >Makefile.doxmlparser
install:
......@@ -202,6 +202,9 @@ template<class T> class BaseHandler : public IBaseHandler,
return TRUE;
}
/*! called when a number of characters are received by the parser.
* \param ch the characters.
*/
virtual bool characters ( const QString & ch )
{
if (m_delegateHandler)
......
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef BASEITERATOR_H
#define BASEITERATOR_H
#include <qlist.h>
#include <doxmlintf.h>
template<class Intf,class ElemIntf,class ElemImpl> class BaseIterator :
public Intf, public QListIterator<ElemImpl>
{
public:
BaseIterator(const QList<ElemImpl> &list) : QListIterator<ElemImpl>(list) {}
virtual ~BaseIterator() {}
virtual ElemIntf *toFirst() { return QListIterator<ElemImpl>::toFirst(); }
virtual ElemIntf *toLast() { return QListIterator<ElemImpl>::toLast(); }
virtual ElemIntf *toNext() { return QListIterator<ElemImpl>::operator++(); }
virtual ElemIntf *toPrev() { return QListIterator<ElemImpl>::operator--(); }
virtual ElemIntf *current() const { return QListIterator<ElemImpl>::current(); }
virtual void release() { delete this; }
};
#endif
......@@ -18,15 +18,23 @@
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include <doxmlintf.h>
#include "basehandler.h"
#include "baseiterator.h"
#include "sectionhandler.h"
#include "doxmlintf.h"
class MainHandler;
class DocHandler;
class ProgramListingHandler;
class CompoundIterator : public BaseIterator<ICompoundIterator,ICompound,ICompound>
{
public:
CompoundIterator(const QList<ICompound> &list) :
BaseIterator<ICompoundIterator,ICompound,ICompound>(list) {}
};
class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
{
public:
......@@ -43,13 +51,19 @@ class CompoundHandler : public ICompound, public BaseHandler<CompoundHandler>
CompoundHandler(IBaseHandler *parent);
virtual ~CompoundHandler();
void initialize(MainHandler *m);
// ICompound
// ICompound implementation
QString name() const { return m_name; }
QString id() const { return m_id; }
QString kind() const { return m_kind; }
QListIterator<ISection> getSectionIterator() const { return m_sections; }
void initialize(MainHandler *m);
ISectionIterator *sections() const
{ return new SectionIterator(m_sections); }
virtual IDocRoot *briefDescription() const
{ return m_brief; }
virtual IDocRoot *detailedDescription() const
{ return m_detailed; }
private:
struct SuperClass
......
......@@ -58,8 +58,8 @@ static TypeNameMapper g_typeMapper;
// MarkupHandler
//----------------------------------------------------------------------
MarkupHandler::MarkupHandler(QList<DocNode> &children,QString &curString)
: m_children(children), m_curString(curString), m_curMarkup(DocNode::Normal)
MarkupHandler::MarkupHandler(QList<IDoc> &children,QString &curString)
: m_children(children), m_curString(curString), m_curMarkup(IDocMarkup::Normal)
{
addStartHandler("bold",this,&MarkupHandler::startBold);
addEndHandler("bold",this,&MarkupHandler::endBold);
......@@ -100,99 +100,99 @@ void MarkupHandler::addTextNode()
void MarkupHandler::startBold(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Bold,TRUE));
m_curMarkup |= DocNode::Bold;
m_children.append(new MarkupModifierNode(IDocMarkup::Bold,TRUE));
m_curMarkup |= IDocMarkup::Bold;
}
void MarkupHandler::endBold()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Bold,FALSE));
m_curMarkup &= ~DocNode::Bold;
m_children.append(new MarkupModifierNode(IDocMarkup::Bold,FALSE));
m_curMarkup &= ~IDocMarkup::Bold;
}
void MarkupHandler::startEmphasis(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Emphasis,TRUE));
m_curMarkup |= DocNode::Emphasis;
m_children.append(new MarkupModifierNode(IDocMarkup::Emphasis,TRUE));
m_curMarkup |= IDocMarkup::Emphasis;
}
void MarkupHandler::endEmphasis()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Emphasis,FALSE));
m_curMarkup &= ~DocNode::Emphasis;
m_children.append(new MarkupModifierNode(IDocMarkup::Emphasis,FALSE));
m_curMarkup &= ~IDocMarkup::Emphasis;
}
void MarkupHandler::startComputerOutput(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::ComputerOutput,TRUE));
m_curMarkup |= DocNode::ComputerOutput;
m_children.append(new MarkupModifierNode(IDocMarkup::ComputerOutput,TRUE));
m_curMarkup |= IDocMarkup::ComputerOutput;
}
void MarkupHandler::endComputerOutput()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::ComputerOutput,FALSE));
m_curMarkup &= ~DocNode::ComputerOutput;
m_children.append(new MarkupModifierNode(IDocMarkup::ComputerOutput,FALSE));
m_curMarkup &= ~IDocMarkup::ComputerOutput;
}
void MarkupHandler::startCenter(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Center,TRUE));
m_curMarkup |= DocNode::Center;
m_children.append(new MarkupModifierNode(IDocMarkup::Center,TRUE));
m_curMarkup |= IDocMarkup::Center;
}
void MarkupHandler::endCenter()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Center,FALSE));
m_curMarkup &= ~DocNode::Center;
m_children.append(new MarkupModifierNode(IDocMarkup::Center,FALSE));
m_curMarkup &= ~IDocMarkup::Center;
}
void MarkupHandler::startSmallFont(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::SmallFont,TRUE));
m_curMarkup |= DocNode::SmallFont;
m_children.append(new MarkupModifierNode(IDocMarkup::SmallFont,TRUE));
m_curMarkup |= IDocMarkup::SmallFont;
}
void MarkupHandler::endSmallFont()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::SmallFont,FALSE));
m_curMarkup &= ~DocNode::SmallFont;
m_children.append(new MarkupModifierNode(IDocMarkup::SmallFont,FALSE));
m_curMarkup &= ~IDocMarkup::SmallFont;
}
void MarkupHandler::startSubscript(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Subscript,TRUE));
m_curMarkup |= DocNode::Subscript;
m_children.append(new MarkupModifierNode(IDocMarkup::Subscript,TRUE));
m_curMarkup |= IDocMarkup::Subscript;
}
void MarkupHandler::endSubscript()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Subscript,FALSE));
m_curMarkup &= ~DocNode::Subscript;
m_children.append(new MarkupModifierNode(IDocMarkup::Subscript,FALSE));
m_curMarkup &= ~IDocMarkup::Subscript;
}
void MarkupHandler::startSuperscript(const QXmlAttributes & /*attrib*/)
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Superscript,TRUE));
m_curMarkup |= DocNode::Superscript;
m_children.append(new MarkupModifierNode(IDocMarkup::Superscript,TRUE));
m_curMarkup |= IDocMarkup::Superscript;
}
void MarkupHandler::endSuperscript()
{
addTextNode();
m_children.append(new MarkupModifierNode(DocNode::Superscript,FALSE));
m_curMarkup &= ~DocNode::Superscript;
m_children.append(new MarkupModifierNode(IDocMarkup::Superscript,FALSE));
m_curMarkup &= ~IDocMarkup::Superscript;
}
//----------------------------------------------------------------------
......@@ -200,7 +200,7 @@ void MarkupHandler::endSuperscript()
//----------------------------------------------------------------------
ListItemHandler::ListItemHandler(IBaseHandler *parent)
: DocNode(ListItem), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
......@@ -236,8 +236,8 @@ void ListItemHandler::startParagraph(const QXmlAttributes& attrib)
// ListHandler
//----------------------------------------------------------------------
ListHandler::ListHandler(NodeKind k,IBaseHandler *parent)
: DocNode(k), m_parent(parent)
ListHandler::ListHandler(Kind k,IBaseHandler *parent)
: m_parent(parent), m_kind(k)
{
m_children.setAutoDelete(TRUE);
const char *endListName=0;
......@@ -277,7 +277,7 @@ void ListHandler::startListItem(const QXmlAttributes& attrib)
// ParameterHandler
//----------------------------------------------------------------------
ParameterHandler::ParameterHandler(IBaseHandler *parent) : DocNode(Parameter),
ParameterHandler::ParameterHandler(IBaseHandler *parent) :
m_parent(parent), m_description(0)
{
addEndHandler("parametername",this,&ParameterHandler::endParameterName);
......@@ -325,7 +325,7 @@ void ParameterHandler::startParagraph(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
ParameterListHandler::ParameterListHandler(IBaseHandler *parent)
: DocNode(ParameterList), m_parent(parent)
: m_parent(parent)
{
addEndHandler("parameterlist",this,&ParameterListHandler::endParameterList);
addStartHandler("parametername",this,&ParameterListHandler::startParameterName);
......@@ -377,7 +377,7 @@ void ParameterListHandler::startParameterDescription(const QXmlAttributes& attri
//----------------------------------------------------------------------
LinkHandler::LinkHandler(IBaseHandler *parent)
: DocNode(Link), m_parent(parent)
: m_parent(parent)
{
addEndHandler("link",this,&LinkHandler::endLink);
}
......@@ -407,7 +407,7 @@ void LinkHandler::endLink()
//----------------------------------------------------------------------
EMailHandler::EMailHandler(IBaseHandler *parent)
: DocNode(EMail), m_parent(parent)
: m_parent(parent)
{
addEndHandler("email",this,&EMailHandler::endEMail);
}
......@@ -436,7 +436,7 @@ void EMailHandler::endEMail()
//----------------------------------------------------------------------
ULinkHandler::ULinkHandler(IBaseHandler *parent)
: DocNode(ULink), m_parent(parent)
: m_parent(parent)
{
addEndHandler("ulink",this,&ULinkHandler::endULink);
}
......@@ -466,7 +466,7 @@ void ULinkHandler::endULink()
//----------------------------------------------------------------------
LineBreakHandler::LineBreakHandler(IBaseHandler *parent)
: DocNode(LineBreak), m_parent(parent)
: m_parent(parent)
{
addEndHandler("linebreak",this,&LineBreakHandler::endLineBreak);
}
......@@ -492,7 +492,7 @@ void LineBreakHandler::endLineBreak()
//----------------------------------------------------------------------
HRulerHandler::HRulerHandler(IBaseHandler *parent)
: DocNode(HRuler), m_parent(parent)
: m_parent(parent)
{
addEndHandler("hruler",this,&HRulerHandler::endHRuler);
}
......@@ -518,7 +518,7 @@ void HRulerHandler::endHRuler()
//----------------------------------------------------------------------
RefHandler::RefHandler(IBaseHandler *parent)
: DocNode(Ref), m_parent(parent)
: m_parent(parent)
{
addEndHandler("ref",this,&RefHandler::endRef);
}
......@@ -549,7 +549,7 @@ void RefHandler::endRef()
//----------------------------------------------------------------------
TitleHandler::TitleHandler(IBaseHandler *parent)
: DocNode(Title), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
m_markupHandler = new MarkupHandler(m_children,m_curString);
......@@ -595,12 +595,17 @@ void TitleHandler::startRef(const QXmlAttributes& attrib)
m_children.append(ref);
}
IDocIterator *TitleHandler::title() const
{
return new TitleIterator(*this);
}
//----------------------------------------------------------------------
// SimpleSectHandler
//----------------------------------------------------------------------
SimpleSectHandler::SimpleSectHandler(IBaseHandler *parent)
: DocNode(Para), m_parent(parent), m_paragraph(0), m_title(0)
: m_parent(parent), m_paragraph(0), m_title(0)
{
addStartHandler("title",this,&SimpleSectHandler::startTitle);
addStartHandler("para",this,&SimpleSectHandler::startParagraph);
......@@ -643,7 +648,7 @@ void SimpleSectHandler::startParagraph(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
VariableListEntryHandler::VariableListEntryHandler(IBaseHandler *parent)
: DocNode(VariableListEntry), m_parent(parent), m_description(0)
: m_parent(parent), m_description(0)
{
addStartHandler("term",this,&VariableListEntryHandler::startTerm);
addEndHandler("term",this,&VariableListEntryHandler::endTerm);
......@@ -706,7 +711,7 @@ void VariableListEntryHandler::startParagraph(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
VariableListHandler::VariableListHandler(IBaseHandler *parent)
: DocNode(VariableList), m_parent(parent)
: m_parent(parent)
{
m_entries.setAutoDelete(TRUE);
addStartHandler("varlistentry",this,&VariableListHandler::startVarListEntry);
......@@ -749,7 +754,7 @@ void VariableListHandler::startListItem(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
HighlightHandler::HighlightHandler(IBaseHandler *parent)
: DocNode(Highlight), m_parent(parent)
: m_parent(parent)
{
addEndHandler("highlight",this,&HighlightHandler::endHighlight);
}
......@@ -777,7 +782,7 @@ void HighlightHandler::endHighlight()
//----------------------------------------------------------------------
CodeLineHandler::CodeLineHandler(IBaseHandler *parent)
: DocNode(CodeLine), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
addEndHandler("codeline",this,&CodeLineHandler::endCodeLine);
......@@ -837,7 +842,7 @@ void CodeLineHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
m_children.append(new TextNode(m_curString,DocNode::Normal));
m_children.append(new TextNode(m_curString,IDocMarkup::Normal));
printf("addTextNode() text=\"%s\"\n",
m_curString.data());
m_curString="";
......@@ -849,7 +854,7 @@ void CodeLineHandler::addTextNode()
//----------------------------------------------------------------------
ProgramListingHandler::ProgramListingHandler(IBaseHandler *parent)
: DocNode(ProgramListing), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
m_hasLineNumber=FALSE;
......@@ -905,7 +910,7 @@ void ProgramListingHandler::startCodeLine(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
FormulaHandler::FormulaHandler(IBaseHandler *parent)
: DocNode(Formula), m_parent(parent)
: m_parent(parent)
{
addEndHandler("formula",this,&FormulaHandler::endFormula);
}
......@@ -933,7 +938,7 @@ void FormulaHandler::endFormula()
//----------------------------------------------------------------------
ImageHandler::ImageHandler(IBaseHandler *parent)
: DocNode(Image), m_parent(parent)
: m_parent(parent)
{
addEndHandler("image",this,&ImageHandler::endImage);
}
......@@ -961,7 +966,7 @@ void ImageHandler::endImage()
//----------------------------------------------------------------------
DotFileHandler::DotFileHandler(IBaseHandler *parent)
: DocNode(DotFile), m_parent(parent)
: m_parent(parent)
{
addEndHandler("image",this,&DotFileHandler::endDotFile);
}
......@@ -989,7 +994,7 @@ void DotFileHandler::endDotFile()
//----------------------------------------------------------------------
IndexEntryHandler::IndexEntryHandler(IBaseHandler *parent)
: DocNode(IndexEntry), m_parent(parent)
: m_parent(parent)
{
addEndHandler("indexentry",this,&IndexEntryHandler::endIndexEntry);
addStartHandler("primaryie",this,&IndexEntryHandler::startPrimaryIE);
......@@ -1040,7 +1045,7 @@ void IndexEntryHandler::endSecondaryIE()
//----------------------------------------------------------------------
EntryHandler::EntryHandler(IBaseHandler *parent)
: DocNode(Entry), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
addEndHandler("entry",this,&EntryHandler::endEntry);
......@@ -1073,7 +1078,7 @@ void EntryHandler::startParagraph(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
RowHandler::RowHandler(IBaseHandler *parent)
: DocNode(Row), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
addEndHandler("row",this,&RowHandler::endRow);
......@@ -1106,7 +1111,7 @@ void RowHandler::startEntry(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
TableHandler::TableHandler(IBaseHandler *parent)
: DocNode(Table), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
addEndHandler("table",this,&TableHandler::endTable);
......@@ -1141,7 +1146,7 @@ void TableHandler::startRow(const QXmlAttributes& attrib)
//----------------------------------------------------------------------
ParagraphHandler::ParagraphHandler(IBaseHandler *parent)
: DocNode(Para), m_parent(parent)
: m_parent(parent)
{
m_children.setAutoDelete(TRUE);
......@@ -1334,6 +1339,70 @@ void ParagraphHandler::addTextNode()
}
}
IDocIterator *ParagraphHandler::contents() const
{
return new ParagraphIterator(*this);
}
//----------------------------------------------------------------------
// DocSectionHandler
//----------------------------------------------------------------------
DocSectionHandler::DocSectionHandler(IBaseHandler *parent,int level)
: m_parent(parent), m_level(level)
{
m_children.setAutoDelete(TRUE);
m_markupHandler = new MarkupHandler(m_children,m_curString);
setFallBackHandler(m_markupHandler);
addStartHandler("ref",this,&DocSectionHandler::startRef);
QString sectionKey;
sectionKey.sprintf("sect%d",level);
addEndHandler(sectionKey,this,&DocSectionHandler::endDocSection);
}
DocSectionHandler::~DocSectionHandler()
{
delete m_markupHandler;
}
void DocSectionHandler::startDocSection(const QXmlAttributes& attrib)
{
m_parent->setDelegate(this);
printf("Start docsection\n");
m_id = attrib.value("id");
m_curString="";
}
void DocSectionHandler::endDocSection()
{
addTextNode();
m_parent->setDelegate(0);
printf("End docsection\n");
}
void DocSectionHandler::addTextNode()
{
if (!m_curString.isEmpty())
{
m_children.append(new TextNode(m_curString,m_markupHandler->markup()));
printf("addTextNode() text=\"%s\" markup=%x\n",
m_curString.data(),m_markupHandler->markup());
m_curString="";
}
}
void DocSectionHandler::startRef(const QXmlAttributes& attrib)
{
RefHandler *ref = new RefHandler(this);
ref->startRef(attrib);
m_children.append(ref);
}
IDocIterator *DocSectionHandler::title() const
{
return new DocSectionIterator(*this);
}
//----------------------------------------------------------------------
// DocHandler
//----------------------------------------------------------------------
......@@ -1346,6 +1415,10 @@ DocHandler::DocHandler(IBaseHandler *parent) : m_parent(parent)
addEndHandler("detaileddescription",this,&DocHandler::endDoc);
addStartHandler("para",this,&DocHandler::startParagraph);
addStartHandler("sect1",this,&DocHandler::startSect1);
addStartHandler("sect2",this,&DocHandler::startSect2);
addStartHandler("sect3",this,&DocHandler::startSect3);
addStartHandler("title",this,&DocHandler::startTitle);
}
DocHandler::~DocHandler()
......@@ -1371,3 +1444,36 @@ void DocHandler::startParagraph(const QXmlAttributes& attrib)
m_children.append(parHandler);
}
void DocHandler::startSect1(const QXmlAttributes& attrib)
{
DocSectionHandler *secHandler = new DocSectionHandler(this,1);
secHandler->startDocSection(attrib);
m_children.append(secHandler);
}
void DocHandler::startSect2(const QXmlAttributes& attrib)
{
DocSectionHandler *secHandler = new DocSectionHandler(this,2);
secHandler->startDocSection(attrib);
m_children.append(secHandler);
}
void DocHandler::startSect3(const QXmlAttributes& attrib)
{
DocSectionHandler *secHandler = new DocSectionHandler(this,3);
secHandler->startDocSection(attrib);
m_children.append(secHandler);
}
void DocHandler::startTitle(const QXmlAttributes& attrib)
{
TitleHandler *titleHandler = new TitleHandler(this);
titleHandler->startTitle(attrib);
m_children.append(titleHandler);
}
IDocIterator *DocHandler::contents() const
{
return new DocIterator(*this);
}
......@@ -20,79 +20,29 @@
#include <qlist.h>
#include <qxml.h>
#include <doxmlintf.h>
#include "basehandler.h"
#include "baseiterator.h"
class ParagraphHandler;
//-----------------------------------------------------------------------------
/*! \brief Node of a structured documentation tree.
*
*/
class DocNode
{
public:
enum Markup
{
Normal = 0x00,
Bold = 0x01,
Emphasis = 0x02,
ComputerOutput = 0x04,
Subscript = 0x08,
Superscript = 0x10,
SmallFont = 0x20,
Center = 0x40
};
enum NodeKind
{
Para,
Text,
MarkupModifier,
ItemizedList,
OrderedList,
ListItem,
ParameterList,
Parameter,
SimpleSect,
Title,
Ref,
VariableList,
VariableListEntry,
HRuler,
LineBreak,
ULink,
EMail,
Link,
ProgramListing,
CodeLine,
Highlight,
Anchor,
Formula,
Image,
DotFile,
IndexEntry,
Table,
Row,
Entry
};
DocNode(NodeKind k) : m_kind(k) {}
virtual ~DocNode() {}
private:
NodeKind m_kind;
};
//-----------------------------------------------------------------------------
/*! \brief Node representing a piece of text.
*
*/
class TextNode : public DocNode
class TextNode : public IDocText
{
public:
TextNode(const QString &t,int markup)
: DocNode(Text), m_text(t), m_markup(markup) {}
: m_text(t), m_markup(markup) {}
virtual ~TextNode() {}
// IDocText
virtual Kind kind() const { return Text; }
virtual QString text() const { return m_text; }
virtual int markup() const { return m_markup; }
private:
QString m_text;
......@@ -104,12 +54,16 @@ class TextNode : public DocNode
/*! \brief Node representing a change in the markup style.
*
*/
class MarkupModifierNode : public DocNode
class MarkupModifierNode : public IDocMarkupModifier
{
public:
MarkupModifierNode(int markup,bool enabled)
: DocNode(MarkupModifier), m_markup(markup), m_enabled(enabled) {}
: m_markup(markup), m_enabled(enabled) {}
virtual ~MarkupModifierNode() {}
// IDocMarkupModifier
virtual Kind kind() const { return MarkupModifier; }
private:
int m_markup;
bool m_enabled;
......@@ -124,7 +78,7 @@ class MarkupModifierNode : public DocNode
class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
{
public:
MarkupHandler(QList<DocNode> &children,QString &curString);
MarkupHandler(QList<IDoc> &children,QString &curString);
virtual ~MarkupHandler();
int markup() const { return m_curMarkup; }
......@@ -147,7 +101,7 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
private:
void addTextNode();
QList<DocNode> &m_children;
QList<IDoc> &m_children;
QString &m_curString;
int m_curMarkup;
};
......@@ -158,7 +112,7 @@ class MarkupHandler : public BaseFallBackHandler<MarkupHandler>
/*! \brief Node representing a list item.
*
*/
class ListItemHandler : public DocNode, public BaseHandler<ListItemHandler>
class ListItemHandler : public IDocListItem, public BaseHandler<ListItemHandler>
{
public:
ListItemHandler(IBaseHandler *parent);
......@@ -167,9 +121,12 @@ class ListItemHandler : public DocNode, public BaseHandler<ListItemHandler>
virtual void endListItem();
virtual void startParagraph(const QXmlAttributes& attrib);
// IDocItem
virtual Kind kind() const { return ListItem; }
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
QList<IDoc> m_children;
};
......@@ -178,18 +135,22 @@ class ListItemHandler : public DocNode, public BaseHandler<ListItemHandler>
/*! \brief Node representing list of items.
*
*/
class ListHandler : public DocNode, public BaseHandler<ListHandler>
class ListHandler : public IDocList, public BaseHandler<ListHandler>
{
public:
ListHandler(NodeKind k,IBaseHandler *parent);
ListHandler(Kind k,IBaseHandler *parent);
virtual ~ListHandler();
virtual void startList(const QXmlAttributes& attrib);
virtual void endList();
virtual void startListItem(const QXmlAttributes& attrib);
// IDocList
virtual Kind kind() const { return m_kind; }
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
QList<IDoc> m_children;
Kind m_kind;
};
......@@ -198,7 +159,7 @@ class ListHandler : public DocNode, public BaseHandler<ListHandler>
/*! \brief Node representing a parameter.
*
*/
class ParameterHandler : public DocNode,
class ParameterHandler : public IDocParameter,
public BaseHandler<ParameterHandler>
{
public:
......@@ -210,6 +171,9 @@ class ParameterHandler : public DocNode,
virtual void endParameterDescription();
virtual void startParagraph(const QXmlAttributes& attrib);
// IDocParameter
virtual Kind kind() const { return Parameter; }
private:
IBaseHandler *m_parent;
QString m_name;
......@@ -222,7 +186,7 @@ class ParameterHandler : public DocNode,
/* \brief Node representing a parameter list.
*
*/
class ParameterListHandler : public DocNode,
class ParameterListHandler : public IDocParameter,
public BaseHandler<ParameterListHandler>
{
public:
......@@ -234,6 +198,9 @@ class ParameterListHandler : public DocNode,
virtual void startParameterName(const QXmlAttributes& attrib);
virtual void startParameterDescription(const QXmlAttributes& attrib);
// IDocParameterList
virtual Kind kind() const { return ParameterList; }
private:
IBaseHandler *m_parent;
QList<ParameterHandler> m_parameters;
......@@ -246,7 +213,7 @@ class ParameterListHandler : public DocNode,
/* \brief Node representing a horizontal ruler
*
*/
class LineBreakHandler : public DocNode, public BaseHandler<LineBreakHandler>
class LineBreakHandler : public IDocLineBreak, public BaseHandler<LineBreakHandler>
{
public:
LineBreakHandler(IBaseHandler *parent);
......@@ -255,6 +222,9 @@ class LineBreakHandler : public DocNode, public BaseHandler<LineBreakHandler>
void startLineBreak(const QXmlAttributes& attrib);
void endLineBreak();
// IDocLineBreak
virtual Kind kind() const { return LineBreak; }
private:
IBaseHandler *m_parent;
};
......@@ -264,7 +234,7 @@ class LineBreakHandler : public DocNode, public BaseHandler<LineBreakHandler>
/* \brief Node representing a link to section
*
*/
class LinkHandler : public DocNode, public BaseHandler<LinkHandler>
class LinkHandler : public IDocLink, public BaseHandler<LinkHandler>
{
public:
LinkHandler(IBaseHandler *parent);
......@@ -273,6 +243,9 @@ class LinkHandler : public DocNode, public BaseHandler<LinkHandler>
void startLink(const QXmlAttributes& attrib);
void endLink();
// IDocLink
virtual Kind kind() const { return Link; }
private:
IBaseHandler *m_parent;
QString m_ref;
......@@ -285,7 +258,7 @@ class LinkHandler : public DocNode, public BaseHandler<LinkHandler>
/* \brief Node representing a link to an email address
*
*/
class EMailHandler : public DocNode, public BaseHandler<EMailHandler>
class EMailHandler : public IDocEMail, public BaseHandler<EMailHandler>
{
public:
EMailHandler(IBaseHandler *parent);
......@@ -294,6 +267,9 @@ class EMailHandler : public DocNode, public BaseHandler<EMailHandler>
void startEMail(const QXmlAttributes& attrib);
void endEMail();
// IDocEMail
virtual Kind kind() const { return EMail; }
private:
IBaseHandler *m_parent;
QString m_address;
......@@ -305,7 +281,7 @@ class EMailHandler : public DocNode, public BaseHandler<EMailHandler>
/* \brief Node representing a link to an URL
*
*/
class ULinkHandler : public DocNode, public BaseHandler<ULinkHandler>
class ULinkHandler : public IDocULink, public BaseHandler<ULinkHandler>
{
public:
ULinkHandler(IBaseHandler *parent);
......@@ -314,6 +290,9 @@ class ULinkHandler : public DocNode, public BaseHandler<ULinkHandler>
void startULink(const QXmlAttributes& attrib);
void endULink();
// IDocULink
virtual Kind kind() const { return ULink; }
private:
IBaseHandler *m_parent;
QString m_url;
......@@ -325,7 +304,7 @@ class ULinkHandler : public DocNode, public BaseHandler<ULinkHandler>
/* \brief Node representing a horizontal ruler
*
*/
class HRulerHandler : public DocNode, public BaseHandler<HRulerHandler>
class HRulerHandler : public IDocHRuler, public BaseHandler<HRulerHandler>
{
public:
HRulerHandler(IBaseHandler *parent);
......@@ -334,6 +313,9 @@ class HRulerHandler : public DocNode, public BaseHandler<HRulerHandler>
void startHRuler(const QXmlAttributes& attrib);
void endHRuler();
// IDocHRuler
virtual Kind kind() const { return HRuler; }
private:
IBaseHandler *m_parent;
};
......@@ -343,13 +325,17 @@ class HRulerHandler : public DocNode, public BaseHandler<HRulerHandler>
/* \brief Node representing a reference to another item
*
*/
class RefHandler : public DocNode, public BaseHandler<RefHandler>
class RefHandler : public IDocRef, public BaseHandler<RefHandler>
{
public:
RefHandler(IBaseHandler *parent);
virtual ~RefHandler();
void startRef(const QXmlAttributes& attrib);
void endRef();
// IDocRef
virtual Kind kind() const { return Ref; }
private:
IBaseHandler *m_parent;
QString m_refId;
......@@ -366,8 +352,9 @@ class RefHandler : public DocNode, public BaseHandler<RefHandler>
// children handled by MarkupHandler:
// bold, computeroutput, emphasis, center,
// small, subscript, superscript.
class TitleHandler : public DocNode, public BaseHandler<TitleHandler>
class TitleHandler : public IDocTitle, public BaseHandler<TitleHandler>
{
friend class TitleIterator;
public:
TitleHandler(IBaseHandler *parent);
virtual ~TitleHandler();
......@@ -375,19 +362,31 @@ class TitleHandler : public DocNode, public BaseHandler<TitleHandler>
virtual void endTitle();
virtual void startRef(const QXmlAttributes& attrib);
void addTextNode();
// IDocTitle
virtual Kind kind() const { return Title; }
virtual IDocIterator *title() const;
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
QList<IDoc> m_children;
MarkupHandler *m_markupHandler;
};
class TitleIterator : public BaseIterator<IDocIterator,IDoc,IDoc>
{
public:
TitleIterator(const TitleHandler &handler) :
BaseIterator<IDocIterator,IDoc,IDoc>(handler.m_children) {}
};
//-----------------------------------------------------------------------------
/* \brief Node representing a simple section with an unnumbered header.
*
*/
// children: title, para
class SimpleSectHandler : public DocNode,
class SimpleSectHandler : public IDocSimpleSect,
public BaseHandler<SimpleSectHandler>
{
public:
......@@ -406,6 +405,9 @@ class SimpleSectHandler : public DocNode,
virtual void startTitle(const QXmlAttributes& attrib);
virtual void startParagraph(const QXmlAttributes& attrib);
// IDocSimpleSect
virtual Kind kind() const { return SimpleSect; }
private:
IBaseHandler *m_parent;
ParagraphHandler *m_paragraph;
......@@ -418,7 +420,7 @@ class SimpleSectHandler : public DocNode,
/* \brief Node representing an named item of a VariableList.
*
*/
class VariableListEntryHandler : public DocNode, public BaseHandler<VariableListEntryHandler>
class VariableListEntryHandler : public IDocVariableListEntry, public BaseHandler<VariableListEntryHandler>
{
public:
virtual void startVarListEntry(const QXmlAttributes& attrib);
......@@ -432,6 +434,9 @@ class VariableListEntryHandler : public DocNode, public BaseHandler<VariableList
VariableListEntryHandler(IBaseHandler *parent);
virtual ~VariableListEntryHandler();
// IDocVariableListEntry
virtual Kind kind() const { return VariableListEntry; }
private:
IBaseHandler *m_parent;
QString m_term;
......@@ -444,7 +449,7 @@ class VariableListEntryHandler : public DocNode, public BaseHandler<VariableList
*
*/
// children: varlistentry, listitem
class VariableListHandler : public DocNode, public BaseHandler<VariableListHandler>
class VariableListHandler : public IDocVariableList, public BaseHandler<VariableListHandler>
{
public:
virtual void startVariableList(const QXmlAttributes& attrib);
......@@ -455,6 +460,9 @@ class VariableListHandler : public DocNode, public BaseHandler<VariableListHandl
VariableListHandler(IBaseHandler *parent);
virtual ~VariableListHandler();
// IDocVariableList
virtual Kind kind() const { return VariableList; }
private:
IBaseHandler *m_parent;
QList<VariableListEntryHandler> m_entries;
......@@ -467,7 +475,7 @@ class VariableListHandler : public DocNode, public BaseHandler<VariableListHandl
*
*/
// children: -
class HighlightHandler : public DocNode, public BaseHandler<HighlightHandler>
class HighlightHandler : public IDocHighlight, public BaseHandler<HighlightHandler>
{
public:
HighlightHandler(IBaseHandler *parent);
......@@ -475,6 +483,9 @@ class HighlightHandler : public DocNode, public BaseHandler<HighlightHandler>
void startHighlight(const QXmlAttributes& attrib);
void endHighlight();
// IDocHighlight
virtual Kind kind() const { return Highlight; }
private:
IBaseHandler *m_parent;
QString m_class;
......@@ -487,7 +498,7 @@ class HighlightHandler : public DocNode, public BaseHandler<HighlightHandler>
*
*/
// children: linenumber, highlight, anchor, ref
class CodeLineHandler : public DocNode, public BaseHandler<CodeLineHandler>
class CodeLineHandler : public IDocCodeLine, public BaseHandler<CodeLineHandler>
{
public:
......@@ -501,13 +512,16 @@ class CodeLineHandler : public DocNode, public BaseHandler<CodeLineHandler>
CodeLineHandler(IBaseHandler *parent);
virtual ~CodeLineHandler();
// IDocCodeLine
virtual Kind kind() const { return CodeLine; }
private:
void addTextNode();
IBaseHandler *m_parent;
int m_lineNumber;
QString m_refId;
QList<DocNode> m_children;
QList<IDoc> m_children;
};
//-----------------------------------------------------------------------------
......@@ -516,7 +530,7 @@ class CodeLineHandler : public DocNode, public BaseHandler<CodeLineHandler>
*
*/
// children: codeline, linenumber
class ProgramListingHandler : public DocNode, public BaseHandler<ProgramListingHandler>
class ProgramListingHandler : public IDocProgramListing, public BaseHandler<ProgramListingHandler>
{
public:
virtual void startProgramListing(const QXmlAttributes& attrib);
......@@ -526,6 +540,10 @@ class ProgramListingHandler : public DocNode, public BaseHandler<ProgramListingH
ProgramListingHandler(IBaseHandler *parent);
virtual ~ProgramListingHandler();
// IDocProgramListing
virtual Kind kind() const { return ProgramListing; }
private:
IBaseHandler *m_parent;
QList<CodeLineHandler> m_children;
......@@ -538,7 +556,7 @@ class ProgramListingHandler : public DocNode, public BaseHandler<ProgramListingH
*
*/
// children: -
class FormulaHandler : public DocNode, public BaseHandler<FormulaHandler>
class FormulaHandler : public IDocFormula, public BaseHandler<FormulaHandler>
{
public:
FormulaHandler(IBaseHandler *parent);
......@@ -546,6 +564,9 @@ class FormulaHandler : public DocNode, public BaseHandler<FormulaHandler>
void startFormula(const QXmlAttributes& attrib);
void endFormula();
// IDocFormula
virtual Kind kind() const { return Formula; }
private:
IBaseHandler *m_parent;
QString m_id;
......@@ -558,7 +579,7 @@ class FormulaHandler : public DocNode, public BaseHandler<FormulaHandler>
*
*/
// children: -
class ImageHandler : public DocNode, public BaseHandler<ImageHandler>
class ImageHandler : public IDocImage, public BaseHandler<ImageHandler>
{
public:
ImageHandler(IBaseHandler *parent);
......@@ -566,6 +587,9 @@ class ImageHandler : public DocNode, public BaseHandler<ImageHandler>
void startImage(const QXmlAttributes& attrib);
void endImage();
// IDocImage
virtual Kind kind() const { return Image; }
private:
IBaseHandler *m_parent;
QString m_name;
......@@ -578,7 +602,7 @@ class ImageHandler : public DocNode, public BaseHandler<ImageHandler>
*
*/
// children: -
class DotFileHandler : public DocNode, public BaseHandler<DotFileHandler>
class DotFileHandler : public IDocDotFile, public BaseHandler<DotFileHandler>
{
public:
DotFileHandler(IBaseHandler *parent);
......@@ -586,6 +610,9 @@ class DotFileHandler : public DocNode, public BaseHandler<DotFileHandler>
void startDotFile(const QXmlAttributes& attrib);
void endDotFile();
// IDocDotFile
virtual Kind kind() const { return DotFile; }
private:
IBaseHandler *m_parent;
QString m_name;
......@@ -598,7 +625,7 @@ class DotFileHandler : public DocNode, public BaseHandler<DotFileHandler>
*
*/
// children: -
class IndexEntryHandler : public DocNode, public BaseHandler<IndexEntryHandler>
class IndexEntryHandler : public IDocIndexEntry, public BaseHandler<IndexEntryHandler>
{
public:
IndexEntryHandler(IBaseHandler *parent);
......@@ -610,6 +637,9 @@ class IndexEntryHandler : public DocNode, public BaseHandler<IndexEntryHandler>
void startSecondaryIE(const QXmlAttributes& attrib);
void endSecondaryIE();
// IDocIndexEntry
virtual Kind kind() const { return IndexEntry; }
private:
IBaseHandler *m_parent;
QString m_primary;
......@@ -622,7 +652,7 @@ class IndexEntryHandler : public DocNode, public BaseHandler<IndexEntryHandler>
*
*/
// children: para
class EntryHandler : public DocNode, public BaseHandler<EntryHandler>
class EntryHandler : public IDocEntry, public BaseHandler<EntryHandler>
{
public:
EntryHandler(IBaseHandler *parent);
......@@ -631,9 +661,12 @@ class EntryHandler : public DocNode, public BaseHandler<EntryHandler>
void endEntry();
void startParagraph(const QXmlAttributes& attrib);
// IDocEntry
virtual Kind kind() const { return Entry; }
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
QList<IDoc> m_children;
};
//-----------------------------------------------------------------------------
......@@ -642,7 +675,7 @@ class EntryHandler : public DocNode, public BaseHandler<EntryHandler>
*
*/
// children: entry
class RowHandler : public DocNode, public BaseHandler<RowHandler>
class RowHandler : public IDocRow, public BaseHandler<RowHandler>
{
public:
RowHandler(IBaseHandler *parent);
......@@ -651,6 +684,9 @@ class RowHandler : public DocNode, public BaseHandler<RowHandler>
void endRow();
void startEntry(const QXmlAttributes& attrib);
// IDocRow
virtual Kind kind() const { return Row; }
private:
IBaseHandler *m_parent;
QList<EntryHandler> m_children;
......@@ -662,7 +698,7 @@ class RowHandler : public DocNode, public BaseHandler<RowHandler>
*
*/
// children: row
class TableHandler : public DocNode, public BaseHandler<TableHandler>
class TableHandler : public IDocTable, public BaseHandler<TableHandler>
{
public:
TableHandler(IBaseHandler *parent);
......@@ -671,6 +707,9 @@ class TableHandler : public DocNode, public BaseHandler<TableHandler>
void endTable();
void startRow(const QXmlAttributes& attrib);
// IDocTable
virtual Kind kind() const { return Table; }
private:
IBaseHandler *m_parent;
QList<RowHandler> m_children;
......@@ -691,8 +730,11 @@ class TableHandler : public DocNode, public BaseHandler<TableHandler>
// bold, computeroutput, emphasis, center,
// small, subscript, superscript.
//
class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler>
class ParagraphHandler : public IDocPara,
public BaseHandler<ParagraphHandler>
{
friend class ParagraphIterator;
public:
virtual void startParagraph(const QXmlAttributes& attrib);
virtual void endParagraph();
......@@ -717,33 +759,101 @@ class ParagraphHandler : public DocNode, public BaseHandler<ParagraphHandler>
ParagraphHandler(IBaseHandler *parent);
virtual ~ParagraphHandler();
// IDocPara
virtual Kind kind() const { return Para; }
virtual IDocIterator *contents() const;
private:
void addTextNode();
IBaseHandler *m_parent;
QList<DocNode> m_children;
QList<IDoc> m_children;
MarkupHandler *m_markupHandler;
};
class ParagraphIterator : public BaseIterator<IDocIterator,IDoc,IDoc>
{
public:
ParagraphIterator(const ParagraphHandler &handler) :
BaseIterator<IDocIterator,IDoc,IDoc>(handler.m_children) {}
};
//-----------------------------------------------------------------------------
/*! \brief Node representing a section.
*
*/
// children: text, ref
// children handled by MarkupHandler:
// bold, computeroutput, emphasis, center,
// small, subscript, superscript.
class DocSectionHandler : public IDocSection, public BaseHandler<DocSectionHandler>
{
friend class DocSectionIterator;
public:
DocSectionHandler(IBaseHandler *parent,int level);
virtual ~DocSectionHandler();
virtual void startDocSection(const QXmlAttributes& attrib);
virtual void endDocSection();
virtual void startRef(const QXmlAttributes& attrib);
void addTextNode();
// IDocSection
virtual Kind kind() const { return Section; }
virtual QString id() const { return m_id; }
virtual int level() const { return m_level; }
virtual IDocIterator *title() const;
private:
IBaseHandler *m_parent;
QList<IDoc> m_children;
MarkupHandler *m_markupHandler;
QString m_id;
int m_level;
};
class DocSectionIterator : public BaseIterator<IDocIterator,IDoc,IDoc>
{
public:
DocSectionIterator(const DocSectionHandler &handler) :
BaseIterator<IDocIterator,IDoc,IDoc>(handler.m_children) {}
};
//-----------------------------------------------------------------------------
/*! \brief Node representing a documentation block.
*
*/
// children: para
// TODO: title, sect1, sect2, sect3
class DocHandler : public BaseHandler<DocHandler>
// children: para, title, sect1, sect2, sect3
class DocHandler : public IDocRoot, public BaseHandler<DocHandler>
{
friend class DocIterator;
public:
virtual void startDoc(const QXmlAttributes& attrib);
virtual void endDoc();
virtual void startParagraph(const QXmlAttributes& attrib);
virtual void startSect1(const QXmlAttributes& attrib);
virtual void startSect2(const QXmlAttributes& attrib);
virtual void startSect3(const QXmlAttributes& attrib);
virtual void startTitle(const QXmlAttributes& attrib);
DocHandler(IBaseHandler *parent);
virtual ~DocHandler();
// IDocRoot
virtual Kind kind() const { return Root; }
virtual IDocIterator *contents() const;
private:
IBaseHandler *m_parent;
QList<DocNode> m_children;
QList<IDoc> m_children;
};
class DocIterator : public BaseIterator<IDocIterator,IDoc,IDoc>
{
public:
DocIterator(const DocHandler &handler) :
BaseIterator<IDocIterator,IDoc,IDoc>(handler.m_children) {}
};
#endif
#ifndef _DOXMLINTF_H
#define _DOXMLINTF_H
#include <qstring.h>
class IMember;
class IDocIterator;
class ILinkedText
{
public:
enum Kind { Kind_Text, Kind_Ref };
virtual Kind kind() const = 0;
};
class ILT_Text : public ILinkedText
{
public:
virtual QString text() const = 0;
};
class ILT_Ref : public ILinkedText
{
public:
virtual QString id() const = 0;
virtual QString external() const = 0;
virtual QString text() const = 0;
};
class ILinkedTextIterator
{
public:
virtual ILinkedText *toFirst() = 0;
virtual ILinkedText *toLast() = 0;
virtual ILinkedText *toNext() = 0;
virtual ILinkedText *toPrev() = 0;
virtual ILinkedText *current() const = 0;
virtual void release() = 0;
};
class IParam
{
public:
virtual ILinkedTextIterator *type() const = 0;
virtual QString declarationName() const = 0;
virtual QString definitionName() const = 0;
virtual QString attrib() const = 0;
virtual QString arraySpecifier() const = 0;
virtual ILinkedTextIterator *defaultValue() const = 0;
};
class IParamIterator
{
public:
virtual IParam *toFirst() = 0;
virtual IParam *toLast() = 0;
virtual IParam *toNext() = 0;
virtual IParam *toPrev() = 0;
virtual IParam *current() const = 0;
virtual void release() = 0;
};
class IMemberReference
{
public:
virtual IMember *member() const = 0;
virtual QString memberName() const = 0;
};
class IMemberReferenceIterator
{
public:
virtual IMemberReference *toFirst() = 0;
virtual IMemberReference *toLast() = 0;
virtual IMemberReference *toNext() = 0;
virtual IMemberReference *toPrev() = 0;
virtual IMemberReference *current() const = 0;
virtual void release() = 0;
};
class IEnumValue
{
public:
virtual QString name() const = 0;
virtual QString initializer() const = 0;
};
class IEnumValueIterator
{
public:
virtual IEnumValue *toFirst() = 0;
virtual IEnumValue *toLast() = 0;
virtual IEnumValue *toNext() = 0;
virtual IEnumValue *toPrev() = 0;
virtual IEnumValue *current() const = 0;
virtual void release() = 0;
};
class IDoc
{
public:
enum Kind
{
Para, // 0 -> IDocPara
Text, // 1 -> IDocText
MarkupModifier, // 2 -> IDocMarkupModifier
ItemizedList, // 3 -> IDocList
OrderedList, // 4 -> IDocList
ListItem, // 5 -> IDocListItem
ParameterList, // 6 -> IDocParameterList
Parameter, // 7 -> IDocParameter
SimpleSect, // 8 -> IDocSimpleSect
Title, // 9 -> IDocTitle
Ref, // 10 -> IDocRef
VariableList, // 11 -> IDocVariableList
VariableListEntry, // 12 -> IDocVariableListEntry
HRuler, // 13 -> IDocHRuler
LineBreak, // 14 -> IDocLineBreak
ULink, // 15 -> IDocULink
EMail, // 16 -> IDocEMail
Link, // 17 -> IDocLink
ProgramListing, // 18 -> IDocProgramListing
CodeLine, // 19 -> IDocCodeLine
Highlight, // 20 -> IDocHighlight
Anchor, // 21 -> IDocAnchor
Formula, // 22 -> IDocFormula
Image, // 23 -> IDocImage
DotFile, // 24 -> IDocDotFile
IndexEntry, // 25 -> IDocIndexEntry
Table, // 26 -> IDocTable
Row, // 27 -> IDocRow
Entry, // 28 -> IDocEntry
Section, // 29 -> IDocSection
Root // 30 -> IDocRoot
};
virtual Kind kind() const = 0;
};
class IDocMarkup : public IDoc
{
public:
enum Markup
{
Normal = 0x00,
Bold = 0x01,
Emphasis = 0x02,
ComputerOutput = 0x04,
Subscript = 0x08,
Superscript = 0x10,
SmallFont = 0x20,
Center = 0x40
};
};
class IDocPara : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
};
class IDocText : public IDocMarkup
{
public:
virtual QString text() const = 0;
virtual int markup() const = 0;
};
class IDocMarkupModifier : public IDoc
{
};
class IDocList : public IDoc
{
};
class IDocListItem : public IDoc
{
};
class IDocParameterList : public IDoc
{
};
class IDocParameter : public IDoc
{
};
class IDocSimpleSect : public IDoc
{
};
class IDocTitle : public IDoc
{
public:
virtual IDocIterator *title() const = 0;
};
class IDocRef : public IDoc
{
};
class IDocVariableList : public IDoc
{
};
class IDocVariableListEntry : public IDoc
{
};
class IDocHRuler : public IDoc
{
};
class IDocLineBreak : public IDoc
{
};
class IDocULink : public IDoc
{
};
class IDocEMail : public IDoc
{
};
class IDocLink : public IDoc
{
};
class IDocProgramListing : public IDoc
{
};
class IDocCodeLine : public IDoc
{
};
class IDocHighlight : public IDoc
{
};
class IDocAnchor : public IDoc
{
};
class IDocFormula : public IDoc
{
};
class IDocImage : public IDoc
{
};
class IDocDotFile : public IDoc
{
};
class IDocIndexEntry : public IDoc
{
};
class IDocTable : public IDoc
{
};
class IDocRow : public IDoc
{
};
class IDocEntry : public IDoc
{
};
class IDocSection : public IDoc
{
public:
virtual QString id() const = 0;
virtual int level() const = 0;
virtual IDocIterator *title() const = 0;
};
class IDocRoot : public IDoc
{
public:
virtual IDocIterator *contents() const = 0;
};
class IDocIterator
{
public:
virtual IDoc *toFirst() = 0;
virtual IDoc *toLast() = 0;
virtual IDoc *toNext() = 0;
virtual IDoc *toPrev() = 0;
virtual IDoc *current() const = 0;
virtual void release() = 0;
};
class IMember
{
public:
virtual QString kind() const = 0;
virtual QString id() const = 0;
virtual QString protection() const = 0;
virtual QString virtualness() const = 0;
virtual ILinkedTextIterator *type() const = 0;
virtual QString name() const = 0;
virtual bool isConst() const = 0;
virtual bool isVolatile() const = 0;
virtual IParamIterator *params() const = 0;
virtual ILinkedTextIterator *initializer() const = 0;
virtual ILinkedTextIterator *exceptions() const = 0;
virtual IMemberReferenceIterator *references() const = 0;
virtual IMemberReferenceIterator *referencedBy() const = 0;
virtual int bodyStart() const = 0;
virtual int bodyEnd() const = 0;
virtual QString definitionFile() const = 0;
virtual int definitionLine() const = 0;
virtual IMemberReference *reimplements() const = 0;
virtual IMemberReferenceIterator *reimplementedBy() const = 0;
virtual IEnumValueIterator *enumValues() const = 0;
virtual IDocRoot *briefDescription() const = 0;
virtual IDocRoot *detailedDescription() const = 0;
};
class IMemberIterator
{
public:
virtual IMember *toFirst() = 0;
virtual IMember *toLast() = 0;
virtual IMember *toNext() = 0;
virtual IMember *toPrev() = 0;
virtual IMember *current() const = 0;
virtual void release() = 0;
};
class ISection
{
public:
virtual QString kind() const = 0;
virtual IMemberIterator *members() const = 0;
};
class ISectionIterator
{
public:
virtual ISection *toFirst() = 0;
virtual ISection *toLast() = 0;
virtual ISection *toNext() = 0;
virtual ISection *toPrev() = 0;
virtual ISection *current() const = 0;
virtual void release() = 0;
};
class ICompound
{
public:
virtual QString name() const = 0;
virtual QString id() const = 0;
virtual QString kind() const = 0;
virtual ISectionIterator *sections() const = 0;
virtual IDocRoot *briefDescription() const = 0;
virtual IDocRoot *detailedDescription() const = 0;
};
class ICompoundIterator
{
public:
virtual ICompound *toFirst() = 0;
virtual ICompound *toLast() = 0;
virtual ICompound *toNext() = 0;
virtual ICompound *toPrev() = 0;
virtual ICompound *current() const = 0;
virtual void release() = 0;
};
/*! Root node of the object model. */
class IDoxygen
{
public:
/*! Returns an iterator that can be used to iterate over the list
* of compounds found in the project.
*/
virtual ICompoundIterator *compounds() const = 0;
/*! Returns a compound given its unique \a id. If you have a
* compound id this function is much more efficient than iterating
* over the compound list. Returns 0 if the id is not valid.
*/
virtual ICompound *compoundById(const QString &id) const = 0;
/*! Returns a compound given its name (including the scope).
* Returns 0 if the name is not found in the project.
*/
virtual ICompound *compoundByName(const QString &name) const = 0;
/*! Returns an interface to a member given its id.
* @param id The member id.
*/
virtual IMember *memberById(const QString &id) const = 0;
/*! Returns a list of all members with a certain name.
* @param name The name of the member.
*/
virtual IMemberIterator *memberByName(const QString &name) const = 0;
/*! Releases the memory for the object hierarchy obtained by
* createdObjecModelFromXML(). First release all iterators before calling
* this function.
*/
virtual void release() = 0;
};
/*! Factory method that creates an object model given an XML file generated
* by doxygen.
* @param xmlFileName The name of the XML to parse.
* @returns An iterface to the object model.
*/
IDoxygen *createObjectModelFromXML(const char *xmlFileName);
#endif
TEMPLATE = app.t
CONFIG = console warn_on $extraopt
TEMPLATE = lib.t
CONFIG = console staticlib warn_on $extraopts
HEADERS = basehandler.h mainhandler.h \
compoundhandler.h sectionhandler.h \
memberhandler.h paramhandler.h \
dochandler.h
SOURCES = main.cpp mainhandler.cpp \
dochandler.h linkedtexthandler.h
SOURCES = mainhandler.cpp \
compoundhandler.cpp sectionhandler.cpp \
memberhandler.cpp paramhandler.cpp \
dochandler.cpp
DEPENDPATH = ../../src
unix:LIBS += -L../../lib -ldoxycfg -lqtools
dochandler.cpp linkedtexthandler.cpp
unix:LIBS += -L../../../lib -lqtools
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../../lib -ldoxycfg -lqtools
win32-msvc:LIBS += qtools.lib doxycfg.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\lib
win32-mingw:LIBS += -L../../../lib -lqtools
win32-msvc:LIBS += qtools.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:....\\..\lib
win32-borland:LIBS += qtools.lib doxycfg.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\..\lib
win32-borland:TMAKE_LFLAGS += -L..\..\..\lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL
INCLUDEPATH += ../../qtools ../../src
DESTDIR =
TARGET = xmlparse
unix:TARGETDEPS = ../../lib/libdoxycfg.a
win32:TARGETDEPS = ../../lib/doxycfg.lib
OBJECTS_DIR = obj
DESTDIR = ../lib
OBJECTS_DIR = ../objects
TARGET = doxmlparser
INCLUDEPATH += ../../../qtools ../include
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 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.
*
*/
#include "linkedtexthandler.h"
#include <doxmlintf.h>
class LT_Text : public ILT_Text
{
public:
LT_Text(const QString &text) : m_text(text) {}
virtual ~LT_Text() {}
// ILT_Text
virtual QString text() const { return m_text; }
virtual Kind kind() const { return Kind_Text; }
private:
QString m_text;
};
class LT_Ref : public ILT_Ref
{
public:
LT_Ref() {}
virtual ~LT_Ref() {}
void setRefId(const QString &refId) { m_refId=refId; }
void setText(const QString &text) { m_text=text; }
void setExtId(const QString &extId) { m_extId=extId; }
// ILT_Ref
virtual QString text() const { return m_text; }
virtual QString id() const { return m_refId; }
virtual QString external() const { return m_extId; }
virtual Kind kind() const { return Kind_Ref; }
private:
QString m_refId;
QString m_extId;
QString m_text;
};
LinkedTextHandler::LinkedTextHandler(IBaseHandler *parent,
QList<ILinkedText> &children
)
: m_parent(parent), m_children(children)
{
addStartHandler("ref",this,&LinkedTextHandler::startRef);
addEndHandler("ref",this,&LinkedTextHandler::endRef);
m_children.setAutoDelete(TRUE);
m_ref=0;
}
LinkedTextHandler::~LinkedTextHandler()
{
}
void LinkedTextHandler::start(const char *endTag)
{
addEndHandler(endTag,this,&LinkedTextHandler::end);
m_parent->setDelegate(this);
m_curString="";
}
void LinkedTextHandler::end()
{
if (!m_curString.isEmpty())
{
m_children.append(new LT_Text(m_curString));
printf("LinkedTextHandler: add text `%s'\n",m_curString.data());
m_curString="";
}
m_parent->setDelegate(0);
}
void LinkedTextHandler::startRef(const QXmlAttributes& attrib)
{
if (!m_curString.isEmpty())
{
m_children.append(new LT_Text(m_curString));
printf("LinkedTextHandler: add text `%s'\n",m_curString.data());
m_curString="";
}
ASSERT(m_ref==0);
m_ref = new LT_Ref;
m_ref->setRefId(attrib.value("idref"));
m_ref->setExtId(attrib.value("external"));
}
void LinkedTextHandler::endRef()
{
m_ref->setText(m_curString);
m_children.append(m_ref);
printf("LinkedTextHandler: add ref `%s'\n",m_ref->text().data());
m_ref=0;
}
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef LINKEDTEXTHANDLER_H
#define LINKEDTEXTHANDLER_H
#include "baseiterator.h"
#include "basehandler.h"
class LT_Ref;
class LinkedTextIterator : public BaseIterator<ILinkedTextIterator,ILinkedText,ILinkedText>
{
public:
LinkedTextIterator(const QList<ILinkedText> &list) :
BaseIterator<ILinkedTextIterator,ILinkedText,ILinkedText>(list) {}
};
class LinkedTextHandler : public BaseHandler<LinkedTextHandler>
{
public:
LinkedTextHandler(IBaseHandler *parent,QList<ILinkedText> &children);
virtual ~LinkedTextHandler();
virtual void start(const char *endTag);
virtual void end();
virtual void startRef(const QXmlAttributes& attrib);
virtual void endRef();
private:
IBaseHandler *m_parent;
QList<ILinkedText> &m_children;
LT_Ref *m_ref;
};
#endif
......@@ -118,7 +118,9 @@ IDoxygen *createObjectModelFromXML(const char * xmlFileName)
reader.setContentHandler( handler );
reader.setErrorHandler( &errorHandler );
reader.parse( source );
printf("<---------- initialize ----------->\n");
handler->initialize();
printf("<-------- end initialize --------->\n");
return handler;
}
......@@ -19,7 +19,8 @@
#include <qlist.h>
#include "basehandler.h"
#include "compoundhandler.h"
#include "doxmlintf.h"
#include <doxmlintf.h>
#include "memberhandler.h"
class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
{
......@@ -28,26 +29,29 @@ class MainHandler : public IDoxygen, public BaseHandler<MainHandler>
MainHandler();
virtual ~MainHandler();
QListIterator<ICompound> getCompoundIterator() const
ICompoundIterator *compounds() const
{
return m_compounds;
return new CompoundIterator(m_compounds);
}
ICompound *getCompoundById(const QString &id) const
ICompound *compoundById(const QString &id) const
{
return m_compoundDict[id];
}
virtual ICompound *getCompoundByName(const QString &name) const
virtual ICompound *compoundByName(const QString &name) const
{
return name.isEmpty() ? 0 : m_compoundNameDict[name];
}
virtual IMember *getMemberById(const QString &id) const
virtual IMember *memberById(const QString &id) const
{
return m_memberDict[id];
}
virtual QList<IMember> *getMemberByName(const QString &name) const
virtual IMemberIterator *memberByName(const QString &name) const
{
return m_memberNameDict[name];
QList<IMember> *ml = m_memberNameDict[name];
if (ml==0) return 0;
return new MemberIterator(*ml);
}
virtual void release() { delete this; }
void insertMemberById(const QString &id,IMember *h);
void insertMemberByName(const QString &name,IMember *h);
......
......@@ -17,14 +17,74 @@
#include "sectionhandler.h"
#include "dochandler.h"
#include "mainhandler.h"
#include "linkedtexthandler.h"
//------------------------------------------------------------------------------
void MemberReference::initialize(MainHandler *mh)
{
m_mainHandler = mh;
}
IMember *MemberReference::member() const
{
return m_mainHandler->memberById(m_memId);
}
//------------------------------------------------------------------------------
EnumValueHandler::EnumValueHandler(IBaseHandler *parent) : m_parent(parent)
{
addEndHandler("enumvalue",this,&EnumValueHandler::endEnumValue);
addStartHandler("name",this,&EnumValueHandler::startName);
addEndHandler("name",this,&EnumValueHandler::endName);
addStartHandler("initializer",this,&EnumValueHandler::startInitializer);
addEndHandler("initializer",this,&EnumValueHandler::endInitializer);
}
void EnumValueHandler::startEnumValue(const QXmlAttributes& /*attrib*/)
{
m_parent->setDelegate(this);
}
void EnumValueHandler::endEnumValue()
{
m_parent->setDelegate(0);
}
void EnumValueHandler::startName(const QXmlAttributes& /*attrib*/)
{
m_curString="";
}
void EnumValueHandler::endName()
{
m_name = m_curString;
}
void EnumValueHandler::startInitializer(const QXmlAttributes& /*attrib*/)
{
m_curString="";
}
void EnumValueHandler::endInitializer()
{
m_initializer = m_curString;
}
//------------------------------------------------------------------------------
MemberHandler::MemberHandler(IBaseHandler *parent)
: m_parent(parent), m_brief(0), m_detailed(0)
{
addEndHandler("memberdef",this,&MemberHandler::endMember);
addStartHandler("type");
addEndHandler("type",this,&MemberHandler::endType);
addStartHandler("type",this,&MemberHandler::startType);
addStartHandler("initializer",this,&MemberHandler::startInitializer);
addStartHandler("exception",this,&MemberHandler::startException);
addStartHandler("enumvalue",this,&MemberHandler::startEnumValue);
addStartHandler("name");
addEndHandler("name",this,&MemberHandler::endName);
......@@ -35,25 +95,38 @@ MemberHandler::MemberHandler(IBaseHandler *parent)
addStartHandler("detaileddescription",this,&MemberHandler::startDetailedDesc);
addStartHandler("location",this,&MemberHandler::startLocation);
addEndHandler("location");
addStartHandler("references",this,&MemberHandler::startReferences);
addEndHandler("references",this,&MemberHandler::endReferences);
addStartHandler("referencedby",this,&MemberHandler::startReferencedBy);
addEndHandler("referencedby",this,&MemberHandler::endReferencedBy);
addStartHandler("reimplements",this,&MemberHandler::startReimplements);
addEndHandler("reimplements",this,&MemberHandler::endReimplements);
addStartHandler("reimplementedby",this,&MemberHandler::startReimplementedBy);
addEndHandler("reimplementedby",this,&MemberHandler::endReimplementedBy);
addStartHandler("location",this,&MemberHandler::startLocation);
addEndHandler("location");
m_params.setAutoDelete(TRUE);
m_references.setAutoDelete(TRUE);
m_referencedBy.setAutoDelete(TRUE);
m_reimplements = 0;
m_reimplementedBy.setAutoDelete(TRUE);
m_enumValues.setAutoDelete(TRUE);
m_linkedTextHandler = 0;
m_defLine=0;
m_bodyStart=0;
m_bodyEnd=0;
}
MemberHandler::~MemberHandler()
{
delete m_brief;
delete m_detailed;
delete m_linkedTextHandler;
}
void MemberHandler::startMember(const QXmlAttributes& attrib)
......@@ -61,8 +134,10 @@ void MemberHandler::startMember(const QXmlAttributes& attrib)
m_parent->setDelegate(this);
m_kind = attrib.value("kind");
m_id = attrib.value("id");
m_virtualness = attrib.value("virt");
m_protection = attrib.value("prot");
m_virtualness = attrib.value("virtualness");
m_isConst = attrib.value("const")=="yes";
m_isVolatile = attrib.value("volatile")=="yes";
printf("member kind=`%s' id=`%s' prot=`%s' virt=`%s'\n",
m_kind.data(),m_id.data(),m_protection.data(),m_virtualness.data());
}
......@@ -84,14 +159,19 @@ void MemberHandler::startDetailedDesc(const QXmlAttributes& attrib)
void MemberHandler::startLocation(const QXmlAttributes& attrib)
{
m_defFile = attrib.value("file");
m_defLine = attrib.value("line").toInt();
QCString s;
s = attrib.value("line");
if (!s.isEmpty()) m_defLine=s.toInt();
s = attrib.value("bodystart");
if (!s.isEmpty()) m_bodyStart=s.toInt();
s = attrib.value("bodyend");
if (!s.isEmpty()) m_bodyEnd=s.toInt();
}
void MemberHandler::startReferences(const QXmlAttributes& attrib)
{
MemberReference *mr = new MemberReference;
mr->m_memId = attrib.value("id");
mr->m_line = attrib.value("line").toInt();
m_references.append(mr);
m_curString="";
}
......@@ -105,7 +185,6 @@ void MemberHandler::startReferencedBy(const QXmlAttributes& attrib)
{
MemberReference *mr = new MemberReference;
mr->m_memId = attrib.value("id");
mr->m_line = attrib.value("line").toInt();
m_referencedBy.append(mr);
m_curString="";
}
......@@ -115,15 +194,58 @@ void MemberHandler::endReferencedBy()
m_referencedBy.getLast()->m_name = m_curString;
}
void MemberHandler::startReimplements(const QXmlAttributes& attrib)
{
m_reimplements = new MemberReference;
m_reimplements->m_memId = attrib.value("id");
m_curString="";
}
void MemberHandler::endReimplements()
{
m_reimplements->m_name = m_curString;
}
void MemberHandler::startReimplementedBy(const QXmlAttributes& attrib)
{
MemberReference *mr = new MemberReference;
mr->m_memId = attrib.value("id");
m_reimplementedBy.append(mr);
m_curString="";
}
void MemberHandler::endReimplementedBy()
{
m_reimplementedBy.getLast()->m_name = m_curString;
}
void MemberHandler::endMember()
{
m_parent->setDelegate(0);
}
void MemberHandler::endType()
void MemberHandler::startType(const QXmlAttributes &)
{
m_type = m_curString.stripWhiteSpace();
printf("member type=`%s'\n",m_type.data());
printf("startType!\n");
delete m_linkedTextHandler;
m_linkedTextHandler = new LinkedTextHandler(this,m_type);
m_linkedTextHandler->start("type");
}
void MemberHandler::startInitializer(const QXmlAttributes &)
{
printf("startInitializer!\n");
delete m_linkedTextHandler;
m_linkedTextHandler = new LinkedTextHandler(this,m_initializer);
m_linkedTextHandler->start("initializer");
}
void MemberHandler::startException(const QXmlAttributes &)
{
printf("startException!\n");
delete m_linkedTextHandler;
m_linkedTextHandler = new LinkedTextHandler(this,m_exception);
m_linkedTextHandler->start("exception");
}
void MemberHandler::endName()
......@@ -139,22 +261,39 @@ void MemberHandler::startParam(const QXmlAttributes& attrib)
m_params.append(paramHandler);
}
void MemberHandler::initialize(MainHandler *mh)
void MemberHandler::startEnumValue(const QXmlAttributes& attrib)
{
QListIterator<MemberReference> mli(m_references);
MemberReference *mr;
for (;(mr=mli.current());++mli)
{
mr->initialize(mh);
}
EnumValueHandler *evh = new EnumValueHandler(this);
evh->startEnumValue(attrib);
m_enumValues.append(evh);
}
void MemberHandler::MemberReference::initialize(MainHandler *mh)
void MemberHandler::initialize(MainHandler *mh)
{
m_mainHandler = mh;
{
QListIterator<MemberReference> mli(m_references);
MemberReference *mr;
for (;(mr=mli.current());++mli)
{
mr->initialize(mh);
}
}
{
QListIterator<MemberReference> mli(m_referencedBy);
MemberReference *mr;
for (;(mr=mli.current());++mli)
{
mr->initialize(mh);
}
}
{
QListIterator<MemberReference> mli(m_reimplementedBy);
MemberReference *mr;
for (;(mr=mli.current());++mli)
{
mr->initialize(mh);
}
}
if (m_reimplements) m_reimplements->initialize(mh);
}
IMember *MemberHandler::MemberReference::getMember() const
{
return m_mainHandler->getMemberById(m_memId);
}
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef _MEMBERHANDLER_H
#define _MEMBERHANDLER_H
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include <doxmlintf.h>
#include "basehandler.h"
#include "baseiterator.h"
#include "paramhandler.h"
#include "linkedtexthandler.h"
#include "dochandler.h"
class MainHandler;
struct MemberReference : public IMemberReference
{
virtual ~MemberReference() {}
virtual IMember *member() const;
virtual QString memberName() const { return m_name; }
void initialize(MainHandler *m);
QString m_memId;
QString m_name;
MainHandler *m_mainHandler;
};
class MemberReferenceIterator : public BaseIterator<IMemberReferenceIterator,IMemberReference,MemberReference>
{
public:
MemberReferenceIterator(const QList<MemberReference> &list) :
BaseIterator<IMemberReferenceIterator,IMemberReference,MemberReference>(list) {}
};
class MemberIterator : public BaseIterator<IMemberIterator,IMember,IMember>
{
public:
MemberIterator(const QList<IMember> &list) :
BaseIterator<IMemberIterator,IMember,IMember>(list) {}
};
class EnumValueHandler : public IEnumValue, public BaseHandler<EnumValueHandler>
{
public:
virtual void startName(const QXmlAttributes& attrib);
virtual void endName();
virtual void startInitializer(const QXmlAttributes& attrib);
virtual void endInitializer();
virtual void startEnumValue(const QXmlAttributes& attrib);
virtual void endEnumValue();
// IEnumValue
virtual QString name() const { return m_name; }
virtual QString initializer() const { return m_initializer; }
void setName(const QString &name) { m_name=name; }
void setInitializer(const QString &init) { m_initializer=init; }
virtual ~EnumValueHandler() {}
EnumValueHandler(IBaseHandler *parent);
private:
QString m_name;
QString m_initializer;
IBaseHandler *m_parent;
};
class EnumValueIterator : public BaseIterator<IEnumValueIterator,IEnumValue,EnumValueHandler>
{
public:
EnumValueIterator(const QList<EnumValueHandler> &list) :
BaseIterator<IEnumValueIterator,IEnumValue,EnumValueHandler>(list) {}
};
class MemberHandler : public IMember, public BaseHandler<MemberHandler>
{
public:
virtual void startMember(const QXmlAttributes& attrib);
virtual void endMember();
virtual void startParam(const QXmlAttributes& attrib);
virtual void startType(const QXmlAttributes& attrib);
virtual void endName();
virtual void startBriefDesc(const QXmlAttributes& attrib);
virtual void startDetailedDesc(const QXmlAttributes& attrib);
virtual void startLocation(const QXmlAttributes& attrib);
virtual void startReferences(const QXmlAttributes& attrib);
virtual void endReferences();
virtual void startReferencedBy(const QXmlAttributes& attrib);
virtual void endReferencedBy();
virtual void startReimplements(const QXmlAttributes& attrib);
virtual void endReimplements();
virtual void startReimplementedBy(const QXmlAttributes& attrib);
virtual void endReimplementedBy();
virtual void startInitializer(const QXmlAttributes& attrib);
virtual void startException(const QXmlAttributes& attrib);
virtual void startEnumValue(const QXmlAttributes& attrib);
MemberHandler(IBaseHandler *parent);
virtual ~MemberHandler();
// IMember implementation
virtual QString kind() const
{ return m_kind; }
virtual QString id() const
{ return m_id; }
virtual QString protection() const
{ return m_protection; }
virtual QString virtualness() const
{ return m_virtualness; }
virtual QString name() const
{ return m_name; }
virtual bool isConst() const
{ return m_isConst; }
virtual bool isVolatile() const
{ return m_isVolatile; }
virtual ILinkedTextIterator *type() const
{ return new LinkedTextIterator(m_type); }
virtual IParamIterator *params() const
{ return new ParamIterator(m_params); }
virtual IMemberReferenceIterator *references() const
{ return new MemberReferenceIterator(m_references); }
virtual IMemberReferenceIterator *referencedBy() const
{ return new MemberReferenceIterator(m_referencedBy); }
virtual ILinkedTextIterator *initializer() const
{ return new LinkedTextIterator(m_initializer); }
virtual ILinkedTextIterator *exceptions() const
{ return new LinkedTextIterator(m_exception); }
virtual int bodyStart() const
{ return m_bodyStart; }
virtual int bodyEnd() const
{ return m_bodyEnd; }
virtual QString definitionFile() const
{ return m_defFile; }
virtual int definitionLine() const
{ return m_defLine; }
virtual IMemberReference *reimplements() const
{ return m_reimplements; }
virtual IMemberReferenceIterator *reimplementedBy() const
{ return new MemberReferenceIterator(m_reimplementedBy); }
virtual IEnumValueIterator *enumValues() const
{ return new EnumValueIterator(m_enumValues); }
virtual IDocRoot *briefDescription() const
{ return m_brief; }
virtual IDocRoot *detailedDescription() const
{ return m_detailed; }
void initialize(MainHandler *m);
private:
IBaseHandler *m_parent;
QString m_kind;
QString m_id;
QString m_protection;
QString m_virtualness;
QList<ILinkedText> m_type;
QList<ILinkedText> m_initializer;
QList<ILinkedText> m_exception;
QString m_name;
DocHandler *m_brief;
DocHandler *m_detailed;
QList<IParam> m_params;
QList<MemberReference> m_references;
QList<MemberReference> m_referencedBy;
MemberReference *m_reimplements;
QList<MemberReference> m_reimplementedBy;
QString m_defFile;
int m_defLine;
int m_bodyStart;
int m_bodyEnd;
bool m_isConst;
bool m_isVolatile;
LinkedTextHandler *m_linkedTextHandler;
QList<EnumValueHandler> m_enumValues;
};
#endif
......@@ -20,8 +20,7 @@ ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent)
{
addEndHandler("param",this,&ParamHandler::endParam);
addStartHandler("type");
addEndHandler("type",this,&ParamHandler::endType);
addStartHandler("type",this,&ParamHandler::startType);
addStartHandler("declname");
addEndHandler("declname",this,&ParamHandler::endDeclName);
......@@ -35,8 +34,9 @@ ParamHandler::ParamHandler(IBaseHandler *parent) : m_parent(parent)
addStartHandler("attrib");
addEndHandler("attrib",this,&ParamHandler::endAttrib);
addStartHandler("defval");
addEndHandler("defval",this,&ParamHandler::endDefVal);
addStartHandler("defval",this,&ParamHandler::startDefVal);
m_linkedTextHandler = 0;
}
ParamHandler::~ParamHandler()
......@@ -54,10 +54,12 @@ void ParamHandler::endParam()
m_parent->setDelegate(0);
}
void ParamHandler::endType()
void ParamHandler::startType(const QXmlAttributes& /*attrib*/)
{
m_type = m_curString.stripWhiteSpace();
printf("param type=`%s'\n",m_type.data());
delete m_linkedTextHandler;
m_linkedTextHandler = new LinkedTextHandler(this,m_type);
m_linkedTextHandler->start("type");
printf("param type\n");
}
void ParamHandler::endDeclName()
......@@ -84,10 +86,12 @@ void ParamHandler::endArray()
printf("member array=`%s'\n",m_array.data());
}
void ParamHandler::endDefVal()
void ParamHandler::startDefVal(const QXmlAttributes& /*attrib*/)
{
m_defVal = m_curString.stripWhiteSpace();
printf("member defVal=`%s'\n",m_defVal.data());
delete m_linkedTextHandler;
m_linkedTextHandler = new LinkedTextHandler(this,m_defVal);
m_linkedTextHandler->start("type");
printf("member defVal\n");
}
......
......@@ -19,41 +19,53 @@
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include <doxmlintf.h>
#include "basehandler.h"
#include "doxmlintf.h"
#include "baseiterator.h"
#include "linkedtexthandler.h"
class ParamIterator : public BaseIterator<IParamIterator,IParam,IParam>
{
public:
ParamIterator(const QList<IParam> &list) :
BaseIterator<IParamIterator,IParam,IParam>(list) {}
};
class ParamHandler : public IParam, public BaseHandler<ParamHandler>
{
public:
virtual void startParam(const QXmlAttributes& attrib);
virtual void endParam();
virtual void endType();
virtual void startType(const QXmlAttributes& attrib);
virtual void endDeclName();
virtual void endDefName();
virtual void endAttrib();
virtual void endArray();
virtual void endDefVal();
virtual void startDefVal(const QXmlAttributes& attrib);
ParamHandler(IBaseHandler *parent);
virtual ~ParamHandler();
// IParam
virtual QString type() const { return m_type; }
virtual ILinkedTextIterator *type() const
{ return new LinkedTextIterator(m_type); }
virtual QString declarationName() const { return m_declName; }
virtual QString definitionName() const { return m_defName; }
virtual QString attrib() const { return m_attrib; }
virtual QString arraySpecifier() const { return m_array; }
virtual QString defaultValue() const { return m_defVal; }
virtual ILinkedTextIterator *defaultValue() const
{ return new LinkedTextIterator(m_defVal); }
private:
IBaseHandler *m_parent;
QString m_type;
QList<ILinkedText> m_type;
QString m_declName;
QString m_defName;
QString m_attrib;
QString m_array;
QString m_defVal;
QList<ILinkedText> m_defVal;
LinkedTextHandler *m_linkedTextHandler;
};
#endif
......@@ -53,7 +53,7 @@ void SectionHandler::initialize(MainHandler *m)
MemberHandler *mh;
for (;(mh=(MemberHandler *)mli.current());++mli)
{
m->insertMemberById(mh->name(),mh);
m->insertMemberById(mh->id(),mh);
m->insertMemberByName(mh->name(),mh);
}
}
......
......@@ -19,13 +19,23 @@
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include <doxmlintf.h>
#include "basehandler.h"
#include "memberhandler.h"
#include "doxmlintf.h"
class MainHandler;
class SectionIterator :
public BaseIterator<ISectionIterator,ISection,ISection>
{
public:
SectionIterator(const QList<ISection> &list) :
BaseIterator<ISectionIterator,ISection,ISection>(list) {}
};
class SectionHandler : public ISection, public BaseHandler<SectionHandler>
{
public:
......@@ -38,7 +48,8 @@ class SectionHandler : public ISection, public BaseHandler<SectionHandler>
// ISection
virtual QString kind() const { return m_kind; }
virtual QListIterator<IMember> getMemberIterator() const { return m_members; }
virtual IMemberIterator *members() const
{ return new MemberIterator(m_members); }
void initialize(MainHandler *m);
......
......@@ -11,6 +11,3 @@ Makefile.xmlparse: xmlparse.pro
$(ENV) $(PERL) $(TMAKE) xmlparse.pro >Makefile.xmlparse
install:
$(INSTTOOL) -d $(INSTALL)/bin
$(INSTTOOL) -m 755 ../../bin/xmlparse $(INSTALL)/bin
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 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.
*
*/
#include <stdio.h>
#include <doxmlintf.h>
QString linkedTextToString(ILinkedTextIterator *ti)
{
QString result;
ILinkedText *lt=0;
for (ti->toFirst();(lt=ti->current());ti->toNext())
{
switch (lt->kind())
{
case ILinkedText::Kind_Text:
result+=dynamic_cast<ILT_Text*>(lt)->text(); break;
case ILinkedText::Kind_Ref:
result+=dynamic_cast<ILT_Ref *>(lt)->text(); break;
}
}
return result;
}
void DumpDoc(IDoc *doc)
{
printf(" doc node kind=`%d'\n",doc->kind());
switch (doc->kind())
{
case IDoc::Para:
{
printf(" --- par --- \n");
IDocPara *par = dynamic_cast<IDocPara*>(doc);
ASSERT(par!=0);
IDocIterator *di = par->contents();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc);
}
di->release();
printf(" --- end par --- \n");
}
break;
case IDoc::Text:
{
IDocText *txt = dynamic_cast<IDocText*>(doc);
ASSERT(txt!=0);
printf(" --- text `%s' markup=%d --- \n",txt->text().data(),txt->markup());
}
break;
case IDoc::Title:
{
printf(" --- title --- \n");
IDocTitle *t = dynamic_cast<IDocTitle*>(doc);
ASSERT(t!=0);
IDocIterator *di = t->title();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc);
}
printf(" --- end title --- \n");
}
break;
case IDoc::Section:
{
IDocSection *sec = dynamic_cast<IDocSection*>(doc);
ASSERT(sec!=0);
printf(" --- section id=`%s' level=%d --- \n",
sec->id().data(),sec->level());
IDocIterator *di = sec->title();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc);
}
printf(" --- end section --- \n");
}
break;
case IDoc::Root:
{
printf(" --- root --- \n");
IDocRoot *root = dynamic_cast<IDocRoot*>(doc);
ASSERT(root!=0);
IDocIterator *di = root->contents();
IDoc *pdoc;
for (di->toFirst();(pdoc=di->current());di->toNext())
{
DumpDoc(pdoc);
}
di->release();
printf(" --- end root --- \n");
}
break;
default:
break;
}
}
int main(int argc,char **argv)
{
if (argc!=2)
{
printf("Usage: %s file.xml\n",argv[0]);
exit(1);
}
IDoxygen *dox = createObjectModelFromXML(argv[1]);
ICompoundIterator *cli = dox->compounds();
ICompound *comp;
printf("--- compound list ---------\n");
for (cli->toFirst();(comp=cli->current());cli->toNext())
{
printf("Compound name=%s id=%s kind=%s\n",
comp->name().data(),comp->id().data(),comp->kind().data());
ISectionIterator *sli = comp->sections();
ISection *sec;
for (sli->toFirst();(sec=sli->current());sli->toNext())
{
printf(" Section kind=%s\n",sec->kind().data());
IMemberIterator *mli = sec->members();
IMember *mem;
for (mli->toFirst();(mem=mli->current());mli->toNext())
{
ILinkedTextIterator *lti = mem->type();
printf(" Member type=%s name=%s\n",
linkedTextToString(lti).data(),mem->name().data());
lti->release();
IParamIterator *pli = mem->params();
IParam *par;
for (pli->toFirst();(par=pli->current());pli->toNext())
{
lti = par->type();
QString parType = linkedTextToString(lti);
lti->release();
lti = par->defaultValue();
QString defVal = linkedTextToString(lti);
lti->release();
printf(" Param type=%s name=%s defvalue=%s\n",
parType.data(), par->definitionName().data(),defVal.data());
}
pli->release();
IMemberReferenceIterator *mri = mem->references();
IMemberReference *mr;
for (mri->toFirst();(mr=mri->current());mri->toNext())
{
IMember *memr = mr->member();
printf(" References %s at line %d\n",
mr->memberName().data(),memr->bodyStart());
}
mri->release();
mri = mem->referencedBy();
for (mri->toFirst();(mr=mri->current());mri->toNext())
{
IMember *memr = mr->member();
printf(" ReferencedBy %s at line %d\n",
mr->memberName().data(),memr->bodyStart());
}
mri->release();
IEnumValueIterator *evi = mem->enumValues();
IEnumValue *ev;
for (evi->toFirst();(ev=evi->current());evi->toNext())
{
printf(" Enum value `%s' init=`%s'\n",
ev->name().data(),ev->initializer().data());
}
evi->release();
IDoc *doc = mem->briefDescription();
if (doc)
{
printf("===== brief description ==== \n");
DumpDoc(doc);
}
doc = mem->detailedDescription();
if (doc)
{
printf("===== detailed description ==== \n");
DumpDoc(doc);
}
}
mli->release();
}
sli->release();
IDoc *doc = comp->briefDescription();
if (doc)
{
printf("===== brief description ==== \n");
DumpDoc(doc);
}
doc = comp->detailedDescription();
if (doc)
{
printf("===== detailed description ==== \n");
DumpDoc(doc);
}
}
cli->release();
printf("---------------------------\n");
dox->release();
return 0;
}
TEMPLATE = app.t
CONFIG = console warn_on $extraopts
HEADERS =
SOURCES = main.cpp
unix:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools
win32:INCLUDEPATH += .
win32-mingw:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools
win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib
win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\lib;..\lib
win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib
win32-borland:TMAKE_LFLAGS += -L..\..\..\lib -L..\lib
win32:TMAKE_CXXFLAGS += -DQT_NODLL
DESTDIR =
OBJECTS_DIR = ../objects
TARGET = xmlparse
INCLUDEPATH += ../../../qtools ../include
unix:TARGETDEPS = ../lib/libdoxmlparser.a
win32:TARGETDEPS = ..\lib\doxmlparser.lib
#ifndef _DOXMLINTF_H
#define _DOXMLINTF_H
#include <qlist.h>
#include <qstring.h>
class IMember;
class IParam
{
public:
virtual QString type() const = 0;
virtual QString declarationName() const = 0;
virtual QString definitionName() const = 0;
virtual QString attrib() const = 0;
virtual QString arraySpecifier() const = 0;
virtual QString defaultValue() const = 0;
};
class IMemberReference
{
public:
virtual IMember *getMember() const = 0;
virtual QString getMemberName() const = 0;
virtual int getLineNumber() const = 0;
};
class IMember
{
public:
virtual QString kind() const = 0;
virtual QString id() const = 0;
virtual QString protection() const = 0;
virtual QString virtualness() const = 0;
virtual QString type() const = 0;
virtual QString name() const = 0;
virtual QListIterator<IParam> getParamIterator() const = 0;
};
class ISection
{
public:
virtual QString kind() const = 0;
virtual QListIterator<IMember> getMemberIterator() const = 0;
};
class ICompound
{
public:
virtual QString name() const = 0;
virtual QString id() const = 0;
virtual QString kind() const = 0;
virtual QListIterator<ISection> getSectionIterator() const = 0;
};
/*! Root node of the object model. */
class IDoxygen
{
public:
/*! Returns an iterator that can be used to iterate over the list
* of compounds found in the project.
*/
virtual QListIterator<ICompound> getCompoundIterator() const = 0;
/*! Returns a compound given its unique \a id. If you have a
* compound id this function is much more efficient than iterating
* over the compound list. Returns 0 if the id is not valid.
*/
virtual ICompound *getCompoundById(const QString &id) const = 0;
/*! Returns a compound given its name (including the scope).
* Returns 0 if the name is not found in the project.
*/
virtual ICompound *getCompoundByName(const QString &name) const = 0;
virtual IMember *getMemberById(const QString &id) const = 0;
virtual QList<IMember> *getMemberByName(const QString &name) const = 0;
};
/*! Factory method that creates an object model given an XML file generated
* by doxygen.
* @param xmlFileName The name of the XML to parse.
* @returns An iterface to the object model.
*/
IDoxygen *createObjectModelFromXML(const char *xmlFileName);
#endif
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 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.
*
*/
#include <stdio.h>
#include "doxmlintf.h"
int main(int argc,char **argv)
{
if (argc!=2)
{
printf("Usage: %s file.xml\n",argv[0]);
exit(1);
}
IDoxygen *dox = createObjectModelFromXML(argv[1]);
{
QListIterator<ICompound> cli(dox->getCompoundIterator());
ICompound *comp;
printf("--- compound list ---------\n");
for (cli.toFirst();(comp=cli.current());++cli)
{
printf("Compound name=%s id=%s kind=%s\n",
comp->name().data(),comp->id().data(),comp->kind().data());
QListIterator<ISection> sli(comp->getSectionIterator());
ISection *sec;
for (sli.toFirst();(sec=sli.current());++sli)
{
printf(" Section kind=%s\n",sec->kind().data());
QListIterator<IMember> mli(sec->getMemberIterator());
IMember *mem;
for (mli.toFirst();(mem=mli.current());++mli)
{
printf(" Member type=%s name=%s\n",mem->type().data(),mem->name().data());
QListIterator<IParam> pli(mem->getParamIterator());
IParam *par;
for (pli.toFirst();(par=pli.current());++pli)
{
printf(" Param type=%s name=%s defvalue=%s\n",
par->type().data(),par->definitionName().data(),par->defaultValue().data());
}
}
}
}
printf("---------------------------\n");
}
delete dox;
return 0;
}
/******************************************************************************
*
* $Id$
*
*
* Copyright (C) 1997-2001 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
*/
#ifndef _MEMBERHANDLER_H
#define _MEMBERHANDLER_H
#include <qstring.h>
#include <qlist.h>
#include <qxml.h>
#include "basehandler.h"
#include "paramhandler.h"
#include "doxmlintf.h"
class DocHandler;
class MainHandler;
class MemberHandler : public IMember, public BaseHandler<MemberHandler>
{
public:
virtual void startMember(const QXmlAttributes& attrib);
virtual void endMember();
virtual void startParam(const QXmlAttributes& attrib);
virtual void endType();
virtual void endName();
virtual void startBriefDesc(const QXmlAttributes& attrib);
virtual void startDetailedDesc(const QXmlAttributes& attrib);
virtual void startLocation(const QXmlAttributes& attrib);
virtual void startReferences(const QXmlAttributes& attrib);
virtual void endReferences();
virtual void startReferencedBy(const QXmlAttributes& attrib);
virtual void endReferencedBy();
MemberHandler(IBaseHandler *parent);
virtual ~MemberHandler();
// IMember
virtual QString kind() const { return m_kind; }
virtual QString id() const { return m_id; }
virtual QString protection() const { return m_protection; }
virtual QString virtualness() const { return m_virtualness; }
virtual QString type() const { return m_type; }
virtual QString name() const { return m_name; }
virtual QListIterator<IParam> getParamIterator() const { return m_params; }
void initialize(MainHandler *m);
private:
struct MemberReference : public IMemberReference
{
virtual ~MemberReference() {}
virtual IMember *getMember() const;
virtual QString getMemberName() const { return m_name; }
virtual int getLineNumber() const { return m_line; }
void initialize(MainHandler *m);
QString m_memId;
QString m_name;
int m_line;
MainHandler *m_mainHandler;
};
IBaseHandler *m_parent;
QString m_kind;
QString m_id;
QString m_protection;
QString m_virtualness;
QString m_type;
QString m_name;
DocHandler *m_brief;
DocHandler *m_detailed;
QList<IParam> m_params;
QList<MemberReference> m_references;
QList<MemberReference> m_referencedBy;
QString m_defFile;
int m_defLine;
};
#endif
......@@ -27,7 +27,7 @@ f_prefix=/usr
f_insttool=NO
f_english=NO
f_wizard=NO
f_langs=nl,se,cz,fr,it,de,jp,es,fi,ru,hr,pl,pt,hu,kr,ro,si,cn,no,br,dk,sk,ua
f_langs=nl,se,cz,fr,it,de,jp,es,fi,ru,hr,pl,pt,hu,kr,ro,si,cn,no,br,dk,sk,ua,gr
while test -n "$1"; do
case $1 in
......@@ -409,7 +409,7 @@ TMAKE_CXXFLAGS += -DENGLISH_ONLY
EOF
fi
f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/xmlparse/Makefile.in"
f_inmakefiles="Makefile.in qtools/Makefile.in src/Makefile.in examples/Makefile.in doc/Makefile.in addon/doxywizard/Makefile.in addon/doxmlparser/src/Makefile.in addon/doxmlparser/test/Makefile.in"
for i in $f_inmakefiles ; do
SRC=$i
......@@ -441,7 +441,7 @@ EOF
echo " Created $DST from $SRC..."
done
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/doxywizard/doxywizard.pro.in addon/xmlparse/xmlparse.pro.in"
f_inprofiles="qtools/qtools.pro.in src/libdoxygen.pro.in src/libdoxycfg.pro.in src/doxygen.pro.in src/doxytag.pro.in src/doxysearch.pro.in addon/doxywizard/doxywizard.pro.in addon/doxmlparser/src/doxmlparser.pro.in addon/doxmlparser/test/xmlparse.pro.in"
for i in $f_inprofiles ; do
SRC=$i
......@@ -467,7 +467,7 @@ echo -n " Generating src/lang_cfg.h..."
echo $f_langs | $f_perl -e '@l=split(/,/,<STDIN>);
chomp @l;
@allowed=(NL,SE,CZ,FR,IT,DE,JP,ES,FI,RU,HR,PL,PT,HU,KR,RO,SI,CN,NO,BR,
DK,SK,UA);
DK,SK,UA,GR);
foreach my $elem (@l){
$elem =~ tr/a-z/A-Z/;
$r=0;
......
......@@ -13,7 +13,7 @@
# input used in their production; they are not affected by this license.
all: language FORCE
@xcopy /s /q /i ..\examples ..\html\examples
@xcopy /y /s /q /i ..\examples ..\html\examples
set DOXYGEN_DOCDIR=. & \
set VERSION=$(VERSION) & \
$(DOXYGEN)\bin\doxygen
......
......@@ -13,7 +13,7 @@
# input used in their production; they are not affected by this license.
all: language FORCE
@xcopy /s /q /i ..\examples ..\html\examples
@xcopy /y /s /q /i ..\examples ..\html\examples
set DOXYGEN_DOCDIR=.
set VERSION=$(VERSION)
$(DOXYGEN)\bin\doxygen
......
......@@ -98,6 +98,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_ext_doc_paths EXT_DOC_PATHS
<li> \refitem cfg_extra_packages EXTRA_PACKAGES
<li> \refitem cfg_extract_all EXTRACT_ALL
<li> \refitem cfg_extract_local_classes EXTRACT_LOCAL_CLASSES
<li> \refitem cfg_extract_private EXTRACT_PRIVATE
<li> \refitem cfg_extract_static EXTRACT_STATIC
<li> \refitem cfg_file_patterns FILE_PATTERNS
......@@ -132,6 +133,7 @@ followed by the descriptions of the tags grouped by category.
<li> \refitem cfg_include_path INCLUDE_PATH
<li> \refitem cfg_inherit_docs INHERIT_DOCS
<li> \refitem cfg_inline_info INLINE_INFO
<li> \refitem cfg_inline_inherited_memb INLINE_INHERITED_MEMB
<li> \refitem cfg_inline_sources INLINE_SOURCES
<li> \refitem cfg_input INPUT
<li> \refitem cfg_input_filter INPUT_FILTER
......@@ -228,8 +230,9 @@ followed by the descriptions of the tags grouped by category.
documentation generated by doxygen is written. Doxygen will use this
information to generate all constant output in the proper language.
The default language is English, other supported languages are:
Dutch, French, Italian, Czech, Swedish, German, Finnish, Hungarian, Japanese,
Korean, Spanish, Russian, Croatian, Polish and Portuguese.
Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French,
German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish,
Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.
\anchor cfg_extract_all
<dt>\c EXTRACT_ALL <dd>
......@@ -255,6 +258,14 @@ followed by the descriptions of the tags grouped by category.
If the \c EXTRACT_STATIC tag is set to \c YES all static members of a file
will be included in the documentation.
\anchor cfg_extract_local_classes
<dt>\c EXTRACT_LOCAL_CLASSES <dd>
\addindex EXTRACT_LOCAL_CLASSES
If the \c EXTRACT_LOCAL_CLASSES tag is set to \c YES classes (and structs)
defined locally in source files will be included in the documentation.
If set to NO only classes defined in header files are included. Does not
have any effect for Java sources.
\anchor cfg_hide_undoc_members
<dt>\c HIDE_UNDOC_MEMBERS <dd>
\addindex HIDE_UNDOC_MEMBERS
......@@ -299,6 +310,14 @@ followed by the descriptions of the tags grouped by category.
doxygen will generate a detailed section even if there is only a brief
description.
\anchor cfg_inline_inherited_memb
<dt>\c INLINE_INHERITED_MEMB <dd>
\addindex INLINE_INHERITED_MEMB
If the \c INLINE_INHERITED_MEMB tag is set to \c YES, doxygen will show all inherited
members of a class in the documentation of that class as if those members were
ordinary class members. Constructors, destructors and assignment operators of
the base classes will not be shown.
\anchor cfg_full_path_names
<dt>\c FULL_PATH_NAMES <dd>
\addindex FULL_PATH_NAMES
......
......@@ -210,6 +210,17 @@ generator -> gen
At the time I was looking into lex and yacc, where a lot of things start with
"yy", so the "y" slipped in and made things pronouncable.
<li><b>What was the reason to develop doxygen?</b>
I once wrote a GUI widget based on the Qt library (it is still available at
http://qdbttabular.sourceforge.net/ and maintained by Sven Meyer).
Qt had nicely generated documentation (using an internal tool which
they didn't want to release) and I wrote similar docs by hand.
This was a nightmare to maintain, so I wanted a similar tool. I looked at
Doc++ but that just wasn't good enough (it didn't support signals and
slots and did have the Qt look and feel I have grown to like),
so I started to write my own tool...
</ol>
\htmlonly
......
......@@ -25,13 +25,13 @@ Doxygen has built-in support for multiple languages. This means
that the text fragments that doxygen generates can be produced in
languages other than English (the default) at configuration time.
Currently (version 1.2.12-20011125), 24 languages
Currently (version 1.2.13), 25 languages
are supported (sorted alphabetically):
Brazilian Portuguese, Chinese, Croatian, Czech, Danish,
Dutch, English, Finnish, French, German,
Hungarian, Italian, Japanese, Korean, Norwegian,
Polish, Portuguese, Romanian, Russian, Slovak,
Slovene, Spanish, Swedish, and Ukrainian.
Greek, Hungarian, Italian, Japanese, Korean,
Norwegian, Polish, Portuguese, Romanian, Russian,
Slovak, Slovene, Spanish, Swedish, and Ukrainian.
The table of information related to the supported languages follows.
It is sorted by language alphabetically. The <b>Status</b> column
......@@ -96,7 +96,7 @@ when the translator was updated.
<TD>Finnish</TD>
<TD>Olli Korhonen</TD>
<TD>Olli.Korhonen@NOSPAM.ccc.fi</TD>
<TD>1.0.0</TD>
<TD>obsolete</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>French</TD>
......@@ -110,6 +110,12 @@ when the translator was updated.
<TD>jensseidel@NOSPAM.users.sf.net<br>Jens.Breitenstein@NOSPAM.tlc.de</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Greek</TD>
<TD>Harry Kalogirou</TD>
<TD>harkal@NOSPAM.rainbow.cs.unipi.gr</TD>
<TD>1.2.11</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Hungarian</TD>
<TD>F&ouml;ldv&aacute;ri Gy&ouml;rgy</TD>
......@@ -118,8 +124,8 @@ when the translator was updated.
</TR>
<TR BGCOLOR="#ffffff">
<TD>Italian</TD>
<TD>Ahmed Aldo Faisal<br>Alessandro Falappa</TD>
<TD>aaf23@NOSPAM.cam.ac.uk<br>a.falappa@NOSPAM.flashnet.it</TD>
<TD>Alessandro Falappa<br>Ahmed Aldo Faisal</TD>
<TD>alessandro@NOSPAM.falappa.net<br>aaf23@NOSPAM.cam.ac.uk</TD>
<TD>up-to-date</TD>
</TR>
<TR BGCOLOR="#ffffff">
......@@ -186,7 +192,7 @@ when the translator was updated.
<TD>Swedish</TD>
<TD>XeT Erixon</TD>
<TD>xet@NOSPAM.hem.passagen.se</TD>
<TD>1.0.0</TD>
<TD>obsolete</TD>
</TR>
<TR BGCOLOR="#ffffff">
<TD>Ukrainian</TD>
......@@ -220,17 +226,19 @@ when the translator was updated.
\hline
English & Dimitri van Heesch & {\tt dimitri@stack.nl} & up-to-date \\
\hline
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & 1.0.0 \\
Finnish & Olli Korhonen & {\tt Olli.Korhonen@ccc.fi} & obsolete \\
\hline
French & Xavier Outhier & {\tt xouthier@yahoo.fr} & up-to-date \\
\hline
German & Jens Seidel & {\tt jensseidel@users.sf.net} & up-to-date \\
& Jens Breitenstein & {\tt Jens.Breitenstein@tlc.de} & \\
\hline
Greek & Harry Kalogirou & {\tt harkal@rainbow.cs.unipi.gr} & 1.2.11 \\
\hline
Hungarian & F\"{o}ldv\'{a}ri Gy\"{o}rgy & {\tt foldvari@diatronltd.com} & 1.2.1 \\
\hline
Italian & Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & up-to-date \\
& Alessandro Falappa & {\tt a.falappa@flashnet.it} & \\
Italian & Alessandro Falappa & {\tt alessandro@falappa.net} & up-to-date \\
& Ahmed Aldo Faisal & {\tt aaf23@cam.ac.uk} & \\
\hline
Japanese & Kenji Nagamatsu & {\tt naga@joyful.club.ne.jp} & 1.2.5 \\
\hline
......@@ -252,7 +260,7 @@ when the translator was updated.
\hline
Spanish & Francisco Oltra Thennet & {\tt foltra@puc.cl} & 1.2.7 \\
\hline
Swedish & XeT Erixon & {\tt xet@hem.passagen.se} & 1.0.0 \\
Swedish & XeT Erixon & {\tt xet@hem.passagen.se} & obsolete \\
\hline
Ukrainian & Olexij Tkatchenko & {\tt olexij.tkatchenko@gmx.de} & 1.2.11 \\
\hline
......@@ -523,5 +531,22 @@ translator adapter base class. The reason is that the adapter
classes implement also obsolete methods. Another reason is that
some of the methods could become obsolete from some newer adapter on.
<b>The really obsolete language translators</b> may lead to too much
complicated adapters. Because of that, doxygen developers may decide
to derive such translators from the \c TranslatorEnglish class, which
is by definition always up-to-date.
When doing so, all the missing methods will be replaced by the
English translation. This means that not-implemented methods will
always return the English result. Such translators are marked using
word \c obsolete. You should read it <b>really obsolete</b>. No
guess about the last update can be done.
Often, it is possible to construct better result from the obsolete
methods. Because of that, the translator adapter classes should be
used if possible. On the other hand, implementation of adapters for
really obsolete translators brings too much maintenance and
run-time overhead.
*/
......@@ -296,5 +296,22 @@ translator adapter base class. The reason is that the adapter
classes implement also obsolete methods. Another reason is that
some of the methods could become obsolete from some newer adapter on.
<b>The really obsolete language translators</b> may lead to too much
complicated adapters. Because of that, doxygen developers may decide
to derive such translators from the \c TranslatorEnglish class, which
is by definition always up-to-date.
When doing so, all the missing methods will be replaced by the
English translation. This means that not-implemented methods will
always return the English result. Such translators are marked using
word \c obsolete. You should read it <b>really obsolete</b>. No
guess about the last update can be done.
Often, it is possible to construct better result from the obsolete
methods. Because of that, the translator adapter classes should be
used if possible. On the other hand, implementation of adapters for
really obsolete translators brings too much maintenance and
run-time overhead.
*/
......@@ -33,6 +33,9 @@ German
Jens Seidel: jensseidel@users.sf.net
Jens Breitenstein: Jens.Breitenstein@tlc.de
Greek
Harry Kalogirou: harkal@rainbow.cs.unipi.gr
Hungarian
F&ouml;ldv&aacute;ri Gy&ouml;rgy: foldvari@diatronltd.com
......
......@@ -87,6 +87,14 @@
# like "almost up-to-date" any more. The script was simplified
# to reflect the changes.
#
# 2001/11/26
# - Information about version of doxygen added to the top
# of the translator report (the ASCII file).
# - TranslatorEnglish can be used to solve really obsolete translators
# to make adapter classes simpler. Such translators are marked
# as "obsolete" in the status (i.e. no guessing when it was last updated).
# The translator report include the notice about that situation.
#
################################################################
use 5.005;
......@@ -527,7 +535,12 @@ xxxTABLE_FOOTxxx
{$1.$2.$3}x;
}
if ($i == 0) { $status = '?'; }
if ($i == 0) {
$i = $status =~ s{^TranslatorEnglish$}
{obsolete}x;
}
if ($i == 0) { $status = 'strange'; }
##}}}
......@@ -890,11 +903,15 @@ print STDERR "\n\n";
# Loop through the list of expected methods and collect
# the missing (new) methods. Do this only when it derives
# from Translator or TranslatorAdapter classes (i.e. ignore
# any unusual kind of TranslatorXxxx implementation). #{{{
# any unusual kind of TranslatorXxxx implementation).
# Accept also deriving from TranslatorEnglish, that can
# be done by doxygen developers to solve problems with
# some really outdated translators. #{{{
#
my @missing_methods = ();
if ($base =~ m/^Translator(Adapter.*)?$/) {
if ($base =~ m/^Translator(Adapter.*)?$/
|| $base =~ m/^TranslatorEnglish$/) {
foreach my $method (@expected) {
# Get the stripped version of the prototype.
......@@ -921,15 +938,34 @@ print STDERR "\n\n";
$output .= "\n\n\n";
$output .= $class . " ($base)\n" . '-' x length($class) . "\n";
if ($base !~ m/^Translator(Adapter.*)?$/) {
$output .= "\nThis is the unusual implementation of the "
. "translator. Its class is derived\n"
if ($base =~ m/^TranslatorEnglish$/) {
$output .= "\nThis translator is implemented via deriving "
. "from the English translator.\n"
. "This should be done only in the case when "
. "the language maintainer\n"
. "or the doxygen "
. "developers need to update some really old-dated "
. "translator.\n"
. "Otherwise, deriving from "
. "the translator adapter classes should be used\n"
. "for obsolete translators. "
. "If you still want some texts to be in English\n"
. "copy the sources of the English translator.\n\n"
. "The obsolete and missing method lists (below) "
. "reflect what have to be done\n"
. "to derive "
. "directly from the Translator class "
. "(i.e. to reach up-to-date status).\n";
}
elsif ($base !~ m/^Translator(Adapter.*)?$/) {
$output .= "\nThis is some unusual implementation of the "
. "translator class. It is derived\n"
. "from the $base base class. The usual translator"
. "class derives\n"
. "or from the Translator class or from some "
. "TranslatorAdapter_x_x_x classes.\n"
. "Because of that, nothing can be guessed about "
. "missing methods.\n";
. "missing or obsolete methods.\n";
}
if (@missing_methods) {
......@@ -951,24 +987,34 @@ print STDERR "\n\n";
}
# Generate the textual output file.
# Generate the ASCII output file.
#
my $fout = "$docdir/$ftranslatortxt";
# Open it first.
# Open it first, and output the version information. #{{{
#
open(FOUT, "> $fout") or die "\nError when open > $fout: $!";
print FOUT "(version $doxversion)\n\n";
##}}}
# List the supported languages. #{{{
#
my @all_translators = keys %cb;
print FOUT "Doxygen supports the following (" . @all_translators
. ") languages (sorted alphabetically):\n\n";
foreach (sort grep { s/^Translator(\w+)\b.*$/$1/ } @all_translators) {
print FOUT " $_\n";
}
my @languages = sort
grep { s/^Translator(\w+)\b.*$/$1/ }
@all_translators;
my $languages = join(", ", @languages);
$languages =~ s{((\w+,\s){5})}{$1\n}g;
$languages =~ s{Brazilian}{Brazilian Portuguese};
$languages =~ s{(,\s+)(\w+)$}{$1and $2.}s;
print FOUT "$languages\n";
##}}}
# If there are up-to-date translators, list them. #{{{
......@@ -1019,11 +1065,35 @@ print STDERR "\n\n";
}
##}}}
# If there are translators derived from TranslatorEnglish, list them
# and name them as obsolete. #{{{
#
@list = sort grep { $cb{$_} =~ m/^TranslatorEnglish$/ } keys %cb;
if (@list) {
print FOUT "\n" .'-' x 70 . "\n";
print FOUT "The following translator classes are implemented "
. "via deriving\n"
. "from the English translator. This should be done only "
. "in the case\n"
. "when the language maintainer or the doxygen "
. "developers need to update\n"
. "some really outdated translator. Otherwise, deriving "
. "from\n"
. "the translator adapter classes should be prefered "
. "for obsolete translators.\n"
. "See details below in the report.\n\n";
foreach (@list) { print FOUT " $_\t($cb{$_})\n"; }
}
##}}}
# If there are other translators, list them. #{{{
#
@list = sort
grep { $cb{$_} !~ m/^Translator$/ }
grep { $cb{$_} !~ m/^TranslatorAdapter_/ }
grep { $cb{$_} !~ m/^TranslatorAdapter_/ }
grep { $cb{$_} !~ m/^TranslatorEnglish$/ }
keys %cb;
if (@list) {
......@@ -1031,12 +1101,16 @@ print STDERR "\n\n";
print FOUT "The following translator classes are somehow different\n"
. "(sorted alphabetically). This means that they "
. "do not derive from\n"
. "the Translator class, nor from some of the adapter classes.\n\n";
. "the Translator class, nor from some of the adapter "
. "classes,\n"
. "nor from the TranslatorEnglish. Nothing can be guessed "
. "about the methods.\n\n";
foreach (@list) { print FOUT " $_\t($cb{$_})\n"; }
}
##}}}
# List the methods that are expected to be implemented. #{{{
#
print FOUT "\n\n" .'-' x 70 . "\n";
......@@ -1059,7 +1133,7 @@ print STDERR "\n\n";
}
##}}}
# Close the output file
# Close the ASCII output file
#
close FOUT;
......
<?xml version='1.0' encoding='ISO-8859-1' standalone='yes'?>
<tagfile>
<compound kind="class">
<name>Test</name>
......
Name: doxygen
Version: 1.2.12_20011209
Version: 1.2.13
Summary: documentation system for C, C++ and IDL
Release: 4
Source: doxygen-%{version}.src.tar.gz
......
......@@ -87,23 +87,24 @@ ClassDef::ClassDef(
memberGroupSDict = new MemberGroupSDict;
memberGroupSDict->setAutoDelete(TRUE);
m_innerClasses = new ClassSDict(17);
//int i=name().findRev("::"); // TODO: broken if A<N::C> is the class name
//if (i==-1)
//{
// m_scopelessName=name();
//}
//else
//{
// m_scopelessName=name().right(name().length()-i-2);
//}
m_subGrouping=TRUE;
//m_isTemplBaseClass=-1;
m_templateInstances = 0;
m_templateMaster =0;
m_templBaseClassNames = 0;
m_artificial = FALSE;
m_isAbstract = FALSE;
m_isStatic = FALSE;
m_membersMerged = FALSE;
if (((QCString)defFileName).right(5)!=".java" &&
guessSection(defFileName)==Entry::SOURCE_SEC)
{
m_isLocal=TRUE;
}
else
{
m_isLocal=FALSE;
}
}
// destroy the class definition
......@@ -181,7 +182,10 @@ void ClassDef::addMembersToMemberGroup()
}
// adds new member definition to the class
void ClassDef::insertMember(MemberDef *md)
void ClassDef::internalInsertMember(MemberDef *md,
Protection prot,
bool addToAllList
)
{
//printf("adding %s::%s\n",name().data(),md->name().data());
if (!isReference())
......@@ -190,7 +194,7 @@ void ClassDef::insertMember(MemberDef *md)
/* insert member in the declaration section */
/********************************************/
if (md->isRelated() &&
(Config_getBool("EXTRACT_PRIVATE") || md->protection()!=Private))
(Config_getBool("EXTRACT_PRIVATE") || prot!=Private))
{
related.append(md);
md->setSectionList(&related);
......@@ -217,7 +221,7 @@ void ClassDef::insertMember(MemberDef *md)
md->setSectionList(&properties);
break;
case MemberDef::Slot: // Qt specific
switch (md->protection())
switch (prot)
{
case Protected:
proSlots.append(md);
......@@ -238,7 +242,7 @@ void ClassDef::insertMember(MemberDef *md)
{
if (md->isVariable())
{
switch (md->protection())
switch (prot)
{
case Protected:
proStaticAttribs.append(md);
......@@ -256,7 +260,7 @@ void ClassDef::insertMember(MemberDef *md)
}
else // function
{
switch (md->protection())
switch (prot)
{
case Protected:
proStaticMembers.append(md);
......@@ -277,7 +281,7 @@ void ClassDef::insertMember(MemberDef *md)
{
if (md->isVariable())
{
switch (md->protection())
switch (prot)
{
case Protected:
proAttribs.append(md);
......@@ -295,7 +299,7 @@ void ClassDef::insertMember(MemberDef *md)
}
else if (md->isTypedef() || md->isEnumerate() || md->isEnumValue())
{
switch (md->protection())
switch (prot)
{
case Protected:
proTypes.append(md);
......@@ -313,7 +317,7 @@ void ClassDef::insertMember(MemberDef *md)
}
else // member function
{
switch (md->protection())
switch (prot)
{
case Protected:
proMembers.append(md);
......@@ -338,7 +342,7 @@ void ClassDef::insertMember(MemberDef *md)
/* insert member in the detailed documentation section */
/*******************************************************/
if ((md->isRelated() &&
(Config_getBool("EXTRACT_PRIVATE") || md->protection()!=Private)
(Config_getBool("EXTRACT_PRIVATE") || prot!=Private)
) || md->isFriend()
)
{
......@@ -365,7 +369,7 @@ void ClassDef::insertMember(MemberDef *md)
functionMembers.append(md);
break;
case MemberDef::Slot:
switch (md->protection())
switch (prot)
{
case Protected:
if (Config_getBool("SORT_MEMBER_DOCS"))
......@@ -391,7 +395,7 @@ void ClassDef::insertMember(MemberDef *md)
}
break;
default: // any of the other members
if (md->protection()!=Private || Config_getBool("EXTRACT_PRIVATE"))
if (prot!=Private || Config_getBool("EXTRACT_PRIVATE"))
{
switch (md->memberType())
{
......@@ -458,21 +462,28 @@ void ClassDef::insertMember(MemberDef *md)
m_isAbstract=TRUE;
}
MemberInfo *mi = new MemberInfo((MemberDef *)md,
md->protection(),md->virtualness(),FALSE);
MemberNameInfo *mni=0;
if ((mni=m_allMemberNameInfoSDict->find(md->name())))
{
mni->append(mi);
}
else
if (addToAllList)
{
mni = new MemberNameInfo(md->name());
mni->append(mi);
m_allMemberNameInfoSDict->inSort(mni->memberName(),mni);
MemberInfo *mi = new MemberInfo((MemberDef *)md,
prot,md->virtualness(),FALSE);
MemberNameInfo *mni=0;
if ((mni=m_allMemberNameInfoSDict->find(md->name())))
{
mni->append(mi);
}
else
{
mni = new MemberNameInfo(md->name());
mni->append(mi);
m_allMemberNameInfoSDict->append(mni->memberName(),mni);
}
}
}
void ClassDef::insertMember(MemberDef *md)
{
internalInsertMember(md,md->protection(),TRUE);
}
//void ClassDef::computeMemberGroups()
//{
......@@ -498,29 +509,30 @@ void ClassDef::insertMember(MemberDef *md)
// compute the anchors for all members
void ClassDef::computeAnchors()
{
setAnchors('a',&pubMembers);
setAnchors('b',&proMembers);
setAnchors('c',&priMembers);
setAnchors('d',&pubStaticMembers);
setAnchors('e',&proStaticMembers);
setAnchors('f',&priStaticMembers);
setAnchors('g',&pubSlots);
setAnchors('h',&proSlots);
setAnchors('i',&priSlots);
setAnchors('j',&signals);
setAnchors('k',&related);
setAnchors('l',&friends);
setAnchors('m',&pubAttribs);
setAnchors('n',&proAttribs);
setAnchors('o',&priAttribs);
setAnchors('p',&pubStaticAttribs);
setAnchors('q',&proStaticAttribs);
setAnchors('r',&priStaticAttribs);
setAnchors('s',&pubTypes);
setAnchors('t',&proTypes);
setAnchors('u',&priTypes);
setAnchors('v',&dcopMethods);
setAnchors('w',&properties);
ClassDef *context = Config_getBool("INLINE_INHERITED_MEMB") ? this : 0;
setAnchors(context,'a',&pubMembers);
setAnchors(context,'b',&proMembers);
setAnchors(context,'c',&priMembers);
setAnchors(context,'d',&pubStaticMembers);
setAnchors(context,'e',&proStaticMembers);
setAnchors(context,'f',&priStaticMembers);
setAnchors(context,'g',&pubSlots);
setAnchors(context,'h',&proSlots);
setAnchors(context,'i',&priSlots);
setAnchors(context,'j',&signals);
setAnchors(context,'k',&related);
setAnchors(context,'l',&friends);
setAnchors(context,'m',&pubAttribs);
setAnchors(context,'n',&proAttribs);
setAnchors(context,'o',&priAttribs);
setAnchors(context,'p',&pubStaticAttribs);
setAnchors(context,'q',&proStaticAttribs);
setAnchors(context,'r',&priStaticAttribs);
setAnchors(context,'s',&pubTypes);
setAnchors(context,'t',&proTypes);
setAnchors(context,'u',&priTypes);
setAnchors(context,'v',&dcopMethods);
setAnchors(context,'w',&properties);
}
void ClassDef::distributeMemberGroupDocumentation()
......@@ -967,7 +979,9 @@ void ClassDef::writeDocumentation(OutputList &ol)
// write link to list of all members (HTML only)
if (m_allMemberNameInfoSDict->count()>0 &&
!Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
!Config_getBool("OPTIMIZE_OUTPUT_FOR_C")
/* && !Config_getBool("INLINE_INHERITED_MEMB") */
)
{
ol.disableAllBut(OutputGenerator::Html);
ol.startTextLink(m_memListFileName,0);
......@@ -1213,7 +1227,9 @@ void ClassDef::writeDocumentationForInnerClasses(OutputList &ol)
ClassDef *innerCd;
for (cli.toFirst();(innerCd=cli.current());++cli)
{
if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0)
if (innerCd->isLinkableInProject() && innerCd->templateMaster()==0 &&
(innerCd->protection()!=Private || Config_getBool("EXTRACT_PRIVATE"))
)
{
msg("Generating docs for nested compound %s...\n",innerCd->name().data());
innerCd->writeDocumentation(ol);
......@@ -1568,6 +1584,7 @@ bool ClassDef::isLinkableInProject() const
!m_artificial &&
name().find('@')==-1 && /* anonymous compound */
(m_prot!=Private || Config_getBool("EXTRACT_PRIVATE")) && /* private */
(!m_isLocal || Config_getBool("EXTRACT_LOCAL_CLASSES")) && /* local */
hasDocumentation() && /* documented */
!isReference() && /* not an external reference */
(!m_isStatic || Config_getBool("EXTRACT_STATIC"));
......@@ -1637,6 +1654,17 @@ bool ClassDef::isBaseClass(ClassDef *bcd)
}
//----------------------------------------------------------------------------
static bool isStandardFunc(MemberDef *md)
{
ClassDef *cd=md->getClassDef();
if (cd->templateMaster()) cd=cd->templateMaster();
return md->name()=="operator=" || // assignment operator
md->name()==cd->localName() || // constructor
(md->name().find('~')!=-1 &&
md->name().find("operator")==-1); // destructor
}
/*!
* recusively merges the `all members' lists of a class base
* with that of this class. Must only be called for classes without
......@@ -1645,19 +1673,22 @@ bool ClassDef::isBaseClass(ClassDef *bcd)
void ClassDef::mergeMembers()
{
if (m_membersMerged) return;
m_membersMerged=TRUE;
//printf(" mergeMembers for %s\n",name().data());
bool inlineInheritedMembers = Config_getBool("INLINE_INHERITED_MEMB" );
BaseClassListIterator bcli(*baseClasses());
BaseClassDef *bcd;
for ( ; (bcd=bcli.current()) ; ++bcli )
{
ClassDef *bClass=bcd->classDef;
// merge the members in the base class of this inheritance branch first
bClass->mergeMembers();
MemberNameInfoSDict *srcMnd = bClass->memberNameInfoSDict();
MemberNameInfoSDict *dstMnd = memberNameInfoSDict();
//MemberNameInfoList *dstMnl = memberNameInfoList();
MemberNameInfoSDict *srcMnd = bClass->m_allMemberNameInfoSDict;
MemberNameInfoSDict *dstMnd = m_allMemberNameInfoSDict;
MemberNameInfoSDict::Iterator srcMnili(*srcMnd);
MemberNameInfo *srcMni;
for ( ; (srcMni=srcMnili.current()) ; ++srcMnili)
......@@ -1687,24 +1718,26 @@ void ClassDef::mergeMembers()
if (srcMd!=dstMd) // different members
{
ClassDef *dstCd = dstMd->getClassDef();
//printf("Is %s a base class of %s?\n",srcCd->name(),dstCd->name());
//printf(" Is %s a base class of %s?\n",srcCd->name().data(),dstCd->name().data());
if (srcCd==dstCd || dstCd->isBaseClass(srcCd))
// member is in the same or a base class
{
found=matchArguments(srcMd->argumentList(),
dstMd->argumentList()
);
//ambigue = ambigue || !found;
dstMd->argumentList());
//printf(" Yes, matching (%s<->%s): %d\n",
// argListToString(srcMd->argumentList()).data(),
// argListToString(dstMd->argumentList()).data(),
// found);
hidden = hidden || !found;
}
else // member is in a non base class => multiple inheritance
// using the same base class.
// using the same base class.
{
//printf("$$ Existing member %s %s add scope %s\n",
// dstMi->ambiguityResolutionScope.data(),
// dstMd->name().data(),
// dstMi->scopePath.left(dstMi->scopePath.find("::")+2).data());
QCString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2);
if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
dstMi->ambiguityResolutionScope.prepend(scope);
......@@ -1722,7 +1755,7 @@ void ClassDef::mergeMembers()
found=TRUE;
}
else // member can be reached via multiple paths in the
// inheritance tree
// inheritance tree
{
//printf("$$ Existing member %s %s add scope %s\n",
// dstMi->ambiguityResolutionScope.data(),
......@@ -1731,7 +1764,9 @@ void ClassDef::mergeMembers()
QCString scope=dstMi->scopePath.left(dstMi->scopePath.find("::")+2);
if (scope!=dstMi->ambiguityResolutionScope.left(scope.length()))
{
dstMi->ambiguityResolutionScope.prepend(scope);
}
ambigue=TRUE;
}
}
......@@ -1748,6 +1783,14 @@ void ClassDef::mergeMembers()
// this case is shown anyway.
if (!found && srcMd->protection()!=Private)
{
if (inlineInheritedMembers)
{
if (!isStandardFunc(srcMd))
{
//printf(" insertMember `%s'\n",srcMd->name().data());
internalInsertMember(srcMd,bcd->prot,FALSE);
}
}
Specifier virt=srcMi->virt;
if (srcMi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
MemberInfo *newMi = new MemberInfo(srcMd,bcd->prot,virt,TRUE);
......@@ -1761,8 +1804,10 @@ void ClassDef::mergeMembers()
QCString scope=bClass->name()+"::";
if (scope!=srcMi->ambiguityResolutionScope.left(scope.length()))
{
newMi->ambiguityResolutionScope=
scope+srcMi->ambiguityResolutionScope.copy();
}
}
if (hidden)
{
......@@ -1777,7 +1822,6 @@ void ClassDef::mergeMembers()
newMi->ambiguityResolutionScope=srcMi->ambigClass->name()+"::";
}
}
//printf("Adding!\n");
dstMni->append(newMi);
}
}
......@@ -1786,8 +1830,9 @@ void ClassDef::mergeMembers()
{
// create a deep copy of the list (only the MemberInfo's will be
// copied, not the actual MemberDef's)
MemberNameInfo *newMni = new MemberNameInfo(srcMni->memberName());
MemberNameInfo *newMni = 0;
newMni = new MemberNameInfo(srcMni->memberName());
// copy the member(s) from the base to the sub class
MemberNameInfoIterator mnii(*srcMni);
MemberInfo *mi;
......@@ -1805,12 +1850,20 @@ void ClassDef::mergeMembers()
//printf("%s::%s: prot=%d bcd->prot=%d result=%d\n",
// name().data(),mi->memberDef->name().data(),mi->prot,
// bcd->prot,prot);
if (mi->prot!=Private)
{
Specifier virt=mi->virt;
if (mi->virt==Normal && bcd->virt!=Normal) virt=bcd->virt;
if (inlineInheritedMembers)
{
if (!isStandardFunc(mi->memberDef))
{
//printf(" insertMember `%s'\n",mi->memberDef->name().data());
internalInsertMember(mi->memberDef,prot,FALSE);
}
}
//printf("Adding!\n");
MemberInfo *newMi=new MemberInfo(mi->memberDef,prot,virt,TRUE);
newMi->scopePath=bClass->name()+"::"+mi->scopePath;
......@@ -1819,13 +1872,13 @@ void ClassDef::mergeMembers()
newMni->append(newMi);
}
}
// add it to the dictionary
//dstMnl->append(newMni);
dstMnd->append(newMni->memberName(),newMni);
}
}
}
//printf(" end mergeMembers\n");
}
//----------------------------------------------------------------------------
......
......@@ -311,6 +311,8 @@ class ClassDef : public Definition
/*! \} Interal API */
private:
void internalInsertMember(MemberDef *md,Protection prot,bool addToAllList);
/*! file name that forms the base for the output file containing the
* class documentation. For compatibility with Qt (e.g. links via tag
* files) this name cannot be derived from the class name directly.
......@@ -408,6 +410,12 @@ class ClassDef : public Definition
/*! Is the class part of an unnamed namespace? */
bool m_isStatic;
/*! TRUE if classes members are merged with those of the base classes. */
bool m_membersMerged;
/*! TRUE if the class is defined in a source file rather than a header file. */
bool m_isLocal;
};
/*! \brief Class that contains information about a usage relation.
......
......@@ -1107,14 +1107,12 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_code->codify(yytext);
}
<ClassName>{ID} {
//g_ccd.name=yytext;
g_curClassName=yytext;
addType();
generateClassOrGlobalLink(*g_code,yytext);
BEGIN( ClassVar );
}
<ClassVar>"=" {
g_code->codify(yytext);
unput(*yytext);
BEGIN( Body );
}
......@@ -1124,7 +1122,7 @@ TYPEKW ("bool"|"char"|"double"|"float"|"int"|"long"|"short"|"signed"|"unsigned"
g_theVarContext.addVariable(g_type,g_name);
generateClassOrGlobalLink(*g_code,yytext);
}
<ClassName,ClassVar>[ \t\n]*":"[ \t\n]* {
<ClassName,ClassVar>[ \t\n]*":"[ \t\n]* {
codifyLines(yytext);
g_curClassBases.clear();
BEGIN( Bases );
......
......@@ -711,7 +711,7 @@ static void substEnvVarsInStrList(QStrList &sl)
// search for a "word"
for (i=0;i<l;i++)
{
char c;
char c=0;
// skip until start of new word
while (i<l && ((c=result.at(i))==' ' || c=='\t')) i++;
p=i; // p marks the start index of the word
......@@ -868,6 +868,15 @@ void Config::check()
char *sfp = stripFromPath.first();
while (sfp)
{
register char *p = sfp;
if (p)
{
char c;
while ((c=*p++))
{
if (c=='\\') c='/';
}
}
QCString path = sfp;
if (path.at(0)!='/' && (path.length()<=2 || path.at(1)!=':'))
{
......@@ -1213,34 +1222,83 @@ void Config::create()
"information to generate all constant output in the proper language. \n"
"The default language is English, other supported languages are: \n"
"Brazilian, Chinese, Croatian, Czech, Danish, Dutch, Finnish, French, \n"
"German, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, \n"
"German, Greek, Hungarian, Italian, Japanese, Korean, Norwegian, Polish, \n"
"Portuguese, Romanian, Russian, Slovak, Slovene, Spanish and Swedish.\n",
"English"
);
#ifdef LANG_BR
ce->addValue("Brazilian");
#endif
#ifdef LANG_CN
ce->addValue("Chinese");
#endif
#ifdef LANG_HR
ce->addValue("Croatian");
#endif
#ifdef LANG_CZ
ce->addValue("Czech");
#endif
#ifdef LANG_DK
ce->addValue("Danish");
#endif
#ifdef LANG_NL
ce->addValue("Dutch");
#endif
ce->addValue("English");
#ifdef LANG_FI
ce->addValue("Finnish");
#endif
#ifdef LANG_FR
ce->addValue("French");
#endif
#ifdef LANG_DE
ce->addValue("German");
#endif
#ifdef LANG_GR
ce->addValue("Greek");
#endif
#ifdef LANG_HU
ce->addValue("Hungarian");
#endif
#ifdef LANG_IT
ce->addValue("Italian");
#endif
#ifdef LANG_JP
ce->addValue("Japanese");
#endif
#ifdef LANG_KR
ce->addValue("Korean");
#endif
#ifdef LANG_NO
ce->addValue("Norwegian");
#endif
#ifdef LANG_PL
ce->addValue("Polish");
#endif
#ifdef LANG_PT
ce->addValue("Portuguese");
#endif
#ifdef LANG_RO
ce->addValue("Romanian");
#endif
#ifdef LANG_RU
ce->addValue("Russian");
#endif
#ifdef LANG_SK
ce->addValue("Slovak");
#endif
#ifdef LANG_SI
ce->addValue("Slovene");
#endif
#ifdef LANG_ES
ce->addValue("Spanish");
#endif
#ifdef LANG_SE
ce->addValue("Swedish");
#endif
#ifdef LANG_UA
ce->addValue("Ukrainian");
#endif
cb = addBool(
"EXTRACT_ALL",
"If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in \n"
......@@ -1261,6 +1319,13 @@ void Config::create()
"will be included in the documentation. \n",
FALSE
);
cb = addBool(
"EXTRACT_LOCAL_CLASSES",
"If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) \n"
"defined locally in source files will be included in the documentation. \n"
"If set to NO only classes defined in header files are included. \n",
TRUE
);
cb = addBool(
"HIDE_UNDOC_MEMBERS",
"If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all \n"
......@@ -1301,6 +1366,14 @@ void Config::create()
"description. \n",
FALSE
);
cb = addBool(
"INLINE_INHERITED_MEMB",
"If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all inherited \n"
"members of a class in the documentation of that class as if those members were \n"
"ordinary class members. Constructors, destructors and assignment operators of \n"
"the base classes will not be shown. \n",
FALSE
);
cb = addBool(
"FULL_PATH_NAMES",
"If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full \n"
......
......@@ -196,8 +196,8 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
g_argRoundCount++;
*g_copyArgValue += *yytext;
}
<CopyArgRound,CopyArgRound2>")" {
*g_copyArgValue += *yytext;
<CopyArgRound,CopyArgRound2>")"({B}*{ID})* {
*g_copyArgValue += yytext;
if (g_argRoundCount>0)
{
g_argRoundCount--;
......@@ -251,6 +251,7 @@ ID [a-z_A-Z][a-z_A-Z0-9]*
<ReadFuncArgType,ReadFuncArgDef>[,)>] {
g_curArgTypeName=removeRedundantWhiteSpace(g_curArgTypeName);
g_curArgDefValue=g_curArgDefValue.stripWhiteSpace();
//printf("curArgType=`%s' curArgDefVal=`%s'\n",g_curArgTypeName.data(),g_curArgDefValue.data());
int l=g_curArgTypeName.length();
if (l>0)
{
......
......@@ -1002,21 +1002,25 @@ OPMASK ({B}*{OPNORM}({OPARG}?))|({OPCAST}{OPARG})
outDoc->docify(getenv(envvar));
}
<DocScan>{CMD}"htmlonly"/[^a-z_A-Z0-9] {
outDoc->startHtmlOnly();
outDoc->pushGeneratorState();
outDoc->disableAllBut(OutputGenerator::Html);
BEGIN(DocHtmlScan);
}
<DocHtmlScan>{CMD}"endhtmlonly"/[^a-z_A-Z0-9] {
outDoc->popGeneratorState();
outDoc->endHtmlOnly();
BEGIN(DocScan);
}
<DocScan>{CMD}"latexonly"/[^a-z_A-Z0-9] {
outDoc->startLatexOnly();
outDoc->pushGeneratorState();
outDoc->disableAllBut(OutputGenerator::Latex);
BEGIN(DocLatexScan);
}
<DocLatexScan>{CMD}"endlatexonly"/[^a-z_A-Z0-9] {
outDoc->popGeneratorState();
outDoc->endLatexOnly();
BEGIN(DocScan);
}
<DocHtmlScan,DocLatexScan>"//"|"/*"|"*/" {
......
......@@ -555,215 +555,214 @@ static void buildClassList(Entry *root)
{
// this should not be called
warn(root->fileName,root->startLine,
"Warning: invalid class name found!"
"Warning: invalid class name found!"
);
goto error;
}
else
{
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());
fullName=stripAnonymousNamespaceScope(fullName);
fullName=stripTemplateSpecifiersFromScope(fullName);
Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data());
fullName=stripAnonymousNamespaceScope(fullName);
fullName=stripTemplateSpecifiersFromScope(fullName);
bool ambig;
ClassDef *cd;
//printf("findFileDef(%s)\n",root->fileName.data());
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
Debug::print(Debug::Classes,0," Found class with name %s\n",fullName.data());
if ((cd=getClass(fullName)))
{
Debug::print(Debug::Classes,0," Existing class!\n",fullName.data());
//if (cd->templateArguments()==0)
//{
// //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
// cd->setTemplateArguments(tArgList);
//}
if (!root->doc.isEmpty() || !root->brief.isEmpty() ||
(root->bodyLine!=-1 && Config_getBool("SOURCE_BROWSER"))
)
// block contains something that ends up in the docs
{
if (!root->doc.isEmpty() && !cd->documentation().isEmpty())
{
warn(
root->fileName,root->startLine,
"Warning: class %s already has a detailed description. "
"Skipping the one found here.",
fullName.data()
);
}
else if (!root->doc.isEmpty())
{
cd->setDocumentation(root->doc);
}
if (!root->brief.isEmpty() && !cd->briefDescription().isEmpty())
{
warn(
root->fileName,root->startLine,
"Warning: class %s already has a brief description\n"
" skipping the one found here.",
fullName.data()
);
}
else if (!root->brief.isEmpty())
{
cd->setBriefDescription(root->brief);
}
if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1)
{
cd->setBodySegment(root->bodyLine,root->endBodyLine);
cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
}
cd->addSectionsToDefinition(root->anchors);
cd->setName(fullName); // change name to match docs
}
cd->setFileDef(fd);
if (cd->hasDocumentation())
bool ambig;
ClassDef *cd;
//printf("findFileDef(%s)\n",root->fileName.data());
FileDef *fd=findFileDef(Doxygen::inputNameDict,root->fileName,ambig);
if ((cd=getClass(fullName)))
{
Debug::print(Debug::Classes,0," Existing class!\n",fullName.data());
//if (cd->templateArguments()==0)
//{
// //printf("existing ClassDef tempArgList=%p specScope=%s\n",root->tArgList,root->scopeSpec.data());
// cd->setTemplateArguments(tArgList);
//}
if (!root->doc.isEmpty() || !root->brief.isEmpty() ||
(root->bodyLine!=-1 && Config_getBool("SOURCE_BROWSER"))
)
// block contains something that ends up in the docs
{
if (!root->doc.isEmpty() && !cd->documentation().isEmpty())
{
addIncludeFile(cd,fd,root);
warn(
root->fileName,root->startLine,
"Warning: class %s already has a detailed description. "
"Skipping the one found here.",
fullName.data()
);
}
addNamespace(root,cd);
if (fd && (root->section & Entry::COMPOUND_MASK))
else if (!root->doc.isEmpty())
{
//printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
// cd->name().data(),
// fd->name().data(),
// root->fileName.data()
// );
fd->insertClass(cd);
cd->setDocumentation(root->doc);
}
addClassToGroups(root,cd);
cd->setRefItems(root->todoId,root->testId,root->bugId);
if (!root->subGrouping) cd->setSubGrouping(FALSE);
if (cd->templateArguments()==0)
if (!root->brief.isEmpty() && !cd->briefDescription().isEmpty())
{
// this happens if a template class declared with @class is found
// before the actual definition.
ArgumentList *tArgList =
getTemplateArgumentsFromName(fullName,root->tArgLists);
cd->setTemplateArguments(tArgList);
warn(
root->fileName,root->startLine,
"Warning: class %s already has a brief description\n"
" skipping the one found here.",
fullName.data()
);
}
}
else // new class
{
ClassDef::CompoundType sec=ClassDef::Class;
switch(root->section)
else if (!root->brief.isEmpty())
{
case Entry::UNION_SEC:
case Entry::UNIONDOC_SEC:
sec=ClassDef::Union; break;
case Entry::STRUCT_SEC:
case Entry::STRUCTDOC_SEC:
sec=ClassDef::Struct; break;
case Entry::INTERFACE_SEC:
case Entry::INTERFACEDOC_SEC:
sec=ClassDef::Interface; break;
case Entry::EXCEPTION_SEC:
case Entry::EXCEPTIONDOC_SEC:
sec=ClassDef::Exception; break;
cd->setBriefDescription(root->brief);
}
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
QCString className;
QCString namespaceName;
extractNamespaceName(fullName,className,namespaceName);
//printf("New class: namespace `%s' name=`%s'\n",className.data(),namespaceName.data());
QCString tagName;
QCString refFileName;
if (root->tagInfo)
if (root->bodyLine!=-1 && cd->getStartBodyLine()==-1)
{
tagName = root->tagInfo->tagName;
refFileName = root->tagInfo->fileName;
cd->setBodySegment(root->bodyLine,root->endBodyLine);
cd->setBodyDef(findFileDef(Doxygen::inputNameDict,root->fileName,ambig));
}
ClassDef *cd=new ClassDef(root->fileName,root->startLine,fullName,sec,
tagName,refFileName);
cd->setDocumentation(root->doc); // copy docs to definition
cd->setBriefDescription(root->brief);
//printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
cd->addSectionsToDefinition(root->anchors);
cd->setName(fullName); // change name to match docs
}
cd->setFileDef(fd);
if (cd->hasDocumentation())
{
addIncludeFile(cd,fd,root);
}
addNamespace(root,cd);
if (fd && (root->section & Entry::COMPOUND_MASK))
{
//printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
// cd->name().data(),
// fd->name().data(),
// root->fileName.data()
// );
fd->insertClass(cd);
}
addClassToGroups(root,cd);
cd->setRefItems(root->todoId,root->testId,root->bugId);
if (!root->subGrouping) cd->setSubGrouping(FALSE);
if (cd->templateArguments()==0)
{
// this happens if a template class declared with @class is found
// before the actual definition.
ArgumentList *tArgList =
getTemplateArgumentsFromName(fullName,root->tArgLists);
//printf("class %s template args=%s\n",fullName.data(),
// tArgList ? tempArgListToString(tArgList).data() : "<none>");
getTemplateArgumentsFromName(fullName,root->tArgLists);
cd->setTemplateArguments(tArgList);
cd->setProtection(root->protection);
cd->addSectionsToDefinition(root->anchors);
cd->setIsStatic(root->stat);
}
}
else // new class
{
// file definition containing the class cd
cd->setBodySegment(root->bodyLine,root->endBodyLine);
cd->setBodyDef(fd);
if (!root->subGrouping) cd->setSubGrouping(FALSE);
ClassDef::CompoundType sec=ClassDef::Class;
switch(root->section)
{
case Entry::UNION_SEC:
case Entry::UNIONDOC_SEC:
sec=ClassDef::Union; break;
case Entry::STRUCT_SEC:
case Entry::STRUCTDOC_SEC:
sec=ClassDef::Struct; break;
case Entry::INTERFACE_SEC:
case Entry::INTERFACEDOC_SEC:
sec=ClassDef::Interface; break;
case Entry::EXCEPTION_SEC:
case Entry::EXCEPTIONDOC_SEC:
sec=ClassDef::Exception; break;
}
Debug::print(Debug::Classes,0," New class `%s' (sec=0x%08x)! #tArgLists=%d\n",
fullName.data(),root->section,root->tArgLists ? (int)root->tArgLists->count() : -1);
QCString className;
QCString namespaceName;
extractNamespaceName(fullName,className,namespaceName);
addClassToGroups(root,cd);
cd->setRefItems(root->todoId,root->testId,root->bugId);
//printf("New class: namespace `%s' name=`%s'\n",className.data(),namespaceName.data());
// see if the class is found inside a namespace
bool found=addNamespace(root,cd);
QCString tagName;
QCString refFileName;
if (root->tagInfo)
{
tagName = root->tagInfo->tagName;
refFileName = root->tagInfo->fileName;
}
ClassDef *cd=new ClassDef(root->fileName,root->startLine,fullName,sec,
tagName,refFileName);
cd->setDocumentation(root->doc); // copy docs to definition
cd->setBriefDescription(root->brief);
//printf("new ClassDef %s tempArgList=%p specScope=%s\n",fullName.data(),root->tArgList,root->scopeSpec.data());
cd->setFileDef(fd);
if (cd->hasDocumentation())
{
addIncludeFile(cd,fd,root);
}
// namespace is part of the class name
if (!found && !namespaceName.isEmpty())
{
NamespaceDef *nd = getResolvedNamespace(namespaceName);
if (nd)
{
cd->setNamespace(nd);
nd->insertClass(cd);
found=TRUE;
}
}
// if the class is not in a namespace then we insert
// it in the file definition
if (!found && fd && (root->section & Entry::COMPOUND_MASK))
{
//printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
// cd->name().data(),
// fd->name().data(),
// root->fileName.data()
// );
fd->insertClass(cd);
}
// the empty string test is needed for extract all case
cd->setBriefDescription(root->brief);
cd->insertUsedFile(root->fileName);
// add class to the list
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
Doxygen::classSDict.append(fullName,cd);
ArgumentList *tArgList =
getTemplateArgumentsFromName(fullName,root->tArgLists);
//printf("class %s template args=%s\n",fullName.data(),
// tArgList ? tempArgListToString(tArgList).data() : "<none>");
cd->setTemplateArguments(tArgList);
cd->setProtection(root->protection);
cd->addSectionsToDefinition(root->anchors);
cd->setIsStatic(root->stat);
// also add class to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
if (d==0)
{
//warn(root->fileName,root->startLine,
// "Warning: Internal inconsistency: scope for class %s not "
// "found!\n",fullName.data()
// );
}
else
// file definition containing the class cd
cd->setBodySegment(root->bodyLine,root->endBodyLine);
cd->setBodyDef(fd);
if (!root->subGrouping) cd->setSubGrouping(FALSE);
addClassToGroups(root,cd);
cd->setRefItems(root->todoId,root->testId,root->bugId);
// see if the class is found inside a namespace
bool found=addNamespace(root,cd);
cd->setFileDef(fd);
if (cd->hasDocumentation())
{
addIncludeFile(cd,fd,root);
}
// namespace is part of the class name
if (!found && !namespaceName.isEmpty())
{
NamespaceDef *nd = getResolvedNamespace(namespaceName);
if (nd)
{
//printf("****** adding %s to scope %s\n",cd->name().data(),d->name().data());
d->addInnerCompound(cd);
cd->setOuterScope(d);
cd->setNamespace(nd);
nd->insertClass(cd);
found=TRUE;
}
}
// if the class is not in a namespace then we insert
// it in the file definition
if (!found && fd && (root->section & Entry::COMPOUND_MASK))
{
//printf(">> Inserting class `%s' in file `%s' (root->fileName=`%s')\n",
// cd->name().data(),
// fd->name().data(),
// root->fileName.data()
// );
fd->insertClass(cd);
}
// the empty string test is needed for extract all case
cd->setBriefDescription(root->brief);
cd->insertUsedFile(root->fileName);
// add class to the list
//printf("ClassDict.insert(%s)\n",resolveDefines(fullName).data());
Doxygen::classSDict.append(fullName,cd);
// also add class to the correct structural context
Definition *d = findScopeFromQualifiedName(Doxygen::globalScope,fullName);
if (d==0)
{
//warn(root->fileName,root->startLine,
// "Warning: Internal inconsistency: scope for class %s not "
// "found!\n",fullName.data()
// );
}
else
{
//printf("****** adding %s to scope %s\n",cd->name().data(),d->name().data());
d->addInnerCompound(cd);
cd->setOuterScope(d);
}
}
}
error:
EntryListIterator eli(*root->sublist);
Entry *e;
for (;(e=eli.current());++eli)
......@@ -1847,7 +1846,7 @@ static void buildFunctionList(Entry *root)
//printf("match!\n");
// see if we need to create a new member
found=(nd && rnd && nsName==rnsName) || // members are in the same namespace
((fd!=0 && // no external reference and
((nd==0 && rnd==0 && fd!=0 && // no external reference and
fd->absFilePath()==root->fileName // prototype in the same file
)
);
......@@ -2167,6 +2166,11 @@ static void transferFunctionDocumentation()
}
mdec->mergeMemberSpecifiers(mdef->getMemberSpecifiers());
mdef->mergeMemberSpecifiers(mdec->getMemberSpecifiers());
int todoId = QMAX(mdec->todoId(),mdef->todoId());
int testId = QMAX(mdec->testId(),mdef->testId());
int bugId = QMAX(mdec->bugId() ,mdef->bugId() );
mdec->setRefItems(todoId,testId,bugId);
}
}
}
......@@ -4775,6 +4779,7 @@ static void buildCompleteMemberLists()
cd->subClasses()->count()==0 && // is a root of the hierarchy
cd->baseClasses()->count()>0) // and has at least one base class
{
//printf("*** merging members for %s\n",cd->name().data());
cd->mergeMembers();
}
}
......@@ -6954,8 +6959,8 @@ void parseInput()
msg("Determining which enums are documented\n");
findDocumentedEnumValues();
msg("Computing member references...\n");
computeMemberReferences();
//msg("Computing member references...\n");
//computeMemberReferences();
msg("Computing member relations...\n");
computeMemberRelations();
......@@ -6975,6 +6980,9 @@ void parseInput()
msg("Building full member lists recursively...\n");
buildCompleteMemberLists();
msg("Computing member references...\n");
computeMemberReferences();
if (Config_getBool("INHERIT_DOCS"))
{
msg("Inheriting documentation...\n");
......
......@@ -84,7 +84,7 @@ FileDef::~FileDef()
/*! Compute the HTML anchor names for all members in the class */
void FileDef::computeAnchors()
{
setAnchors('a',&allMemberList);
setAnchors(0,'a',&allMemberList);
}
void FileDef::distributeMemberGroupDocumentation()
......
......@@ -343,7 +343,7 @@ int GroupDef::countMembers() const
/*! Compute the HTML anchor names for all members in the class */
void GroupDef::computeAnchors()
{
setAnchors('a',allMemberList);
setAnchors(0,'a',allMemberList);
}
void GroupDef::writeDocumentation(OutputList &ol)
......
......@@ -249,6 +249,11 @@ class HtmlGenerator : public OutputGenerator
void startFontClass(const char *s) { t << "<font class=\"" << s << "\">"; }
void endFontClass() { t << "</font>"; }
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
private:
QCString lastTitle;
QCString lastFile;
......
......@@ -21,3 +21,4 @@
#define LANG_DK
#define LANG_SK
#define LANG_UA
#define LANG_GR
......@@ -91,6 +91,12 @@
#ifdef LANG_UA
#include "translator_ua.h"
#endif
#ifdef LANG_GR
#include "translator_gr.h"
#endif
//#ifdef LANG_JS
//#include "translator_js.h"
//#endif
#endif
#define L_EQUAL(a) !stricmp(langName,a)
......@@ -242,6 +248,16 @@ bool setTranslator(const char *langName)
theTranslator=new TranslatorUkrainian;
}
#endif
#ifdef LANG_GR
else if (L_EQUAL("greek"))
{
theTranslator=new TranslatorGreek;
}
#endif
// else if (L_EQUAL("japanese-sjis"))
// {
// theTranslator=new TranslatorJapaneseSjis;
// }
#endif
else // use the default language (i.e. english)
{
......
......@@ -272,8 +272,9 @@ static void writeDefaultHeaderPart1(QTextStream &t)
t << "\\makeindex\n"
"\\setcounter{tocdepth}{1}\n"
"\\setlength{\\footrulewidth}{0.4pt}\n"
"\\begin{document}\n"
"\\begin{titlepage}\n"
"\\begin{document}\n";
if (theTranslator->idLanguage()=="greek") t << "\\selectlanguage{greek}\n";
t << "\\begin{titlepage}\n"
"\\vspace*{7cm}\n"
"\\begin{center}\n"
"{\\Large ";
......@@ -1380,13 +1381,15 @@ void LatexGenerator::latin2ToLatex(unsigned char c)
//void LatexGenerator::docifyStatic(QTextStream &t,const char *str)
void LatexGenerator::docify(const char *str)
{
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";
static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2";
static bool isCzech = theTranslator->idLanguage()=="czech";
static bool isJapanese = theTranslator->idLanguage()=="japanese";
static bool isJapaneseSjis = theTranslator->idLanguage()=="japanese-sjis";
static bool isKorean = theTranslator->idLanguage()=="korean";
static bool isRussian = theTranslator->idLanguage()=="russian";
static bool isUkrainian = theTranslator->idLanguage()=="ukrainian";
static bool isChinese = theTranslator->idLanguage()=="chinese";
static bool isLatin2 = theTranslator->idLanguageCharset()=="iso-8859-2";
static bool isGreek = theTranslator->idLanguage()=="greek";
if (str)
{
const unsigned char *p=(const unsigned char *)str;
......@@ -1452,7 +1455,7 @@ void LatexGenerator::docify(const char *str)
default:
// Some languages uses wide characters
if (isJapanese || isKorean || isChinese)
if (isJapanese || isJapaneseSjis || isKorean || isChinese)
{
if (c>=128)
{
......@@ -1494,6 +1497,17 @@ void LatexGenerator::docify(const char *str)
t << (char)c;
}
}
else if (isGreek)
{
if (c<128)
{
t << "\\textlatin{" << (char)c << "}";
}
else
{
t << (char)c;
}
}
else // language is other than Czech, Russian or Japanese
{
switch(c)
......
......@@ -255,6 +255,11 @@ class LatexGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
private:
void latin2ToLatex(unsigned char);
......
......@@ -76,6 +76,7 @@ HEADERS = bufstr.h \
translator_es.h \
translator_fi.h \
translator_fr.h \
translator_gr.h \
translator_hr.h \
translator_hu.h \
translator_it.h \
......
......@@ -143,6 +143,7 @@ void ManGenerator::startFile(const char *,const char *manName,
void ManGenerator::endFile()
{
t << endl;
endPlainFile();
}
......
......@@ -237,6 +237,11 @@ class ManGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
private:
bool firstCol;
bool paragraph;
......
......@@ -129,6 +129,7 @@ static void writeDefArgumentList(OutputList &ol,ClassDef *cd,
}
if ((vp=a->type.find(re))!=-1) // argument type is a function pointer
{
//printf("a->type=`%s' a->name=`%s'\n",a->type.data(),a->name.data());
QCString n=a->type.left(vp);
if (!cName.isEmpty()) n=addTemplateNames(n,cd->name(),cName);
linkifyText(TextGeneratorOLImpl(ol),scopeName,md->name(),n);
......@@ -367,10 +368,7 @@ void MemberDef::setReimplements(MemberDef *md)
{
m_templateMaster->setReimplements(md);
}
else
{
redefines=md;
}
redefines=md;
}
void MemberDef::insertReimplementedBy(MemberDef *md)
......@@ -379,11 +377,8 @@ void MemberDef::insertReimplementedBy(MemberDef *md)
{
m_templateMaster->insertReimplementedBy(md);
}
else
{
if (redefinedBy==0) redefinedBy = new MemberList;
redefinedBy->inSort(md);
}
if (redefinedBy==0) redefinedBy = new MemberList;
redefinedBy->inSort(md);
}
void MemberDef::insertEnumField(MemberDef *md)
......@@ -491,6 +486,7 @@ ClassDef *MemberDef::getClassDefOfAnonymousType()
if (ltype.left(7)=="friend ") ltype=ltype.right(ltype.length()-7);
static QRegExp r("@[0-9]+");
int l,i=r.match(ltype,0,&l);
//printf("ltype=`%s' i=%d\n",ltype.data(),i);
// search for the last anonymous scope in the member type
ClassDef *annoClassDef=0;
if (i!=-1) // found anonymous scope in type
......@@ -498,10 +494,9 @@ ClassDef *MemberDef::getClassDefOfAnonymousType()
int il=i-1,ir=i+l;
// extract anonymous scope
while (il>=0 && (isId(ltype.at(il)) || ltype.at(il)==':' || ltype.at(il)=='@')) il--;
if (il>0) il++;
if (il>0) il++; else if (il<0) il=0;
while (ir<(int)ltype.length() && (isId(ltype.at(ir)) || ltype.at(ir)==':' || ltype.at(ir)=='@')) ir++;
//QCString annName = ltype.mid(i,l);
QCString annName = ltype.mid(il,ir-il);
// if inside a class or namespace try to prepend the scope name
......@@ -745,7 +740,7 @@ void MemberDef::writeDeclaration(OutputList &ol,
}
// write name
if (!name().isEmpty() && name().at(0)!='@')
if (!name().isEmpty() && name().at(0)!='@') // hide annonymous stuff
{
//printf("Member name=`%s gd=%p md->groupDef=%p inGroup=%d isLinkable()=%d\n",name().data(),gd,getGroupDef(),inGroup,isLinkable());
if (isLinkable())
......@@ -764,7 +759,9 @@ void MemberDef::writeDeclaration(OutputList &ol,
else
{
//printf("writeLink %s->%d\n",name.data(),hasDocumentation());
writeLink(ol,cd,nd,fd,gd);
ClassDef *rcd = cd;
if (isReference() && classDef) rcd = classDef;
writeLink(ol,rcd,nd,fd,gd);
}
}
else if (isDocumentedFriendClass())
......@@ -903,7 +900,7 @@ bool MemberDef::isDetailedSectionVisible(bool inGroup) const
{
bool groupFilter = getGroupDef()==0 || inGroup;
bool visible = isDetailedSectionLinkable() && groupFilter;
bool visible = isDetailedSectionLinkable() && groupFilter && !isReference();
//printf("MemberDef::isDetailedSectionVisible() %d\n",visible);
return visible;
}
......@@ -1102,7 +1099,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
isFriend() || isRelated() || isExplicit() ||
isMutable() || (isInline() && Config_getBool("INLINE_INFO")) ||
isSignal() || isSlot() ||
isStatic()
isStatic() || (classDef && classDef!=container)
)
{
// write the member specifier list
......@@ -1126,6 +1123,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
if (isSignal()) sl.append("signal");
if (isSlot()) sl.append("slot");
}
if (classDef && classDef!=container) sl.append("inherited");
const char *s=sl.first();
while (s)
{
......@@ -1165,22 +1163,29 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
parseCode(ol,scopeName,init,FALSE,0);
ol.endCodeFragment();
}
QCString brief = m_templateMaster ?
m_templateMaster->briefDescription() : briefDescription();
QCString detailed = m_templateMaster ?
m_templateMaster->documentation() : documentation();
ArgumentList *docArgList = m_templateMaster ?
m_templateMaster->argList : argList;
/* write brief description */
if (!briefDescription().isEmpty() &&
if (!brief.isEmpty() &&
(Config_getBool("REPEAT_BRIEF")
/* || (!Config_getBool("BRIEF_MEMBER_DESC") && documentation().isEmpty())*/
) /* || !annMemb */
)
{
parseDoc(ol,m_defFileName,m_defLine,scopeName,name(),briefDescription());
parseDoc(ol,m_defFileName,m_defLine,scopeName,name(),brief);
ol.newParagraph();
}
/* write detailed description */
if (!documentation().isEmpty())
if (!detailed.isEmpty())
{
parseDoc(ol,m_defFileName,m_defLine,scopeName,name(),documentation()+"\n");
parseDoc(ol,m_defFileName,m_defLine,scopeName,name(),detailed+"\n");
ol.pushGeneratorState();
ol.disableAllBut(OutputGenerator::RTF);
ol.newParagraph();
......@@ -1190,7 +1195,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
//printf("***** argList=%p name=%s docs=%s hasDocs=%d\n",
// argList,
// argList?argList->hasDocumentation():-1);
if (argList && argList->hasDocumentation())
if (docArgList && docArgList->hasDocumentation())
{
//printf("***** argumentList is documented\n");
ol.startParamList(BaseOutputDocInterface::Param);
......@@ -1198,7 +1203,7 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ol.endDescTitle();
ol.writeDescItem();
ol.startDescTable();
ArgumentListIterator ali(*argList);
ArgumentListIterator ali(*docArgList);
Argument *a;
for (ali.toFirst();(a=ali.current());++ali)
{
......@@ -1293,21 +1298,6 @@ void MemberDef::writeDocumentation(MemberList *ml,OutputList &ol,
ClassDef *bcd=0;
if (bmd && (bcd=bmd->getClassDef()))
{
#if 0
if (lvirt!=Normal) // search for virtual member of the deepest base class
{
MemberDef *lastBmd=bmd;
while (lastBmd)
{
ClassDef *lastBcd = lastBmd->getClassDef();
if (lastBmd->virtualness()!=Normal &&
lastBmd->isLinkable() &&
lastBcd->isLinkable()
) { bmd=lastBmd; bcd=lastBcd; }
lastBmd=lastBmd->reimplements();
}
}
#endif
// write class that contains a member that is reimplemented by this one
if (bcd->isLinkable())
{
......@@ -1543,6 +1533,11 @@ QCString MemberDef::getScopeString() const
return result;
}
void MemberDef::setAnchor(const char *a)
{
anc=a;
}
QCString MemberDef::anchor() const
{
if (m_templateMaster) return m_templateMaster->anchor();
......@@ -1601,6 +1596,9 @@ MemberDef *MemberDef::createTemplateInstanceMember(
actArg->type = substituteTemplateArgumentsInString(actArg->type,formalArgs,actualArgs);
actualArgList->append(actArg);
}
actualArgList->constSpecifier = argList->constSpecifier;
actualArgList->volatileSpecifier = argList->volatileSpecifier;
actualArgList->pureSpecifier = argList->pureSpecifier;
}
MemberDef *imd = new MemberDef(
......@@ -1613,7 +1611,11 @@ MemberDef *MemberDef::createTemplateInstanceMember(
);
imd->argList = actualArgList;
imd->def = substituteTemplateArgumentsInString(def,formalArgs,actualArgs);
imd->setBodyDef(getBodyDef());
imd->setBodySegment(getStartBodyLine(),getEndBodyLine());
// TODO: init other member variables (if needed).
// TODO: reimplemented info
return imd;
}
......@@ -1663,6 +1665,7 @@ void MemberDef::addListReference(Definition *d)
memName.prepend(pd->name()+"::");
}
}
//printf("*** addListReference %s todo=%d test=%d bug=%d\n",name().data(),todoId(),testId(),bugId());
addRefItem(todoId(),testId(),bugId(),memLabel,
d->getOutputFileBase()+":"+anchor(),memName,argsString());
}
......
......@@ -135,7 +135,7 @@ class MemberDef : public Definition
void setMemberType(MemberType t) { mtype=t; }
void setDefinition(const char *d) { def=d; }
void setFileDef(FileDef *fd) { fileDef=fd; }
void setAnchor(const char *a) { anc=a; }
void setAnchor(const char *a);
void setProtection(Protection p) { prot=p; }
void setMemberSpecifiers(int s) { memSpec=s; }
void mergeMemberSpecifiers(int s) { memSpec|=s; }
......
......@@ -84,7 +84,7 @@ void MemberGroup::insertMember(MemberDef *md)
void MemberGroup::setAnchors()
{
::setAnchors('z',memberList,grpId);
::setAnchors(0,'z',memberList,grpId);
}
void MemberGroup::writeDeclarations(OutputList &ol,
......
......@@ -373,54 +373,8 @@ void MemberList::writePlainDeclarations(OutputList &ol,
}
case MemberDef::Friend:
{
#if 0
//printf("Writing friend `%s'\n",md->name().data());
QCString type=md->typeString();
//printf("Friend: type=%s name=%s\n",type.data(),md->name().data());
bool isFriendClass = type=="friend class";
if (!isFriendClass)
{
#endif
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
#if 0
}
else // isFriendClass
// friend is undocumented as a member but it is a class,
// so generate a link to the class if that is documented.
{
ClassDef *cd=getClass(md->name());
if (md->hasDocumentation()) // friend is documented
{
if (first) ol.startMemberList(),first=FALSE;
ol.startMemberItem(0);
ol.docify("class ");
ol.insertMemberAlign();
ol.writeObjectLink(0,0,md->anchor(),md->name());
ol.endMemberItem(FALSE);
}
else if (cd && cd->isLinkable()) // class is documented
{
if (first) ol.startMemberList(),first=FALSE;
ol.startMemberItem(0);
ol.docify("class ");
ol.insertMemberAlign();
ol.writeObjectLink(cd->getReference(),cd->getOutputFileBase(),0,cd->name());
ol.endMemberItem(FALSE);
}
else if (!Config_getBool("HIDE_UNDOC_MEMBERS")) // no documentation
{
if (first) ol.startMemberList(),first=FALSE;
ol.startMemberItem(0);
ol.docify("class ");
ol.insertMemberAlign();
ol.startBold();
ol.docify(md->name());
ol.endBold();
ol.endMemberItem(FALSE);
}
}
#endif
if (first) ol.startMemberList(),first=FALSE;
md->writeDeclaration(ol,cd,nd,fd,gd,m_inGroup);
break;
}
case MemberDef::EnumValue:
......
......@@ -167,7 +167,7 @@ void NamespaceDef::insertMember(MemberDef *md)
void NamespaceDef::computeAnchors()
{
setAnchors('a',&allMemberList);
setAnchors(0,'a',&allMemberList);
}
void NamespaceDef::writeDocumentation(OutputList &ol)
......
......@@ -257,6 +257,11 @@ class BaseOutputDocInterface
virtual void startFontClass(const char *) = 0;
virtual void endFontClass() = 0;
virtual void startHtmlOnly() = 0;
virtual void endHtmlOnly() = 0;
virtual void startLatexOnly() = 0;
virtual void endLatexOnly() = 0;
/*! Writes an ASCII string to the output. This function should keep
* spaces visible, should break lines at a newline and should convert
* tabs to the right number of spaces.
......
......@@ -434,6 +434,15 @@ class OutputList : public OutputDocInterface
void endFontClass()
{ forall(&OutputGenerator::endFontClass); }
void startHtmlOnly()
{ forall(&OutputGenerator::startHtmlOnly); }
void endHtmlOnly()
{ forall(&OutputGenerator::endHtmlOnly); }
void startLatexOnly()
{ forall(&OutputGenerator::startLatexOnly); }
void endLatexOnly()
{ forall(&OutputGenerator::endLatexOnly); }
#if 0
void startPlainFile(const char *name)
{ forall(&OutputGenerator::startPlainFile,name); }
......
......@@ -240,6 +240,11 @@ class RTFGenerator : public OutputGenerator
void startFontClass(const char *) {}
void endFontClass() {}
void startHtmlOnly() {}
void endHtmlOnly() {}
void startLatexOnly() {}
void endLatexOnly() {}
static bool preProcessFileInplace(const char *path,const char *name);
private:
......
......@@ -920,6 +920,10 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
current->name = current->name.simplifyWhiteSpace();
BEGIN( FindMembers ) ;
}
<Operator>";" { // can occur when importing members
unput(';');
BEGIN( FindMembers ) ;
}
<Operator>[^(] {
lineCount();
current->name += *yytext ;
......@@ -1093,6 +1097,11 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
BEGIN( ReadFuncArgType ) ;
}
}
<EndTemplate>">"{BN}*/"("({BN}*{ID}{BN}*"::")*({BN}*"*"{BN}*)+ { // function pointer returning a template instance
lineCount();
current->name+='>';
BEGIN(FindMembers);
}
<EndTemplate>">"{BN}*/"::" {
lineCount();
current->name+='>';
......@@ -2033,24 +2042,58 @@ CHARLIT (("'"\\[0-7]{1,3}"'")|("'"\\."'")|("'"[^'\\\n]{1,4}"'"))
}
/* a special comment */
<ReadFuncArgType>("/*"[*!]|"//"[/!])("<"?) {
fullArgString+=yytext;
lastCopyArgChar=0;
if (yytext[1]=='/')
BEGIN( CopyArgCommentLine );
if (currentArgumentContext==DefineEnd)
{
// for defines we interpret a comment
// as documentation for the define
int i;for (i=yyleng-1;i>=0;i--)
{
unput(yytext[i]);
}
stringToArgumentList(fullArgString,current->argList);
BEGIN( currentArgumentContext );
}
else
BEGIN( CopyArgComment );
{
// for functions we interpret a comment
// as documentation for the argument
fullArgString+=yytext;
lastCopyArgChar=0;
if (yytext[1]=='/')
BEGIN( CopyArgCommentLine );
else
BEGIN( CopyArgComment );
}
}
/* `)' followed by a special comment */
<ReadFuncArgType>")"{BN}*("/*"[*!]|"//"[/!])"<" {
lineCount();
lastCopyArgChar=*yytext;
QCString text=&yytext[1];
text=text.stripWhiteSpace();
fullArgString+=text;
if (text.find("//")!=-1)
BEGIN( CopyArgCommentLine );
if (currentArgumentContext==DefineEnd)
{
// for defines we interpret a comment
// as documentation for the define
int i;for (i=yyleng-1;i>0;i--)
{
unput(yytext[i]);
}
*copyArgString+=*yytext;
fullArgString+=*yytext;
stringToArgumentList(fullArgString,current->argList);
BEGIN( currentArgumentContext );
}
else
BEGIN( CopyArgComment );
{
// for functions we interpret a comment
// as documentation for the last argument
lastCopyArgChar=*yytext;
QCString text=&yytext[1];
text=text.stripWhiteSpace();
fullArgString+=text;
if (text.find("//")!=-1)
BEGIN( CopyArgCommentLine );
else
BEGIN( CopyArgComment );
}
}
<CopyArgComment>[^\n\*]+ { fullArgString+=yytext; }
<CopyArgComment>"*/" { fullArgString+=yytext;
......
......@@ -32,6 +32,7 @@
#include "doxygen.h"
#include "util.h"
#include "message.h"
#include "defargs.h"
//#include "reflist.h"
/*! Container for member specific info that can be read from a tagfile */
......@@ -859,6 +860,11 @@ void TagFileParser::buildMemberList(Entry *ce,QList<TagMemberInfo> &members)
me->type = tmi->type;
me->name = tmi->name;
me->args = tmi->arglist;
if (!me->args.isEmpty())
{
me->argList = new ArgumentList;
stringToArgumentList(me->args,me->argList);
}
me->protection = tmi->prot;
me->virt = tmi->virt;
me->stat = tmi->isStatic;
......
......@@ -267,252 +267,4 @@ class TranslatorAdapter_1_2_1 : public TranslatorAdapter_1_2_2
{ return english.trDCOPMethods(); }
};
/*! \brief Translator adapter class for release 1.2.0
*
* Translator adapter for dealing with translator changes since
* release 1.2.0
*/
class TranslatorAdapter_1_2_0 : public TranslatorAdapter_1_2_1
{
public:
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.2.0"); }
virtual QCString trTest()
{ return english.trTest(); }
virtual QCString trTestList()
{ return english.trTestList(); }
};
/*! \brief Translator adapter class for release 1.1.5
*
* Translator adapter for dealing with translator changes since
* release 1.1.5
*/
class TranslatorAdapter_1_1_5 : public TranslatorAdapter_1_2_0
{
public:
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.1.5"); }
virtual QCString trLegendTitle()
{ return english.trLegendTitle(); }
virtual QCString trLegendDocs()
{ return english.trLegendDocs(); }
virtual QCString trLegend()
{ return english.trLegend(); }
};
/*! \brief Translator adapter class for release 1.1.4
*
* Translator adapter for dealing with translator changes since
* release 1.1.4
*/
class TranslatorAdapter_1_1_4 : public TranslatorAdapter_1_1_5
{
public:
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.1.4"); }
virtual QCString trReferencedBy()
{ return english.trReferencedBy(); }
virtual QCString trRemarks()
{ return english.trRemarks(); }
virtual QCString trAttention()
{ return english.trAttention(); }
virtual QCString trInclByDepGraph()
{ return english.trInclByDepGraph(); }
virtual QCString trSince()
{ return english.trSince(); }
};
/*! \brief Translator adapter class for release 1.1.3
*
* Translator adapter for dealing with translator changes since
* release 1.1.3
*/
class TranslatorAdapter_1_1_3 : public TranslatorAdapter_1_1_4
{
public:
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.1.3"); }
virtual QCString trTodo()
{ return english.trTodo(); }
virtual QCString trTodoList()
{ return english.trTodoList(); }
};
/*! \brief Translator adapter class for release 1.1.0
*
* Translator adapter for dealing with translator changes since
* release 1.1.0
*/
class TranslatorAdapter_1_1_0 : public TranslatorAdapter_1_1_3
{
public:
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.1.0"); }
virtual QCString trNote()
{ return english.trNote(); }
virtual QCString trPublicTypes()
{ return english.trPublicTypes(); }
virtual QCString trPublicAttribs()
{ return english.trPublicAttribs(); }
virtual QCString trStaticPublicAttribs()
{ return english.trStaticPublicAttribs(); }
virtual QCString trProtectedTypes()
{ return english.trProtectedTypes(); }
virtual QCString trProtectedAttribs()
{ return english.trProtectedAttribs(); }
virtual QCString trStaticProtectedAttribs()
{ return english.trStaticProtectedAttribs(); }
virtual QCString trPrivateTypes()
{ return english.trPrivateTypes(); }
virtual QCString trPrivateAttribs()
{ return english.trPrivateAttribs(); }
virtual QCString trStaticPrivateAttribs()
{ return english.trStaticPrivateAttribs(); }
virtual QCString trEnumerationValueDocumentation()
{ return english.trEnumerationValueDocumentation(); }
};
/*! \brief Translator adapter class for release 1.0.0
*
* Translator adapter for dealing with translator changes since
* release 1.0.0
*/
class TranslatorAdapter_1_0_0 : public TranslatorAdapter_1_1_0
{
virtual QCString updateNeededMessage()
{ return createUpdateNeededMessage(idLanguage(),"release 1.0.0"); }
virtual QCString trIncludingInheritedMembers()
{ return english.trIncludingInheritedMembers(); }
virtual QCString trFuncProtos()
{ return english.trFuncProtos(); }
virtual QCString trNamespaces()
{ return english.trNamespaces(); }
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ return english.trGeneratedFromFiles(compType, single); }
virtual QCString trAlphabeticalList()
{ return english.trAlphabeticalList(); }
virtual QCString trReturnValues()
{ return english.trReturnValues(); }
virtual QCString trMainPage()
{ return english.trMainPage(); }
virtual QCString trPageAbbreviation()
{ return english.trPageAbbreviation(); }
virtual QCString trSources()
{ return english.trSources(); }
virtual QCString trStaticProtectedMembers()
{ return english.trStaticProtectedMembers(); }
virtual QCString trDefinedAtLineInSourceFile()
{ return english.trDefinedAtLineInSourceFile(); }
virtual QCString trDefinedInSourceFile()
{ return english.trDefinedInSourceFile(); }
virtual QCString trDeprecated()
{ return english.trDeprecated(); }
virtual QCString trCollaborationDiagram(const char *clName)
{ return english.trCollaborationDiagram(clName); }
virtual QCString trInclDepGraph(const char *fName)
{ return english.trInclDepGraph(fName); }
virtual QCString trConstructorDocumentation()
{ return english.trConstructorDocumentation(); }
virtual QCString trGotoSourceCode()
{ return english.trGotoSourceCode(); }
virtual QCString trGotoDocumentation()
{ return english.trGotoDocumentation(); }
virtual QCString trPrecondition()
{ return english.trPrecondition(); }
virtual QCString trPostcondition()
{ return english.trPostcondition(); }
virtual QCString trInvariant()
{ return english.trInvariant(); }
virtual QCString trInitialValue()
{ return english.trInitialValue(); }
virtual QCString trCode()
{ return english.trCode(); }
virtual QCString trGraphicalHierarchy()
{ return english.trGraphicalHierarchy(); }
virtual QCString trGotoGraphicalHierarchy()
{ return english.trGotoGraphicalHierarchy(); }
virtual QCString trGotoTextualHierarchy()
{ return english.trGotoTextualHierarchy(); }
virtual QCString trPageIndex()
{ return english.trPageIndex(); }
virtual QCString trReimplementedForInternalReasons()
{ return english.trReimplementedForInternalReasons(); }
virtual QCString trClassHierarchyDescription()
{ return english.trClassHierarchyDescription(); }
virtual QCString trNoDescriptionAvailable()
{ return english.trNoDescriptionAvailable(); }
virtual QCString trEnumerationValues()
{ return english.trEnumerationValues(); }
virtual QCString trFunctionPrototypeDocumentation()
{ return english.trFunctionPrototypeDocumentation(); }
virtual QCString trEnumerationTypeDocumentation()
{ return english.trEnumerationTypeDocumentation(); }
virtual QCString trFunctionDocumentation()
{ return english.trFunctionDocumentation(); }
virtual QCString trRelatedFunctionDocumentation()
{ return english.trRelatedFunctionDocumentation(); }
};
#endif
......@@ -27,58 +27,67 @@ Olli Korhonen <olli.korhonen@ccc.fi>
olla vakiintuneessa käytössä.
* Tehtävää:
- Termien kokoaminen listaksi ja suomennosten järkevyyden tarkastelu. (lista on jo melko kattava)
Author = Tekijä
Class = Luokka
Compound = Kooste ?
Data = Data
Documentation = Dokumentaatio
Defines = Määrittelyt ?
Description = Selite
Detailed = Yksityiskohtainen
diagram = kaavio
Enum = Enumeraatio ?
Exceptions = Poikkeukset
File = Tiedosto
Friends = Ystävät ?
Functions = Funktiot
Hierarchical = Hierarkinen
Index = Indeksi
Inherits = Perii
Member = Jäsen
Module = Moduli
Namespace = Nimiavaruus ?
Parameters = Parametrit
Private = Yksityinen
Protected = Suojattu
Prototypes = Prototyypit
Public = Julkinen
Reference Manual= Käsikirja
Reimplemented = Uudelleen toteutettu
Related = Liittyvä
Signals = Signaali
Slots = ?
Static = Staattinen
Struct = ?
Typedef = Tyyppimäärittely
Union = ?
Variables = Muuttujat
- Taivutusmuotojen virheettömyyden tarkastelu prepositioiden korvauskohdissa.
- Sanasta sanaan käännöskohtien mielekkyyden tarkastelu valmiista dokumentista.
- umlaut vastineiden käyttö scandien kohdalla.
- Termien kokoaminen listaksi ja suomennosten järkevyyden tarkastelu. (lista on jo melko kattava)
Author = Tekijä
Class = Luokka
Compound = Kooste ?
Data = Data
Documentation = Dokumentaatio
Defines = Määrittelyt ?
Description = Selite
Detailed = Yksityiskohtainen
diagram = kaavio
Enum = Enumeraatio ?
Exceptions = Poikkeukset
File = Tiedosto
Friends = Ystävät ?
Functions = Funktiot
Hierarchical = Hierarkinen
Index = Indeksi
Inherits = Perii
Member = Jäsen
Module = Moduli
Namespace = Nimiavaruus ?
Parameters = Parametrit
Private = Yksityinen
Protected = Suojattu
Prototypes = Prototyypit
Public = Julkinen
Reference Manual= Käsikirja
Reimplemented = Uudelleen toteutettu
Related = Liittyvä
Signals = Signaali
Slots = ?
Static = Staattinen
Struct = ?
Typedef = Tyyppimäärittely
Union = ?
Variables = Muuttujat
- Taivutusmuotojen virheettömyyden tarkastelu prepositioiden korvauskohdissa.
- Sanasta sanaan käännöskohtien mielekkyyden tarkastelu valmiista dokumentista.
- umlaut vastineiden käyttö scandien kohdalla.
positiiviset kommentit otetaan ilolla vastaan.
===================================================================================
*/
#ifndef TRANSLATOR_SF_H
#define TRANSLATOR_SF_H
#ifndef TRANSLATOR_FI_H
#define TRANSLATOR_FI_H
#include "translator_adapter.h"
class TranslatorFinnish : public TranslatorAdapter_1_0_0
class TranslatorFinnish : public TranslatorEnglish
{
public:
/*! This method is used to generate a warning message to signal
* the user that the translation of his/her language of choice
* needs updating.
*/
virtual QCString updateNeededMessage()
{
return "Warning: The Finnish translator is really obsolete.\n"
"It was not updated since version 1.0.0. As a result,\n"
"some sentences may appear in English.\n\n";
}
QCString idLanguage()
{ return "finnish"; }
QCString latexBabelPackage()
......@@ -119,7 +128,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_0_0
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
QCString result=(QCString)"Tämän "+s+ // "The documentation for this"+s+
" dokumentaatio on generoitu ";// " was generated from the following file";
" dokumentaatio on generoitu ";// " was generated from the following file";
if (single)
result+="seuraavasta tiedostosta:";
else
......@@ -379,7 +388,7 @@ class TranslatorFinnish : public TranslatorAdapter_1_0_0
QCString trGeneratedAt(const char *date,const char *projName)
{
// funktio on hiukan vaikea kääntää prepositioihin sidotun rakenteen vuoksi.
// funktio on hiukan vaikea kääntää prepositioihin sidotun rakenteen vuoksi.
QCString result=(QCString)"Generoitu "+date; // "Generated at "
if (projName) result+=(QCString)" projektille "+projName; // " for "
result+=(QCString)" tekijä: "; // " by"
......
/******************************************************************************
*
*
*
* Copyright (C) 1997-2001 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.
*
*/
/*
* 15 Dec 2001 : Translation to greek by
* Harry Kalogirou <harkal@rainbow.cs.unipi.gr>
*/
#ifndef TRANSLATOR_GR_H
#define TRANSLATOR_GR_H
class TranslatorGreek : public TranslatorAdapter_1_2_11
{
public:
// --- Language control methods -------------------
/*! Used for identification of the language. The identification
* should not be translated. It should be replaced by the name
* of the language in English using lower-case characters only
* (e.g. "czech", "japanese", "russian", etc.). It should be equal to
* the identification used in language.cpp.
*/
virtual QCString idLanguage()
{ return "greek"; }
virtual QCString latexBabelPackage()
{
return "greek";
}
virtual QCString latexLanguageSupportCommand()
{
return "\\usepackage[greek,english]{babel}\n\\usepackage[iso-8859-7]{inputenc}\n";
}
/*! return the language charset. This will be used for the HTML output */
virtual QCString idLanguageCharset()
{
return "iso-8859-7";
}
// --- Language translation methods -------------------
/*! used in the compound documentation before a list of related functions. */
virtual QCString trRelatedFunctions()
{ return " "; }
/*! subscript for the related functions. */
virtual QCString trRelatedSubscript()
{ return "( .)"; }
/*! header that is put before the detailed description of files, classes and namespaces. */
virtual QCString trDetailedDescription()
{ return " "; }
/*! header that is put before the list of typedefs. */
virtual QCString trMemberTypedefDocumentation()
{ return " Typedef"; }
/*! header that is put before the list of enumerations. */
virtual QCString trMemberEnumerationDocumentation()
{ return " "; }
/*! header that is put before the list of member functions. */
virtual QCString trMemberFunctionDocumentation()
{ return " "; }
/*! header that is put before the list of member attributes. */
virtual QCString trMemberDataDocumentation()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return " ";
}
}
/*! this is the text of a link put after brief descriptions. */
virtual QCString trMore()
{ return "..."; }
/*! put in the class documentation */
virtual QCString trListOfAllMembers()
{ return " ."; }
/*! used as the title of the "list of all members" page of a class */
virtual QCString trMemberList()
{ return " "; }
/*! this is the first part of a sentence that is followed by a class name */
virtual QCString trThisIsTheListOfAllMembers()
{ return " "; }
/*! this is the remainder of the sentence after the class name */
virtual QCString trIncludingInheritedMembers()
{ return ", ."; }
/*! this is put at the author sections at the bottom of man pages.
* parameter s is name of the project name.
*/
virtual QCString trGeneratedAutomatically(const char *s)
{ QCString result=" Doxygen";
if (s) result+=(QCString)" "+s;
result+=" .";
return result;
}
/*! put after an enum name in the list of all members */
virtual QCString trEnumName()
{ return " "; }
/*! put after an enum value in the list of all members */
virtual QCString trEnumValue()
{ return " "; }
/*! put after an undocumented member in the list of all members */
virtual QCString trDefinedIn()
{ return " "; }
// quick reference sections
/*! This is put above each page as a link to the list of all groups of
* compounds or files (see the \\group command).
*/
virtual QCString trModules()
{ return ""; }
/*! This is put above each page as a link to the class hierarchy */
virtual QCString trClassHierarchy()
{ return " "; }
/*! This is put above each page as a link to the list of annotated classes */
virtual QCString trCompoundList()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return " ";
}
}
/*! This is put above each page as a link to the list of documented files */
virtual QCString trFileList()
{ return " "; }
/*! This is put above each page as a link to the list of all verbatim headers */
virtual QCString trHeaderFiles()
{ return " "; }
/*! This is put above each page as a link to all members of compounds. */
virtual QCString trCompoundMembers()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return " ";
}
}
/*! This is put above each page as a link to all members of files. */
virtual QCString trFileMembers()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return " ";
}
}
/*! This is put above each page as a link to all related pages. */
virtual QCString trRelatedPages()
{ return " "; }
/*! This is put above each page as a link to all examples. */
virtual QCString trExamples()
{ return ""; }
/*! This is put above each page as a link to the search engine. */
virtual QCString trSearch()
{ return ""; }
/*! This is an introduction to the class hierarchy. */
virtual QCString trClassHierarchyDescription()
{ return " , "
" , :";
}
/*! This is an introduction to the list with all files. */
virtual QCString trFileListDescription(bool extractAll)
{
QCString result=" ";
if (!extractAll) result+=" ";
result+=" :";
return result;
}
/*! This is an introduction to the annotated compound list. */
virtual QCString trCompoundListDescription()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " :";
}
else
{
return " , , "
" :";
}
}
/*! This is an introduction to the page with all class members. */
virtual QCString trCompoundMembersDescription(bool extractAll)
{
QCString result=" ";
if (!extractAll)
{
result+=" ";
}
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+=" ";
}
else
{
result+="";
}
result+=" ";
if (extractAll)
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+=" / :";
}
else
{
result+=" :";
}
}
else
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+=" / :";
}
else
{
result+=" :";
}
}
return result;
}
/*! This is an introduction to the page with all file members. */
virtual QCString trFileMembersDescription(bool extractAll)
{
QCString result=" ";
if (!extractAll) result+=" ";
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
result+=", , , , ";
}
else
{
result+=" ";
}
result+=" ";
if (extractAll)
result+=" :";
else
result+=" :";
return result;
}
/*! This is an introduction to the page with the list of all header files. */
virtual QCString trHeaderFilesDescription()
{ return " API:"; }
/*! This is an introduction to the page with the list of all examples */
virtual QCString trExamplesDescription()
{ return " :"; }
/*! This is an introduction to the page with the list of related pages */
virtual QCString trRelatedPagesDescription()
{ return " :"; }
/*! This is an introduction to the page with the list of class/file groups */
virtual QCString trModulesDescription()
{ return " :"; }
/*! This sentences is used in the annotated class/file lists if no brief
* description is given.
*/
virtual QCString trNoDescriptionAvailable()
{ return " "; }
// index titles (the project name is prepended for these)
/*! This is used in HTML as the title of index.html. */
virtual QCString trDocumentation()
{ return ""; }
/*! This is used in LaTeX as the title of the chapter with the
* index of all groups.
*/
virtual QCString trModuleIndex()
{ return " "; }
/*! This is used in LaTeX as the title of the chapter with the
* class hierarchy.
*/
virtual QCString trHierarchicalIndex()
{ return " "; }
/*! This is used in LaTeX as the title of the chapter with the
* annotated compound index.
*/
virtual QCString trCompoundIndex()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return " ";
}
}
/*! This is used in LaTeX as the title of the chapter with the
* list of all files.
*/
virtual QCString trFileIndex()
{ return " "; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all groups.
*/
virtual QCString trModuleDocumentation()
{ return " "; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all classes, structs and unions.
*/
virtual QCString trClassDocumentation()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return " ";
}
}
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all files.
*/
virtual QCString trFileDocumentation()
{ return " "; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all examples.
*/
virtual QCString trExampleDocumentation()
{ return " "; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all related pages.
*/
virtual QCString trPageDocumentation()
{ return " "; }
/*! This is used in LaTeX as the title of the document */
virtual QCString trReferenceManual()
{ return " "; }
/*! This is used in the documentation of a file as a header before the
* list of defines
*/
virtual QCString trDefines()
{ return ""; }
/*! This is used in the documentation of a file as a header before the
* list of function prototypes
*/
virtual QCString trFuncProtos()
{ return " "; }
/*! This is used in the documentation of a file as a header before the
* list of typedefs
*/
virtual QCString trTypedefs()
{ return " "; }
/*! This is used in the documentation of a file as a header before the
* list of enumerations
*/
virtual QCString trEnumerations()
{ return ""; }
/*! This is used in the documentation of a file as a header before the
* list of (global) functions
*/
virtual QCString trFunctions()
{ return ""; }
/*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trVariables()
{ return ""; }
/*! This is used in the documentation of a file as a header before the
* list of (global) variables
*/
virtual QCString trEnumerationValues()
{ return " "; }
/*! This is used in the documentation of a file before the list of
* documentation blocks for defines
*/
virtual QCString trDefineDocumentation()
{ return " "; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for function prototypes
*/
virtual QCString trFunctionPrototypeDocumentation()
{ return " "; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for typedefs
*/
virtual QCString trTypedefDocumentation()
{ return " "; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration types
*/
virtual QCString trEnumerationTypeDocumentation()
{ return " "; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for enumeration values
*/
virtual QCString trEnumerationValueDocumentation()
{ return " "; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for functions
*/
virtual QCString trFunctionDocumentation()
{ return " "; }
/*! This is used in the documentation of a file/namespace before the list
* of documentation blocks for variables
*/
virtual QCString trVariableDocumentation()
{ return " "; }
/*! This is used in the documentation of a file/namespace/group before
* the list of links to documented compounds
*/
virtual QCString trCompounds()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return "";
}
}
/*! This is used in the standard footer of each page and indicates when
* the page was generated
*/
virtual QCString trGeneratedAt(const char *date,const char *projName)
{
QCString result=(QCString)" "+date;
if (projName) result+=(QCString)" "+projName;
result+=(QCString)" ";
return result;
}
/*! This is part of the sentence used in the standard footer of each page.
*/
virtual QCString trWrittenBy()
{
return " ";
}
/*! this text is put before a class diagram */
virtual QCString trClassDiagram(const char *clName)
{
return (QCString)" "+clName+":";
}
/*! this text is generated when the \\internal command is used. */
virtual QCString trForInternalUseOnly()
{ return " ."; }
/*! this text is generated when the \\reimp command is used. */
virtual QCString trReimplementedForInternalReasons()
{ return " , API ."; }
/*! this text is generated when the \\warning command is used. */
virtual QCString trWarning()
{ return ""; }
/*! this text is generated when the \\bug command is used. */
virtual QCString trBugsAndLimitations()
{ return " "; }
/*! this text is generated when the \\version command is used. */
virtual QCString trVersion()
{ return ""; }
/*! this text is generated when the \\date command is used. */
virtual QCString trDate()
{ return "/"; }
/*! this text is generated when the \\return command is used. */
virtual QCString trReturns()
{ return ""; }
/*! this text is generated when the \\sa command is used. */
virtual QCString trSeeAlso()
{ return " "; }
/*! this text is generated when the \\param command is used. */
virtual QCString trParameters()
{ return ""; }
/*! this text is generated when the \\exception command is used. */
virtual QCString trExceptions()
{ return ""; }
/*! this text is used in the title page of a LaTeX document. */
virtual QCString trGeneratedBy()
{ return " "; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990307
//////////////////////////////////////////////////////////////////////////
/*! used as the title of page containing all the index of all namespaces. */
virtual QCString trNamespaceList()
{ return " "; }
/*! used as an introduction to the namespace list */
virtual QCString trNamespaceListDescription(bool extractAll)
{
QCString result=" ";
if (!extractAll) result+=" ";
result+=" :";
return result;
}
/*! used in the class documentation as a header before the list of all
* friends of a class
*/
virtual QCString trFriends()
{ return ""; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990405
//////////////////////////////////////////////////////////////////////////
/*! used in the class documentation as a header before the list of all
* related classes
*/
virtual QCString trRelatedFunctionDocumentation()
{ return " "; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990425
//////////////////////////////////////////////////////////////////////////
/*! used as the title of the HTML page of a class/struct/union */
virtual QCString trCompoundReference(const char *clName,
ClassDef::CompoundType compType,
bool isTemplate)
{
QCString result=(QCString)clName+" ";
result+=" ";
switch(compType)
{
case ClassDef::Class: result+=" "; break;
case ClassDef::Struct: result+=" "; break;
case ClassDef::Union: result+=" "; break;
case ClassDef::Interface: result+=" "; break;
case ClassDef::Exception: result+=" "; break;
}
if (isTemplate) result+=" Template";
return result;
}
/*! used as the title of the HTML page of a file */
virtual QCString trFileReference(const char *fileName)
{
QCString result=fileName;
result+=" ";
return result;
}
/*! used as the title of the HTML page of a namespace */
virtual QCString trNamespaceReference(const char *namespaceName)
{
QCString result=namespaceName;
result+=" ";
return result;
}
virtual QCString trPublicMembers()
{ return " "; }
virtual QCString trPublicSlots()
{ return " Slots"; }
virtual QCString trSignals()
{ return ""; }
virtual QCString trStaticPublicMembers()
{ return " "; }
virtual QCString trProtectedMembers()
{ return " "; }
virtual QCString trProtectedSlots()
{ return " Slots"; }
virtual QCString trStaticProtectedMembers()
{ return " "; }
virtual QCString trPrivateMembers()
{ return " "; }
virtual QCString trPrivateSlots()
{ return " Slots"; }
virtual QCString trStaticPrivateMembers()
{ return " "; }
/*! this function is used to produce a comma-separated list of items.
* use generateMarker(i) to indicate where item i should be put.
*/
virtual QCString trWriteList(int numEntries)
{
QCString result;
int i;
// the inherits list contain `numEntries' classes
for (i=0;i<numEntries;i++)
{
// use generateMarker to generate placeholders for the class links!
result+=generateMarker(i); // generate marker for entry i in the list
// (order is left to right)
if (i!=numEntries-1) // not the last entry, so we need a separator
{
if (i<numEntries-2) // not the fore last entry
result+=", ";
else // the fore last entry
result+=", ";
}
}
return result;
}
/*! used in class documentation to produce a list of base classes,
* if class diagrams are disabled.
*/
virtual QCString trInheritsList(int numEntries)
{
return " "+trWriteList(numEntries)+".";
}
/*! used in class documentation to produce a list of super classes,
* if class diagrams are disabled.
*/
virtual QCString trInheritedByList(int numEntries)
{
return " "+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
* members that are hidden by this one.
*/
virtual QCString trReimplementedFromList(int numEntries)
{
return " "+trWriteList(numEntries)+".";
}
/*! used in member documentation blocks to produce a list of
* all member that overwrite the implementation of this member.
*/
virtual QCString trReimplementedInList(int numEntries)
{
return " "+trWriteList(numEntries)+".";
}
/*! This is put above each page as a link to all members of namespaces. */
virtual QCString trNamespaceMembers()
{ return " Namespace"; }
/*! This is an introduction to the page with all namespace members */
virtual QCString trNamespaceMemberDescription(bool extractAll)
{
QCString result=" ";
if (!extractAll) result+=" ";
result+=" ";
if (extractAll)
result+=" :";
else
result+=" :";
return result;
}
/*! This is used in LaTeX as the title of the chapter with the
* index of all namespaces.
*/
virtual QCString trNamespaceIndex()
{ return " "; }
/*! This is used in LaTeX as the title of the chapter containing
* the documentation of all namespaces.
*/
virtual QCString trNamespaceDocumentation()
{ return " "; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990522
//////////////////////////////////////////////////////////////////////////
/*! This is used in the documentation before the list of all
* namespaces in a file.
*/
virtual QCString trNamespaces()
{ return " "; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990728
//////////////////////////////////////////////////////////////////////////
/*! This is put at the bottom of a class documentation page and is
* followed by a list of files that were used to generate the page.
*/
virtual QCString trGeneratedFromFiles(ClassDef::CompoundType compType,
bool single)
{ // here s is one of " Class", " Struct" or " Union"
// single is true implies a single file
QCString result=(QCString)" ";
switch(compType)
{
case ClassDef::Class: result+=" "; break;
case ClassDef::Struct: result+=" "; break;
case ClassDef::Union: result+=" "; break;
case ClassDef::Interface: result+=" "; break;
case ClassDef::Exception: result+=" "; break;
}
result+=" ";
if (single) result+=" :"; else result+=" :";
return result;
}
/*! This is in the (quick) index as a link to the alphabetical compound
* list.
*/
virtual QCString trAlphabeticalList()
{ return " "; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-990901
//////////////////////////////////////////////////////////////////////////
/*! This is used as the heading text for the retval command. */
virtual QCString trReturnValues()
{ return " "; }
/*! This is in the (quick) index as a link to the main page (index.html)
*/
virtual QCString trMainPage()
{ return " "; }
/*! This is used in references to page that are put in the LaTeX
* documentation. It should be an abbreviation of the word page.
*/
virtual QCString trPageAbbreviation()
{ return "."; }
//////////////////////////////////////////////////////////////////////////
// new since 0.49-991003
//////////////////////////////////////////////////////////////////////////
virtual QCString trSources()
{
return "";
}
virtual QCString trDefinedAtLineInSourceFile()
{
return " @0 @1.";
}
virtual QCString trDefinedInSourceFile()
{
return " @0.";
}
//////////////////////////////////////////////////////////////////////////
// new since 0.49-991205
//////////////////////////////////////////////////////////////////////////
virtual QCString trDeprecated()
{
return "";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.0.0
//////////////////////////////////////////////////////////////////////////
/*! this text is put before a collaboration diagram */
virtual QCString trCollaborationDiagram(const char *clName)
{
return (QCString)" "+clName+":";
}
/*! this text is put before an include dependency graph */
virtual QCString trInclDepGraph(const char *fName)
{
return (QCString)" Include "+fName+":";
}
/*! header that is put before the list of constructor/destructors. */
virtual QCString trConstructorDocumentation()
{
return " Constructor & Destructor";
}
/*! Used in the file documentation to point to the corresponding sources. */
virtual QCString trGotoSourceCode()
{
return " .";
}
/*! Used in the file sources to point to the corresponding documentation. */
virtual QCString trGotoDocumentation()
{
return " .";
}
/*! Text for the \\pre command */
virtual QCString trPrecondition()
{
return "";
}
/*! Text for the \\post command */
virtual QCString trPostcondition()
{
return "";
}
/*! Text for the \\invariant command */
virtual QCString trInvariant()
{
return "";
}
/*! Text shown before a multi-line variable/enum initialization */
virtual QCString trInitialValue()
{
return " :";
}
/*! Text used the source code in the file index */
virtual QCString trCode()
{
return "";
}
virtual QCString trGraphicalHierarchy()
{
return " ";
}
virtual QCString trGotoGraphicalHierarchy()
{
return " ";
}
virtual QCString trGotoTextualHierarchy()
{
return " ";
}
virtual QCString trPageIndex()
{
return " ";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.0
//////////////////////////////////////////////////////////////////////////
virtual QCString trNote()
{
return "";
}
virtual QCString trPublicTypes()
{
return " ";
}
virtual QCString trPublicAttribs()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return " ";
}
}
virtual QCString trStaticPublicAttribs()
{
return " ";
}
virtual QCString trProtectedTypes()
{
return " ";
}
virtual QCString trProtectedAttribs()
{
return " ";
}
virtual QCString trStaticProtectedAttribs()
{
return " ";
}
virtual QCString trPrivateTypes()
{
return " ";
}
virtual QCString trPrivateAttribs()
{
return " ";
}
virtual QCString trStaticPrivateAttribs()
{
return " ";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.3
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a \\todo item */
virtual QCString trTodo()
{
return " ";
}
/*! Used as the header of the todo list */
virtual QCString trTodoList()
{
return " ";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.4
//////////////////////////////////////////////////////////////////////////
virtual QCString trReferencedBy()
{
return " ";
}
virtual QCString trRemarks()
{
return "";
}
virtual QCString trAttention()
{
return "";
}
virtual QCString trInclByDepGraph()
{
return " "
" :";
}
virtual QCString trSince()
{
return "";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.1.5
//////////////////////////////////////////////////////////////////////////
/*! title of the graph legend page */
virtual QCString trLegendTitle()
{
return " ";
}
/*! page explaining how the dot graph's should be interpreted
* The %A in the text below are to prevent link to classes called "A".
*/
virtual QCString trLegendDocs()
{
return
" "
" doxygen.<p>\n"
" :"
"\\code\n"
"/*! Invisible class because of truncation */\n"
"class Invisible { };\n\n"
"/*! Truncated class, inheritance relation is hidden */\n"
"class Truncated : public Invisible { };\n\n"
"/* Class not documented with doxygen comments */\n"
"class Undocumented { };\n\n"
"/*! Class that is inherited using public inheritance */\n"
"class PublicBase : public Truncated { };\n\n"
"/*! Class that is inherited using protected inheritance */\n"
"class ProtectedBase { };\n\n"
"/*! Class that is inherited using private inheritance */\n"
"class PrivateBase { };\n\n"
"/*! Class that is used by the Inherited class */\n"
"class Used { };\n\n"
"/*! Super class that inherits a number of other classes */\n"
"class Inherited : public PublicBase,\n"
" protected ProtectedBase,\n"
" private PrivateBase,\n"
" public Undocumented\n"
"{\n"
" private:\n"
" Used *m_usedClass;\n"
"};\n"
"\\endcode\n"
" \\c MAX_DOT_GRAPH_HEIGHT "
" 200 :"
"<p><center><img src=\"graph_legend.gif\"></center>\n"
"<p>\n"
" :\n"
"<ul>\n"
"<li> "
" .\n"
"<li> .\n"
"<li> .\n"
"<li> "
" . % "
" ."
"</ul>\n"
" :\n"
"<ul>\n"
"<li> "
" .\n"
"<li> .\n"
"<li> .\n"
"<li> "
" . () "
" . \n"
"</ul>\n";
}
/*! text for the link to the legend page */
virtual QCString trLegend()
{
return "";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.0
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a test item */
virtual QCString trTest()
{
return "";
}
/*! Used as the header of the test list */
virtual QCString trTestList()
{
return " ";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.1
//////////////////////////////////////////////////////////////////////////
/*! Used as a section header for KDE-2 IDL methods */
virtual QCString trDCOPMethods()
{
return " DCOP";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.2
//////////////////////////////////////////////////////////////////////////
/*! Used as a section header for IDL properties */
virtual QCString trProperties()
{
return "";
}
/*! Used as a section header for IDL property documentation */
virtual QCString trPropertyDocumentation()
{
return " ";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.4
//////////////////////////////////////////////////////////////////////////
/*! Used for Java interfaces in the summary section of Java packages */
virtual QCString trInterfaces()
{
return "";
}
/*! Used for Java classes in the summary section of Java packages */
virtual QCString trClasses()
{
if (Config_getBool("OPTIMIZE_OUTPUT_FOR_C"))
{
return " ";
}
else
{
return "";
}
}
/*! Used as the title of a Java package */
virtual QCString trPackage(const char *name)
{
return (QCString)" "+name;
}
/*! Title of the package index page */
virtual QCString trPackageList()
{
return " ";
}
/*! The description of the package index page */
virtual QCString trPackageListDescription()
{
return " ( ):";
}
/*! The link name in the Quick links header for each page */
virtual QCString trPackages()
{
return "";
}
/*! Used as a chapter title for Latex & RTF output */
virtual QCString trPackageDocumentation()
{
return " ";
}
/*! Text shown before a multi-line define */
virtual QCString trDefineValue()
{
return ":";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.5
//////////////////////////////////////////////////////////////////////////
/*! Used as a marker that is put before a \\bug item */
virtual QCString trBug()
{
return "";
}
/*! Used as the header of the bug list */
virtual QCString trBugList()
{
return " ";
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.6
//////////////////////////////////////////////////////////////////////////
/*! Used as ansicpg for RTF file
*
* The following table shows the correlation of Charset name, Charset Value and
* <pre>
* Codepage number:
* Charset Name Charset Value(hex) Codepage number
* ------------------------------------------------------
* DEFAULT_CHARSET 1 (x01)
* SYMBOL_CHARSET 2 (x02)
* OEM_CHARSET 255 (xFF)
* ANSI_CHARSET 0 (x00) 1252
* RUSSIAN_CHARSET 204 (xCC) 1251
* EE_CHARSET 238 (xEE) 1250
* GREEK_CHARSET 161 (xA1) 1253
* TURKISH_CHARSET 162 (xA2) 1254
* BALTIC_CHARSET 186 (xBA) 1257
* HEBREW_CHARSET 177 (xB1) 1255
* ARABIC _CHARSET 178 (xB2) 1256
* SHIFTJIS_CHARSET 128 (x80) 932
* HANGEUL_CHARSET 129 (x81) 949
* GB2313_CHARSET 134 (x86) 936
* CHINESEBIG5_CHARSET 136 (x88) 950
* </pre>
*
*/
virtual QCString trRTFansicp()
{
return "1253";
}
/*! Used as ansicpg for RTF fcharset
* \see trRTFansicp() for a table of possible values.
*/
virtual QCString trRTFCharSet()
{
return "0";
}
/*! Used as header RTF general index */
virtual QCString trRTFGeneralIndex()
{
return "";
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trClass(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+="";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trFile(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+=""; else result+="";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trNamespace(bool first_capital, bool singular)
{
QCString result((first_capital ? "Namespace" : "namespace"));
if (!singular) result+="s";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trGroup(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+=""; else result+="";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trPage(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+=""; else result+="";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trMember(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+=""; else result+="";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trField(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+=""; else result+="";
return result;
}
/*! This is used for translation of the word that will possibly
* be followed by a single name or by a list of names
* of the category.
*/
virtual QCString trGlobal(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+=""; else result+="";
return result;
}
//////////////////////////////////////////////////////////////////////////
// new since 1.2.7
//////////////////////////////////////////////////////////////////////////
/*! This text is generated when the \\author command is used and
* for the author section in man pages. */
virtual QCString trAuthor(bool first_capital, bool singular)
{
QCString result((first_capital ? "" : ""));
if (!singular) result+=""; else result+="";
return result;
}
};
#endif
......@@ -62,11 +62,20 @@ Problem!
#ifndef TRANSLATOR_SE_H
#define TRANSLATOR_SE_H
#include "translator_adapter.h"
class TranslatorSwedish : public TranslatorAdapter_1_0_0
class TranslatorSwedish : public TranslatorEnglish
{
public:
/*! This method is used to generate a warning message to signal
* the user that the translation of his/her language of choice
* needs updating.
*/
virtual QCString updateNeededMessage()
{
return "Warning: The Swedish translator is really obsolete.\n"
"It was not updated since version 1.0.0. As a result,\n"
"some sentences may appear in English.\n\n";
}
QCString idLanguage()
{ return "swedish"; }
QCString latexBabelPackage()
......
......@@ -869,7 +869,7 @@ QCString tempArgListToString(ArgumentList *al)
// compute the HTML anchors for a list of members
void setAnchors(char id,MemberList *ml,int groupId)
void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId)
{
int count=0;
MemberListIterator mli(*ml);
......@@ -883,7 +883,8 @@ void setAnchors(char id,MemberList *ml,int groupId)
anchor.sprintf("%c%d",id,count++);
else
anchor.sprintf("%c%d_%d",id,groupId,count++);
//printf("Member %s anchor %s\n",md->name(),anchor.data());
if (cd) anchor.prepend(escapeCharsInString(cd->name(),FALSE));
//printf("Member %s anchor %s\n",md->name().data(),anchor.data());
md->setAnchor(anchor);
}
}
......@@ -2878,6 +2879,44 @@ bool hasVisibleRoot(BaseClassList *bcl)
//----------------------------------------------------------------------
QCString escapeCharsInString(const char *name,bool allowDots)
{
QCString result;
char c;
const char *p=name;
while ((c=*p++)!=0)
{
switch(c)
{
case '_': result+="__"; break;
case '-': result+="-"; break;
case ':': result+="_1"; break;
case '/': result+="_2"; break;
case '<': result+="_3"; break;
case '>': result+="_4"; break;
case '*': result+="_5"; break;
case '&': result+="_6"; break;
case '|': result+="_7"; break;
case '.': if (allowDots) result+="."; else result+="_8"; break;
case '!': result+="_9"; break;
case ',': result+="_00"; break;
case ' ': result+="_01"; break;
default:
if (Config_getBool("CASE_SENSE_NAMES") || !isupper(c))
{
result+=c;
}
else
{
result+="_";
result+=tolower(c);
}
break;
}
}
return result;
}
/*! This function determines the file name on disk of an item
* given its name, which could be a class name with templete
* arguments, so special characters need to be escaped.
......@@ -2906,41 +2945,7 @@ QCString convertNameToFile(const char *name,bool allowDots)
}
else // long names
{
QCString result;
char c;
const char *p=name;
while ((c=*p++)!=0)
{
switch(c)
{
case '_': result+="__"; break;
case '-': result+="-"; break;
case ':': result+="_1"; break;
case '/': result+="_2"; break;
case '<': result+="_3"; break;
case '>': result+="_4"; break;
case '*': result+="_5"; break;
case '&': result+="_6"; break;
case '|': result+="_7"; break;
case '.': if (allowDots) result+="."; else result+="_8"; break;
case '!': result+="_9"; break;
case ',': result+="_00"; break;
case ' ': result+="_01"; break;
default:
if (Config_getBool("CASE_SENSE_NAMES") || !isupper(c))
{
result+=c;
}
else
{
result+="_";
result+=tolower(c);
}
break;
}
}
return result;
return escapeCharsInString(name,allowDots);
}
}
......
......@@ -73,7 +73,7 @@ class TextGeneratorOLImpl : public TextGeneratorIntf
extern void linkifyText(const TextGeneratorIntf &ol,const char *clName,const char *name,
const char *text,bool autoBreak=FALSE,bool external=TRUE);
extern void setAnchors(char id,MemberList *ml,int groupId=-1);
extern void setAnchors(ClassDef *cd,char id,MemberList *ml,int groupId=-1);
extern QCString fileToString(const char *name,bool filter=FALSE);
extern QCString dateToString(bool);
extern bool getDefs(const QCString &scopeName,
......@@ -172,6 +172,7 @@ void addRelatedPage(const char *name,const QCString &ptitle,
int todoId,int testId,int bugId,GroupDef *gd=0,
TagInfo *tagInfo=0
);
QCString escapeCharsInString(const char *name,bool allowDots);
#endif
......@@ -37,7 +37,14 @@
#include <qfile.h>
#include <qtextstream.h>
#define XML_DB(x)
// no debug info
#define XML_DB(x) do {} while(0)
// debug to stdout
//#define XML_DB(x) printf x
// debug inside output
//#define XML_DB(x) QCString __t;__t.sprintf x;m_t << __t
QCString sectionTypeToString(BaseOutputDocInterface::SectionTypes t)
{
......@@ -76,14 +83,15 @@ inline void writeXMLString(QTextStream &t,const char *s)
void writeXMLLink(QTextStream &t,const char *extRef,const char *compoundId,
const char *anchorId,const char *text)
{
t << "<ref idref=\"" << compoundId << "\"";
if (extRef)
t << "<ref idref=\"" << compoundId;
if (anchorId)
{
t << " external=\"" << extRef << "\"";
t << "_1" << anchorId;
}
if (anchorId)
t << "\"";
if (extRef)
{
t << " anchor=\"" << anchorId << "\"";
t << " external=\"" << extRef << "\"";
}
t << ">";
writeXMLString(t,text);
......@@ -166,7 +174,6 @@ template<class T> class ValStack
* Its methods are called when some XML text or markup
* needs to be written.
*/
// TODO: htmlonly, latexonly
class XMLGenerator : public OutputDocInterface
{
public:
......@@ -179,13 +186,13 @@ class XMLGenerator : public OutputDocInterface
{
m_inParStack.top() = TRUE;
m_t << "<para>" << endl;
XML_DB(("start par at level=%d\n",m_inParStack.count());)
XML_DB(("start par at level=%d\n",m_inParStack.count()));
}
else if (m_inParStack.isEmpty())
{
m_inParStack.push(TRUE);
m_t << "<para>" << endl;
XML_DB(("start par at level=%d\n",m_inParStack.count());)
XML_DB(("start par at level=%d\n",m_inParStack.count()));
}
}
void endParMode()
......@@ -194,24 +201,24 @@ class XMLGenerator : public OutputDocInterface
{
m_inParStack.top() = FALSE;
m_t << "</para>" << endl;
XML_DB(("end par at level=%d\n",m_inParStack.count());)
XML_DB(("end par at level=%d\n",m_inParStack.count()));
}
}
void startNestedPar()
{
m_inParStack.push(FALSE);
XML_DB(("enter par level=%d\n",m_inParStack.count());)
XML_DB(("enter par level=%d\n",m_inParStack.count()));
}
void endNestedPar()
{
XML_DB(("leave par level=%d\n",m_inParStack.count());)
XML_DB(("leave par level=%d\n",m_inParStack.count()));
if (m_inParStack.pop())
{
m_t << "</para>" << endl;
}
else
{
XML_DB(("ILLEGAL par level!\n");)
//XML_DB(("ILLEGAL par level!\n"));
}
}
......@@ -219,35 +226,37 @@ class XMLGenerator : public OutputDocInterface
void docify(const char *s)
{
XML_DB(("(docify \"%s\")\n",s));
startParMode();
writeXMLString(m_t,s);
}
void writeChar(char c)
{
startParMode();
char s[2];s[0]=c;s[1]=0;
docify(s);
}
void writeString(const char *text)
{
startParMode();
//m_t << text;
docify(text);
}
void startItemList()
{
XML_DB(("(startItemList)\n"));
startParMode();
m_t << "<itemizedlist>" << endl;;
m_inListStack.push(TRUE);
}
void startEnumList()
{
XML_DB(("(startEnumList)\n"));
startParMode();
m_t << "<orderedlist>";
m_inListStack.push(TRUE);
}
void writeListItem()
{
XML_DB(("(writeListItem)\n"));
if (!m_inListStack.isEmpty() && m_inListStack.top()) // first element
{
m_inListStack.top()=FALSE;
......@@ -263,6 +272,7 @@ class XMLGenerator : public OutputDocInterface
}
void endItemList()
{
XML_DB(("(endItemList)\n"));
if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element
{
endParMode();
......@@ -273,6 +283,7 @@ class XMLGenerator : public OutputDocInterface
}
void endEnumList()
{
XML_DB(("(endEnumList)\n"));
if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element
{
endParMode();
......@@ -283,65 +294,81 @@ class XMLGenerator : public OutputDocInterface
}
void newParagraph()
{
XML_DB(("(newParagraph)\n"));
endParMode();
startParMode();
}
void startBold()
{
XML_DB(("(startBold)\n"));
startParMode();
m_t << "<bold>"; // non DocBook
}
void endBold()
{
XML_DB(("(endBold)\n"));
m_t << "</bold>"; // non DocBook
}
void startTypewriter()
{
XML_DB(("(startTypewriter)\n"));
startParMode();
m_t << "<computeroutput>";
}
void endTypewriter()
{
XML_DB(("(endTypewriter)\n"));
m_t << "</computeroutput>";
}
void startEmphasis()
{
XML_DB(("(startEmphasis)\n"));
startParMode();
m_t << "<emphasis>";
}
void endEmphasis()
{
XML_DB(("(endEmphasis)\n"));
m_t << "</emphasis>";
}
void startCodeFragment()
{
XML_DB(("(startCodeFragment)\n"));
startParMode();
m_t << "<programlisting>";
}
void endCodeFragment()
{
XML_DB(("(endCodeFragment)\n"));
m_t << "</programlisting>";
}
void startPreFragment()
{
XML_DB(("(startPreFragment)\n"));
startParMode();
m_t << "<programlisting>";
}
void endPreFragment()
{
XML_DB(("(endPreFragment)\n"));
m_t << "</programlisting>";
}
void writeRuler()
{
XML_DB(("(startParMode)\n"));
startParMode();
m_t << "<hruler/>";
}
void startDescription()
{
XML_DB(("(startDescription)\n"));
startParMode();
m_t << "<variablelist>";
m_inListStack.push(TRUE);
}
void endDescription()
{
XML_DB(("(endDescription)\n"));
if (!m_inListStack.isEmpty() && !m_inListStack.pop()) // first element
{
endNestedPar();
......@@ -352,6 +379,7 @@ class XMLGenerator : public OutputDocInterface
}
void startDescItem()
{
XML_DB(("(startDescItem)\n"));
if (!m_inListStack.isEmpty() && m_inListStack.top()) // first element
{
m_inListStack.top()=FALSE;
......@@ -365,22 +393,28 @@ class XMLGenerator : public OutputDocInterface
}
void endDescItem()
{
XML_DB(("(endDescItem)\n"));
m_t << "</term></varlistentry><listitem>";
startNestedPar();
}
void startDescList(SectionTypes st)
{
startParMode();
XML_DB(("(startDescList)\n"));
endParMode();
m_t << "<simplesect kind=\"" << sectionTypeToString(st);
m_t << "\"><title>";
startNestedPar();
m_inParStack.top() = TRUE;
}
void endDescList()
{
XML_DB(("(endDescList)\n"));
endNestedPar();
m_t << "</simplesect>";
}
void startParamList(ParamListTypes t)
{
XML_DB(("(startParamList)\n"));
startParMode();
QCString kind;
switch(t)
......@@ -390,150 +424,209 @@ class XMLGenerator : public OutputDocInterface
case Exception: kind="exception"; break;
}
m_t << "<parameterlist kind=\"" << kind << "\"><title>"; // non DocBook
startNestedPar();
m_inParStack.top() = TRUE;
m_inParamList = TRUE;
}
void endParamList()
{
XML_DB(("(endParamList)\n"));
m_inParamList = FALSE;
m_t << "</parameterlist>";
}
void endDescTitle()
{
m_inParStack.top() = FALSE;
endNestedPar();
XML_DB(("(endDescTitle)\n"));
m_t << "</title>";
if (!m_inParamList) startNestedPar();
}
void writeDescItem() { }
void startDescTable() { }
void endDescTable() { }
void writeDescItem()
{
XML_DB(("(writeDescItem)\n"));
}
void startDescTable()
{
XML_DB(("(startDescTable)\n"));
}
void endDescTable()
{
XML_DB(("(endDescTable)\n"));
}
void startDescTableTitle()
{
XML_DB(("(startDescTableTitle)\n"));
m_t << "<parametername>"; // non docbook
}
void endDescTableTitle()
{
XML_DB(("(endDescTableTitle)\n"));
m_t << "</parametername>"; // non docbook
}
void startDescTableData()
{
XML_DB(("(startDescTableData)\n"));
m_t << "<parameterdescription>"; // non docbook
startNestedPar();
}
void endDescTableData()
{
XML_DB(("(endDescTableData)\n"));
endNestedPar();
m_t << "</parameterdescription>"; // non docbook
}
void lineBreak()
{
XML_DB(("(lineBreak)\n"));
startParMode();
m_t << "<linebreak/>"; // non docbook
}
void writeNonBreakableSpace(int num)
{
XML_DB(("(writeNonBreakableSpace)\n"));
int i;for (i=0;i<num;i++) m_t << "&nbsp;";
}
void writeObjectLink(const char *ref,const char *file,
const char *anchor, const char *text)
{
XML_DB(("(writeObjectLink)\n"));
startParMode();
writeXMLLink(m_t,ref,file,anchor,text);
}
void writeCodeLink(const char *ref,const char *file,
const char *anchor,const char *text)
{
XML_DB(("(writeCodeLink)\n"));
writeXMLLink(m_t,ref,file,anchor,text);
}
void startHtmlLink(const char *url)
{
XML_DB(("(startHtmlLink)\n"));
startParMode();
m_t << "<ulink url=\"" << url << "\">";
}
void endHtmlLink()
{
XML_DB(("(endHtmlLink)\n"));
m_t << "</ulink>";
}
void writeMailLink(const char *url)
{
XML_DB(("(writeMailLink)\n"));
startParMode();
m_t << "<email>";
docify(url);
m_t << "</email>";
}
void startSection(const char *id,const char *,bool)
void startSection(const char *id,const char *,bool subsection)
{
m_t << "<sect1 id=\"" << id << "\">";
XML_DB(("(startSection)\n"));
endParMode();
m_t << "<sect";
if (subsection) m_t << "2"; else m_t << "1";
m_t << " id=\"" << id << "\">";
startNestedPar();
m_inParStack.top() = TRUE;
}
void endSection(const char *,bool)
void endSection(const char *,bool subsection)
{
m_t << "</sect1>";
XML_DB(("(endSection)\n"));
m_t << "</sect";
if (subsection) m_t << "2"; else m_t << "1";
m_t << ">";
m_inParStack.top() = FALSE;
endNestedPar();
}
void startSubsection()
{
XML_DB(("(startSubsection)\n"));
endParMode();
m_t << "<sect2>";
startNestedPar();
m_inParStack.top() = TRUE;
}
void endSubsection()
{
XML_DB(("(endSubsection)\n"));
m_t << "</sect2>";
m_inParStack.top() = FALSE;
endNestedPar();
}
void startSubsubsection()
{
XML_DB(("(startSubsubsection)\n"));
endParMode();
m_t << "<sect3>";
startNestedPar();
m_inParStack.top() = TRUE;
}
void endSubsubsection()
{
XML_DB(("(endSubsubsection)\n"));
m_t << "</sect3>";
m_inParStack.top() = FALSE;
endNestedPar();
}
void startCenter()
{
XML_DB(("(startCenter)\n"));
startParMode();
m_t << "<center>"; // non docbook
}
void endCenter()
{
XML_DB(("(endCenter)\n"));
m_t << "</center>"; // non docbook
}
void startSmall()
{
XML_DB(("(startSmall)\n"));
startParMode();
m_t << "<small>"; // non docbook
}
void endSmall()
{
XML_DB(("(endSmall)\n"));
m_t << "</small>"; // non docbook
}
void startSubscript()
{
XML_DB(("(startSubscript)\n"));
startParMode();
m_t << "<subscript>";
}
void endSubscript()
{
XML_DB(("(endSubscript)\n"));
m_t << "</subscript>";
}
void startSuperscript()
{
XML_DB(("(startSuperscript)\n"));
startParMode();
m_t << "<superscript>";
}
void endSuperscript()
{
XML_DB(("(endSuperscript)\n"));
m_t << "</superscript>";
}
void startTable(int cols)
{
XML_DB(("startTable\n");)
XML_DB(("startTable\n"));
startParMode();
m_t << "<table cols=\"" << cols << "\">\n";
}
void endTable()
{
XML_DB(("endTable\n");)
XML_DB(("endTable\n"));
m_t << "</row>\n</table>";
}
void nextTableRow()
{
XML_DB(("nextTableRow\n");)
XML_DB(("(nextTableRow)\n"));
m_t << "<row><entry>";
// we need manually add a para here because cells are
......@@ -543,12 +636,12 @@ class XMLGenerator : public OutputDocInterface
}
void endTableRow()
{
XML_DB(("endTableRow\n");)
XML_DB(("(endTableRow)\n"));
m_t << "</row>" << endl;
}
void nextTableColumn()
{
XML_DB(("nextTableColumn\n");)
XML_DB(("(nextTableColumn)\n"));
m_t << "<entry>";
// we need manually add a para here because cells are
......@@ -558,7 +651,7 @@ class XMLGenerator : public OutputDocInterface
}
void endTableColumn()
{
XML_DB(("endTableColumn\n");)
XML_DB(("(endTableColumn)\n"));
// we need manually add a para here because cells are
// parsed before the table is generated, and thus
// are already parsed as if they are inside a paragraph.
......@@ -579,20 +672,28 @@ class XMLGenerator : public OutputDocInterface
void startTitle()
{
XML_DB(("(startTitle)\n"));
m_t << "<title>";
startNestedPar();
m_inParStack.top() = TRUE;
}
void endTitle()
{
m_inParStack.top() = FALSE;
endNestedPar();
XML_DB(("(endTitle)\n"));
m_t << "</title>" << endl;
}
void writeAnchor(const char *id,const char *name)
{
XML_DB(("(writeAnchor)\n"));
startParMode();
m_t << "<anchor id=\"" << id << "_" << name << "\"/>";
}
void writeSectionRef(const char *,const char *id,
const char *name,const char *text)
{
XML_DB(("(writeSectionRef)\n"));
startParMode();
m_t << "<link linkend=\"" << id << "_" << name << "\">";
docify(text);
......@@ -604,6 +705,7 @@ class XMLGenerator : public OutputDocInterface
}
void addIndexItem(const char *primaryie,const char *secondaryie)
{
XML_DB(("(addIndexItem)\n"));
startParMode();
m_t << "<indexentry><primaryie>";
docify(primaryie);
......@@ -613,6 +715,7 @@ class XMLGenerator : public OutputDocInterface
}
void writeFormula(const char *id,const char *text)
{
XML_DB(("(writeFormula)\n"));
startParMode();
m_t << "<formula id=\"" << id << "\">"; // non Docbook
docify(text);
......@@ -620,6 +723,7 @@ class XMLGenerator : public OutputDocInterface
}
void startImage(const char *name,const char *size,bool /*caption*/)
{
XML_DB(("(startImage)\n"));
startParMode();
m_t << "<image name=\"" << name << "\"";
if (size) m_t << " size=\"" << size << "\"";
......@@ -627,35 +731,43 @@ class XMLGenerator : public OutputDocInterface
}
void endImage(bool)
{
XML_DB(("(endImage)\n"));
m_t << "</image>";
}
void startDotFile(const char *name,bool /*caption*/)
{
XML_DB(("(startDotFile)\n"));
startParMode();
m_t << "<dotfile name=\"" << name << "\">"; // non docbook
}
void endDotFile(bool)
{
XML_DB(("(endDotFile)\n"));
m_t << "</dotfile>";
}
void startTextLink(const char *name,const char *anchor)
{
XML_DB(("(startTextLink)\n"));
startParMode();
m_t << "<ulink url=\"" << name << "#" << anchor << "\">";
}
void endTextLink()
{
XML_DB(("(endTextLink)\n"));
m_t << "<ulink>";
}
void startPageRef()
{
XML_DB(("(startPageRef)\n"));
}
void endPageRef(const char *,const char *)
{
XML_DB(("(endPageRef)\n"));
}
void writeLineNumber(const char *,const char *file, // TODO: support external references
const char *anchor,int l)
{
XML_DB(("(writeLineNumber)\n"));
m_t << "<linenumber";
m_t << " line=\"" << l << "\"";
if (file)
......@@ -666,34 +778,61 @@ class XMLGenerator : public OutputDocInterface
}
void startCodeLine()
{
XML_DB(("(startCodeLine)\n"));
startParMode();
m_t << "<codeline>"; // non DocBook
}
void endCodeLine()
{
XML_DB(("(endCodeLine)\n"));
m_t << "</codeline>" << endl; // non DocBook
}
void startCodeAnchor(const char *id)
{
XML_DB(("(startCodeAnchor)\n"));
startParMode();
m_t << "<anchor id=\"" << id << "\">";
}
void endCodeAnchor()
{
XML_DB(("(endCodeAnchor)\n"));
m_t << "</anchor>";
}
void startFontClass(const char *colorClass)
{
XML_DB(("(startFontClass)\n"));
m_t << "<highlight class=\"" << colorClass << "\">"; // non DocBook
}
void endFontClass()
{
XML_DB(("(endFontClass)\n"));
m_t << "</highlight>"; // non DocBook
}
void codify(const char *text)
{
XML_DB(("(codify \"%s\")\n",text));
docify(text);
}
void startHtmlOnly()
{
XML_DB(("(startHtmlOnly)\n"));
m_t << "<htmlonly>" << endl;
}
void endHtmlOnly()
{
XML_DB(("(endHtmlOnly)\n"));
m_t << "</htmlonly>" << endl;
}
void startLatexOnly()
{
XML_DB(("(startLatexOnly)\n"));
m_t << "<latexonly>" << endl;
}
void endLatexOnly()
{
XML_DB(("(endLatexOnly)\n"));
m_t << "</latexonly>" << endl;
}
// Generator specific functions
......@@ -782,15 +921,16 @@ static void writeXMLDocBlock(QTextStream &t,
const QCString &name,
const QCString &text)
{
if (text.stripWhiteSpace().isEmpty()) return;
QCString stext = text.stripWhiteSpace();
if (text.isEmpty()) return;
XMLGenerator *xmlGen = new XMLGenerator;
xmlGen->startParMode();
//xmlGen->startParMode();
parseDoc(*xmlGen,
fileName, // input definition file
lineNr, // input definition line
scope, // scope (which should not be linked to)
name, // member (which should not be linked to)
text+"\n" // actual text
stext+"\n" // actual text
);
xmlGen->endParMode();
t << xmlGen->getContents();
......@@ -812,7 +952,39 @@ void writeXMLCodeBlock(QTextStream &t,FileDef *fd)
delete xmlGen;
}
static void writeMemberReference(QTextStream &t,Definition *def,MemberDef *rmd,const char *tagName)
{
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
if (!scope.isEmpty() && scope!=def->name())
{
name.prepend(scope+"::");
}
Definition *d = rmd->getOuterScope();
if (d==Doxygen::globalScope) d=rmd->getBodyDef();
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
// link to definition in code
{
t << " <" << tagName << " id=\"";
t << rmd->getBodyDef()->getOutputFileBase()
<< "_1" // encoded `:' character (see util.cpp:convertNameToFile)
<< rmd->anchor()
<< "\">";
writeXMLString(t,name);
t << "</" << tagName << ">" << endl;
}
else if (rmd->isLinkable() && d && d->isLinkable())
// link to declaration in documentation (in absense of a definition)
{
t << " <" << tagName << " id=\"";
t << d->getOutputFileBase()
<< "_1" // encoded `:' character (see util.cpp:convertNameToFile)
<< rmd->anchor()
<< "\">";
writeXMLString(t,name);
t << "</" << tagName << ">" << endl;
}
}
static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
{
......@@ -894,7 +1066,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
md->memberType()!=MemberDef::Enumeration
)
{
QCString typeStr = replaceAnonymousScopes(md->typeString());
QCString typeStr = md->typeString(); //replaceAnonymousScopes(md->typeString());
t << " <type>";
linkifyText(TextGeneratorXMLImpl(t),scopeName,md->name(),typeStr);
t << "</type>" << endl;
......@@ -1035,7 +1207,13 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
{
t << " <location file=\""
<< md->getDefFileName() << "\" line=\""
<< md->getDefLine() << "\"/>" << endl;
<< md->getDefLine() << "\"";
if (md->getStartBodyLine()!=-1)
{
t << " bodystart=\"" << md->getStartBodyLine() << "\" bodyend=\""
<< md->getEndBodyLine() << "\"";
}
t << "/>" << endl;
}
//printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
......@@ -1045,24 +1223,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
MemberDef *rmd;
for (mdi.toFirst();(rmd=mdi.current());++mdi)
{
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
t << " <references id=\"";
t << rmd->getBodyDef()->getOutputFileBase()
<< "_1" // encoded `:' character (see util.cpp:convertNameToFile)
<< rmd->anchor()
<< "\" line=\""
<< rmd->getStartBodyLine()
<< "\">";
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
if (!scope.isEmpty() && scope!=def->name())
{
name.prepend(scope+"::");
}
writeXMLString(t,name);
t << "</references>" << endl;
}
writeMemberReference(t,def,rmd,"references");
}
}
if (md->getReferencedByMembers())
......@@ -1071,24 +1232,7 @@ static void generateXMLForMember(MemberDef *md,QTextStream &t,Definition *def)
MemberDef *rmd;
for (mdi.toFirst();(rmd=mdi.current());++mdi)
{
if (rmd->getStartBodyLine()!=-1 && rmd->getBodyDef())
{
t << " <referencedby id=\"";
t << rmd->getBodyDef()->getOutputFileBase()
<< "_1" // encoded `:' character (see util.cpp:convertNameToFile)
<< rmd->anchor()
<< "\" line=\""
<< rmd->getStartBodyLine()
<< "\">";
QCString scope = rmd->getScopeString();
QCString name = rmd->name();
if (!scope.isEmpty() && scope!=def->name())
{
name.prepend(scope+"::");
}
writeXMLString(t,name);
t << "</referencedby>" << endl;
}
writeMemberReference(t,def,rmd,"referencedby");
}
}
......@@ -1256,9 +1400,15 @@ static void generateXMLForClass(ClassDef *cd,QTextStream &t)
collaborationGraph.writeXML(t);
t << " </collaborationgraph>" << endl;
}
t << " <location file=\""
t << " <location file=\""
<< cd->getDefFileName() << "\" line=\""
<< cd->getDefLine() << "\"/>" << endl;
<< cd->getDefLine() << "\"";
if (cd->getStartBodyLine()!=-1)
{
t << " bodystart=\"" << cd->getStartBodyLine() << "\" bodyend=\""
<< cd->getEndBodyLine() << "\"";
}
t << "/>" << endl;
t << " </compounddef>" << endl;
}
......@@ -1461,7 +1611,7 @@ static void generateXMLForGroup(GroupDef *gd,QTextStream &t)
t << " <compounddef id=\""
<< gd->getOutputFileBase() << "\" kind=\"group\">" << endl;
t << " <name>" << convertToXML(gd->name()) << "</name>" << endl;
t << " <compoundname>" << convertToXML(gd->name()) << "</compoundname>" << endl;
t << " <title>" << convertToXML(gd->groupTitle()) << "</title>" << endl;
FileList *fl = gd->getFiles();
......@@ -1540,8 +1690,8 @@ static void generateXMLForPage(PageInfo *pi,QTextStream &t)
t << " <compounddef id=\"";
if (Config_getBool("CASE_SENSE_NAMES")) t << pi->name; else t << pi->name.lower();
t << "\">" << endl;
t << " <name>" << pi->name << "</name>" << endl;
t << "\" kind=\"page\">" << endl;
t << " <compoundname>" << pi->name << "</compoundname>" << endl;
SectionInfo *si = Doxygen::sectionDict.find(pi->name);
if (si)
{
......
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