doxmlintf.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * $Id$
4  *
5  *
6  * Copyright (C) 1997-2015 by Dimitri van Heesch.
7  *
8  * Permission to use, copy, modify, and distribute this software and its
9  * documentation under the terms of the GNU General Public License is hereby
10  * granted. No representations are made about the suitability of this software
11  * for any purpose. It is provided "as is" without express or implied warranty.
12  * See the GNU General Public License for more details.
13  *
14  */
15 
16 #ifndef _DOXMLINTF_H
17 #define _DOXMLINTF_H
18 
19 /*! \file
20  * \brief The interface to the object model provided by the XML parser
21  * library.
22  *
23  * To start using this library one calls createObjectModel() and then
24  * uses the returned IDoxygen interface to read doxygen generated
25  * XML output and navigate through the information contained in it.
26  *
27  * @see createObjectModel()
28  */
29 
30 class IMember;
31 class IDocIterator;
32 class ICompound;
33 class ISection;
34 class INode;
35 class IDocInternal;
36 class IDocRoot;
37 
38 #define VIRTUAL_DESTRUCTOR(x) virtual ~x() {}
39 
40 /*! \brief Read only interface to a string.
41  */
42 class IString
43 {
44  public:
46  /*! Returns a latin1 character representation of the string. */
47  virtual const char *latin1() const = 0;
48  /*! Returns a utf8 character representation of the string. */
49  virtual const char *utf8() const = 0;
50  /*! Returns a 16-bit unicode character representation of the character at
51  * position \a index in the string. The first character is at index 0.
52  */
53  virtual unsigned short unicodeCharAt(int index) const = 0;
54  /*! Returns true if this string is empty or false otherwise */
55  virtual bool isEmpty() const = 0;
56  /*! Returns the number of characters in the string. */
57  virtual int length() const = 0;
58 };
59 
60 /*! \brief Base interface for hyperlinked text
61  *
62  * Depending on the result of kind() the interface is extended by
63  * ILT_Text or ILT_Ref.
64  */
66 {
67  public:
69  enum Kind { Kind_Text, Kind_Ref };
70  virtual Kind kind() const = 0;
71 };
72 
73 /*! \brief Plain text fragment.
74  */
75 class ILT_Text : public ILinkedText
76 {
77  public:
79  virtual const IString *text() const = 0;
80 };
81 
82 /*! \brief Reference to an object.
83  */
84 class ILT_Ref : public ILinkedText
85 {
86  public:
88  enum TargetKind { Member, Compound };
89  virtual const IString *id() const = 0;
90  virtual TargetKind targetKind() const = 0;
91  virtual const IString *external() const = 0;
92  virtual const IString *text() const = 0;
93 };
94 
95 /*! \brief Iterates over a list of ILinkedText fragments.
96  */
98 {
99  public:
101  virtual ILinkedText *toFirst() = 0;
102  virtual ILinkedText *toLast() = 0;
103  virtual ILinkedText *toNext() = 0;
104  virtual ILinkedText *toPrev() = 0;
105  virtual ILinkedText *current() const = 0;
106  virtual void release() = 0;
107 };
108 
109 /*! \brief Representation of a parameter of a function. */
110 class IParam
111 {
112  public:
114  virtual ILinkedTextIterator *type() const = 0;
115  virtual const IString * declarationName() const = 0;
116  virtual const IString * definitionName() const = 0;
117  virtual const IString * attrib() const = 0;
118  virtual const IString * arraySpecifier() const = 0;
119  virtual ILinkedTextIterator *defaultValue() const = 0;
120  virtual IDocRoot *briefDescription() const = 0;
121 };
122 
124 {
125  public:
127  virtual IParam *toFirst() = 0;
128  virtual IParam *toLast() = 0;
129  virtual IParam *toNext() = 0;
130  virtual IParam *toPrev() = 0;
131  virtual IParam *current() const = 0;
132  virtual void release() = 0;
133 };
134 
136 {
137  public:
139  virtual IMember *member() const = 0;
140  virtual const IString * name() const = 0;
141  virtual const IString * scope() const = 0;
142  virtual const IString * protection() const = 0;
143  virtual const IString * virtualness() const = 0;
144  virtual const IString * ambiguityScope() const = 0;
145 };
146 
148 {
149  public:
151  virtual IMemberReference *toFirst() = 0;
152  virtual IMemberReference *toLast() = 0;
153  virtual IMemberReference *toNext() = 0;
154  virtual IMemberReference *toPrev() = 0;
155  virtual IMemberReference *current() const = 0;
156  virtual void release() = 0;
157 };
158 
159 class IDoc
160 {
161  public:
163  enum Kind
164  {
165  Invalid = 0, // 0
166  Para, // 1 -> IDocPara
167  Text, // 2 -> IDocText
168  MarkupModifier, // 3 -> IDocMarkupModifier
169  ItemizedList, // 4 -> IDocItemizedList
170  OrderedList, // 5 -> IDocOrderedList
171  ListItem, // 6 -> IDocListItem
172  ParameterList, // 7 -> IDocParameterList
173  Parameter, // 8 -> IDocParameter
174  SimpleSect, // 9 -> IDocSimpleSect
175  Title, // 10 -> IDocTitle
176  Ref, // 11 -> IDocRef
177  VariableList, // 12 -> IDocVariableList
178  VariableListEntry, // 13 -> IDocVariableListEntry
179  HRuler, // 14 -> IDocHRuler
180  LineBreak, // 15 -> IDocLineBreak
181  ULink, // 16 -> IDocULink
182  EMail, // 17 -> IDocEMail
183  Link, // 18 -> IDocLink
184  ProgramListing, // 19 -> IDocProgramListing
185  CodeLine, // 20 -> IDocCodeLine
186  Highlight, // 21 -> IDocHighlight
187  Formula, // 22 -> IDocFormula
188  Image, // 23 -> IDocImage
189  DotFile, // 24 -> IDocDotFile
190  IndexEntry, // 25 -> IDocIndexEntry
191  Table, // 26 -> IDocTable
192  Row, // 27 -> IDocRow
193  Entry, // 28 -> IDocEntry
194  Section, // 29 -> IDocSection
195  Verbatim, // 30 -> IDocVerbatim
196  Copy, // 31 -> IDocCopy
197  TocList, // 32 -> IDocTocList
198  TocItem, // 33 -> IDocTocItem
199  Anchor, // 34 -> IDocAnchor
200  Symbol, // 35 -> IDocSymbol
201  Internal, // 36 -> IDocInternal
202  Root, // 37 -> IDocRoot
203  ParameterItem // 38 -> IDocParameterItem
204  };
205  virtual Kind kind() const = 0;
206 };
207 
208 class IDocMarkup : public IDoc
209 {
210  public:
211  enum Markup
212  {
213  Normal = 0x000,
214  Bold = 0x001,
215  Emphasis = 0x002,
216  ComputerOutput = 0x004,
217  Subscript = 0x008,
218  Superscript = 0x010,
219  SmallFont = 0x020,
220  Center = 0x040,
221  Preformatted = 0x080,
222  Heading = 0x100
223  };
224 };
225 
226 class IDocPara : public IDoc
227 {
228  public:
229  virtual IDocIterator *contents() const = 0;
230 };
231 
232 class IDocText : public IDocMarkup
233 {
234  public:
235  virtual const IString * text() const = 0;
236  virtual int markup() const = 0;
237  virtual int headingLevel() const = 0;
238 };
239 
240 class IDocMarkupModifier : public IDoc
241 {
242  public:
243  virtual bool enabled() const = 0;
244  virtual int markup() const = 0;
245  virtual int headingLevel() const = 0;
246 };
247 
248 class IDocItemizedList : public IDoc
249 {
250  public:
251  virtual IDocIterator *elements() const = 0;
252 };
253 
254 class IDocOrderedList : public IDoc
255 {
256  public:
257  virtual IDocIterator *elements() const = 0;
258 };
259 
260 class IDocListItem : public IDoc
261 {
262  public:
263  virtual IDocIterator *contents() const = 0;
264 };
265 
266 class IDocParameterList : public IDoc
267 {
268  public:
269  enum Types { Param, RetVal, Exception };
270  virtual Types sectType() const = 0;
271  virtual IDocIterator *params() const = 0;
272 };
273 
274 class IDocParameterItem : public IDoc
275 {
276  public:
277  virtual IDocIterator *paramNames() const = 0;
278  virtual IDocPara *description() const = 0;
279 };
280 
281 class IDocParameter : public IDoc
282 {
283  public:
284  virtual const IString * name() const = 0;
285 };
286 
287 class IDocTitle : public IDoc
288 {
289  public:
290  virtual IDocIterator *title() const = 0;
291 };
292 
293 class IDocSimpleSect : public IDoc
294 {
295  public:
296  enum Types { Invalid = 0,
297  See, Return, Author, Version,
298  Since, Date, Bug, Note,
299  Warning, Par, Deprecated, Pre,
300  Post, Invar, Remark, Attention,
301  Todo, Test, RCS, EnumValues,
302  Examples
303  };
304  virtual Types type() const = 0;
305  virtual const IString * typeString() const = 0;
306  virtual IDocTitle *title() const = 0;
307  virtual IDocPara *description() const = 0;
308 };
309 
310 class IDocRef : public IDoc
311 {
312  public:
313  enum TargetKind { Member, Compound };
314  virtual const IString * refId() const = 0;
315  virtual TargetKind targetKind() const = 0;
316  virtual const IString * external() const = 0;
317  virtual const IString * text() const = 0;
318 };
319 
320 class IDocVariableList : public IDoc
321 {
322  public:
323  virtual IDocIterator *entries() const = 0;
324 };
325 
327 {
328  public:
329  virtual ILinkedTextIterator * term() const = 0;
330  virtual IDocPara *description() const = 0;
331 };
332 
333 class IDocHRuler : public IDoc
334 {
335 };
336 
337 class IDocLineBreak : public IDoc
338 {
339 };
340 
341 class IDocULink : public IDoc
342 {
343  public:
344  virtual const IString * url() const = 0;
345  virtual const IString * text() const = 0;
346 };
347 
348 class IDocEMail : public IDoc
349 {
350  public:
351  virtual const IString * address() const = 0;
352 };
353 
354 class IDocLink : public IDoc
355 {
356  public:
357  virtual const IString * refId() const = 0;
358  virtual const IString * text() const = 0;
359 };
360 
361 class IDocProgramListing : public IDoc
362 {
363  public:
364  virtual IDocIterator *codeLines() const = 0;
365 };
366 
367 class IDocCodeLine : public IDoc
368 {
369  public:
370  virtual int lineNumber() const = 0;
371  virtual const IString * refId() const = 0;
372  virtual IDocIterator *codeElements() const = 0;
373 };
374 
375 class IDocHighlight : public IDoc
376 {
377  public:
379  { Invalid=0,
381  KeywordType, KeywordFlow, CharLiteral,
382  StringLiteral, Preprocessor
383  };
384  virtual HighlightKind highlightKind() const = 0;
385  virtual IDocIterator *codeElements() const = 0;
386 };
387 
388 class IDocFormula : public IDoc
389 {
390  public:
391  virtual const IString * id() const = 0;
392  virtual const IString * text() const = 0;
393 };
394 
395 class IDocImage : public IDoc
396 {
397  public:
398  virtual const IString * name() const = 0;
399  virtual const IString * caption() const = 0;
400 };
401 
402 class IDocDotFile : public IDoc
403 {
404  public:
405  virtual const IString * name() const = 0;
406  virtual const IString * caption() const = 0;
407 };
408 
409 class IDocIndexEntry : public IDoc
410 {
411  public:
412  virtual const IString * primary() const = 0;
413  virtual const IString * secondary() const = 0;
414 };
415 
416 class IDocTable : public IDoc
417 {
418  public:
419  virtual IDocIterator *rows() const = 0;
420  virtual int numColumns() const = 0;
421  virtual const IString * caption() const = 0;
422 };
423 
424 class IDocRow : public IDoc
425 {
426  public:
427  virtual IDocIterator *entries() const = 0;
428 };
429 
430 class IDocEntry : public IDoc
431 {
432  public:
433  virtual IDocIterator *contents() const = 0;
434 };
435 
436 class IDocSection : public IDoc
437 {
438  public:
439  virtual const IString * id() const = 0;
440  virtual int level() const = 0;
441  virtual IDocTitle *title() const = 0;
442  virtual IDocIterator *paragraphs() const = 0;
443  virtual IDocIterator *subSections() const = 0;
444  virtual IDocInternal *internal() const = 0;
445 };
446 
447 class IDocInternal : public IDoc
448 {
449  public:
450  virtual IDocIterator *paragraphs() const = 0;
451  virtual IDocIterator *subSections() const = 0;
452 };
453 
454 class IDocTocList : public IDoc
455 {
456  public:
457  virtual IDocIterator *elements() const = 0;
458 };
459 
460 class IDocTocItem : public IDoc
461 {
462  public:
463  virtual const IString *id() const = 0;
464  virtual const IString *title() const = 0;
465 };
466 
467 class IDocCopy : public IDoc
468 {
469  public:
470  virtual IDocIterator *contents() const = 0;
471 };
472 
473 class IDocVerbatim : public IDoc
474 {
475  public:
476  enum Types { Invalid = 0, HtmlOnly, LatexOnly, Verbatim };
477  virtual const IString *text() const = 0;
478  virtual Types type() const = 0;
479 };
480 
481 class IDocAnchor : public IDoc
482 {
483  public:
484  virtual const IString *id() const = 0;
485 };
486 
487 class IDocSymbol : public IDoc
488 {
489  public:
490  enum Types
491  { Invalid = 0,
492  Umlaut, Acute, Grave, Circ, Tilde, Szlig, Cedil, Ring, Nbsp, Copy
493  };
494  virtual Types type() const = 0;
495  virtual const IString * typeString() const = 0;
496  virtual char letter() const = 0;
497 };
498 
499 class IDocRoot : public IDoc
500 {
501  public:
502  virtual IDocIterator *contents() const = 0;
503  virtual IDocInternal *internal() const = 0;
504 };
505 
507 {
508  public:
510  virtual IDoc *toFirst() = 0;
511  virtual IDoc *toLast() = 0;
512  virtual IDoc *toNext() = 0;
513  virtual IDoc *toPrev() = 0;
514  virtual IDoc *current() const = 0;
515  virtual void release() = 0;
516 };
517 
519 {
520  public:
522  virtual const IString * label() const = 0;
523 };
524 
526 {
527  public:
529  virtual IEdgeLabel *toFirst() = 0;
530  virtual IEdgeLabel *toLast() = 0;
531  virtual IEdgeLabel *toNext() = 0;
532  virtual IEdgeLabel *toPrev() = 0;
533  virtual IEdgeLabel *current() const = 0;
534  virtual void release() = 0;
535 };
536 
538 {
539  public:
541  enum NodeRelation { PublicInheritance, ProtectedInheritance,
542  PrivateInheritance, Usage, TemplateInstance
543  };
544  virtual INode * node() const = 0;
545  virtual NodeRelation relation() const = 0;
546  virtual const IString * relationString() const = 0;
547  virtual IEdgeLabelIterator *edgeLabels() const = 0;
548 };
549 
551 {
552  public:
554  virtual IChildNode *toFirst() = 0;
555  virtual IChildNode *toLast() = 0;
556  virtual IChildNode *toNext() = 0;
557  virtual IChildNode *toPrev() = 0;
558  virtual IChildNode *current() const = 0;
559  virtual void release() = 0;
560 };
561 
562 class INode
563 {
564  public:
566  virtual const IString * id() const = 0;
567  virtual const IString * label() const = 0;
568  virtual const IString * linkId() const = 0;
569  virtual IChildNodeIterator *children() const = 0;
570 };
571 
573 {
574  public:
576  virtual INode *toFirst() = 0;
577  virtual INode *toLast() = 0;
578  virtual INode *toNext() = 0;
579  virtual INode *toPrev() = 0;
580  virtual INode *current() const = 0;
581  virtual void release() = 0;
582 };
583 
584 class IGraph
585 {
586  public:
588  virtual INodeIterator *nodes() const = 0;
589 };
590 
591 class IMember
592 {
593  public:
595  enum MemberKind { Invalid=0,
598  EnumValue
599  };
600  virtual ICompound *compound() const = 0;
601  virtual ISection *section() const = 0;
602  virtual MemberKind kind() const = 0;
603  virtual const IString * kindString() const = 0;
604  virtual const IString * id() const = 0;
605  virtual const IString * protection() const = 0;
606  virtual const IString * virtualness() const = 0;
607  virtual ILinkedTextIterator *type() const = 0;
608  virtual const IString * typeString() const = 0;
609  virtual const IString * name() const = 0;
610  virtual const IString * readAccessor() const = 0;
611  virtual const IString * writeAccessor() const = 0;
612  virtual const IString * definition() const = 0;
613  virtual const IString * argsstring() const = 0;
614  virtual bool isConst() const = 0;
615  virtual bool isVolatile() const = 0;
616  virtual bool isStatic() const = 0;
617  virtual bool isExplicit() const = 0;
618  virtual bool isInline() const = 0;
619  virtual bool isMutable() const = 0;
620  virtual bool isReadable() const = 0;
621  virtual bool isWritable() const = 0;
622  virtual IParamIterator *parameters() const = 0;
623  virtual IParamIterator *templateParameters() const = 0;
624  virtual ILinkedTextIterator *initializer() const = 0;
625  virtual ILinkedTextIterator *exceptions() const = 0;
626  virtual IMemberReferenceIterator *references() const = 0;
627  virtual IMemberReferenceIterator *referencedBy() const = 0;
628  virtual const IString *bodyFile() const = 0;
629  virtual int bodyStart() const = 0;
630  virtual int bodyEnd() const = 0;
631  virtual const IString * definitionFile() const = 0;
632  virtual int definitionLine() const = 0;
633  virtual IMemberReference *reimplements() const = 0;
634  virtual IMemberReferenceIterator *reimplementedBy() const = 0;
635  virtual IDocRoot *briefDescription() const = 0;
636  virtual IDocRoot *detailedDescription() const = 0;
637  virtual IDocRoot *inbodyDescription() const = 0;
638 };
639 
640 class IDefine : public IMember
641 {
642  public:
643 };
644 
645 class IProperty : public IMember
646 {
647  public:
648 };
649 
650 class IVariable : public IMember
651 {
652  public:
653 };
654 
655 class ITypedef : public IMember
656 {
657  public:
658 };
659 
660 class IFunction : public IMember
661 {
662  public:
663 };
664 
665 class ISignal : public IMember
666 {
667  public:
668 };
669 
670 class IPrototype : public IMember
671 {
672  public:
673 };
674 
675 class IFriend : public IMember
676 {
677  public:
678 };
679 
680 class IDCOP : public IMember
681 {
682  public:
683 };
684 
685 class ISlot : public IMember
686 {
687  public:
688 };
689 
690 class IEnumValue : public IMember
691 {
692  public:
693  virtual const IString * name() const = 0;
694 };
695 
696 /*! \brief Include relation
697  */
698 class IInclude
699 {
700  public:
702  virtual const IString * name() const = 0;
703  virtual const IString * refId() const = 0;
704  virtual bool isLocal() const = 0;
705 };
706 
708 {
709  public:
711  virtual IInclude *toFirst() = 0;
712  virtual IInclude *toLast() = 0;
713  virtual IInclude *toNext() = 0;
714  virtual IInclude *toPrev() = 0;
715  virtual IInclude *current() const = 0;
716  virtual void release() = 0;
717 };
718 
720 {
721  public:
723  virtual IMember *toFirst() = 0;
724  virtual IMember *toLast() = 0;
725  virtual IMember *toNext() = 0;
726  virtual IMember *toPrev() = 0;
727  virtual IMember *current() const = 0;
728  virtual void release() = 0;
729 };
730 
731 class IEnum : public IMember
732 {
733  public:
734  virtual IMemberIterator *enumValues() const = 0;
735 };
736 
737 /*! \brief The interface to a section in the object model.
738  *
739  * A compound can have a number of sections, where each
740  * section contains a set of members with the properties implied by
741  * the section kind. The kind() method returns the kind of the section.
742  * The members of the section can be accessed via members(). Apart
743  * from using kind(), some of the individual properties of the section can
744  * also be inspected via isStatic(), isPublic(), isProtected() and
745  * isPrivate().
746  */
747 class ISection
748 {
749  public:
751  /*! Possible section types */
753  { Invalid=0,
754  UserDefined, //!< A user defined member group
755  PubTypes, //!< Public member typedefs
756  PubFuncs, //!< Public member functions
757  PubAttribs, //!< Public member attributes
758  PubSlots, //!< Public Qt Slots
759  Signals, //!< Qt Signals
760  DCOPFuncs, //!< KDE-DCOP interface functions
761  Properties, //!< IDL properties
762  Events, //!< C# events
763  PubStatFuncs, //!< Public static member functions
764  PubStatAttribs, //!< Public static attributes
765  ProTypes, //!< Protected member typedefs
766  ProFuncs, //!< Protected member functions
767  ProAttribs, //!< Protected member attributes
768  ProSlots, //!< Protected slots
769  ProStatFuncs, //!< Protected static member functions
770  ProStatAttribs, //!< Protected static member attributes
771  PacTypes, //!< Package member typedefs
772  PacFuncs, //!< Package member functions
773  PacAttribs, //!< Package member attributes
774  PacStatFuncs, //!< Package static member functions
775  PacStatAttribs, //!< Package static member attributes
776  PriTypes, //!< Private member typedefs
777  PriFuncs, //!< Private member functions
778  PriAttribs, //!< Private member attributes
779  PriSlots, //!< Private Qt slots
780  PriStatFuncs, //!< Private static member functions
781  PriStatAttribs, //!< Private static member attributes
782  Friend, //!< Friends
783  Related, //!< Function marked as related
784  Defines, //!< Preprocessor defines
785  Prototypes, //!< Global function prototypes
786  Typedefs, //!< Global typedefs
787  Enums, //!< Enumerations
788  Functions, //!< Global functions
789  Variables //!< Global variables
790  };
791 
792  /*! Returns a string representation of the value returned by kind() */
793  virtual const IString * kindString() const = 0;
794 
795  /*! Returns what kind of section this is */
796  virtual SectionKind kind() const = 0;
797 
798  /*! Returns the description attached to this section (for user defined
799  * sections, also known as member groups).
800  */
801  virtual IDocRoot *description() const = 0;
802 
803  /*! Returns an iterator for the members of this section */
804  virtual IMemberIterator *members() const = 0;
805 
806  /*! Returns \c true if this section contains statics */
807  virtual bool isStatic() const = 0;
808 
809  /*! Returns \c true if this section belongs to a
810  * public section of a class
811  */
812  virtual bool isPublic() const = 0;
813 
814  /*! Returns \c true if this section belongs to a
815  * private section of a class
816  */
817  virtual bool isPrivate() const = 0;
818 
819  /*! Returns \c true if this section belongs to a
820  * protected section of a class
821  * */
822  virtual bool isProtected() const = 0;
823 };
824 
825 class IUserDefined : public ISection
826 {
827  public:
828  virtual const IString * header() const = 0;
829 };
830 
832 {
833  public:
835  virtual ISection *toFirst() = 0;
836  virtual ISection *toLast() = 0;
837  virtual ISection *toNext() = 0;
838  virtual ISection *toPrev() = 0;
839  virtual ISection *current() const = 0;
840  virtual void release() = 0;
841 };
842 
843 /*! \brief The interface to a compound in the object model.
844  *
845  * A compound has a name which can be obtained via the name() method
846  * and a unique id, which is return via the id() method.
847  * A compound consists zero or more members which are grouped into sections.
848  * The sections() method can be used to access the individual sections.
849  * Alternatively, members can be obtained by name or id. There are
850  * different types of compounds. The kind() method returns what kind of
851  * compound this is. Depending on the return value one can dynamically
852  * cast an interface pointer to an more specialised interface that provides
853  * additional methods.
854  * Example:
855  * \code
856  * ICompound *comp=...;
857  * if (comp->kind()==ICompound::Class)
858  * {
859  * IClass *cls = dynamic_cast<IClass*>(comp);
860  * // use methods of IClass
861  * }
862  * \endcode
863  * The documentation that is provided by a compound is available via
864  * the briefDescription() and detailedDescription() methods.
865  * To avoid excessive memory usage, release() should be called (once) on each
866  * compound interface pointer that is no longer needed.
867  */
868 class ICompound
869 {
870  public:
872  /*! Represents the kind of compounds recognised by doxygen. */
873  enum CompoundKind { Invalid=0,
874  Class, Struct, Union, Interface, Protocol, Category,
875  Exception, File, Namespace, Group, Page, Example, Dir
876  };
877 
878  /*! Returns the name of this compound */
879  virtual const IString * name() const = 0;
880 
881  /*! Returns the id of this compound. The id is a
882  * unique string representing a specific compound object.
883  */
884  virtual const IString * id() const = 0;
885 
886  /*! Returns the kind of compound. See #CompoundKind for possible
887  * values.
888  */
889  virtual CompoundKind kind() const = 0;
890 
891  /*! Returns a string representation of the compound kind.
892  * @see kind()
893  */
894  virtual const IString * kindString() const = 0;
895 
896  /*! Returns an iterator for the different member sections in this
897  * compound.
898  */
899  virtual ISectionIterator *sections() const = 0;
900 
901  /*! Returns a tree-structured representation of the brief
902  * description that is attached to this compound.
903  */
904  virtual IDocRoot *briefDescription() const = 0;
905 
906  /*! Returns a tree-structured representation of the detailed
907  * description that is attached to this compound.
908  */
909  virtual IDocRoot *detailedDescription() const = 0;
910 
911  /*! Returns an interface to a member given its id.
912  * @param id The member id.
913  */
914  virtual IMember *memberById(const char * id) const = 0;
915 
916  /*! Returns a list of all members within the compound having a certain
917  * name. Member overloading is the reason why there can be more than
918  * one member.
919  * @param name The name of the member.
920  */
921  virtual IMemberIterator *memberByName(const char * name) const = 0;
922 
923  /*! Decreases the reference counter for this compound. If it reaches
924  * zero, the memory for the compound will be released.
925  */
926  virtual void release() = 0;
927 };
928 
930 {
931  public:
933  virtual void toFirst() = 0;
934  virtual void toLast() = 0;
935  virtual void toNext() = 0;
936  virtual void toPrev() = 0;
937  virtual ICompound *current() const = 0;
938  virtual void release() = 0;
939 };
940 
942 {
943  public:
946  enum Kind { Normal, Virtual };
947  virtual ICompound *compound() const = 0;
948  virtual Protection protection() const = 0;
949  virtual Kind kind() const = 0;
950  virtual const IString *name() const = 0;
951 
952 };
953 
955 {
956  public:
958  virtual IRelatedCompound *toFirst() = 0;
959  virtual IRelatedCompound *toLast() = 0;
960  virtual IRelatedCompound *toNext() = 0;
961  virtual IRelatedCompound *toPrev() = 0;
962  virtual IRelatedCompound *current() const = 0;
963  virtual void release() = 0;
964 };
965 
966 /*! \brief The interface to a class in the object model.
967  */
968 class IClass : public ICompound
969 {
970  public:
971  virtual IGraph *inheritanceGraph() const = 0;
972  virtual IGraph *collaborationGraph() const = 0;
973  virtual IRelatedCompoundIterator *baseCompounds() const = 0;
974  virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
975  virtual ICompoundIterator *nestedCompounds() const = 0;
976  virtual IParamIterator *templateParameters() const = 0;
977  virtual const IString *locationFile() const = 0;
978  virtual int locationLine() const = 0;
979  virtual const IString *locationBodyFile() const = 0;
980  virtual int locationBodyStartLine() const = 0;
981  virtual int locationBodyEndLine() const = 0;
982 
983  // TODO:
984  // class:
985  // listOfAllMembers()
986  // protection()
987  // isAbstract()
988 };
989 
990 /*! \brief The interface to a struct in the object model.
991  */
992 class IStruct : public ICompound
993 {
994  public:
995  virtual ICompoundIterator *nestedCompounds() const = 0;
996  virtual IRelatedCompoundIterator *baseCompounds() const = 0;
997  virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
998  virtual const IString *locationFile() const = 0;
999  virtual int locationLine() const = 0;
1000  virtual int locationBodyStartLine() const = 0;
1001  virtual int locationBodyEndLine() const = 0;
1002 };
1003 
1004 /*! \brief The interface to a union in the object model.
1005  */
1006 class IUnion : public ICompound
1007 {
1008  public:
1009  virtual ICompoundIterator *nestedCompounds() const = 0;
1010 };
1011 
1012 /*! \brief The interface to a Java/IDL interface in the object model.
1013  */
1014 class IInterface : public ICompound
1015 {
1016  public:
1017  virtual IRelatedCompoundIterator *baseCompounds() const = 0;
1018  virtual IRelatedCompoundIterator *derivedCompounds() const = 0;
1019 };
1020 
1021 
1022 /*! \brief The interface to a Java/IDL exception in the object model.
1023  */
1024 class IException : public ICompound
1025 {
1026 };
1027 
1028 /*! \brief The interface to a namespace in the object model.
1029  */
1030 class INamespace : public ICompound
1031 {
1032  public:
1033  virtual ICompoundIterator *nestedCompounds() const = 0;
1034 };
1035 
1036 /*! \brief The interface to a file in the object model.
1037  */
1038 class IFile : public ICompound
1039 {
1040  public:
1041  virtual IGraph *includeDependencyGraph() const = 0;
1042  virtual IGraph *includedByDependencyGraph() const = 0;
1043  virtual IDocProgramListing *source() const = 0;
1044  virtual ICompoundIterator *nestedCompounds() const = 0;
1045 
1046  virtual IIncludeIterator *includes() const = 0;
1047  virtual IIncludeIterator *includedBy() const = 0;
1048 
1049  // ICompound *innerNamespaces()
1050  // ICompoundIterator *innerClasses()
1051 };
1052 
1053 /*! \brief The interface to a group in the object model.
1054  */
1055 class IGroup : public ICompound
1056 {
1057  public:
1058  virtual ICompoundIterator *nestedCompounds() const = 0;
1059  // group:
1060  // Title()
1061  // innerFile()
1062  // innerPage()
1063 };
1064 
1065 /*! \brief The interface to a page in the object model.
1066  */
1067 class IPage : public ICompound
1068 {
1069  public:
1070  virtual const IDocTitle *title() const = 0;
1071 };
1072 
1073 /** \brief Interface to a directory in the object model. */
1074 class IDir : public ICompound
1075 {
1076  public:
1077  virtual ICompoundIterator *nestedCompounds() const = 0;
1078 };
1079 
1080 /*! Root node of the object model. */
1081 class IDoxygen
1082 {
1083  public:
1085 
1086  /*! Returns an iterator that can be used to iterate over the list
1087  * of compounds found in the project.
1088  */
1089  virtual ICompoundIterator *compounds() const = 0;
1090 
1091  /*! Returns a compound given its unique \a id. If you have a
1092  * compound id this function is much more efficient than iterating
1093  * over the compound list. Returns 0 if the id is not valid.
1094  */
1095  virtual ICompound *compoundById(const char * id) const = 0;
1096 
1097  /*! Returns a compound given its name (including the scope).
1098  * Returns 0 if the name is not found in the project.
1099  */
1100  virtual ICompound *compoundByName(const char * name) const = 0;
1101 
1102  /*! Returns an interface to a compound containing a member given it the
1103  * member's id. Given the ICompound interface one can use the same id
1104  * to obtain the IMember interface.
1105  * @param id The member id.
1106  */
1107  virtual ICompound *memberById(const char * id) const = 0;
1108 
1109  /*! Returns a list of all compounds containing at least one members
1110  * with a certain name. Each compound can be asked to return the
1111  * list of members with that name.
1112  * @param name The name of the member.
1113  */
1114  virtual ICompoundIterator *memberByName(const char * name) const = 0;
1115 
1116  /*! Releases the memory for the object hierarchy obtained by
1117  * createdObjecModelFromXML(). First release all iterators before calling
1118  * this function.
1119  */
1120  virtual void release() = 0;
1121 
1122  /*! Sets the debug level.
1123  * - 0 all debugging messages are disabled (the default).
1124  * - 1 display important messages only
1125  * - 2 display any messages.
1126  */
1127  virtual void setDebugLevel(int level) = 0;
1128 
1129  /*! Reads an XML directory produced by doxygen and builds up a data
1130  * structure representing the contents of the XML files in the directory.
1131  */
1132  virtual bool readXMLDir(const char *xmlDirName) = 0;
1133 };
1134 
1135 /*! Factory method that creates an empty object model for a doxygen generated XML file.
1136  * Use the readXMLDir() method to build the model from an XML output
1137  * directory containing doxygen output.
1138  */
1140 
1141 #endif
static QCString name
Definition: declinfo.cpp:673
#define Prototype
The interface to a class in the object model.
Definition: doxmlintf.h:968
Private member typedefs.
Definition: doxmlintf.h:776
Read only interface to a string.
Definition: doxmlintf.h:42
static QCString scope
Definition: declinfo.cpp:668
Definition: types.h:32
Definition: types.h:29
virtual int length() const =0
void setDebugLevel(int level)
Definition: debug.cpp:20
Protected static member functions.
Definition: doxmlintf.h:769
#define Define
Definition: scanner.cpp:11520
virtual const char * latin1() const =0
The interface to a struct in the object model.
Definition: doxmlintf.h:992
Interface to a directory in the object model.
Definition: doxmlintf.h:1074
Friends.
Definition: doxmlintf.h:782
Private Qt slots.
Definition: doxmlintf.h:779
Definition: types.h:26
Qt Signals.
Definition: doxmlintf.h:759
Public member functions.
Definition: doxmlintf.h:756
A Test class.
Definition: class.h:3
static QCString initializer
The interface to a namespace in the object model.
Definition: doxmlintf.h:1030
Public member attributes.
Definition: doxmlintf.h:757
Definition: types.h:32
Definition: types.h:29
The interface to a file in the object model.
Definition: doxmlintf.h:1038
C# events.
Definition: doxmlintf.h:762
virtual bool isEmpty() const =0
Package member functions.
Definition: doxmlintf.h:772
Public static member functions.
Definition: doxmlintf.h:763
#define nodes
IDL properties.
Definition: doxmlintf.h:761
Private static member functions.
Definition: doxmlintf.h:780
Protected static member attributes.
Definition: doxmlintf.h:770
#define Function
Definition: scanner.cpp:11542
Reference to an object.
Definition: doxmlintf.h:84
Private member attributes.
Definition: doxmlintf.h:778
Global typedefs.
Definition: doxmlintf.h:786
Public member typedefs.
Definition: doxmlintf.h:755
Private member functions.
Definition: doxmlintf.h:777
static Entry * current
Package static member attributes.
Definition: doxmlintf.h:775
#define VIRTUAL_DESTRUCTOR(x)
Definition: doxmlintf.h:38
Protected slots.
Definition: doxmlintf.h:768
Protected member typedefs.
Definition: doxmlintf.h:765
Enumerations.
Definition: doxmlintf.h:787
The interface to a compound in the object model.
Definition: doxmlintf.h:868
Global function prototypes.
Definition: doxmlintf.h:785
The interface to a section in the object model.
Definition: doxmlintf.h:747
Iterates over a list of ILinkedText fragments.
Definition: doxmlintf.h:97
The interface to a page in the object model.
Definition: doxmlintf.h:1067
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
string release
Definition: conf.py:24
Definition: types.h:38
Base interface for hyperlinked text.
Definition: doxmlintf.h:65
#define Comment
The interface to a union in the object model.
Definition: doxmlintf.h:1006
#define Verbatim
The interface to a Java/IDL interface in the object model.
Definition: doxmlintf.h:1014
IDoxygen * createObjectModel()
Package member typedefs.
Definition: doxmlintf.h:771
Representation of a parameter of a function.
Definition: doxmlintf.h:110
virtual const char * utf8() const =0
Protection protection
static QCString type
Definition: declinfo.cpp:672
A user defined member group.
Definition: doxmlintf.h:754
Private static member attributes.
Definition: doxmlintf.h:781
Preprocessor defines.
Definition: doxmlintf.h:784
Protected member attributes.
Definition: doxmlintf.h:767
Package static member functions.
Definition: doxmlintf.h:774
Include relation.
Definition: doxmlintf.h:698
Definition: 009_bug.cpp:15
Global functions.
Definition: doxmlintf.h:788
#define Typedef
Function marked as related.
Definition: doxmlintf.h:783
The interface to a group in the object model.
Definition: doxmlintf.h:1055
Public Qt Slots.
Definition: doxmlintf.h:758
Plain text fragment.
Definition: doxmlintf.h:75
Definition: types.h:32
The interface to a Java/IDL exception in the object model.
Definition: doxmlintf.h:1024
Package member attributes.
Definition: doxmlintf.h:773
Public static attributes.
Definition: doxmlintf.h:764
KDE-DCOP interface functions.
Definition: doxmlintf.h:760
virtual unsigned short unicodeCharAt(int index) const =0
TargetKind
Definition: doxmlintf.h:88
Protected member functions.
Definition: doxmlintf.h:766