diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:51:13 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2021-10-15 10:51:13 +0900 |
commit | b65cb2d67b946445ba89e1938cee8527969922cd (patch) | |
tree | e3aff002a9b580aef8a80eb3823786993c3a5c64 /addon | |
parent | 738086af77ab085837d0044a33a5d954a3edc6f5 (diff) | |
download | doxygen-b65cb2d67b946445ba89e1938cee8527969922cd.tar.gz doxygen-b65cb2d67b946445ba89e1938cee8527969922cd.tar.bz2 doxygen-b65cb2d67b946445ba89e1938cee8527969922cd.zip |
Imported Upstream version 1.8.7upstream/1.8.7
Diffstat (limited to 'addon')
48 files changed, 1710 insertions, 1240 deletions
diff --git a/addon/doxmlparser/examples/metrics/metrics.pro.in b/addon/doxmlparser/examples/metrics/metrics.pro.in index 6dd344f..3b2354d 100644 --- a/addon/doxmlparser/examples/metrics/metrics.pro.in +++ b/addon/doxmlparser/examples/metrics/metrics.pro.in @@ -2,19 +2,19 @@ TEMPLATE = app.t CONFIG = console warn_on $extraopts HEADERS = SOURCES = main.cpp -unix:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +unix:LIBS += -L../../../../lib -ldoxmlparser -lqtools win32:INCLUDEPATH += . -win32-mingw:LIBS += -L../../../../lib -L../../lib -ldoxmlparser -lqtools +win32-mingw:LIBS += -L../../../../lib -ldoxmlparser -lqtools win32-msvc:LIBS += doxmlparser.lib qtools.lib shell32.lib -win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\..\lib;..\..\lib +win32-msvc:TMAKE_LFLAGS += /LIBPATH:..\..\..\..\lib; win32-borland:LIBS += doxmlparser.lib qtools.lib shell32.lib -win32-borland:TMAKE_LFLAGS += -L..\..\..\..\lib -L..\..\lib +win32-borland:TMAKE_LFLAGS += -L..\..\..\..\lib win32:TMAKE_CXXFLAGS += -DQT_NODLL -DESTDIR = -OBJECTS_DIR = obj +DESTDIR = ../../../../bin +OBJECTS_DIR = ../../../../objects/doxmlparer/metrics TARGET = metrics DEPENDPATH = ../../include INCLUDEPATH += ../../../../qtools ../../include -unix:TARGETDEPS = ../../lib/libdoxmlparser.a -win32:TARGETDEPS = ..\..\lib\doxmlparser.lib +unix:TARGETDEPS = ../../../../lib/libdoxmlparser.a +win32:TARGETDEPS = ..\..\..\..\lib\doxmlparser.lib diff --git a/addon/doxmlparser/include/doxmlintf.h b/addon/doxmlparser/include/doxmlintf.h index f13971f..2d2b707 100644..120000 --- a/addon/doxmlparser/include/doxmlintf.h +++ b/addon/doxmlparser/include/doxmlintf.h @@ -1,1141 +1 @@ -/****************************************************************************** - * - * $Id$ - * - * - * Copyright (C) 1997-2013 by Dimitri van Heesch. - * - * Permission to use, copy, modify, and distribute this software and its - * documentation under the terms of the GNU General Public License is hereby - * granted. No representations are made about the suitability of this software - * for any purpose. It is provided "as is" without express or implied warranty. - * See the GNU General Public License for more details. - * - */ - -#ifndef _DOXMLINTF_H -#define _DOXMLINTF_H - -/*! \file - * \brief The interface to the object model provided by the XML parser - * library. - * - * To start using this library one calls createObjectModel() and then - * uses the returned IDoxygen interface to read doxygen generated - * XML output and navigate through the information contained in it. - * - * @see createObjectModel() - */ - -class IMember; -class IDocIterator; -class ICompound; -class ISection; -class INode; -class IDocInternal; -class IDocRoot; - -#define VIRTUAL_DESTRUCTOR(x) virtual ~x() {} - -/*! \brief Read only interface to a string. - */ -class IString -{ - public: - VIRTUAL_DESTRUCTOR(IString) - /*! Returns a latin1 character representation of the string. */ - virtual const char *latin1() const = 0; - /*! Returns a utf8 character representation of the string. */ - virtual const char *utf8() const = 0; - /*! Returns a 16-bit unicode character representation of the character at - * position \a index in the string. The first character is at index 0. - */ - virtual unsigned short unicodeCharAt(int index) const = 0; - /*! Returns true if this string is empty or false otherwise */ - virtual bool isEmpty() const = 0; - /*! Returns the number of characters in the string. */ - virtual int length() const = 0; -}; - -/*! \brief Base interface for hyperlinked text - * - * Depending on the result of kind() the interface is extended by - * ILT_Text or ILT_Ref. - */ -class ILinkedText -{ - public: - VIRTUAL_DESTRUCTOR(ILinkedText) - enum Kind { Kind_Text, Kind_Ref }; - virtual Kind kind() const = 0; -}; - -/*! \brief Plain text fragment. - */ -class ILT_Text : public ILinkedText -{ - public: - VIRTUAL_DESTRUCTOR(ILT_Text) - virtual const IString *text() const = 0; -}; - -/*! \brief Reference to an object. - */ -class ILT_Ref : public ILinkedText -{ - public: - VIRTUAL_DESTRUCTOR(ILT_Ref) - enum TargetKind { Member, Compound }; - virtual const IString *id() const = 0; - virtual TargetKind targetKind() const = 0; - virtual const IString *external() const = 0; - virtual const IString *text() const = 0; -}; - -/*! \brief Iterates over a list of ILinkedText fragments. - */ -class ILinkedTextIterator -{ - public: - VIRTUAL_DESTRUCTOR(ILinkedTextIterator) - 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; -}; - -/*! \brief Representation of a parameter of a function. */ -class IParam -{ - public: - VIRTUAL_DESTRUCTOR(IParam) - virtual ILinkedTextIterator *type() const = 0; - virtual const IString * declarationName() const = 0; - virtual const IString * definitionName() const = 0; - virtual const IString * attrib() const = 0; - virtual const IString * arraySpecifier() const = 0; - virtual ILinkedTextIterator *defaultValue() const = 0; - virtual IDocRoot *briefDescription() const = 0; -}; - -class IParamIterator -{ - public: - VIRTUAL_DESTRUCTOR(IParamIterator) - 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_DESTRUCTOR(IMemberReference) - virtual IMember *member() const = 0; - virtual const IString * name() const = 0; - virtual const IString * scope() const = 0; - virtual const IString * protection() const = 0; - virtual const IString * virtualness() const = 0; - virtual const IString * ambiguityScope() const = 0; -}; - -class IMemberReferenceIterator -{ - public: - VIRTUAL_DESTRUCTOR(IMemberReferenceIterator) - 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 IDoc -{ - public: - VIRTUAL_DESTRUCTOR(IDoc) - enum Kind - { - Invalid = 0, // 0 - Para, // 1 -> IDocPara - Text, // 2 -> IDocText - MarkupModifier, // 3 -> IDocMarkupModifier - ItemizedList, // 4 -> IDocItemizedList - OrderedList, // 5 -> IDocOrderedList - ListItem, // 6 -> IDocListItem - ParameterList, // 7 -> IDocParameterList - Parameter, // 8 -> IDocParameter - SimpleSect, // 9 -> IDocSimpleSect - Title, // 10 -> IDocTitle - Ref, // 11 -> IDocRef - VariableList, // 12 -> IDocVariableList - VariableListEntry, // 13 -> IDocVariableListEntry - HRuler, // 14 -> IDocHRuler - LineBreak, // 15 -> IDocLineBreak - ULink, // 16 -> IDocULink - EMail, // 17 -> IDocEMail - Link, // 18 -> IDocLink - ProgramListing, // 19 -> IDocProgramListing - CodeLine, // 20 -> IDocCodeLine - Highlight, // 21 -> IDocHighlight - Formula, // 22 -> IDocFormula - Image, // 23 -> IDocImage - DotFile, // 24 -> IDocDotFile - IndexEntry, // 25 -> IDocIndexEntry - Table, // 26 -> IDocTable - Row, // 27 -> IDocRow - Entry, // 28 -> IDocEntry - Section, // 29 -> IDocSection - Verbatim, // 30 -> IDocVerbatim - Copy, // 31 -> IDocCopy - TocList, // 32 -> IDocTocList - TocItem, // 33 -> IDocTocItem - Anchor, // 34 -> IDocAnchor - Symbol, // 35 -> IDocSymbol - Internal, // 36 -> IDocInternal - Root, // 37 -> IDocRoot - ParameterItem // 38 -> IDocParameterItem - }; - virtual Kind kind() const = 0; -}; - -class IDocMarkup : public IDoc -{ - public: - enum Markup - { - Normal = 0x000, - Bold = 0x001, - Emphasis = 0x002, - ComputerOutput = 0x004, - Subscript = 0x008, - Superscript = 0x010, - SmallFont = 0x020, - Center = 0x040, - Preformatted = 0x080, - Heading = 0x100 - }; -}; - -class IDocPara : public IDoc -{ - public: - virtual IDocIterator *contents() const = 0; -}; - -class IDocText : public IDocMarkup -{ - public: - virtual const IString * text() const = 0; - virtual int markup() const = 0; - virtual int headingLevel() const = 0; -}; - -class IDocMarkupModifier : public IDoc -{ - public: - virtual bool enabled() const = 0; - virtual int markup() const = 0; - virtual int headingLevel() const = 0; -}; - -class IDocItemizedList : public IDoc -{ - public: - virtual IDocIterator *elements() const = 0; -}; - -class IDocOrderedList : public IDoc -{ - public: - virtual IDocIterator *elements() const = 0; -}; - -class IDocListItem : public IDoc -{ - public: - virtual IDocIterator *contents() const = 0; -}; - -class IDocParameterList : public IDoc -{ - public: - enum Types { Param, RetVal, Exception }; - virtual Types sectType() const = 0; - virtual IDocIterator *params() const = 0; -}; - -class IDocParameterItem : public IDoc -{ - public: - virtual IDocIterator *paramNames() const = 0; - virtual IDocPara *description() const = 0; -}; - -class IDocParameter : public IDoc -{ - public: - virtual const IString * name() const = 0; -}; - -class IDocTitle : public IDoc -{ - public: - virtual IDocIterator *title() const = 0; -}; - -class IDocSimpleSect : public IDoc -{ - public: - enum Types { Invalid = 0, - See, Return, Author, Version, - Since, Date, Bug, Note, - Warning, Par, Deprecated, Pre, - Post, Invar, Remark, Attention, - Todo, Test, RCS, EnumValues, - Examples - }; - virtual Types type() const = 0; - virtual const IString * typeString() const = 0; - virtual IDocTitle *title() const = 0; - virtual IDocPara *description() const = 0; -}; - -class IDocRef : public IDoc -{ - public: - enum TargetKind { Member, Compound }; - virtual const IString * refId() const = 0; - virtual TargetKind targetKind() const = 0; - virtual const IString * external() const = 0; - virtual const IString * text() const = 0; -}; - -class IDocVariableList : public IDoc -{ - public: - virtual IDocIterator *entries() const = 0; -}; - -class IDocVariableListEntry : public IDoc -{ - public: - virtual ILinkedTextIterator * term() const = 0; - virtual IDocPara *description() const = 0; -}; - -class IDocHRuler : public IDoc -{ -}; - -class IDocLineBreak : public IDoc -{ -}; - -class IDocULink : public IDoc -{ - public: - virtual const IString * url() const = 0; - virtual const IString * text() const = 0; -}; - -class IDocEMail : public IDoc -{ - public: - virtual const IString * address() const = 0; -}; - -class IDocLink : public IDoc -{ - public: - virtual const IString * refId() const = 0; - virtual const IString * text() const = 0; -}; - -class IDocProgramListing : public IDoc -{ - public: - virtual IDocIterator *codeLines() const = 0; -}; - -class IDocCodeLine : public IDoc -{ - public: - virtual int lineNumber() const = 0; - virtual const IString * refId() const = 0; - virtual IDocIterator *codeElements() const = 0; -}; - -class IDocHighlight : public IDoc -{ - public: - enum HighlightKind - { Invalid=0, - Comment, Keyword, - KeywordType, KeywordFlow, CharLiteral, - StringLiteral, Preprocessor - }; - virtual HighlightKind highlightKind() const = 0; - virtual IDocIterator *codeElements() const = 0; -}; - -class IDocFormula : public IDoc -{ - public: - virtual const IString * id() const = 0; - virtual const IString * text() const = 0; -}; - -class IDocImage : public IDoc -{ - public: - virtual const IString * name() const = 0; - virtual const IString * caption() const = 0; -}; - -class IDocDotFile : public IDoc -{ - public: - virtual const IString * name() const = 0; - virtual const IString * caption() const = 0; -}; - -class IDocIndexEntry : public IDoc -{ - public: - virtual const IString * primary() const = 0; - virtual const IString * secondary() const = 0; -}; - -class IDocTable : public IDoc -{ - public: - virtual IDocIterator *rows() const = 0; - virtual int numColumns() const = 0; - virtual const IString * caption() const = 0; -}; - -class IDocRow : public IDoc -{ - public: - virtual IDocIterator *entries() const = 0; -}; - -class IDocEntry : public IDoc -{ - public: - virtual IDocIterator *contents() const = 0; -}; - -class IDocSection : public IDoc -{ - public: - virtual const IString * id() const = 0; - virtual int level() const = 0; - virtual IDocTitle *title() const = 0; - virtual IDocIterator *paragraphs() const = 0; - virtual IDocIterator *subSections() const = 0; - virtual IDocInternal *internal() const = 0; -}; - -class IDocInternal : public IDoc -{ - public: - virtual IDocIterator *paragraphs() const = 0; - virtual IDocIterator *subSections() const = 0; -}; - -class IDocTocList : public IDoc -{ - public: - virtual IDocIterator *elements() const = 0; -}; - -class IDocTocItem : public IDoc -{ - public: - virtual const IString *id() const = 0; - virtual const IString *title() const = 0; -}; - -class IDocCopy : public IDoc -{ - public: - virtual IDocIterator *contents() const = 0; -}; - -class IDocVerbatim : public IDoc -{ - public: - enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim }; - virtual const IString *text() const = 0; - virtual Types type() const = 0; -}; - -class IDocAnchor : public IDoc -{ - public: - virtual const IString *id() const = 0; -}; - -class IDocSymbol : public IDoc -{ - public: - enum Types - { Invalid = 0, - Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy - }; - virtual Types type() const = 0; - virtual const IString * typeString() const = 0; - virtual char letter() const = 0; -}; - -class IDocRoot : public IDoc -{ - public: - virtual IDocIterator *contents() const = 0; - virtual IDocInternal *internal() const = 0; -}; - -class IDocIterator -{ - public: - VIRTUAL_DESTRUCTOR(IDocIterator) - 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 IEdgeLabel -{ - public: - VIRTUAL_DESTRUCTOR(IEdgeLabel) - virtual const IString * label() const = 0; -}; - -class IEdgeLabelIterator -{ - public: - VIRTUAL_DESTRUCTOR(IEdgeLabelIterator) - virtual IEdgeLabel *toFirst() = 0; - virtual IEdgeLabel *toLast() = 0; - virtual IEdgeLabel *toNext() = 0; - virtual IEdgeLabel *toPrev() = 0; - virtual IEdgeLabel *current() const = 0; - virtual void release() = 0; -}; - -class IChildNode -{ - public: - VIRTUAL_DESTRUCTOR(IChildNode) - enum NodeRelation { PublicInheritance, ProtectedInheritance, - PrivateInheritance, Usage, TemplateInstance - }; - virtual INode * node() const = 0; - virtual NodeRelation relation() const = 0; - virtual const IString * relationString() const = 0; - virtual IEdgeLabelIterator *edgeLabels() const = 0; -}; - -class IChildNodeIterator -{ - public: - VIRTUAL_DESTRUCTOR(IChildNodeIterator) - virtual IChildNode *toFirst() = 0; - virtual IChildNode *toLast() = 0; - virtual IChildNode *toNext() = 0; - virtual IChildNode *toPrev() = 0; - virtual IChildNode *current() const = 0; - virtual void release() = 0; -}; - -class INode -{ - public: - VIRTUAL_DESTRUCTOR(INode) - virtual const IString * id() const = 0; - virtual const IString * label() const = 0; - virtual const IString * linkId() const = 0; - virtual IChildNodeIterator *children() const = 0; -}; - -class INodeIterator -{ - public: - VIRTUAL_DESTRUCTOR(INodeIterator) - virtual INode *toFirst() = 0; - virtual INode *toLast() = 0; - virtual INode *toNext() = 0; - virtual INode *toPrev() = 0; - virtual INode *current() const = 0; - virtual void release() = 0; -}; - -class IGraph -{ - public: - VIRTUAL_DESTRUCTOR(IGraph) - virtual INodeIterator *nodes() const = 0; -}; - -class IMember -{ - public: - VIRTUAL_DESTRUCTOR(IMember) - enum MemberKind { Invalid=0, - Define, Property, Variable, Typedef, Enum, - Function, Signal, Prototype, Friend, DCOP, Slot, - EnumValue - }; - virtual ICompound *compound() const = 0; - virtual ISection *section() const = 0; - virtual MemberKind kind() const = 0; - virtual const IString * kindString() const = 0; - virtual const IString * id() const = 0; - virtual const IString * protection() const = 0; - virtual const IString * virtualness() const = 0; - virtual ILinkedTextIterator *type() const = 0; - virtual const IString * typeString() const = 0; - virtual const IString * name() const = 0; - virtual const IString * readAccessor() const = 0; - virtual const IString * writeAccessor() const = 0; - virtual const IString * definition() const = 0; - virtual const IString * argsstring() const = 0; - virtual bool isConst() const = 0; - virtual bool isVolatile() const = 0; - virtual bool isStatic() const = 0; - virtual bool isExplicit() const = 0; - virtual bool isInline() const = 0; - virtual bool isMutable() const = 0; - virtual bool isReadable() const = 0; - virtual bool isWritable() const = 0; - virtual IParamIterator *parameters() const = 0; - virtual IParamIterator *templateParameters() const = 0; - virtual ILinkedTextIterator *initializer() const = 0; - virtual ILinkedTextIterator *exceptions() const = 0; - virtual IMemberReferenceIterator *references() const = 0; - virtual IMemberReferenceIterator *referencedBy() const = 0; - virtual const IString *bodyFile() const = 0; - virtual int bodyStart() const = 0; - virtual int bodyEnd() const = 0; - virtual const IString * definitionFile() const = 0; - virtual int definitionLine() const = 0; - virtual IMemberReference *reimplements() const = 0; - virtual IMemberReferenceIterator *reimplementedBy() const = 0; - virtual IDocRoot *briefDescription() const = 0; - virtual IDocRoot *detailedDescription() const = 0; - virtual IDocRoot *inbodyDescription() const = 0; -}; - -class IDefine : public IMember -{ - public: -}; - -class IProperty : public IMember -{ - public: -}; - -class IVariable : public IMember -{ - public: -}; - -class ITypedef : public IMember -{ - public: -}; - -class IFunction : public IMember -{ - public: -}; - -class ISignal : public IMember -{ - public: -}; - -class IPrototype : public IMember -{ - public: -}; - -class IFriend : public IMember -{ - public: -}; - -class IDCOP : public IMember -{ - public: -}; - -class ISlot : public IMember -{ - public: -}; - -class IEnumValue : public IMember -{ - public: - virtual const IString * name() const = 0; -}; - -/*! \brief Include relation - */ -class IInclude -{ - public: - VIRTUAL_DESTRUCTOR(IInclude) - virtual const IString * name() const = 0; - virtual const IString * refId() const = 0; - virtual bool isLocal() const = 0; -}; - -class IIncludeIterator -{ - public: - VIRTUAL_DESTRUCTOR(IIncludeIterator) - virtual IInclude *toFirst() = 0; - virtual IInclude *toLast() = 0; - virtual IInclude *toNext() = 0; - virtual IInclude *toPrev() = 0; - virtual IInclude *current() const = 0; - virtual void release() = 0; -}; - -class IMemberIterator -{ - public: - VIRTUAL_DESTRUCTOR(IMemberIterator) - 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 IEnum : public IMember -{ - public: - virtual IMemberIterator *enumValues() const = 0; -}; - -/*! \brief The interface to a section in the object model. - * - * A compound can have a number of sections, where each - * section contains a set of members with the properties implied by - * the section kind. The kind() method returns the kind of the section. - * The members of the section can be accessed via members(). Apart - * from using kind(), some of the individual properties of the section can - * also be inspected via isStatic(), isPublic(), isProtected() and - * isPrivate(). - */ -class ISection -{ - public: - VIRTUAL_DESTRUCTOR(ISection) - /*! Possible section types */ - enum SectionKind - { Invalid=0, - UserDefined, //!< A user defined member group - PubTypes, //!< Public member typedefs - PubFuncs, //!< Public member functions - PubAttribs, //!< Public member attributes - PubSlots, //!< Public Qt Slots - Signals, //!< Qt Signals - DCOPFuncs, //!< KDE-DCOP interface functions - Properties, //!< IDL properties - Events, //!< C# events - PubStatFuncs, //!< Public static member functions - PubStatAttribs, //!< Public static attributes - ProTypes, //!< Protected member typedefs - ProFuncs, //!< Protected member functions - ProAttribs, //!< Protected member attributes - ProSlots, //!< Protected slots - ProStatFuncs, //!< Protected static member functions - ProStatAttribs, //!< Protected static member attributes - PacTypes, //!< Package member typedefs - PacFuncs, //!< Package member functions - PacAttribs, //!< Package member attributes - PacStatFuncs, //!< Package static member functions - PacStatAttribs, //!< Package static member attributes - PriTypes, //!< Private member typedefs - PriFuncs, //!< Private member functions - PriAttribs, //!< Private member attributes - PriSlots, //!< Private Qt slots - PriStatFuncs, //!< Private static member functions - PriStatAttribs, //!< Private static member attributes - Friend, //!< Friends - Related, //!< Function marked as related - Defines, //!< Preprocessor defines - Prototypes, //!< Global function prototypes - Typedefs, //!< Global typedefs - Enums, //!< Enumerations - Functions, //!< Global functions - Variables //!< Global variables - }; - - /*! Returns a string representation of the value returned by kind() */ - virtual const IString * kindString() const = 0; - - /*! Returns what kind of section this is */ - virtual SectionKind kind() const = 0; - - /*! Returns the description attached to this section (for user defined - * sections, also known as member groups). - */ - virtual IDocRoot *description() const = 0; - - /*! Returns an iterator for the members of this section */ - virtual IMemberIterator *members() const = 0; - - /*! Returns \c true if this section contains statics */ - virtual bool isStatic() const = 0; - - /*! Returns \c true if this section belongs to a - * public section of a class - */ - virtual bool isPublic() const = 0; - - /*! Returns \c true if this section belongs to a - * private section of a class - */ - virtual bool isPrivate() const = 0; - - /*! Returns \c true if this section belongs to a - * protected section of a class - * */ - virtual bool isProtected() const = 0; -}; - -class IUserDefined : public ISection -{ - public: - virtual const IString * header() const = 0; -}; - -class ISectionIterator -{ - public: - VIRTUAL_DESTRUCTOR(ISectionIterator) - 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; -}; - -/*! \brief The interface to a compound in the object model. - * - * A compound has a name which can be obtained via the name() method - * and a unique id, which is return via the id() method. - * A compound consists zero or more members which are grouped into sections. - * The sections() method can be used to access the individual sections. - * Alternatively, members can be obtained by name or id. There are - * different types of compounds. The kind() method returns what kind of - * compound this is. Depending on the return value one can dynamically - * cast an interface pointer to an more specialised interface that provides - * additional methods. - * Example: - * \code - * ICompound *comp=...; - * if (comp->kind()==ICompound::Class) - * { - * IClass *cls = dynamic_cast<IClass*>(comp); - * // use methods of IClass - * } - * \endcode - * The documentation that is provided by a compound is available via - * the briefDescription() and detailedDescription() methods. - * To avoid excessive memory usage, release() should be called (once) on each - * compound interface pointer that is no longer needed. - */ -class ICompound -{ - public: - VIRTUAL_DESTRUCTOR(ICompound) - /*! Represents the kind of compounds recognised by doxygen. */ - enum CompoundKind { Invalid=0, - Class, Struct, Union, Interface, Protocol, Category, - Exception, File, Namespace, Group, Page, Example, Dir - }; - - /*! Returns the name of this compound */ - virtual const IString * name() const = 0; - - /*! Returns the id of this compound. The id is a - * unique string representing a specific compound object. - */ - virtual const IString * id() const = 0; - - /*! Returns the kind of compound. See #CompoundKind for possible - * values. - */ - virtual CompoundKind kind() const = 0; - - /*! Returns a string representation of the compound kind. - * @see kind() - */ - virtual const IString * kindString() const = 0; - - /*! Returns an iterator for the different member sections in this - * compound. - */ - virtual ISectionIterator *sections() const = 0; - - /*! Returns a tree-structured representation of the brief - * description that is attached to this compound. - */ - virtual IDocRoot *briefDescription() const = 0; - - /*! Returns a tree-structured representation of the detailed - * description that is attached to this compound. - */ - virtual IDocRoot *detailedDescription() const = 0; - - /*! Returns an interface to a member given its id. - * @param id The member id. - */ - virtual IMember *memberById(const char * id) const = 0; - - /*! Returns a list of all members within the compound having a certain - * name. Member overloading is the reason why there can be more than - * one member. - * @param name The name of the member. - */ - virtual IMemberIterator *memberByName(const char * name) const = 0; - - /*! Decreases the reference counter for this compound. If it reaches - * zero, the memory for the compound will be released. - */ - virtual void release() = 0; -}; - -class ICompoundIterator -{ - public: - VIRTUAL_DESTRUCTOR(ICompoundIterator) - virtual void toFirst() = 0; - virtual void toLast() = 0; - virtual void toNext() = 0; - virtual void toPrev() = 0; - virtual ICompound *current() const = 0; - virtual void release() = 0; -}; - -class IRelatedCompound -{ - public: - VIRTUAL_DESTRUCTOR(IRelatedCompound) - enum Protection { Public, Protected, Private }; - enum Kind { Normal, Virtual }; - virtual ICompound *compound() const = 0; - virtual Protection protection() const = 0; - virtual Kind kind() const = 0; - virtual const IString *name() const = 0; - -}; - -class IRelatedCompoundIterator -{ - public: - VIRTUAL_DESTRUCTOR(IRelatedCompoundIterator) - virtual IRelatedCompound *toFirst() = 0; - virtual IRelatedCompound *toLast() = 0; - virtual IRelatedCompound *toNext() = 0; - virtual IRelatedCompound *toPrev() = 0; - virtual IRelatedCompound *current() const = 0; - virtual void release() = 0; -}; - -/*! \brief The interface to a class in the object model. - */ -class IClass : public ICompound -{ - public: - virtual IGraph *inheritanceGraph() const = 0; - virtual IGraph *collaborationGraph() const = 0; - virtual IRelatedCompoundIterator *baseCompounds() const = 0; - virtual IRelatedCompoundIterator *derivedCompounds() const = 0; - virtual ICompoundIterator *nestedCompounds() const = 0; - virtual IParamIterator *templateParameters() const = 0; - virtual const IString *locationFile() const = 0; - virtual int locationLine() const = 0; - virtual const IString *locationBodyFile() const = 0; - virtual int locationBodyStartLine() const = 0; - virtual int locationBodyEndLine() const = 0; - - // TODO: - // class: - // listOfAllMembers() - // protection() - // isAbstract() -}; - -/*! \brief The interface to a struct in the object model. - */ -class IStruct : public ICompound -{ - public: - virtual ICompoundIterator *nestedCompounds() const = 0; - virtual IRelatedCompoundIterator *baseCompounds() const = 0; - virtual IRelatedCompoundIterator *derivedCompounds() const = 0; - virtual const IString *locationFile() const = 0; - virtual int locationLine() const = 0; - virtual int locationBodyStartLine() const = 0; - virtual int locationBodyEndLine() const = 0; -}; - -/*! \brief The interface to a union in the object model. - */ -class IUnion : public ICompound -{ - public: - virtual ICompoundIterator *nestedCompounds() const = 0; -}; - -/*! \brief The interface to a Java/IDL interface in the object model. - */ -class IInterface : public ICompound -{ - public: - virtual IRelatedCompoundIterator *baseCompounds() const = 0; - virtual IRelatedCompoundIterator *derivedCompounds() const = 0; -}; - - -/*! \brief The interface to a Java/IDL exception in the object model. - */ -class IException : public ICompound -{ -}; - -/*! \brief The interface to a namespace in the object model. - */ -class INamespace : public ICompound -{ - public: - virtual ICompoundIterator *nestedCompounds() const = 0; -}; - -/*! \brief The interface to a file in the object model. - */ -class IFile : public ICompound -{ - public: - virtual IGraph *includeDependencyGraph() const = 0; - virtual IGraph *includedByDependencyGraph() const = 0; - virtual IDocProgramListing *source() const = 0; - virtual ICompoundIterator *nestedCompounds() const = 0; - - virtual IIncludeIterator *includes() const = 0; - virtual IIncludeIterator *includedBy() const = 0; - - // ICompound *innerNamespaces() - // ICompoundIterator *innerClasses() -}; - -/*! \brief The interface to a group in the object model. - */ -class IGroup : public ICompound -{ - public: - virtual ICompoundIterator *nestedCompounds() const = 0; - // group: - // Title() - // innerFile() - // innerPage() -}; - -/*! \brief The interface to a page in the object model. - */ -class IPage : public ICompound -{ - public: - virtual const IDocTitle *title() const = 0; -}; - -/** \brief Interface to a directory in the object model. */ -class IDir : public ICompound -{ - public: - virtual ICompoundIterator *nestedCompounds() const = 0; -}; - -/*! Root node of the object model. */ -class IDoxygen -{ - public: - VIRTUAL_DESTRUCTOR(IDoxygen) - - /*! 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 char * 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 char * name) const = 0; - - /*! Returns an interface to a compound containing a member given it the - * member's id. Given the ICompound interface one can use the same id - * to obtain the IMember interface. - * @param id The member id. - */ - virtual ICompound *memberById(const char * id) const = 0; - - /*! Returns a list of all compounds containing at least one members - * with a certain name. Each compound can be asked to return the - * list of members with that name. - * @param name The name of the member. - */ - virtual ICompoundIterator *memberByName(const char * 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; - - /*! Sets the debug level. - * - 0 all debugging messages are disabled (the default). - * - 1 display important messages only - * - 2 display any messages. - */ - virtual void setDebugLevel(int level) = 0; - - /*! Reads an XML directory produced by doxygen and builds up a data - * structure representing the contents of the XML files in the directory. - */ - virtual bool readXMLDir(const char *xmlDirName) = 0; -}; - -/*! Factory method that creates an empty object model for a doxygen generated XML file. - * Use the readXMLDir() method to build the model from an XML output - * directory containing doxygen output. - */ -IDoxygen *createObjectModel(); - -#endif +../src/doxmlintf.h
\ No newline at end of file diff --git a/addon/doxmlparser/src/basehandler.h b/addon/doxmlparser/src/basehandler.h index 32e4181..31fbf24 100644 --- a/addon/doxmlparser/src/basehandler.h +++ b/addon/doxmlparser/src/basehandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/baseiterator.h b/addon/doxmlparser/src/baseiterator.h index 9a59502..2ee9c2f 100644 --- a/addon/doxmlparser/src/baseiterator.h +++ b/addon/doxmlparser/src/baseiterator.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/compoundhandler.cpp b/addon/doxmlparser/src/compoundhandler.cpp index 3cd77b0..87b0440 100644 --- a/addon/doxmlparser/src/compoundhandler.cpp +++ b/addon/doxmlparser/src/compoundhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/compoundhandler.h b/addon/doxmlparser/src/compoundhandler.h index 635cff3..c7e5ac0 100644 --- a/addon/doxmlparser/src/compoundhandler.h +++ b/addon/doxmlparser/src/compoundhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/dochandler.cpp b/addon/doxmlparser/src/dochandler.cpp index 992b185..df71e6a 100644 --- a/addon/doxmlparser/src/dochandler.cpp +++ b/addon/doxmlparser/src/dochandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/dochandler.h b/addon/doxmlparser/src/dochandler.h index 172bcd2..6bc2bd9 100644 --- a/addon/doxmlparser/src/dochandler.h +++ b/addon/doxmlparser/src/dochandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/doxmlintf.h b/addon/doxmlparser/src/doxmlintf.h index 1b1e847..ba863d4 120000..100644 --- a/addon/doxmlparser/src/doxmlintf.h +++ b/addon/doxmlparser/src/doxmlintf.h @@ -1 +1,1141 @@ -../include/doxmlintf.h
\ No newline at end of file +/****************************************************************************** + * + * $Id$ + * + * + * Copyright (C) 1997-2014 by Dimitri van Heesch. + * + * Permission to use, copy, modify, and distribute this software and its + * documentation under the terms of the GNU General Public License is hereby + * granted. No representations are made about the suitability of this software + * for any purpose. It is provided "as is" without express or implied warranty. + * See the GNU General Public License for more details. + * + */ + +#ifndef _DOXMLINTF_H +#define _DOXMLINTF_H + +/*! \file + * \brief The interface to the object model provided by the XML parser + * library. + * + * To start using this library one calls createObjectModel() and then + * uses the returned IDoxygen interface to read doxygen generated + * XML output and navigate through the information contained in it. + * + * @see createObjectModel() + */ + +class IMember; +class IDocIterator; +class ICompound; +class ISection; +class INode; +class IDocInternal; +class IDocRoot; + +#define VIRTUAL_DESTRUCTOR(x) virtual ~x() {} + +/*! \brief Read only interface to a string. + */ +class IString +{ + public: + VIRTUAL_DESTRUCTOR(IString) + /*! Returns a latin1 character representation of the string. */ + virtual const char *latin1() const = 0; + /*! Returns a utf8 character representation of the string. */ + virtual const char *utf8() const = 0; + /*! Returns a 16-bit unicode character representation of the character at + * position \a index in the string. The first character is at index 0. + */ + virtual unsigned short unicodeCharAt(int index) const = 0; + /*! Returns true if this string is empty or false otherwise */ + virtual bool isEmpty() const = 0; + /*! Returns the number of characters in the string. */ + virtual int length() const = 0; +}; + +/*! \brief Base interface for hyperlinked text + * + * Depending on the result of kind() the interface is extended by + * ILT_Text or ILT_Ref. + */ +class ILinkedText +{ + public: + VIRTUAL_DESTRUCTOR(ILinkedText) + enum Kind { Kind_Text, Kind_Ref }; + virtual Kind kind() const = 0; +}; + +/*! \brief Plain text fragment. + */ +class ILT_Text : public ILinkedText +{ + public: + VIRTUAL_DESTRUCTOR(ILT_Text) + virtual const IString *text() const = 0; +}; + +/*! \brief Reference to an object. + */ +class ILT_Ref : public ILinkedText +{ + public: + VIRTUAL_DESTRUCTOR(ILT_Ref) + enum TargetKind { Member, Compound }; + virtual const IString *id() const = 0; + virtual TargetKind targetKind() const = 0; + virtual const IString *external() const = 0; + virtual const IString *text() const = 0; +}; + +/*! \brief Iterates over a list of ILinkedText fragments. + */ +class ILinkedTextIterator +{ + public: + VIRTUAL_DESTRUCTOR(ILinkedTextIterator) + 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; +}; + +/*! \brief Representation of a parameter of a function. */ +class IParam +{ + public: + VIRTUAL_DESTRUCTOR(IParam) + virtual ILinkedTextIterator *type() const = 0; + virtual const IString * declarationName() const = 0; + virtual const IString * definitionName() const = 0; + virtual const IString * attrib() const = 0; + virtual const IString * arraySpecifier() const = 0; + virtual ILinkedTextIterator *defaultValue() const = 0; + virtual IDocRoot *briefDescription() const = 0; +}; + +class IParamIterator +{ + public: + VIRTUAL_DESTRUCTOR(IParamIterator) + 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_DESTRUCTOR(IMemberReference) + virtual IMember *member() const = 0; + virtual const IString * name() const = 0; + virtual const IString * scope() const = 0; + virtual const IString * protection() const = 0; + virtual const IString * virtualness() const = 0; + virtual const IString * ambiguityScope() const = 0; +}; + +class IMemberReferenceIterator +{ + public: + VIRTUAL_DESTRUCTOR(IMemberReferenceIterator) + 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 IDoc +{ + public: + VIRTUAL_DESTRUCTOR(IDoc) + enum Kind + { + Invalid = 0, // 0 + Para, // 1 -> IDocPara + Text, // 2 -> IDocText + MarkupModifier, // 3 -> IDocMarkupModifier + ItemizedList, // 4 -> IDocItemizedList + OrderedList, // 5 -> IDocOrderedList + ListItem, // 6 -> IDocListItem + ParameterList, // 7 -> IDocParameterList + Parameter, // 8 -> IDocParameter + SimpleSect, // 9 -> IDocSimpleSect + Title, // 10 -> IDocTitle + Ref, // 11 -> IDocRef + VariableList, // 12 -> IDocVariableList + VariableListEntry, // 13 -> IDocVariableListEntry + HRuler, // 14 -> IDocHRuler + LineBreak, // 15 -> IDocLineBreak + ULink, // 16 -> IDocULink + EMail, // 17 -> IDocEMail + Link, // 18 -> IDocLink + ProgramListing, // 19 -> IDocProgramListing + CodeLine, // 20 -> IDocCodeLine + Highlight, // 21 -> IDocHighlight + Formula, // 22 -> IDocFormula + Image, // 23 -> IDocImage + DotFile, // 24 -> IDocDotFile + IndexEntry, // 25 -> IDocIndexEntry + Table, // 26 -> IDocTable + Row, // 27 -> IDocRow + Entry, // 28 -> IDocEntry + Section, // 29 -> IDocSection + Verbatim, // 30 -> IDocVerbatim + Copy, // 31 -> IDocCopy + TocList, // 32 -> IDocTocList + TocItem, // 33 -> IDocTocItem + Anchor, // 34 -> IDocAnchor + Symbol, // 35 -> IDocSymbol + Internal, // 36 -> IDocInternal + Root, // 37 -> IDocRoot + ParameterItem // 38 -> IDocParameterItem + }; + virtual Kind kind() const = 0; +}; + +class IDocMarkup : public IDoc +{ + public: + enum Markup + { + Normal = 0x000, + Bold = 0x001, + Emphasis = 0x002, + ComputerOutput = 0x004, + Subscript = 0x008, + Superscript = 0x010, + SmallFont = 0x020, + Center = 0x040, + Preformatted = 0x080, + Heading = 0x100 + }; +}; + +class IDocPara : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocText : public IDocMarkup +{ + public: + virtual const IString * text() const = 0; + virtual int markup() const = 0; + virtual int headingLevel() const = 0; +}; + +class IDocMarkupModifier : public IDoc +{ + public: + virtual bool enabled() const = 0; + virtual int markup() const = 0; + virtual int headingLevel() const = 0; +}; + +class IDocItemizedList : public IDoc +{ + public: + virtual IDocIterator *elements() const = 0; +}; + +class IDocOrderedList : public IDoc +{ + public: + virtual IDocIterator *elements() const = 0; +}; + +class IDocListItem : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocParameterList : public IDoc +{ + public: + enum Types { Param, RetVal, Exception }; + virtual Types sectType() const = 0; + virtual IDocIterator *params() const = 0; +}; + +class IDocParameterItem : public IDoc +{ + public: + virtual IDocIterator *paramNames() const = 0; + virtual IDocPara *description() const = 0; +}; + +class IDocParameter : public IDoc +{ + public: + virtual const IString * name() const = 0; +}; + +class IDocTitle : public IDoc +{ + public: + virtual IDocIterator *title() const = 0; +}; + +class IDocSimpleSect : public IDoc +{ + public: + enum Types { Invalid = 0, + See, Return, Author, Version, + Since, Date, Bug, Note, + Warning, Par, Deprecated, Pre, + Post, Invar, Remark, Attention, + Todo, Test, RCS, EnumValues, + Examples + }; + virtual Types type() const = 0; + virtual const IString * typeString() const = 0; + virtual IDocTitle *title() const = 0; + virtual IDocPara *description() const = 0; +}; + +class IDocRef : public IDoc +{ + public: + enum TargetKind { Member, Compound }; + virtual const IString * refId() const = 0; + virtual TargetKind targetKind() const = 0; + virtual const IString * external() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocVariableList : public IDoc +{ + public: + virtual IDocIterator *entries() const = 0; +}; + +class IDocVariableListEntry : public IDoc +{ + public: + virtual ILinkedTextIterator * term() const = 0; + virtual IDocPara *description() const = 0; +}; + +class IDocHRuler : public IDoc +{ +}; + +class IDocLineBreak : public IDoc +{ +}; + +class IDocULink : public IDoc +{ + public: + virtual const IString * url() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocEMail : public IDoc +{ + public: + virtual const IString * address() const = 0; +}; + +class IDocLink : public IDoc +{ + public: + virtual const IString * refId() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocProgramListing : public IDoc +{ + public: + virtual IDocIterator *codeLines() const = 0; +}; + +class IDocCodeLine : public IDoc +{ + public: + virtual int lineNumber() const = 0; + virtual const IString * refId() const = 0; + virtual IDocIterator *codeElements() const = 0; +}; + +class IDocHighlight : public IDoc +{ + public: + enum HighlightKind + { Invalid=0, + Comment, Keyword, + KeywordType, KeywordFlow, CharLiteral, + StringLiteral, Preprocessor + }; + virtual HighlightKind highlightKind() const = 0; + virtual IDocIterator *codeElements() const = 0; +}; + +class IDocFormula : public IDoc +{ + public: + virtual const IString * id() const = 0; + virtual const IString * text() const = 0; +}; + +class IDocImage : public IDoc +{ + public: + virtual const IString * name() const = 0; + virtual const IString * caption() const = 0; +}; + +class IDocDotFile : public IDoc +{ + public: + virtual const IString * name() const = 0; + virtual const IString * caption() const = 0; +}; + +class IDocIndexEntry : public IDoc +{ + public: + virtual const IString * primary() const = 0; + virtual const IString * secondary() const = 0; +}; + +class IDocTable : public IDoc +{ + public: + virtual IDocIterator *rows() const = 0; + virtual int numColumns() const = 0; + virtual const IString * caption() const = 0; +}; + +class IDocRow : public IDoc +{ + public: + virtual IDocIterator *entries() const = 0; +}; + +class IDocEntry : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocSection : public IDoc +{ + public: + virtual const IString * id() const = 0; + virtual int level() const = 0; + virtual IDocTitle *title() const = 0; + virtual IDocIterator *paragraphs() const = 0; + virtual IDocIterator *subSections() const = 0; + virtual IDocInternal *internal() const = 0; +}; + +class IDocInternal : public IDoc +{ + public: + virtual IDocIterator *paragraphs() const = 0; + virtual IDocIterator *subSections() const = 0; +}; + +class IDocTocList : public IDoc +{ + public: + virtual IDocIterator *elements() const = 0; +}; + +class IDocTocItem : public IDoc +{ + public: + virtual const IString *id() const = 0; + virtual const IString *title() const = 0; +}; + +class IDocCopy : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; +}; + +class IDocVerbatim : public IDoc +{ + public: + enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim }; + virtual const IString *text() const = 0; + virtual Types type() const = 0; +}; + +class IDocAnchor : public IDoc +{ + public: + virtual const IString *id() const = 0; +}; + +class IDocSymbol : public IDoc +{ + public: + enum Types + { Invalid = 0, + Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy + }; + virtual Types type() const = 0; + virtual const IString * typeString() const = 0; + virtual char letter() const = 0; +}; + +class IDocRoot : public IDoc +{ + public: + virtual IDocIterator *contents() const = 0; + virtual IDocInternal *internal() const = 0; +}; + +class IDocIterator +{ + public: + VIRTUAL_DESTRUCTOR(IDocIterator) + 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 IEdgeLabel +{ + public: + VIRTUAL_DESTRUCTOR(IEdgeLabel) + virtual const IString * label() const = 0; +}; + +class IEdgeLabelIterator +{ + public: + VIRTUAL_DESTRUCTOR(IEdgeLabelIterator) + virtual IEdgeLabel *toFirst() = 0; + virtual IEdgeLabel *toLast() = 0; + virtual IEdgeLabel *toNext() = 0; + virtual IEdgeLabel *toPrev() = 0; + virtual IEdgeLabel *current() const = 0; + virtual void release() = 0; +}; + +class IChildNode +{ + public: + VIRTUAL_DESTRUCTOR(IChildNode) + enum NodeRelation { PublicInheritance, ProtectedInheritance, + PrivateInheritance, Usage, TemplateInstance + }; + virtual INode * node() const = 0; + virtual NodeRelation relation() const = 0; + virtual const IString * relationString() const = 0; + virtual IEdgeLabelIterator *edgeLabels() const = 0; +}; + +class IChildNodeIterator +{ + public: + VIRTUAL_DESTRUCTOR(IChildNodeIterator) + virtual IChildNode *toFirst() = 0; + virtual IChildNode *toLast() = 0; + virtual IChildNode *toNext() = 0; + virtual IChildNode *toPrev() = 0; + virtual IChildNode *current() const = 0; + virtual void release() = 0; +}; + +class INode +{ + public: + VIRTUAL_DESTRUCTOR(INode) + virtual const IString * id() const = 0; + virtual const IString * label() const = 0; + virtual const IString * linkId() const = 0; + virtual IChildNodeIterator *children() const = 0; +}; + +class INodeIterator +{ + public: + VIRTUAL_DESTRUCTOR(INodeIterator) + virtual INode *toFirst() = 0; + virtual INode *toLast() = 0; + virtual INode *toNext() = 0; + virtual INode *toPrev() = 0; + virtual INode *current() const = 0; + virtual void release() = 0; +}; + +class IGraph +{ + public: + VIRTUAL_DESTRUCTOR(IGraph) + virtual INodeIterator *nodes() const = 0; +}; + +class IMember +{ + public: + VIRTUAL_DESTRUCTOR(IMember) + enum MemberKind { Invalid=0, + Define, Property, Variable, Typedef, Enum, + Function, Signal, Prototype, Friend, DCOP, Slot, + EnumValue + }; + virtual ICompound *compound() const = 0; + virtual ISection *section() const = 0; + virtual MemberKind kind() const = 0; + virtual const IString * kindString() const = 0; + virtual const IString * id() const = 0; + virtual const IString * protection() const = 0; + virtual const IString * virtualness() const = 0; + virtual ILinkedTextIterator *type() const = 0; + virtual const IString * typeString() const = 0; + virtual const IString * name() const = 0; + virtual const IString * readAccessor() const = 0; + virtual const IString * writeAccessor() const = 0; + virtual const IString * definition() const = 0; + virtual const IString * argsstring() const = 0; + virtual bool isConst() const = 0; + virtual bool isVolatile() const = 0; + virtual bool isStatic() const = 0; + virtual bool isExplicit() const = 0; + virtual bool isInline() const = 0; + virtual bool isMutable() const = 0; + virtual bool isReadable() const = 0; + virtual bool isWritable() const = 0; + virtual IParamIterator *parameters() const = 0; + virtual IParamIterator *templateParameters() const = 0; + virtual ILinkedTextIterator *initializer() const = 0; + virtual ILinkedTextIterator *exceptions() const = 0; + virtual IMemberReferenceIterator *references() const = 0; + virtual IMemberReferenceIterator *referencedBy() const = 0; + virtual const IString *bodyFile() const = 0; + virtual int bodyStart() const = 0; + virtual int bodyEnd() const = 0; + virtual const IString * definitionFile() const = 0; + virtual int definitionLine() const = 0; + virtual IMemberReference *reimplements() const = 0; + virtual IMemberReferenceIterator *reimplementedBy() const = 0; + virtual IDocRoot *briefDescription() const = 0; + virtual IDocRoot *detailedDescription() const = 0; + virtual IDocRoot *inbodyDescription() const = 0; +}; + +class IDefine : public IMember +{ + public: +}; + +class IProperty : public IMember +{ + public: +}; + +class IVariable : public IMember +{ + public: +}; + +class ITypedef : public IMember +{ + public: +}; + +class IFunction : public IMember +{ + public: +}; + +class ISignal : public IMember +{ + public: +}; + +class IPrototype : public IMember +{ + public: +}; + +class IFriend : public IMember +{ + public: +}; + +class IDCOP : public IMember +{ + public: +}; + +class ISlot : public IMember +{ + public: +}; + +class IEnumValue : public IMember +{ + public: + virtual const IString * name() const = 0; +}; + +/*! \brief Include relation + */ +class IInclude +{ + public: + VIRTUAL_DESTRUCTOR(IInclude) + virtual const IString * name() const = 0; + virtual const IString * refId() const = 0; + virtual bool isLocal() const = 0; +}; + +class IIncludeIterator +{ + public: + VIRTUAL_DESTRUCTOR(IIncludeIterator) + virtual IInclude *toFirst() = 0; + virtual IInclude *toLast() = 0; + virtual IInclude *toNext() = 0; + virtual IInclude *toPrev() = 0; + virtual IInclude *current() const = 0; + virtual void release() = 0; +}; + +class IMemberIterator +{ + public: + VIRTUAL_DESTRUCTOR(IMemberIterator) + 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 IEnum : public IMember +{ + public: + virtual IMemberIterator *enumValues() const = 0; +}; + +/*! \brief The interface to a section in the object model. + * + * A compound can have a number of sections, where each + * section contains a set of members with the properties implied by + * the section kind. The kind() method returns the kind of the section. + * The members of the section can be accessed via members(). Apart + * from using kind(), some of the individual properties of the section can + * also be inspected via isStatic(), isPublic(), isProtected() and + * isPrivate(). + */ +class ISection +{ + public: + VIRTUAL_DESTRUCTOR(ISection) + /*! Possible section types */ + enum SectionKind + { Invalid=0, + UserDefined, //!< A user defined member group + PubTypes, //!< Public member typedefs + PubFuncs, //!< Public member functions + PubAttribs, //!< Public member attributes + PubSlots, //!< Public Qt Slots + Signals, //!< Qt Signals + DCOPFuncs, //!< KDE-DCOP interface functions + Properties, //!< IDL properties + Events, //!< C# events + PubStatFuncs, //!< Public static member functions + PubStatAttribs, //!< Public static attributes + ProTypes, //!< Protected member typedefs + ProFuncs, //!< Protected member functions + ProAttribs, //!< Protected member attributes + ProSlots, //!< Protected slots + ProStatFuncs, //!< Protected static member functions + ProStatAttribs, //!< Protected static member attributes + PacTypes, //!< Package member typedefs + PacFuncs, //!< Package member functions + PacAttribs, //!< Package member attributes + PacStatFuncs, //!< Package static member functions + PacStatAttribs, //!< Package static member attributes + PriTypes, //!< Private member typedefs + PriFuncs, //!< Private member functions + PriAttribs, //!< Private member attributes + PriSlots, //!< Private Qt slots + PriStatFuncs, //!< Private static member functions + PriStatAttribs, //!< Private static member attributes + Friend, //!< Friends + Related, //!< Function marked as related + Defines, //!< Preprocessor defines + Prototypes, //!< Global function prototypes + Typedefs, //!< Global typedefs + Enums, //!< Enumerations + Functions, //!< Global functions + Variables //!< Global variables + }; + + /*! Returns a string representation of the value returned by kind() */ + virtual const IString * kindString() const = 0; + + /*! Returns what kind of section this is */ + virtual SectionKind kind() const = 0; + + /*! Returns the description attached to this section (for user defined + * sections, also known as member groups). + */ + virtual IDocRoot *description() const = 0; + + /*! Returns an iterator for the members of this section */ + virtual IMemberIterator *members() const = 0; + + /*! Returns \c true if this section contains statics */ + virtual bool isStatic() const = 0; + + /*! Returns \c true if this section belongs to a + * public section of a class + */ + virtual bool isPublic() const = 0; + + /*! Returns \c true if this section belongs to a + * private section of a class + */ + virtual bool isPrivate() const = 0; + + /*! Returns \c true if this section belongs to a + * protected section of a class + * */ + virtual bool isProtected() const = 0; +}; + +class IUserDefined : public ISection +{ + public: + virtual const IString * header() const = 0; +}; + +class ISectionIterator +{ + public: + VIRTUAL_DESTRUCTOR(ISectionIterator) + 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; +}; + +/*! \brief The interface to a compound in the object model. + * + * A compound has a name which can be obtained via the name() method + * and a unique id, which is return via the id() method. + * A compound consists zero or more members which are grouped into sections. + * The sections() method can be used to access the individual sections. + * Alternatively, members can be obtained by name or id. There are + * different types of compounds. The kind() method returns what kind of + * compound this is. Depending on the return value one can dynamically + * cast an interface pointer to an more specialised interface that provides + * additional methods. + * Example: + * \code + * ICompound *comp=...; + * if (comp->kind()==ICompound::Class) + * { + * IClass *cls = dynamic_cast<IClass*>(comp); + * // use methods of IClass + * } + * \endcode + * The documentation that is provided by a compound is available via + * the briefDescription() and detailedDescription() methods. + * To avoid excessive memory usage, release() should be called (once) on each + * compound interface pointer that is no longer needed. + */ +class ICompound +{ + public: + VIRTUAL_DESTRUCTOR(ICompound) + /*! Represents the kind of compounds recognised by doxygen. */ + enum CompoundKind { Invalid=0, + Class, Struct, Union, Interface, Protocol, Category, + Exception, File, Namespace, Group, Page, Example, Dir + }; + + /*! Returns the name of this compound */ + virtual const IString * name() const = 0; + + /*! Returns the id of this compound. The id is a + * unique string representing a specific compound object. + */ + virtual const IString * id() const = 0; + + /*! Returns the kind of compound. See #CompoundKind for possible + * values. + */ + virtual CompoundKind kind() const = 0; + + /*! Returns a string representation of the compound kind. + * @see kind() + */ + virtual const IString * kindString() const = 0; + + /*! Returns an iterator for the different member sections in this + * compound. + */ + virtual ISectionIterator *sections() const = 0; + + /*! Returns a tree-structured representation of the brief + * description that is attached to this compound. + */ + virtual IDocRoot *briefDescription() const = 0; + + /*! Returns a tree-structured representation of the detailed + * description that is attached to this compound. + */ + virtual IDocRoot *detailedDescription() const = 0; + + /*! Returns an interface to a member given its id. + * @param id The member id. + */ + virtual IMember *memberById(const char * id) const = 0; + + /*! Returns a list of all members within the compound having a certain + * name. Member overloading is the reason why there can be more than + * one member. + * @param name The name of the member. + */ + virtual IMemberIterator *memberByName(const char * name) const = 0; + + /*! Decreases the reference counter for this compound. If it reaches + * zero, the memory for the compound will be released. + */ + virtual void release() = 0; +}; + +class ICompoundIterator +{ + public: + VIRTUAL_DESTRUCTOR(ICompoundIterator) + virtual void toFirst() = 0; + virtual void toLast() = 0; + virtual void toNext() = 0; + virtual void toPrev() = 0; + virtual ICompound *current() const = 0; + virtual void release() = 0; +}; + +class IRelatedCompound +{ + public: + VIRTUAL_DESTRUCTOR(IRelatedCompound) + enum Protection { Public, Protected, Private }; + enum Kind { Normal, Virtual }; + virtual ICompound *compound() const = 0; + virtual Protection protection() const = 0; + virtual Kind kind() const = 0; + virtual const IString *name() const = 0; + +}; + +class IRelatedCompoundIterator +{ + public: + VIRTUAL_DESTRUCTOR(IRelatedCompoundIterator) + virtual IRelatedCompound *toFirst() = 0; + virtual IRelatedCompound *toLast() = 0; + virtual IRelatedCompound *toNext() = 0; + virtual IRelatedCompound *toPrev() = 0; + virtual IRelatedCompound *current() const = 0; + virtual void release() = 0; +}; + +/*! \brief The interface to a class in the object model. + */ +class IClass : public ICompound +{ + public: + virtual IGraph *inheritanceGraph() const = 0; + virtual IGraph *collaborationGraph() const = 0; + virtual IRelatedCompoundIterator *baseCompounds() const = 0; + virtual IRelatedCompoundIterator *derivedCompounds() const = 0; + virtual ICompoundIterator *nestedCompounds() const = 0; + virtual IParamIterator *templateParameters() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual const IString *locationBodyFile() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; + + // TODO: + // class: + // listOfAllMembers() + // protection() + // isAbstract() +}; + +/*! \brief The interface to a struct in the object model. + */ +class IStruct : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; + virtual IRelatedCompoundIterator *baseCompounds() const = 0; + virtual IRelatedCompoundIterator *derivedCompounds() const = 0; + virtual const IString *locationFile() const = 0; + virtual int locationLine() const = 0; + virtual int locationBodyStartLine() const = 0; + virtual int locationBodyEndLine() const = 0; +}; + +/*! \brief The interface to a union in the object model. + */ +class IUnion : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; +}; + +/*! \brief The interface to a Java/IDL interface in the object model. + */ +class IInterface : public ICompound +{ + public: + virtual IRelatedCompoundIterator *baseCompounds() const = 0; + virtual IRelatedCompoundIterator *derivedCompounds() const = 0; +}; + + +/*! \brief The interface to a Java/IDL exception in the object model. + */ +class IException : public ICompound +{ +}; + +/*! \brief The interface to a namespace in the object model. + */ +class INamespace : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; +}; + +/*! \brief The interface to a file in the object model. + */ +class IFile : public ICompound +{ + public: + virtual IGraph *includeDependencyGraph() const = 0; + virtual IGraph *includedByDependencyGraph() const = 0; + virtual IDocProgramListing *source() const = 0; + virtual ICompoundIterator *nestedCompounds() const = 0; + + virtual IIncludeIterator *includes() const = 0; + virtual IIncludeIterator *includedBy() const = 0; + + // ICompound *innerNamespaces() + // ICompoundIterator *innerClasses() +}; + +/*! \brief The interface to a group in the object model. + */ +class IGroup : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; + // group: + // Title() + // innerFile() + // innerPage() +}; + +/*! \brief The interface to a page in the object model. + */ +class IPage : public ICompound +{ + public: + virtual const IDocTitle *title() const = 0; +}; + +/** \brief Interface to a directory in the object model. */ +class IDir : public ICompound +{ + public: + virtual ICompoundIterator *nestedCompounds() const = 0; +}; + +/*! Root node of the object model. */ +class IDoxygen +{ + public: + VIRTUAL_DESTRUCTOR(IDoxygen) + + /*! 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 char * 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 char * name) const = 0; + + /*! Returns an interface to a compound containing a member given it the + * member's id. Given the ICompound interface one can use the same id + * to obtain the IMember interface. + * @param id The member id. + */ + virtual ICompound *memberById(const char * id) const = 0; + + /*! Returns a list of all compounds containing at least one members + * with a certain name. Each compound can be asked to return the + * list of members with that name. + * @param name The name of the member. + */ + virtual ICompoundIterator *memberByName(const char * 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; + + /*! Sets the debug level. + * - 0 all debugging messages are disabled (the default). + * - 1 display important messages only + * - 2 display any messages. + */ + virtual void setDebugLevel(int level) = 0; + + /*! Reads an XML directory produced by doxygen and builds up a data + * structure representing the contents of the XML files in the directory. + */ + virtual bool readXMLDir(const char *xmlDirName) = 0; +}; + +/*! Factory method that creates an empty object model for a doxygen generated XML file. + * Use the readXMLDir() method to build the model from an XML output + * directory containing doxygen output. + */ +IDoxygen *createObjectModel(); + +#endif diff --git a/addon/doxmlparser/src/doxmlparser.pro.in b/addon/doxmlparser/src/doxmlparser.pro.in index 841a46c..2bbf326 100644 --- a/addon/doxmlparser/src/doxmlparser.pro.in +++ b/addon/doxmlparser/src/doxmlparser.pro.in @@ -20,8 +20,8 @@ win32-msvc:TMAKE_LFLAGS += /LIBPATH:....\\..\lib win32-borland:LIBS += qtools.lib doxycfg.lib shell32.lib win32-borland:TMAKE_LFLAGS += -L..\..\..\lib win32:TMAKE_CXXFLAGS += -DQT_NODLL -DESTDIR = ../lib -OBJECTS_DIR = ../objects +DESTDIR = ../../../lib +OBJECTS_DIR = ../../../objects/doxmlparser TARGET = doxmlparser INCLUDEPATH += ../../../qtools ../include diff --git a/addon/doxmlparser/src/graphhandler.h b/addon/doxmlparser/src/graphhandler.h index d946fcf..090c62a 100644 --- a/addon/doxmlparser/src/graphhandler.h +++ b/addon/doxmlparser/src/graphhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/linkedtexthandler.cpp b/addon/doxmlparser/src/linkedtexthandler.cpp index d51d8e2..fe45133 100644 --- a/addon/doxmlparser/src/linkedtexthandler.cpp +++ b/addon/doxmlparser/src/linkedtexthandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/linkedtexthandler.h b/addon/doxmlparser/src/linkedtexthandler.h index 6c6a1c7..cebdeb0 100644 --- a/addon/doxmlparser/src/linkedtexthandler.h +++ b/addon/doxmlparser/src/linkedtexthandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/loamhandler.h b/addon/doxmlparser/src/loamhandler.h index 61f9e6b..a113aa9 100644 --- a/addon/doxmlparser/src/loamhandler.h +++ b/addon/doxmlparser/src/loamhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/mainhandler.cpp b/addon/doxmlparser/src/mainhandler.cpp index 49cfef9..48c77fa 100644 --- a/addon/doxmlparser/src/mainhandler.cpp +++ b/addon/doxmlparser/src/mainhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/mainhandler.h b/addon/doxmlparser/src/mainhandler.h index 5706e6e..270f417 100644 --- a/addon/doxmlparser/src/mainhandler.h +++ b/addon/doxmlparser/src/mainhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/memberhandler.cpp b/addon/doxmlparser/src/memberhandler.cpp index 4d0a0cf..ea55333 100644 --- a/addon/doxmlparser/src/memberhandler.cpp +++ b/addon/doxmlparser/src/memberhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/memberhandler.h b/addon/doxmlparser/src/memberhandler.h index 66c9a14..a84cc79 100644 --- a/addon/doxmlparser/src/memberhandler.h +++ b/addon/doxmlparser/src/memberhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/paramhandler.cpp b/addon/doxmlparser/src/paramhandler.cpp index 4b57e50..e6d3db1 100644 --- a/addon/doxmlparser/src/paramhandler.cpp +++ b/addon/doxmlparser/src/paramhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/paramhandler.h b/addon/doxmlparser/src/paramhandler.h index 89ef541..7ecf711 100644 --- a/addon/doxmlparser/src/paramhandler.h +++ b/addon/doxmlparser/src/paramhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/sectionhandler.cpp b/addon/doxmlparser/src/sectionhandler.cpp index df89941..bb43925 100644 --- a/addon/doxmlparser/src/sectionhandler.cpp +++ b/addon/doxmlparser/src/sectionhandler.cpp @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/src/sectionhandler.h b/addon/doxmlparser/src/sectionhandler.h index b43e878..2730307 100644 --- a/addon/doxmlparser/src/sectionhandler.h +++ b/addon/doxmlparser/src/sectionhandler.h @@ -3,7 +3,7 @@ * $Id$ * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxmlparser/test/xmlparse.pro.in b/addon/doxmlparser/test/xmlparse.pro.in index cfb95be..368d499 100644 --- a/addon/doxmlparser/test/xmlparse.pro.in +++ b/addon/doxmlparser/test/xmlparse.pro.in @@ -2,19 +2,19 @@ TEMPLATE = app.t CONFIG = console warn_on $extraopts HEADERS = SOURCES = main.cpp -unix:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools +unix:LIBS += -L../../../lib -ldoxmlparser -lqtools win32:INCLUDEPATH += . -win32-mingw:LIBS += -L../../../lib -L../lib -ldoxmlparser -lqtools +win32-mingw:LIBS += -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-borland:TMAKE_LFLAGS += -L..\..\..\lib win32:TMAKE_CXXFLAGS += -DQT_NODLL -DESTDIR = -OBJECTS_DIR = ../objects +DESTDIR = ../../../bin +OBJECTS_DIR = ../../../objects/doxmlparser/test TARGET = xmlparse INCLUDEPATH += ../../../qtools ../include DEPENDPATH += ../include -unix:TARGETDEPS = ../lib/libdoxmlparser.a -win32:TARGETDEPS = ..\lib\doxmlparser.lib +unix:TARGETDEPS = ../../../lib/libdoxmlparser.a +win32:TARGETDEPS = ..\..\..\lib\doxmlparser.lib diff --git a/addon/doxyapp/doxyapp.cpp b/addon/doxyapp/doxyapp.cpp index a05f414..e73d12a 100644 --- a/addon/doxyapp/doxyapp.cpp +++ b/addon/doxyapp/doxyapp.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxyapp/doxyapp.pro.in b/addon/doxyapp/doxyapp.pro.in index 4a49a56..7a8c5ee 100644 --- a/addon/doxyapp/doxyapp.pro.in +++ b/addon/doxyapp/doxyapp.pro.in @@ -4,7 +4,7 @@ HEADERS = SOURCES = doxyapp.cpp LIBS += -L../../lib -ldoxygen -lqtools -lmd5 -ldoxycfg -lpthread -liconv DESTDIR = -OBJECTS_DIR = ../../objects +OBJECTS_DIR = ../../objects/doxyapp TARGET = ../../bin/doxyapp INCLUDEPATH += ../../qtools ../../src DEPENDPATH += ../../src diff --git a/addon/doxypysql/search.py b/addon/doxypysql/search.py new file mode 100755 index 0000000..d0c88c0 --- /dev/null +++ b/addon/doxypysql/search.py @@ -0,0 +1,364 @@ +#!/usr/bin/python + +# python script to search through doxygen_sqlite3.db +# +# 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. +# + +import sqlite3 +import sys +import os +import getopt +import json + +class MemberType: + Define="0" + Function="1" + Variable="2" + Typedef="3" + Enumeration="4" + EnumValue="5" + Signal="6" + Slot="7" + Friend="8" + DCOP="9" + Property="10" + Event="11" + +class RequestType: + References="9901" + Struct="9902" + Includers="9903" + Includees="9904" + Members="9905" + BaseClasses="9906" + SubClasses="9907" + +g_conn=None +############################################################################### + +def escapeLike(val): + return 'LIKE "%' + val.replace("\\", "\\\\").replace("_", "\\_") \ + .replace("%", "\\%") + '%" ESCAPE "\\"' + +def matchName(name): + if type(name) is str: + return "name "+escapeLike(name) + else: + return 'id=%d' %name + +def fileName(id_file): + if g_conn.execute("SELECT COUNT(*) FROM files WHERE id=?",[id_file]).fetchone()[0] > 1: + print "non-uniq fileid" + + for r in g_conn.execute("SELECT * FROM files WHERE id=?",[id_file]).fetchall(): + return r['name'] + + return "" + +def fileId(name): + if g_conn.execute("SELECT COUNT(*) FROM files WHERE name=?",[name]).fetchone()[0] > 1: + print "non-uniq file name" + + for r in g_conn.execute("SELECT * FROM files WHERE name=?",[name]).fetchall(): + return r['id'] + + return -1 + +############################################################################### + +def findReferences(name): + o=[] + + cur = g_conn.cursor() + cur.execute("SELECT refid FROM memberdef WHERE name=?",[name]) + refids = cur.fetchall() + + if len(refids) == 0: + return o + + refid = refids[0]['refid'] + cur = g_conn.cursor() + for info in cur.execute("SELECT * FROM xrefs WHERE dst LIKE '%"+refid+"%'"): + item={} + cur = g_conn.cursor() + for i2 in cur.execute("SELECT * FROM memberdef WHERE refid=?",[info['src']]): + item['name']=i2['name'] + item['src']=info['src'] + item['file']=fileName(info['id_file']) + item['line']=info['line'] + + o.append(item) + return o + + +def findFunction(name): + o=[] + for r in g_conn.execute('SELECT * FROM memberdef WHERE '+matchName(name)+' AND kind=?',[MemberType.Function]).fetchall(): + item={} + item['name'] = r['name'] + item['definition'] = r['definition'] + item['argsstring'] = r['argsstring'] + item['file'] = fileName(r['id_file']) + item['line'] = r['line'] + item['detaileddescription'] = r['detaileddescription'] + o.append(item) + return o + + +def findMacro(name): + o=[] + for r in g_conn.execute('SELECT * FROM memberdef WHERE '+matchName(name)+' AND kind=?',[MemberType.Define]).fetchall(): + item={} + item['name'] = r['name'] + if r['argsstring']: + item['argsstring'] = r['argsstring'] + item['definition'] = r['initializer'] + item['file'] = fileName(r['id_file']) + item['line'] = r['line'] + o.append(item) + return o + + +def findTypedef(name): + o=[] + for r in g_conn.execute('SELECT * FROM memberdef WHERE '+matchName(name)+' AND kind=?',[MemberType.Typedef]).fetchall(): + item={} + item['name'] = r['name'] + item['definition'] = r['definition'] + item['file'] = fileName(r['id_file']) + item['line'] = r['line'] + o.append(item) + return o + + +def findVariable(name): + o=[] + for r in g_conn.execute('SELECT * FROM memberdef WHERE '+matchName(name)+' AND kind=?',[MemberType.Variable]).fetchall(): + item={} + item['name'] = r['name'] + item['definition'] = r['definition'] + item['file'] = fileName(r['id_file']) + item['line'] = r['line'] + o.append(item) + return o + +def findParams(name): + o=[] + for r in g_conn.execute('SELECT id FROM memberdef WHERE '+matchName(name)).fetchall(): + #a=("SELECT * FROM params where id=(SELECT id_param FROM memberdef_params where id_memberdef=?",[id_memberdef]) + item={} + item['id'] = r['id'] + o.append(item) + return o + + +def findStruct(name): + o=[] + for r in g_conn.execute('SELECT * FROM compounddef WHERE '+matchName(name)).fetchall(): + item={} + item['name'] = r['name'] + o.append(item) + return o + +def findIncluders(name): + o=[] + fid = fileId(name) + for r in g_conn.execute('SELECT * FROM includes WHERE id_dst=?',[fid]).fetchall(): + item={} + item['name'] = fileName(r['id_src']) + o.append(item) + return o + +def findIncludees(name): + o=[] + fid = fileId(name) + for r in g_conn.execute('SELECT * FROM includes WHERE id_src=?',[fid]).fetchall(): + item={} + item['name'] = r['dst'] + o.append(item) + return o + + +def findMembers(name): + o=[] + for r in g_conn.execute('SELECT * FROM memberdef WHERE scope LIKE "%'+name+'%";').fetchall(): + item={} + item['name'] = r['name'] + item['definition'] = r['definition'] + item['argsstring'] = r['argsstring'] + item['file'] = fileName(r['id_file']) + item['line'] = r['line'] + item['documentation'] = r['documentation'] + o.append(item) + return o + + +def findBaseClasses(name): + o=[] + for r in g_conn.execute('SELECT base FROM basecompoundref WHERE derived=?',[name]).fetchall(): + item={} + item['name'] = r['base'] + o.append(item) + return o + + +def findSubClasses(name): + o=[] + for r in g_conn.execute('SELECT derived FROM basecompoundref WHERE base=?',[name]).fetchall(): + item={} + item['name'] = r['derived'] + o.append(item) + return o + + +############################################################################### + +def usage(): + print """Usage: search.py [Options] +Options: + -h, --help + -d <D> Use database <D> for queries + -r <F> Search for references to <F> + -f <F> Search for definition of function <F> + -m <M> Search for definition of macro <M> + -t <T> Search for definition of type <T> + -v <V> Search for definition of variable <V> + -I <I> Get the includers of <I> + -i <I> Get the includees of <I> + -M <C> Get all members of class <C> + -B <C> Get the base classes of class <C> + -S <C> Get the sub classes of class <C> +""" + +def openDb(dbname): + global g_conn + + if dbname == None: + dbname = "doxygen_sqlite3.db" + + if not os.path.isfile(dbname): + raise BaseException("No such file %s" % dbname ) + + g_conn = sqlite3.connect(dbname) + g_conn.execute('PRAGMA temp_store = MEMORY;') + g_conn.row_factory = sqlite3.Row + +############################################################################### +def process(kind,o): + request_processors = { + MemberType.Function: findFunction, + MemberType.Define: findMacro, + MemberType.Variable: findVariable, + MemberType.Typedef: findTypedef, + RequestType.References: findReferences, + RequestType.Struct: findStruct, + RequestType.Includers: findIncluders, + RequestType.Includees: findIncludees, + RequestType.Members: findMembers, + RequestType.BaseClasses: findBaseClasses, + RequestType.SubClasses: findSubClasses + } + return request_processors[kind](o) + + +def processHref(ref): + j={} + + # is it in memberdef ? + table="memberdef" + if ( g_conn.execute("SELECT count(*) from %s WHERE refid='%s'" % (table,ref) ).fetchone()[0] > 0 ): + for r in g_conn.execute("SELECT kind,id FROM %s WHERE refid='%s'" % (table,ref) ).fetchall(): + j=process(str(r['kind']),int(r['id'])) + + # is it in compounddef ? + table="compounddef" + if ( g_conn.execute("SELECT count(*) from %s WHERE refid='%s'" % (table,ref)).fetchone()[0] > 0 ): + for r in g_conn.execute("SELECT id FROM %s WHERE refid='%s'" % (table,ref) ).fetchall(): + j=process(RequestType.Struct,int(r['id'])) + + return j + + +def serveCgi(): + import cgi + + print 'Content-Type: application/json\n' + + fieldStorage = cgi.FieldStorage() + form = dict((key, fieldStorage.getvalue(key)) for key in fieldStorage.keys()) + + if 'href' in form: + ref = form['href'] + else: + print '{"result": null, "error": "no refid given"}' + sys.exit(0) + + openDb('doxygen_sqlite3.db') + + j = processHref(ref) + + print json.dumps({"result":j,"error":None}) + + +def serveCli(argv): + try: + opts, args = getopt.getopt(argv, "hr:I:i:d:f:m:t:v:H:M:B:S:",["help"]) + except getopt.GetoptError: + usage() + sys.exit(1) + + ref=None + dbname=None + j={} + + for a, o in opts: + if a in ('-h', '--help'): + usage() + sys.exit(0) + elif a in ('-d'): + dbname=o + continue + elif a in ('-r'): + kind=RequestType.References + elif a in ('-I'): + kind=RequestType.Includers + elif a in ('-i'): + kind=RequestType.Includees + elif a in ('-M'): + kind=RequestType.Members + elif a in ('-B'): + kind=RequestType.BaseClasses + elif a in ('-S'): + kind=RequestType.SubClasses + elif a in ('-f'): + kind=MemberType.Function + elif a in ('-m'): + kind=MemberType.Define + elif a in ('-t'): + kind=MemberType.Typedef + elif a in ('-v'): + kind=MemberType.Variable + elif a in ('-H'): + ref = o + + openDb(dbname) + if ref != None: + j=processHref(ref) + else: + j=process(kind,o) + print json.dumps(j) + + +def main(argv): + if 'REQUEST_METHOD' in os.environ: + serveCgi() + else: + serveCli(argv) + +if __name__ == '__main__': + main(sys.argv[1:]) diff --git a/addon/doxysearch/Makefile.in b/addon/doxysearch/Makefile.in index f3ed662..7daafee 100644 --- a/addon/doxysearch/Makefile.in +++ b/addon/doxysearch/Makefile.in @@ -7,8 +7,6 @@ distclean: clean $(RM) -rf Makefile doxysearch.pro Makefile.doxysearch $(RM) -rf Makefile doxyindexer.pro Makefile.doxyindexer -realclean: distclean - tmake: $(ENV) $(PERL) "$(TMAKE)" doxysearch.pro >Makefile.doxysearch $(ENV) $(PERL) "$(TMAKE)" doxyindexer.pro >Makefile.doxyindexer diff --git a/addon/doxysearch/doxyindexer.cpp b/addon/doxysearch/doxyindexer.cpp index 9c27f56..b44a940 100644 --- a/addon/doxysearch/doxyindexer.cpp +++ b/addon/doxysearch/doxyindexer.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxysearch/doxyindexer.pro.in b/addon/doxysearch/doxyindexer.pro.in index deeb8f8..c84a2ac 100644 --- a/addon/doxysearch/doxyindexer.pro.in +++ b/addon/doxysearch/doxyindexer.pro.in @@ -4,7 +4,7 @@ HEADERS = SOURCES = doxyindexer.cpp LIBS += -L../../lib -lxapian -lqtools DESTDIR = -OBJECTS_DIR = ../../objects +OBJECTS_DIR = ../../objects/doxyindexer TARGET = ../../bin/doxyindexer INCLUDEPATH += ../../qtools DEPENDPATH += diff --git a/addon/doxysearch/doxysearch.cpp b/addon/doxysearch/doxysearch.cpp index 8aeed81..11af8e3 100644 --- a/addon/doxysearch/doxysearch.cpp +++ b/addon/doxysearch/doxysearch.cpp @@ -1,6 +1,6 @@ /****************************************************************************** * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxysearch/doxysearch.pro.in b/addon/doxysearch/doxysearch.pro.in index c860fd1..702f5a4 100644 --- a/addon/doxysearch/doxysearch.pro.in +++ b/addon/doxysearch/doxysearch.pro.in @@ -4,7 +4,7 @@ HEADERS = SOURCES = doxysearch.cpp LIBS += -lxapian DESTDIR = -OBJECTS_DIR = ../../objects +OBJECTS_DIR = ../../objects/doxysearch TARGET = ../../bin/doxysearch.cgi INCLUDEPATH += DEPENDPATH += diff --git a/addon/doxywizard/Makefile.in b/addon/doxywizard/Makefile.in index 152c2b7..9b14174 100644 --- a/addon/doxywizard/Makefile.in +++ b/addon/doxywizard/Makefile.in @@ -1,7 +1,7 @@ # # # -# Copyright (C) 1997-2013 by Dimitri van Heesch. +# Copyright (C) 1997-2014 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 @@ -29,11 +29,6 @@ distclean: Makefile.doxywizard $(MAKE) -f Makefile.doxywizard distclean $(RM) Makefile.doxywizard -realclean: Makefile.doxywizard - $(RM) configdoc.cpp - $(RM) config_doxyw.cpp - $(MAKE) distclean - install: $(INSTTOOL) -d $(INSTALL)/bin $(INSTTOOL) -m 755 ../../bin/doxywizard $(INSTALL)/bin diff --git a/addon/doxywizard/config.l b/addon/doxywizard/config.l index 48d233e..f11bc46 100644 --- a/addon/doxywizard/config.l +++ b/addon/doxywizard/config.l @@ -2,7 +2,7 @@ * * $Id: config_templ.l,v 1.8 2001/01/01 10:15:16 root Exp $ * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/config_doxyw.l b/addon/doxywizard/config_doxyw.l index 3a26eb6..400330f 100644 --- a/addon/doxywizard/config_doxyw.l +++ b/addon/doxywizard/config_doxyw.l @@ -2,7 +2,7 @@ * * $Id: config_templ.l,v 1.8 2001/01/01 10:15:16 root Exp $ * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/doxywizard.cpp b/addon/doxywizard/doxywizard.cpp index ce764e0..99310a1 100644 --- a/addon/doxywizard/doxywizard.cpp +++ b/addon/doxywizard/doxywizard.cpp @@ -624,20 +624,34 @@ bool MainWindow::discardUnsavedChanges(bool saveOption) } //----------------------------------------------------------------------- - int main(int argc,char **argv) { QApplication a(argc,argv); - MainWindow &main = MainWindow::instance(); - if (argc==2 && argv[1][0]!='-') // name of config file as an argument + if (argc == 2) { - main.loadConfigFromFile(QString::fromLocal8Bit(argv[1])); + if (!qstrcmp(argv[1],"--help")) + { + QMessageBox msgBox; + msgBox.setText(QString().sprintf("Usage: %s [config file]",argv[0])); + msgBox.exec(); + exit(0); + } } - else if (argc>1) + if (argc > 2) { - printf("Usage: %s [config file]\n",argv[0]); + QMessageBox msgBox; + msgBox.setText(QString().sprintf("Too many arguments specified\n\nUsage: %s [config file]",argv[0])); + msgBox.exec(); exit(1); } - main.show(); - return a.exec(); + else + { + MainWindow &main = MainWindow::instance(); + if (argc==2 && argv[1][0]!='-') // name of config file as an argument + { + main.loadConfigFromFile(QString::fromLocal8Bit(argv[1])); + } + main.show(); + return a.exec(); + } } diff --git a/addon/doxywizard/doxywizard.pro.in b/addon/doxywizard/doxywizard.pro.in index 01832df..0c8d049 100644 --- a/addon/doxywizard/doxywizard.pro.in +++ b/addon/doxywizard/doxywizard.pro.in @@ -6,12 +6,12 @@ TEMPLATE = app DESTDIR = ../../bin TARGET = DEPENDPATH += . -INCLUDEPATH += . +INCLUDEPATH += . ../../generated_src/doxywizard QT += xml CONFIG += $extraopts -OBJECTS_DIR = obj -MOC_DIR = moc -RCC_DIR = rcc +OBJECTS_DIR = ../../objects/doxywizard +MOC_DIR = ../../moc/doxywizard +RCC_DIR = ../../rcc/doxywizard DEFINES += QT_NO_CAST_FROM_ASCII QT_NO_CAST_TO_ASCII macx-g++ { @@ -27,13 +27,13 @@ RESOURCES += doxywizard.qrc INCBUFSIZE=$(PYTHON) ../../src/increasebuffer.py win32:RC_FILE += doxywizard.rc -config.target = config_doxyw.cpp -config.commands = $(LEX) -P$*YY -t $*.l | $(INCBUFSIZE) >$*.cpp -config.depends = config_doxyw.l ../../src/increasebuffer.py -configdoc.target = configdoc.cpp -configdoc.commands = $(PYTHON) ../../src/configgen.py -wiz ../../src/config.xml > configdoc.cpp +config.target = ../../generated_src/doxywizard/config_doxyw.cpp +config.commands = $(LEX) -Pconfig_doxywYY -t ../../addon/doxywizard/config_doxyw.l | $(INCBUFSIZE) >../../generated_src/doxywizard/$*.cpp +config.depends = ../../addon/doxywizard/config_doxyw.l ../../src/increasebuffer.py +configdoc.target = ../../generated_src/doxywizard/configdoc.cpp +configdoc.commands = $(PYTHON) ../../src/configgen.py -wiz ../../src/config.xml > ../../generated_src/doxywizard/configdoc.cpp configdoc.depends = ../../src/config.xml ../../src/configgen.py -version.target = ../../src/version.cpp +version.target = ../../generated_src/doxywizard/version.cpp version.commands = cd ../../src;$(PYTHON) version.py version.depends = ../../configure QMAKE_EXTRA_TARGETS += configdoc config version diff --git a/addon/doxywizard/expert.cpp b/addon/doxywizard/expert.cpp index 4c988c9..fe6609e 100644 --- a/addon/doxywizard/expert.cpp +++ b/addon/doxywizard/expert.cpp @@ -9,7 +9,7 @@ #include "config.h" #include "version.h" #include "configdoc.h" -#include "../../src/settings.h" +#include "settings.h" #define SA(x) QString::fromAscii(x) @@ -323,6 +323,32 @@ static QString getDocsForNode(const QDomElement &child) } } } + else if (child.attribute(SA("format")) == SA("image")) + { + QString abspath = child.attribute(SA("abspath")); + if (defval != SA("")) + { + docs+=SA("<br/>"); + if (abspath != SA("1")) + { + docs += SA(" The default image is: <code>") + defval + SA("</code>."); + } + else + { + docs += SA(" The default image (with absolute path) is: <code>") + defval + SA("</code>."); + } + docs += SA("<br/>"); + } + else + { + if (abspath == SA("1")) + { + docs+=SA("<br/>"); + docs += SA(" The image has to be specified with full path."); + docs += SA("<br/>"); + } + } + } else // if (child.attribute(SA("format")) == SA("string")) { if (defval != SA("")) @@ -477,6 +503,10 @@ QWidget *Expert::createTopicWidget(QDomElement &elem) { mode = InputString::StringFile; } + else if (format==SA("image")) + { + mode = InputString::StringImage; + } else // format=="string" { mode = InputString::StringFree; diff --git a/addon/doxywizard/inputbool.cpp b/addon/doxywizard/inputbool.cpp index 9e28852..be99b0a 100644 --- a/addon/doxywizard/inputbool.cpp +++ b/addon/doxywizard/inputbool.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/inputbool.h b/addon/doxywizard/inputbool.h index 69a6893..03bb76e 100644 --- a/addon/doxywizard/inputbool.h +++ b/addon/doxywizard/inputbool.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/inputint.cpp b/addon/doxywizard/inputint.cpp index 876a920..e0c426c 100644 --- a/addon/doxywizard/inputint.cpp +++ b/addon/doxywizard/inputint.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/inputint.h b/addon/doxywizard/inputint.h index c4723be..6662865 100644 --- a/addon/doxywizard/inputint.h +++ b/addon/doxywizard/inputint.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/inputstring.cpp b/addon/doxywizard/inputstring.cpp index 36fe319..ad258f7 100644 --- a/addon/doxywizard/inputstring.cpp +++ b/addon/doxywizard/inputstring.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 @@ -44,6 +44,7 @@ InputString::InputString( QGridLayout *layout,int &row, layout->addWidget( m_com, row, 1, 1, 3, Qt::AlignLeft ); m_le=0; m_br=0; + m_im=0; row++; } else @@ -51,28 +52,39 @@ InputString::InputString( QGridLayout *layout,int &row, layout->addWidget( m_lab, row, 0 ); m_le = new QLineEdit; m_le->setText( s ); + m_im = 0; //layout->setColumnMinimumWidth(2,150); - if (m==StringFile || m==StringDir) + if (m==StringFile || m==StringDir || m==StringImage) { layout->addWidget( m_le, row, 1 ); m_br = new QToolBar; m_br->setIconSize(QSize(24,24)); - if (m==StringFile) + if (m==StringFile || m==StringImage) { QAction *file = m_br->addAction(QIcon(QString::fromAscii(":/images/file.png")),QString(),this,SLOT(browse())); file->setToolTip(tr("Browse to a file")); + layout->addWidget( m_br,row,2 ); + if (m==StringImage) + { + m_im = new QLabel; + m_im->setMinimumSize(1,55); + m_im->setAlignment(Qt::AlignLeft|Qt::AlignTop); + row++; + layout->addWidget( m_im,row,1 ); + } } else { QAction *dir = m_br->addAction(QIcon(QString::fromAscii(":/images/folder.png")),QString(),this,SLOT(browse())); dir->setToolTip(tr("Browse to a folder")); + layout->addWidget( m_br,row,2 ); } - layout->addWidget( m_br,row,2 ); } else { layout->addWidget( m_le, row, 1, 1, 2 ); m_br=0; + m_im=0; } m_com=0; row++; @@ -119,6 +131,33 @@ void InputString::updateDefault() { m_lab->setText(QString::fromAscii("<qt><font color='red'>")+m_id+QString::fromAscii("</font></qt>")); } + if (m_im) + { + if (m_str.isEmpty()) + { + m_im->setText(tr("No Project logo selected.")); + } + else + { + QFile Fout(m_str); + if(!Fout.exists()) + { + m_im->setText(tr("Sorry, cannot find file(")+m_str+QString::fromAscii(");")); + } + else + { + QPixmap pm(m_str); + if (!pm.isNull()) + { + m_im->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation)); + } + else + { + m_im->setText(tr("Sorry, no preview available (")+m_str+QString::fromAscii(");")); + } + } + } + } if (m_le && m_le->text()!=m_str) m_le->setText( m_str ); emit changed(); } @@ -128,6 +167,7 @@ void InputString::setEnabled(bool state) { m_lab->setEnabled(state); if (m_le) m_le->setEnabled(state); + if (m_im) m_le->setEnabled(state); if (m_br) m_br->setEnabled(state); if (m_com) m_com->setEnabled(state); updateDefault(); @@ -136,7 +176,7 @@ void InputString::setEnabled(bool state) void InputString::browse() { QString path = QFileInfo(MainWindow::instance().configFileName()).path(); - if (m_sm==StringFile) + if (m_sm==StringFile || m_sm==StringImage) { QString fileName = QFileDialog::getOpenFileName(&MainWindow::instance(), tr("Select file"),path); diff --git a/addon/doxywizard/inputstring.h b/addon/doxywizard/inputstring.h index c904dad..90ea87d 100644 --- a/addon/doxywizard/inputstring.h +++ b/addon/doxywizard/inputstring.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 @@ -35,7 +35,8 @@ class InputString : public QObject, public Input enum StringMode { StringFree=0, StringFile=1, StringDir=2, - StringFixed=3 + StringFixed=3, + StringImage=4 }; InputString( QGridLayout *layout,int &row, @@ -77,6 +78,7 @@ class InputString : public QObject, public Input void updateDefault(); QLabel *m_lab; QLineEdit *m_le; + QLabel *m_im; QToolBar *m_br; QComboBox *m_com; QString m_str; diff --git a/addon/doxywizard/inputstrlist.cpp b/addon/doxywizard/inputstrlist.cpp index 23c20ff..0a0f01f 100644 --- a/addon/doxywizard/inputstrlist.cpp +++ b/addon/doxywizard/inputstrlist.cpp @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/inputstrlist.h b/addon/doxywizard/inputstrlist.h index 352ed5e..0d7efe7 100644 --- a/addon/doxywizard/inputstrlist.h +++ b/addon/doxywizard/inputstrlist.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/version.h b/addon/doxywizard/version.h index 9d523c1..b31fe4f 100644 --- a/addon/doxywizard/version.h +++ b/addon/doxywizard/version.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 diff --git a/addon/doxywizard/wizard.cpp b/addon/doxywizard/wizard.cpp index ce989e7..56933e0 100644 --- a/addon/doxywizard/wizard.cpp +++ b/addon/doxywizard/wizard.cpp @@ -468,6 +468,7 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w projVersion->setAlignment(Qt::AlignRight|Qt::AlignVCenter); // project icon QLabel *projLogo = new QLabel(this); + projLogo->setMinimumSize(1,55); projLogo->setText(tr("Project logo:")); projLogo->setAlignment(Qt::AlignRight|Qt::AlignVCenter); @@ -481,10 +482,7 @@ Step1::Step1(Wizard *wizard,const QHash<QString,Input*> &modelData) : m_wizard(w m_projNumber = new QLineEdit; QPushButton *projIconSel = new QPushButton(this); projIconSel->setText(tr("Select...")); - QPixmap pm(QSize(120,55)); - pm.fill(); m_projIconLab = new QLabel; - m_projIconLab->setPixmap(pm); grid->addWidget(m_projName,0,1,1,2); grid->addWidget(m_projBrief,1,1,1,2); @@ -567,12 +565,31 @@ void Step1::selectProjectIcon() QString path = QFileInfo(MainWindow::instance().configFileName()).path(); QString iconName = QFileDialog::getOpenFileName(this, tr("Select project icon/image"),path); - QPixmap pm(iconName); - if (!pm.isNull()) + if (iconName.isEmpty()) { - m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation)); - updateStringOption(m_modelData,STR_PROJECT_LOGO,iconName); + m_projIconLab->setText(tr("No Project logo selected.")); } + else + { + QFile Fout(iconName); + if(!Fout.exists()) + { + m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+QString::fromAscii(");")); + } + else + { + QPixmap pm(iconName); + if (!pm.isNull()) + { + m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation)); + } + else + { + m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+QString::fromAscii(");")); + } + } + } + updateStringOption(m_modelData,STR_PROJECT_LOGO,iconName); } void Step1::selectSourceDir() @@ -663,17 +680,27 @@ void Step1::init() QString iconName = getStringOption(m_modelData,STR_PROJECT_LOGO); if (!iconName.isEmpty()) { - QPixmap pm(iconName); - if (!pm.isNull()) + QFile Fout(iconName); + if(!Fout.exists()) + { + m_projIconLab->setText(tr("Sorry, cannot find file(")+iconName+QString::fromAscii(");")); + } + else { - m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation)); + QPixmap pm(iconName); + if (!pm.isNull()) + { + m_projIconLab->setPixmap(pm.scaledToHeight(55,Qt::SmoothTransformation)); + } + else + { + m_projIconLab->setText(tr("Sorry, no preview available (")+iconName+QString::fromAscii(");")); + } } } else { - QPixmap pm(QSize(120,55)); - pm.fill(); - m_projIconLab->setPixmap(pm); + m_projIconLab->setText(tr("No Project logo selected.")); } option = m_modelData[STR_INPUT]; if (option->value().toStringList().count()>0) diff --git a/addon/doxywizard/wizard.h b/addon/doxywizard/wizard.h index 877de1d..a18df62 100644 --- a/addon/doxywizard/wizard.h +++ b/addon/doxywizard/wizard.h @@ -2,7 +2,7 @@ * * * - * Copyright (C) 1997-2013 by Dimitri van Heesch. + * Copyright (C) 1997-2014 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 |