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
......@@ -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
......
#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 &)
{
printf("startType!\n");
delete m_linkedTextHandler;
m_linkedTextHandler = new LinkedTextHandler(this,m_type);
m_linkedTextHandler->start("type");
}
void MemberHandler::startInitializer(const QXmlAttributes &)
{
m_type = m_curString.stripWhiteSpace();
printf("member type=`%s'\n",m_type.data());
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::startEnumValue(const QXmlAttributes& attrib)
{
EnumValueHandler *evh = new EnumValueHandler(this);
evh->startEnumValue(attrib);
m_enumValues.append(evh);
}
void MemberHandler::initialize(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);
}
void MemberHandler::MemberReference::initialize(MainHandler *mh)
{
m_mainHandler = 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,14 +987,17 @@ 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;
......@@ -966,9 +1005,16 @@ print STDERR "\n\n";
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/^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
......
This diff is collapsed.
......@@ -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 );
}
......
......@@ -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>"//"|"/*"|"*/" {
......
......@@ -557,9 +557,8 @@ static void buildClassList(Entry *root)
warn(root->fileName,root->startLine,
"Warning: invalid class name found!"
);
goto error;
}
else
{
Debug::print(Debug::Classes,0," Found class with raw name %s\n",fullName.data());
fullName=stripAnonymousNamespaceScope(fullName);
......@@ -763,7 +762,7 @@ static void buildClassList(Entry *root)
}
}
}
}
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)
{
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment