context.h
Go to the documentation of this file.
1 /******************************************************************************
2  *
3  * Copyright (C) 1997-2015 by Dimitri van Heesch.
4  *
5  * Permission to use, copy, modify, and distribute this software and its
6  * documentation under the terms of the GNU General Public License is hereby
7  * granted. No representations are made about the suitability of this software
8  * for any purpose. It is provided "as is" without express or implied warranty.
9  * See the GNU General Public License for more details.
10  *
11  * Documents produced by Doxygen are derivative works derived from the
12  * input used in their production; they are not affected by this license.
13  *
14  */
15 
16 #ifndef CONTEXT_H
17 #define CONTEXT_H
18 
19 #include "types.h"
20 #include "template.h"
21 #include <qlist.h>
22 #include <stdio.h>
23 
24 class Definition;
25 class ClassDef;
26 class ClassSDict;
27 class BaseClassList;
28 class PageDef;
29 class GroupDef;
30 class NamespaceDef;
31 class BaseClassList;
32 class NamespaceSDict;
33 class FileDef;
34 class FileList;
35 class FileNameList;
36 class DirSDict;
37 class DirList;
38 class DirDef;
39 class PageSDict;
40 class GroupSDict;
41 class GroupDef;
42 class GroupList;
43 struct IncludeInfo;
44 class MemberList;
45 class MemberSDict;
46 class MemberDef;
47 struct Argument;
48 class ArgumentList;
50 struct MemberInfo;
51 class MemberGroup;
52 class MemberGroupSDict;
53 class MemberGroupList;
54 class DotNode;
56 struct SearchIndexInfo;
57 class SearchIndexList;
59 
60 //----------------------------------------------------
61 
62 #define DEBUG_REF 0
63 
64 /** @brief Helper class to support reference counting */
65 #if DEBUG_REF
67 {
68  public:
69  RefCountedContext(const char *className) : m_refCount(0)
70  {
71  m_className=className;
72  m_insideRelease = FALSE;
73  }
74  virtual ~RefCountedContext()
75  {
76  if (!m_insideRelease) abort();
77  }
78  int addRef()
79  {
80  ++s_totalCount;
81  printf("%p:%s::addRef()=%d\n",this,m_className.data(),m_refCount);
82  return ++m_refCount;
83  }
84  int release()
85  {
86  --s_totalCount;
87  printf("%p:%s::release()=%d\n",this,m_className.data(),m_refCount-1);
88  int count = --m_refCount;
89  if (count<=0)
90  {
91  m_insideRelease=TRUE;
92  delete this;
93  }
94  return count;
95  }
96  private:
97  int m_refCount;
98  QCString m_className;
99  bool m_insideRelease;
100  public:
101  static int s_totalCount;
102 };
103 
104 #else // release version
105 
107 {
108  public:
109  RefCountedContext(const char *) : m_refCount(0) {}
110  virtual ~RefCountedContext() {}
111  int addRef() { return ++m_refCount; }
112  int release()
113  {
114  int count = --m_refCount;
115  if (count<=0)
116  {
117  delete this;
118  }
119  return count;
120  }
121  private:
123 };
124 #endif
125 
126 
127 //----------------------------------------------------
128 
130 {
131  public:
132  static ConfigContext *alloc() { return new ConfigContext; }
133 
134  // TemplateStructIntf methods
135  virtual TemplateVariant get(const char *name) const;
136  virtual int addRef() { return RefCountedContext::addRef(); }
137  virtual int release() { return RefCountedContext::release(); }
138 
139  private:
140  ConfigContext();
141  ~ConfigContext();
142  class Private;
143  Private *p;
144 };
145 
146 //----------------------------------------------------
147 
149 {
150  public:
151  static DoxygenContext *alloc() { return new DoxygenContext; }
152 
153  // TemplateStructIntf methods
154  virtual TemplateVariant get(const char *name) const;
155  virtual int addRef() { return RefCountedContext::addRef(); }
156  virtual int release() { return RefCountedContext::release(); }
157 
158  private:
159  DoxygenContext();
160  ~DoxygenContext();
161  class Private;
162  Private *p;
163 };
164 
165 //----------------------------------------------------
166 
168 {
169  public:
170  static TranslateContext *alloc() { return new TranslateContext; }
171 
172  // TemplateStructIntf methods
173  virtual TemplateVariant get(const char *name) const;
174  virtual int addRef() { return RefCountedContext::addRef(); }
175  virtual int release() { return RefCountedContext::release(); }
176 
177  private:
179  ~TranslateContext();
180  class Private;
181  Private *p;
182 };
183 
184 //----------------------------------------------------
185 
187 {
188  public:
189  static UsedFilesContext *alloc(ClassDef *cd) { return new UsedFilesContext(cd); }
190 
191  // TemplateListIntf
192  virtual int count() const;
193  virtual TemplateVariant at(int index) const;
194  virtual TemplateListIntf::ConstIterator *createIterator() const;
195  virtual int addRef() { return RefCountedContext::addRef(); }
196  virtual int release() { return RefCountedContext::release(); }
197 
198  void addFile(FileDef *fd);
199 
200  private:
202  ~UsedFilesContext();
203 
204  class Private;
205  Private *p;
206 };
207 
208 //----------------------------------------------------
209 
211 {
212  public:
214  { return new IncludeInfoContext(info,lang); }
215 
216  // TemplateStructIntf methods
217  virtual TemplateVariant get(const char *name) const;
218  virtual int addRef() { return RefCountedContext::addRef(); }
219  virtual int release() { return RefCountedContext::release(); }
220 
221  private:
224  class Private;
225  Private *p;
226 };
227 
228 //----------------------------------------------------
229 
231 {
232  public:
234  { return new IncludeInfoListContext(list,lang); }
235 
236  // TemplateListIntf
237  virtual int count() const;
238  virtual TemplateVariant at(int index) const;
239  virtual TemplateListIntf::ConstIterator *createIterator() const;
240  virtual int addRef() { return RefCountedContext::addRef(); }
241  virtual int release() { return RefCountedContext::release(); }
242 
243  private:
246  class Private;
247  Private *p;
248 };
249 
250 
251 //----------------------------------------------------
252 
254 {
255  public:
256  static ClassContext *alloc(ClassDef *cd) { return new ClassContext(cd); }
257 
258  // TemplateStructIntf methods
259  virtual TemplateVariant get(const char *name) const;
260  virtual int addRef() { return RefCountedContext::addRef(); }
261  virtual int release() { return RefCountedContext::release(); }
262 
263  private:
265  ~ClassContext();
266  class Private;
267  Private *p;
268 };
269 
270 //----------------------------------------------------
271 
273 {
274  public:
275  static NamespaceContext *alloc(NamespaceDef *nd) { return new NamespaceContext(nd); }
276 
277  // TemplateStructIntf methods
278  virtual TemplateVariant get(const char *name) const;
279  virtual int addRef() { return RefCountedContext::addRef(); }
280  virtual int release() { return RefCountedContext::release(); }
281 
282  private:
284  ~NamespaceContext();
285  class Private;
286  Private *p;
287 };
288 
289 //----------------------------------------------------
290 
292 {
293  public:
294  static FileContext *alloc(FileDef *fd) { return new FileContext(fd); }
295 
296  // TemplateStructIntf methods
297  virtual TemplateVariant get(const char *name) const;
298  virtual int addRef() { return RefCountedContext::addRef(); }
299  virtual int release() { return RefCountedContext::release(); }
300 
301  private:
302  FileContext(FileDef *);
303  ~FileContext();
304  class Private;
305  Private *p;
306 };
307 //----------------------------------------------------
308 
310 {
311  public:
312  static DirContext *alloc(DirDef *dd) { return new DirContext(dd); }
313 
314  // TemplateStructIntf methods
315  virtual TemplateVariant get(const char *name) const;
316  virtual int addRef() { return RefCountedContext::addRef(); }
317  virtual int release() { return RefCountedContext::release(); }
318 
319  private:
320  DirContext(DirDef *);
321  ~DirContext();
322  class Private;
323  Private *p;
324 };
325 
326 
327 //----------------------------------------------------
328 
330 {
331  public:
332  static PageContext *alloc(PageDef *pd,bool isMainPage,bool isExample) { return new PageContext(pd,isMainPage,isExample); }
333 
334  // TemplateStructIntf methods
335  virtual TemplateVariant get(const char *name) const;
336  virtual int addRef() { return RefCountedContext::addRef(); }
337  virtual int release() { return RefCountedContext::release(); }
338 
339  private:
340  PageContext(PageDef *,bool isMainPage,bool isExample);
341  ~PageContext();
342  class Private;
343  Private *p;
344 };
345 
346 //----------------------------------------------------
347 
349 {
350  public:
351  static MemberContext *alloc(MemberDef *md) { return new MemberContext(md); }
352 
353  // TemplateStructIntf methods
354  virtual TemplateVariant get(const char *name) const;
355  virtual int addRef() { return RefCountedContext::addRef(); }
356  virtual int release() { return RefCountedContext::release(); }
357 
358  private:
360  ~MemberContext();
361  class Private;
362  Private *p;
363 };
364 
365 
366 //----------------------------------------------------
367 
369 {
370  public:
371  static ModuleContext *alloc(GroupDef *gd) { return new ModuleContext(gd); }
372 
373  // TemplateStructIntf methods
374  virtual TemplateVariant get(const char *name) const;
375  virtual int addRef() { return RefCountedContext::addRef(); }
376  virtual int release() { return RefCountedContext::release(); }
377 
378  private:
380  ~ModuleContext();
381  class Private;
382  Private *p;
383 };
384 
385 //----------------------------------------------------
386 
388 {
389  public:
390  static ClassListContext *alloc() { return new ClassListContext; }
391 
392  // TemplateListIntf
393  virtual int count() const;
394  virtual TemplateVariant at(int index) const;
395  virtual TemplateListIntf::ConstIterator *createIterator() const;
396  virtual int addRef() { return RefCountedContext::addRef(); }
397  virtual int release() { return RefCountedContext::release(); }
398 
399  private:
401  ~ClassListContext();
402  class Private;
403  Private *p;
404 };
405 
406 //----------------------------------------------------
407 
409 {
410  public:
411  static ClassIndexContext *alloc() { return new ClassIndexContext; }
412 
413  // TemplateStructIntf methods
414  virtual TemplateVariant get(const char *name) const;
415  virtual int addRef() { return RefCountedContext::addRef(); }
416  virtual int release() { return RefCountedContext::release(); }
417 
418  private:
421  class Private;
422  Private *p;
423 };
424 
425 //----------------------------------------------------
426 
428 {
429  public:
431  { return new InheritanceGraphContext(hierarchy,n,id); }
432 
433  // TemplateStructIntf methods
434  virtual TemplateVariant get(const char *name) const;
435  virtual int addRef() { return RefCountedContext::addRef(); }
436  virtual int release() { return RefCountedContext::release(); }
437 
438  private:
441  class Private;
442  Private *p;
443 };
444 
445 //----------------------------------------------------
446 
448 {
449  public:
451  { return new ClassInheritanceNodeContext(cd); }
452 
453  // TemplateStructIntf methods
454  virtual TemplateVariant get(const char *name) const;
455  virtual int addRef() { return RefCountedContext::addRef(); }
456  virtual int release() { return RefCountedContext::release(); }
457 
458  void addChildren(const BaseClassList *bcl,bool hideSuper);
459 
460  private:
463  class Private;
464  Private *p;
465 };
466 
467 //----------------------------------------------------
468 
470 {
471  public:
473 
474  // TemplateListIntf
475  virtual int count() const;
476  virtual TemplateVariant at(int index) const;
477  virtual TemplateListIntf::ConstIterator *createIterator() const;
478  virtual int addRef() { return RefCountedContext::addRef(); }
479  virtual int release() { return RefCountedContext::release(); }
480 
481  private:
484  class Private;
485  Private *p;
486 };
487 
488 //----------------------------------------------------
489 
491 {
492  public:
494 
495  // TemplateStructIntf methods
496  virtual TemplateVariant get(const char *name) const;
497  virtual int addRef() { return RefCountedContext::addRef(); }
498  virtual int release() { return RefCountedContext::release(); }
499 
500  private:
503  class Private;
504  Private *p;
505 };
506 
507 //----------------------------------------------------
508 
510 {
511  public:
513  int index,int level,bool addClasses,bool inherit,bool hideSuper)
514  { return new NestingNodeContext(parent,def,index,level,addClasses,inherit,hideSuper); }
515 
516  QCString id() const;
517 
518  // TemplateStructIntf methods
519  virtual TemplateVariant get(const char *name) const;
520  virtual int addRef() { return RefCountedContext::addRef(); }
521  virtual int release() { return RefCountedContext::release(); }
522 
523  private:
525  Definition *,int index,int level,bool addClasses,bool inherit,bool hideSuper);
527  class Private;
528  Private *p;
529 };
530 
531 //----------------------------------------------------
532 
534 {
535  public:
537  { return new NestingContext(parent,level); }
538 
539  // TemplateListIntf
540  virtual int count() const;
541  virtual TemplateVariant at(int index) const;
542  virtual TemplateListIntf::ConstIterator *createIterator() const;
543  virtual int addRef() { return RefCountedContext::addRef(); }
544  virtual int release() { return RefCountedContext::release(); }
545 
546  void addNamespaces(const NamespaceSDict &nsDict,bool rootOnly,bool addClasses);
547  void addClasses(const ClassSDict &clDict,bool rootOnly);
548  void addDirs(const DirSDict &);
549  void addDirs(const DirList &);
550  void addFiles(const FileNameList &);
551  void addFiles(const FileList &);
552  void addPages(const PageSDict &pages,bool rootOnly);
553  void addModules(const GroupSDict &modules);
554  void addModules(const GroupList &modules);
555  void addClassHierarchy(const ClassSDict &clDict,bool rootOnly);
556  void addDerivedClasses(const BaseClassList *bcl,bool hideSuper);
557 
558  private:
560  ~NestingContext();
561  class Private;
562  Private *p;
563 };
564 
565 //----------------------------------------------------
566 
568 {
569  public:
570  static ClassTreeContext *alloc() { return new ClassTreeContext; }
571 
572  // TemplateStructIntf methods
573  virtual TemplateVariant get(const char *name) const;
574  virtual int addRef() { return RefCountedContext::addRef(); }
575  virtual int release() { return RefCountedContext::release(); }
576 
577  private:
579  ~ClassTreeContext();
580  class Private;
581  Private *p;
582 };
583 
584 //----------------------------------------------------
585 
587 {
588  public:
590 
591  // TemplateListIntf
592  virtual int count() const;
593  virtual TemplateVariant at(int index) const;
594  virtual TemplateListIntf::ConstIterator *createIterator() const;
595  virtual int addRef() { return RefCountedContext::addRef(); }
596  virtual int release() { return RefCountedContext::release(); }
597 
598  private:
601  class Private;
602  Private *p;
603 };
604 
605 //----------------------------------------------------
606 
608 {
609  public:
611 
612  // TemplateStructIntf methods
613  virtual TemplateVariant get(const char *name) const;
614  virtual int addRef() { return RefCountedContext::addRef(); }
615  virtual int release() { return RefCountedContext::release(); }
616 
617  private:
620  class Private;
621  Private *p;
622 };
623 
624 //----------------------------------------------------
625 
627 {
628  public:
629  static DirListContext *alloc() { return new DirListContext; }
630 
631  // TemplateListIntf
632  virtual int count() const;
633  virtual TemplateVariant at(int index) const;
634  virtual TemplateListIntf::ConstIterator *createIterator() const;
635  virtual int addRef() { return RefCountedContext::addRef(); }
636  virtual int release() { return RefCountedContext::release(); }
637 
638  private:
639  DirListContext();
640  ~DirListContext();
641  class Private;
642  Private *p;
643 };
644 
645 //----------------------------------------------------
646 
648 {
649  public:
650  static FileListContext *alloc() { return new FileListContext; }
651 
652  // TemplateListIntf
653  virtual int count() const;
654  virtual TemplateVariant at(int index) const;
655  virtual TemplateListIntf::ConstIterator *createIterator() const;
656  virtual int addRef() { return RefCountedContext::addRef(); }
657  virtual int release() { return RefCountedContext::release(); }
658 
659  private:
660  FileListContext();
661  ~FileListContext();
662  class Private;
663  Private *p;
664 };
665 
666 //----------------------------------------------------
667 
669 {
670  public:
671  static FileTreeContext *alloc() { return new FileTreeContext; }
672 
673  // TemplateStructIntf methods
674  virtual TemplateVariant get(const char *name) const;
675  virtual int addRef() { return RefCountedContext::addRef(); }
676  virtual int release() { return RefCountedContext::release(); }
677 
678  private:
679  FileTreeContext();
680  ~FileTreeContext();
681  class Private;
682  Private *p;
683 };
684 
685 //----------------------------------------------------
686 
688 {
689  public:
690  static PageListContext *alloc(const PageSDict *pages) { return new PageListContext(pages); }
691 
692  // TemplateListIntf methods
693  virtual int count() const;
694  virtual TemplateVariant at(int index) const;
695  virtual TemplateListIntf::ConstIterator *createIterator() const;
696  virtual int addRef() { return RefCountedContext::addRef(); }
697  virtual int release() { return RefCountedContext::release(); }
698 
699  void addPages(const PageSDict &pages);
700 
701  private:
702  PageListContext(const PageSDict *pages);
703  ~PageListContext();
704  class Private;
705  Private *p;
706 };
707 
708 //----------------------------------------------------
709 
711 {
712  public:
713  static PageTreeContext *alloc(const PageSDict *pages) { return new PageTreeContext(pages); }
714 
715  // TemplateStructIntf methods
716  virtual TemplateVariant get(const char *name) const;
717  virtual int addRef() { return RefCountedContext::addRef(); }
718  virtual int release() { return RefCountedContext::release(); }
719 
720  private:
721  PageTreeContext(const PageSDict *pages);
722  ~PageTreeContext();
723  class Private;
724  Private *p;
725 };
726 
727 //----------------------------------------------------
728 
730 {
731  public:
732  static ModuleNodeContext *alloc(GroupDef *gd) { return new ModuleNodeContext(gd); }
733 
734  // TemplateStructIntf methods
735  virtual TemplateVariant get(const char *name) const;
736  virtual int addRef() { return RefCountedContext::addRef(); }
737  virtual int release() { return RefCountedContext::release(); }
738 
739  private:
742  class Private;
743  Private *p;
744 };
745 
746 //----------------------------------------------------
747 
749 {
750  public:
751  static ModuleListContext *alloc() { return new ModuleListContext(); }
752 
753  // TemplateListIntf
754  virtual int count() const;
755  virtual TemplateVariant at(int index) const;
756  virtual TemplateListIntf::ConstIterator *createIterator() const;
757  virtual int addRef() { return RefCountedContext::addRef(); }
758  virtual int release() { return RefCountedContext::release(); }
759 
760  void addModules(const GroupSDict &);
761  void addModules(const GroupList &);
762 
763  private:
766  class Private;
767  Private *p;
768 };
769 
770 //----------------------------------------------------
771 
773 {
774  public:
775  static ModuleTreeContext *alloc() { return new ModuleTreeContext(); }
776 
777  // TemplateStructIntf methods
778  virtual TemplateVariant get(const char *name) const;
779  virtual int addRef() { return RefCountedContext::addRef(); }
780  virtual int release() { return RefCountedContext::release(); }
781 
782  private:
785  class Private;
786  Private *p;
787 };
788 
789 //----------------------------------------------------
790 
792 {
793  public:
794  static ExampleListContext *alloc() { return new ExampleListContext; }
795 
796  // TemplateListIntf methods
797  virtual int count() const;
798  virtual TemplateVariant at(int index) const;
799  virtual TemplateListIntf::ConstIterator *createIterator() const;
800  virtual int addRef() { return RefCountedContext::addRef(); }
801  virtual int release() { return RefCountedContext::release(); }
802 
803  private:
806  class Private;
807  Private *p;
808 };
809 
810 //----------------------------------------------------
811 
812 
814 {
815  public:
816  static ExampleTreeContext *alloc() { return new ExampleTreeContext; }
817 
818  // TemplateStructIntf methods
819  virtual TemplateVariant get(const char *name) const;
820  virtual int addRef() { return RefCountedContext::addRef(); }
821  virtual int release() { return RefCountedContext::release(); }
822 
823  private:
826  class Private;
827  Private *p;
828 };
829 
830 //----------------------------------------------------
831 
833 {
834  public:
835  static GlobalsIndexContext *alloc() { return new GlobalsIndexContext(); }
836 
837  // TemplateStructIntf methods
838  virtual TemplateVariant get(const char *name) const;
839  virtual int addRef() { return RefCountedContext::addRef(); }
840  virtual int release() { return RefCountedContext::release(); }
841 
842  private:
845  class Private;
846  Private *p;
847 };
848 
849 //----------------------------------------------------
850 
852 {
853  public:
855 
856  // TemplateStructIntf methods
857  virtual TemplateVariant get(const char *name) const;
858  virtual int addRef() { return RefCountedContext::addRef(); }
859  virtual int release() { return RefCountedContext::release(); }
860 
861  private:
864  class Private;
865  Private *p;
866 };
867 
868 //----------------------------------------------------
869 
871 {
872  public:
874 
875  // TemplateStructIntf methods
876  virtual TemplateVariant get(const char *name) const;
877  virtual int addRef() { return RefCountedContext::addRef(); }
878  virtual int release() { return RefCountedContext::release(); }
879 
880  private:
883  class Private;
884  Private *p;
885 };
886 
887 //----------------------------------------------------
888 
890 {
891  public:
892  static NavPathElemContext *alloc(Definition *def) { return new NavPathElemContext(def); }
893 
894  // TemplateStructIntf methods
895  virtual TemplateVariant get(const char *name) const;
896  virtual int addRef() { return RefCountedContext::addRef(); }
897  virtual int release() { return RefCountedContext::release(); }
898 
899  private:
902  class Private;
903  Private *p;
904 };
905 
906 
907 //----------------------------------------------------
908 
910 {
911  public:
913  { return new InheritanceNodeContext(cd,name); }
914 
915  // TemplateStructIntf methods
916  virtual TemplateVariant get(const char *name) const;
917  virtual int addRef() { return RefCountedContext::addRef(); }
918  virtual int release() { return RefCountedContext::release(); }
919 
920  private:
923  class Private;
924  Private *p;
925 };
926 
927 //----------------------------------------------------
928 
930 {
931  public:
932  static InheritanceListContext *alloc(const BaseClassList *list,bool baseClasses)
933  { return new InheritanceListContext(list,baseClasses); }
934 
935  // TemplateListIntf
936  virtual int count() const;
937  virtual TemplateVariant at(int index) const;
938  virtual TemplateListIntf::ConstIterator *createIterator() const;
939  virtual int addRef() { return RefCountedContext::addRef(); }
940  virtual int release() { return RefCountedContext::release(); }
941 
942  private:
943  InheritanceListContext(const BaseClassList *list,bool baseClasses);
945  class Private;
946  Private *p;
947 };
948 
949 //----------------------------------------------------
950 
952 {
953  public:
955  { return new MemberListContext; }
956  static MemberListContext *alloc(const MemberList *ml)
957  { return new MemberListContext(ml); }
958  static MemberListContext *alloc(MemberSDict *ml,bool doSort)
959  { return new MemberListContext(ml,doSort); }
960 
961  // TemplateListIntf
962  virtual int count() const;
963  virtual TemplateVariant at(int index) const;
964  virtual TemplateListIntf::ConstIterator *createIterator() const;
965  virtual int addRef() { return RefCountedContext::addRef(); }
966  virtual int release() { return RefCountedContext::release(); }
967 
968  private:
970  MemberListContext(const MemberList *ml);
971  MemberListContext(MemberSDict *ml,bool doSort);
973  class Private;
974  Private *p;
975 };
976 
977 //----------------------------------------------------
978 
980 {
981  public:
982  static MemberGroupInfoContext *alloc(Definition *def,const QCString &relPath,const MemberGroup *mg)
983  { return new MemberGroupInfoContext(def,relPath,mg); }
984 
985  // TemplateStructIntf methods
986  virtual TemplateVariant get(const char *name) const;
987  virtual int addRef() { return RefCountedContext::addRef(); }
988  virtual int release() { return RefCountedContext::release(); }
989 
990  private:
991  MemberGroupInfoContext(Definition *def,const QCString &relPath,const MemberGroup *mg);
993  class Private;
994  Private *p;
995 };
996 
997 //----------------------------------------------------
998 
1000 {
1001  public:
1003  { return new MemberGroupListContext; }
1004  static MemberGroupListContext *alloc(Definition *def,const QCString &relPath,const MemberGroupList *list)
1005  { return new MemberGroupListContext(def,relPath,list); }
1006  static MemberGroupListContext *alloc(Definition *def,const QCString &relPath,const MemberGroupSDict *dict,bool subGrouping)
1007  { return new MemberGroupListContext(def,relPath,dict,subGrouping); }
1008 
1009  // TemplateListIntf
1010  virtual int count() const;
1011  virtual TemplateVariant at(int index) const;
1012  virtual TemplateListIntf::ConstIterator *createIterator() const;
1013  virtual int addRef() { return RefCountedContext::addRef(); }
1014  virtual int release() { return RefCountedContext::release(); }
1015 
1016  private:
1018  MemberGroupListContext(Definition *def,const QCString &relPath,const MemberGroupList *list);
1019  MemberGroupListContext(Definition *def,const QCString &relPath,const MemberGroupSDict *mgDict,bool subGrouping);
1021  class Private;
1022  Private *p;
1023 };
1024 
1025 
1026 //----------------------------------------------------
1027 
1029 {
1030  public:
1031  static MemberListInfoContext *alloc(Definition *def,const QCString &relPath,
1032  const MemberList *ml,const QCString &title,
1033  const QCString &subtitle=QCString())
1034  { return new MemberListInfoContext(def,relPath,ml,title,subtitle); }
1035 
1036  // TemplateStructIntf methods
1037  virtual TemplateVariant get(const char *name) const;
1038  virtual int addRef() { return RefCountedContext::addRef(); }
1039  virtual int release() { return RefCountedContext::release(); }
1040 
1041  private:
1042  MemberListInfoContext(Definition *def,const QCString &relPath,
1043  const MemberList *ml,const QCString &title,
1044  const QCString &subtitle=QCString());
1046  class Private;
1047  Private *p;
1048 };
1049 
1050 //----------------------------------------------------
1051 
1053 {
1054  public:
1055  static MemberInfoContext *alloc(const MemberInfo *mi) { return new MemberInfoContext(mi); }
1056 
1057  // TemplateStructIntf methods
1058  virtual TemplateVariant get(const char *name) const;
1059  virtual int addRef() { return RefCountedContext::addRef(); }
1060  virtual int release() { return RefCountedContext::release(); }
1061 
1062  private:
1063  MemberInfoContext(const MemberInfo *mi);
1064  ~MemberInfoContext();
1065  class Private;
1066  Private *p;
1067 };
1068 
1069 //----------------------------------------------------
1070 
1072 {
1073  public:
1075  { return new InheritedMemberInfoContext(cd,ml,title); }
1076 
1077  // TemplateStructIntf methods
1078  virtual TemplateVariant get(const char *name) const;
1079  virtual int addRef() { return RefCountedContext::addRef(); }
1080  virtual int release() { return RefCountedContext::release(); }
1081 
1082  private:
1085  class Private;
1086  Private *p;
1087 };
1088 
1089 //----------------------------------------------------
1090 
1092 {
1093  public:
1095  void addMemberList(ClassDef *cd,MemberListType lt,const QCString &title,bool additionalList=TRUE);
1096 
1097  // TemplateListIntf
1098  virtual int count() const;
1099  virtual TemplateVariant at(int index) const;
1100  virtual TemplateListIntf::ConstIterator *createIterator() const;
1101  virtual int addRef() { return RefCountedContext::addRef(); }
1102  virtual int release() { return RefCountedContext::release(); }
1103 
1104  private:
1107  class Private;
1108  Private *p;
1109 };
1110 
1111 //----------------------------------------------------
1112 
1114 {
1115  public:
1117  { return new AllMembersListContext; }
1119  { return new AllMembersListContext(ml); }
1120 
1121  // TemplateListIntf
1122  virtual int count() const;
1123  virtual TemplateVariant at(int index) const;
1124  virtual TemplateListIntf::ConstIterator *createIterator() const;
1125  virtual int addRef() { return RefCountedContext::addRef(); }
1126  virtual int release() { return RefCountedContext::release(); }
1127 
1128  private:
1132  class Private;
1133  Private *p;
1134 };
1135 
1136 //----------------------------------------------------
1137 
1139 {
1140  public:
1141  static ArgumentContext *alloc(const Argument *arg,Definition *def,const QCString &relPath)
1142  { return new ArgumentContext(arg,def,relPath); }
1143 
1144  // TemplateStructIntf methods
1145  virtual TemplateVariant get(const char *name) const;
1146  virtual int addRef() { return RefCountedContext::addRef(); }
1147  virtual int release() { return RefCountedContext::release(); }
1148 
1149  private:
1150  ArgumentContext(const Argument *arg,Definition *def,const QCString &relPath);
1151  ~ArgumentContext();
1152  class Private;
1153  Private *p;
1154 };
1155 
1156 //----------------------------------------------------
1157 
1159 {
1160  public:
1162  static ArgumentListContext *alloc(const ArgumentList *al,Definition *def,const QCString &relPath)
1163  { return new ArgumentListContext(al,def,relPath); }
1164 
1165  // TemplateListIntf
1166  virtual int count() const;
1167  virtual TemplateVariant at(int index) const;
1168  virtual TemplateListIntf::ConstIterator *createIterator() const;
1169  virtual int addRef() { return RefCountedContext::addRef(); }
1170  virtual int release() { return RefCountedContext::release(); }
1171 
1172  private:
1174  ArgumentListContext(const ArgumentList *al,Definition *def,const QCString &relPath);
1176  class Private;
1177  Private *p;
1178 };
1179 
1180 //----------------------------------------------------
1181 
1183 {
1184  public:
1185  static SymbolContext *alloc(const Definition *def,const Definition *prev,const Definition *next)
1186  { return new SymbolContext(def,prev,next); }
1187 
1188  // TemplateStructIntf methods
1189  virtual TemplateVariant get(const char *name) const;
1190  virtual int addRef() { return RefCountedContext::addRef(); }
1191  virtual int release() { return RefCountedContext::release(); }
1192 
1193  private:
1194  SymbolContext(const Definition *def,const Definition *prev,const Definition *next);
1195  ~SymbolContext();
1196  class Private;
1197  Private *p;
1198 };
1199 
1200 //----------------------------------------------------
1201 
1203 {
1204  public:
1206  { return new SymbolListContext(sdl); }
1207 
1208  // TemplateListIntf
1209  virtual int count() const;
1210  virtual TemplateVariant at(int index) const;
1211  virtual TemplateListIntf::ConstIterator *createIterator() const;
1212  virtual int addRef() { return RefCountedContext::addRef(); }
1213  virtual int release() { return RefCountedContext::release(); }
1214 
1215  private:
1217  ~SymbolListContext();
1218  class Private;
1219  Private *p;
1220 };
1221 
1222 //----------------------------------------------------
1223 
1225 {
1226  public:
1228  { return new SymbolGroupContext(sdl); }
1229 
1230  // TemplateStructIntf methods
1231  virtual TemplateVariant get(const char *name) const;
1232  virtual int addRef() { return RefCountedContext::addRef(); }
1233  virtual int release() { return RefCountedContext::release(); }
1234 
1235  private:
1237  ~SymbolGroupContext();
1238  class Private;
1239  Private *p;
1240 };
1241 
1242 //----------------------------------------------------
1243 
1245 {
1246  public:
1248  { return new SymbolGroupListContext(sil); }
1249 
1250  // TemplateListIntf
1251  virtual int count() const;
1252  virtual TemplateVariant at(int index) const;
1253  virtual TemplateListIntf::ConstIterator *createIterator() const;
1254  virtual int addRef() { return RefCountedContext::addRef(); }
1255  virtual int release() { return RefCountedContext::release(); }
1256 
1257  private:
1260  class Private;
1261  Private *p;
1262 };
1263 
1264 //----------------------------------------------------
1265 
1267 {
1268  public:
1270  { return new SymbolIndexContext(sl,name); }
1271 
1272  // TemplateStructIntf methods
1273  virtual TemplateVariant get(const char *name) const;
1274  virtual int addRef() { return RefCountedContext::addRef(); }
1275  virtual int release() { return RefCountedContext::release(); }
1276 
1277  private:
1278  SymbolIndexContext(const SearchIndexList *sl,const QCString &name);
1279  ~SymbolIndexContext();
1280  class Private;
1281  Private *p;
1282 };
1283 
1284 //----------------------------------------------------
1285 
1287 {
1288  public:
1290  { return new SymbolIndicesContext(info); }
1291 
1292  // TemplateListIntf
1293  virtual int count() const;
1294  virtual TemplateVariant at(int index) const;
1295  virtual TemplateListIntf::ConstIterator *createIterator() const;
1296  virtual int addRef() { return RefCountedContext::addRef(); }
1297  virtual int release() { return RefCountedContext::release(); }
1298 
1299  private:
1302  class Private;
1303  Private *p;
1304 };
1305 
1306 //----------------------------------------------------
1307 
1309 {
1310  public:
1312  { return new SearchIndexContext(info); }
1313 
1314  // TemplateStructIntf methods
1315  virtual TemplateVariant get(const char *name) const;
1316  virtual int addRef() { return RefCountedContext::addRef(); }
1317  virtual int release() { return RefCountedContext::release(); }
1318 
1319  private:
1321  ~SearchIndexContext();
1322  class Private;
1323  Private *p;
1324 };
1325 
1326 //----------------------------------------------------
1327 
1329 {
1330  public:
1332 
1333  // TemplateListIntf
1334  virtual int count() const;
1335  virtual TemplateVariant at(int index) const;
1336  virtual TemplateListIntf::ConstIterator *createIterator() const;
1337  virtual int addRef() { return RefCountedContext::addRef(); }
1338  virtual int release() { return RefCountedContext::release(); }
1339 
1340  private:
1343  class Private;
1344  Private *p;
1345 };
1346 
1347 //----------------------------------------------------
1348 
1350 
1351 #endif
static QCString name
Definition: declinfo.cpp:673
Private * p
Definition: context.h:766
virtual int release()
Definition: context.h:758
Private * p
Definition: context.h:806
virtual int addRef()
Definition: context.h:415
static SymbolIndexContext * alloc(const SearchIndexList *sl, const QCString &name)
Definition: context.h:1269
virtual int addRef()
Definition: context.h:435
virtual int addRef()
Definition: context.h:195
virtual int addRef()
Definition: context.h:155
This class represents an function or template argument list.
Definition: arguments.h:82
This file contains a number of basic enums and types.
virtual int addRef()
Definition: context.h:1038
virtual int addRef()
Definition: context.h:717
static ExampleTreeContext * alloc()
Definition: context.h:816
static PageContext * alloc(PageDef *pd, bool isMainPage, bool isExample)
Definition: context.h:332
static FileContext * alloc(FileDef *fd)
Definition: context.h:294
static NavPathElemContext * alloc(Definition *def)
Definition: context.h:892
static NestingContext * alloc(const NestingNodeContext *parent, int level)
Definition: context.h:536
static NamespaceContext * alloc(NamespaceDef *nd)
Definition: context.h:275
Private * p
Definition: context.h:304
virtual int addRef()
Definition: context.h:279
virtual int addRef()
Definition: context.h:1169
virtual int addRef()
Definition: context.h:1254
virtual int addRef()
Definition: context.h:355
static MemberListContext * alloc(const MemberList *ml)
Definition: context.h:956
virtual int release()
Definition: context.h:676
virtual int addRef()
Definition: context.h:614
virtual int release()
Definition: context.h:356
virtual ~RefCountedContext()
Definition: context.h:110
virtual int addRef()
Definition: context.h:497
virtual int release()
Definition: context.h:657
virtual int addRef()
Definition: context.h:260
static InheritanceGraphContext * alloc(DotGfxHierarchyTable *hierarchy, DotNode *n, int id)
Definition: context.h:430
virtual int release()
Definition: context.h:1170
virtual int addRef()
Definition: context.h:1013
virtual int release()
Definition: context.h:376
static InheritedMemberInfoContext * alloc(ClassDef *cd, MemberList *ml, const QCString &title)
Definition: context.h:1074
static PageListContext * alloc(const PageSDict *pages)
Definition: context.h:690
Definition: dot.h:60
static ArgumentListContext * alloc(const ArgumentList *al, Definition *def, const QCString &relPath)
Definition: context.h:1162
static ClassInheritanceNodeContext * alloc(ClassDef *cd)
Definition: context.h:450
Private * p
Definition: context.h:723
Private * p
Definition: context.h:704
const bool FALSE
Definition: qglobal.h:370
Definition: types.h:26
virtual int addRef()
Definition: context.h:1232
void generateOutputViaTemplate()
Definition: context.cpp:10068
virtual int addRef()
Definition: context.h:696
RefCountedContext(const char *)
Definition: context.h:109
virtual int addRef()
Definition: context.h:896
virtual int addRef()
Definition: context.h:675
virtual int addRef()
Definition: context.h:800
static AllMembersListContext * alloc(const MemberNameInfoSDict *ml)
Definition: context.h:1118
static ClassHierarchyContext * alloc()
Definition: context.h:493
virtual int release()
Definition: context.h:337
static ModuleNodeContext * alloc(GroupDef *gd)
Definition: context.h:732
static QCString className
Definition: declinfo.cpp:669
virtual int release()
Definition: context.h:1014
static MemberGroupListContext * alloc(Definition *def, const QCString &relPath, const MemberGroupSDict *dict, bool subGrouping)
Definition: context.h:1006
virtual int release()
Definition: context.h:156
virtual int addRef()
Definition: context.h:455
virtual int release()
Definition: context.h:1191
Private * p
Definition: context.h:142
virtual int addRef()
Definition: context.h:1190
Abstract interface for a context value of type struct.
Definition: template.h:406
virtual int release()
Definition: context.h:137
virtual int addRef()
Definition: context.h:1146
static PageTreeContext * alloc(const PageSDict *pages)
Definition: context.h:713
Private * p
Definition: context.h:580
static SymbolContext * alloc(const Definition *def, const Definition *prev, const Definition *next)
Definition: context.h:1185
static InheritanceListContext * alloc(const BaseClassList *list, bool baseClasses)
Definition: context.h:932
static ConfigContext * alloc()
Definition: context.h:132
Private * p
Definition: context.h:826
static constexpr double mg
Definition: Units.h:145
SrcLangExt
Definition: types.h:41
Private * p
Definition: context.h:1152
virtual int release()
Definition: context.h:1039
virtual int addRef()
Definition: context.h:478
static NamespaceListContext * alloc()
Definition: context.h:589
virtual int addRef()
Definition: context.h:779
static SymbolListContext * alloc(const SearchDefinitionList *sdl)
Definition: context.h:1205
virtual int release()
Definition: context.h:196
Private * p
Definition: context.h:1196
static ModuleTreeContext * alloc()
Definition: context.h:775
static MemberListInfoContext * alloc(Definition *def, const QCString &relPath, const MemberList *ml, const QCString &title, const QCString &subtitle=QCString())
Definition: context.h:1031
static DoxygenContext * alloc()
Definition: context.h:151
static MemberListContext * alloc(MemberSDict *ml, bool doSort)
Definition: context.h:958
virtual int addRef()
Definition: context.h:240
static SymbolGroupListContext * alloc(const SearchIndexList *sil)
Definition: context.h:1247
static DirContext * alloc(DirDef *dd)
Definition: context.h:312
virtual int addRef()
Definition: context.h:736
Private * p
Definition: context.h:902
Private * p
Definition: context.h:785
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
virtual int release()
Definition: context.h:436
virtual int addRef()
Definition: context.h:595
virtual int release()
Definition: context.h:615
virtual int addRef()
Definition: context.h:396
Private * p
Definition: context.h:204
virtual int addRef()
Definition: context.h:174
Definition: dirdef.h:37
virtual int addRef()
Definition: context.h:543
virtual int addRef()
Definition: context.h:1316
static NestingNodeContext * alloc(const NestingNodeContext *parent, Definition *def, int index, int level, bool addClasses, bool inherit, bool hideSuper)
Definition: context.h:512
static MemberListContext * alloc()
Definition: context.h:954
static ArgumentListContext * alloc()
Definition: context.h:1161
Private * p
Definition: context.h:662
virtual int addRef()
Definition: context.h:298
Private * p
Definition: context.h:421
std::void_t< T > n
virtual int release()
Definition: context.h:175
virtual int addRef()
Definition: context.h:218
Private * p
Definition: context.h:224
virtual int addRef()
Definition: context.h:965
virtual int release()
Definition: context.h:840
static AllMembersListContext * alloc()
Definition: context.h:1116
static FileListContext * alloc()
Definition: context.h:650
static TranslateContext * alloc()
Definition: context.h:170
Abstract interface for a iterator of a list.
Definition: template.h:333
static ArgumentContext * alloc(const Argument *arg, Definition *def, const QCString &relPath)
Definition: context.h:1141
static UsedFilesContext * alloc(ClassDef *cd)
Definition: context.h:189
Definition: dirdef.h:44
Private * p
Definition: context.h:361
virtual int addRef()
Definition: context.h:336
static ExampleListContext * alloc()
Definition: context.h:794
virtual int release()
Definition: context.h:596
virtual int release()
Definition: context.h:636
virtual int addRef()
Definition: context.h:574
static InheritanceNodeContext * alloc(ClassDef *cd, const QCString &name)
Definition: context.h:912
Private * p
Definition: context.h:285
Private * p
Definition: context.h:1218
static ModuleListContext * alloc()
Definition: context.h:751
virtual int release()
Definition: context.h:859
static MemberInfoContext * alloc(const MemberInfo *mi)
Definition: context.h:1055
static ModuleContext * alloc(GroupDef *gd)
Definition: context.h:371
static ClassInheritanceContext * alloc()
Definition: context.h:472
Private * p
Definition: context.h:161
virtual int addRef()
Definition: context.h:656
virtual int release()
Definition: context.h:299
virtual int addRef()
Definition: context.h:987
virtual int release()
Definition: context.h:1080
virtual int release()
Definition: context.h:918
static GlobalsIndexContext * alloc()
Definition: context.h:835
virtual int release()
Definition: context.h:521
static NamespaceTreeContext * alloc()
Definition: context.h:610
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
virtual int addRef()
Definition: context.h:1337
static SearchIndexContext * alloc(const SearchIndexInfo *info)
Definition: context.h:1311
virtual int release()
Definition: context.h:219
static MemberGroupInfoContext * alloc(Definition *def, const QCString &relPath, const MemberGroup *mg)
Definition: context.h:982
Private * p
Definition: context.h:681
virtual int release()
Definition: context.h:397
virtual int addRef()
Definition: context.h:1274
static SearchIndicesContext * alloc()
Definition: context.h:1331
virtual int release()
Definition: context.h:1126
virtual int addRef()
Definition: context.h:917
virtual int release()
Definition: context.h:261
virtual int release()
Definition: context.h:988
virtual int addRef()
Definition: context.h:820
virtual int release()
Definition: context.h:479
virtual int release()
Definition: context.h:456
static IncludeInfoContext * alloc(const IncludeInfo *info, SrcLangExt lang)
Definition: context.h:213
virtual int release()
Definition: context.h:821
Private * p
Definition: context.h:381
virtual int release()
Definition: context.h:1255
static SymbolGroupContext * alloc(const SearchDefinitionList *sdl)
Definition: context.h:1227
virtual int release()
Definition: context.h:317
virtual int release()
Definition: context.h:1060
A model of a page symbol.
Definition: pagedef.h:29
static MemberGroupListContext * alloc(Definition *def, const QCString &relPath, const MemberGroupList *list)
Definition: context.h:1004
static MemberGroupListContext * alloc()
Definition: context.h:1002
virtual int release()
Definition: context.h:897
virtual int addRef()
Definition: context.h:1059
virtual int addRef()
Definition: context.h:858
virtual int release()
Definition: context.h:718
static IncludeInfoListContext * alloc(const QList< IncludeInfo > &list, SrcLangExt lang)
Definition: context.h:233
virtual int release()
Definition: context.h:1338
Private * p
Definition: context.h:973
static ClassMembersIndexContext * alloc()
Definition: context.h:854
static ClassTreeContext * alloc()
Definition: context.h:570
Private * p
Definition: context.h:641
Private * p
Definition: context.h:322
Private * p
Definition: context.h:266
virtual int release()
Definition: context.h:697
Private * p
Definition: context.h:402
virtual int release()
Definition: context.h:801
Private * p
Definition: context.h:1065
static DirListContext * alloc()
Definition: context.h:629
static SymbolIndicesContext * alloc(const SearchIndexInfo *info)
Definition: context.h:1289
virtual int addRef()
Definition: context.h:520
MemberListType
Definition: types.h:104
virtual int addRef()
Definition: context.h:136
virtual int addRef()
Definition: context.h:1296
Private * p
Definition: context.h:742
virtual int release()
Definition: context.h:966
virtual int release()
Definition: context.h:280
virtual int addRef()
Definition: context.h:1079
virtual int release()
Definition: context.h:498
Helper class to support reference counting.
Definition: context.h:106
Private * p
Definition: context.h:342
static ClassIndexContext * alloc()
Definition: context.h:411
Private * p
Definition: context.h:527
virtual int release()
Definition: context.h:1213
virtual int addRef()
Definition: context.h:839
virtual int addRef()
Definition: context.h:635
Abstract read-only interface for a context value of type list.
Definition: template.h:329
virtual int addRef()
Definition: context.h:939
static MemberContext * alloc(MemberDef *md)
Definition: context.h:351
virtual int release()
Definition: context.h:416
virtual int release()
Definition: context.h:1275
virtual int release()
Definition: context.h:1233
virtual int addRef()
Definition: context.h:757
virtual int release()
Definition: context.h:241
static ClassListContext * alloc()
Definition: context.h:390
virtual int release()
Definition: context.h:940
static NamespaceMembersIndexContext * alloc()
Definition: context.h:873
virtual int release()
Definition: context.h:1147
virtual int release()
Definition: context.h:575
static FileTreeContext * alloc()
Definition: context.h:671
virtual int addRef()
Definition: context.h:375
virtual int release()
Definition: context.h:780
def parent(G, child, parent_type)
Definition: graph.py:67
const bool TRUE
Definition: qglobal.h:371
virtual int release()
Definition: context.h:1317
Private * p
Definition: context.h:561
Private * p
Definition: context.h:180
virtual int addRef()
Definition: context.h:1212
static InheritedMemberInfoListContext * alloc()
Definition: context.h:1094
virtual int addRef()
Definition: context.h:316
virtual int release()
Definition: context.h:1297
static ClassContext * alloc(ClassDef *cd)
Definition: context.h:256
virtual int addRef()
Definition: context.h:1125
virtual int release()
Definition: context.h:737
virtual int release()
Definition: context.h:544