context.cpp
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 #include <assert.h>
17 #include <qdir.h>
18 
19 #include "context.h"
20 #include "config.h"
21 #include "index.h"
22 #include "classlist.h"
23 #include "doxygen.h"
24 #include "namespacedef.h"
25 #include "filedef.h"
26 #include "pagedef.h"
27 #include "groupdef.h"
28 #include "util.h"
29 #include "version.h"
30 #include "language.h"
31 #include "message.h"
32 #include "vhdldocgen.h"
33 #include "filename.h"
34 #include "dirdef.h"
35 #include "docparser.h"
36 #include "htmlgen.h"
37 #include "htmldocvisitor.h"
38 #include "latexgen.h"
39 #include "latexdocvisitor.h"
40 #include "dot.h"
41 #include "diagram.h"
42 #include "example.h"
43 #include "membername.h"
44 #include "parserintf.h"
45 #include "portable.h"
46 #include "arguments.h"
47 #include "groupdef.h"
48 #include "searchindex.h"
49 
50 // TODO: pass the current file to Dot*::writeGraph, so the user can put dot graphs in other
51 // files as well
52 
53 #define ADD_PROPERTY(name) addProperty(#name,this,&Private::name);
54 
56 {
65 };
66 
68 {
72 } g_globals;
73 
74 /** @brief Scoped smart pointer */
75 template<class T> class ScopedPtr
76 {
77  private:
78  T *m_ptr;
79  ScopedPtr(const ScopedPtr &);
80  ScopedPtr &operator=(const ScopedPtr &);
81  void operator==(const ScopedPtr &) const;
82  void operator!=(const ScopedPtr &) const;
83 
84  public:
85  typedef T Type;
86  explicit ScopedPtr(T *p=0) : m_ptr(p) {}
87  ~ScopedPtr() { delete m_ptr; };
88  T &operator*() const { return *m_ptr; }
89  T *operator->() const { return m_ptr; }
90  T *get() const { return m_ptr; }
91  operator bool() const { return m_ptr!=0; }
92  void reset(T *p=0) { if (p!=m_ptr) { delete m_ptr; m_ptr = p; } }
93 };
94 
95 /** @brief Reference counting smart pointer */
96 template<class T> class SharedPtr
97 {
98  private:
99  T *m_ptr;
100  SharedPtr(const SharedPtr &);
101  SharedPtr &operator=(const SharedPtr &p);
102  void operator==(const SharedPtr &) const;
103  void operator!=(const SharedPtr &) const;
104 
105  public:
106  typedef T Type;
107  explicit SharedPtr(T *p=0) : m_ptr(p) { if (m_ptr) m_ptr->addRef(); }
108  ~SharedPtr() { if (m_ptr) m_ptr->release(); };
109  T &operator*() const { return *m_ptr; }
110  T *operator->() const { return m_ptr; }
111  T *get() const { return m_ptr; }
112  operator bool() const { return m_ptr!=0; }
113  void reset(T *p=0)
114  {
115  if (p) p->addRef();
116  if (m_ptr) m_ptr->release();
117  m_ptr = p;
118  }
119 };
120 
121 /** @brief Template List iterator support */
123 {
124  public:
126  : m_it(list) { }
128  void toFirst()
129  {
130  m_it.toFirst();
131  }
132  void toLast()
133  {
134  m_it.toLast();
135  }
136  void toNext()
137  {
138  if (m_it.current()) ++m_it;
139  }
140  void toPrev()
141  {
142  if (m_it.current()) --m_it;
143  }
144  bool current(TemplateVariant &v) const
145  {
146  if (m_it.current())
147  {
148  v = *m_it.current();
149  return TRUE;
150  }
151  else
152  {
153  v = TemplateVariant();
154  return FALSE;
155  }
156  }
157  private:
159 };
160 
161 //------------------------------------------------------------------------
162 
163 /** @brief standard template list implementation */
165 {
166  public:
167  GenericNodeListContext() : m_refCount(0)
168  {
169  m_children.setAutoDelete(TRUE);
170  }
172  {
173  return new GenericNodeListContext;
174  }
175 
176  // TemplateListIntf methods
177  int count() const
178  {
179  return (int)m_children.count();
180  }
182  {
184  if (index>=0 && index<count())
185  {
186  result = *m_children.at(index);
187  }
188  return result;
189  }
191  {
192  return new GenericConstIterator(m_children);
193  }
194 
195  void append(const TemplateVariant &ctn)
196  {
197  m_children.append(new TemplateVariant(ctn));
198  }
199  bool isEmpty() const
200  {
201  return m_children.isEmpty();
202  }
203  int addRef()
204  {
205  return ++m_refCount;
206  }
207  int release()
208  {
209  int count = --m_refCount;
210  if (count<=0)
211  {
212  delete this;
213  }
214  return count;
215  }
216  private:
219 };
220 
221 //------------------------------------------------------------------------
222 
223 /** @brief Helper class to map a property name to a handler member function */
224 template<typename T>
226 {
227  private:
229  {
230  virtual ~PropertyFuncIntf() {}
231  virtual TemplateVariant operator()(const T *obj) const = 0;
232  };
234  {
235  typedef TemplateVariant (T::*Handler)() const;
236  PropertyFunc(Handler h) : handler(h) {}
237  TemplateVariant operator()(const T *obj) const
238  {
239  return (obj->*handler)();
240  }
241  Handler handler;
242  };
243 
244  public:
245  PropertyMapper() : m_map(63) { m_map.setAutoDelete(TRUE); }
246 
247  /** Add a property to the map
248  * @param[in] name The name of the property to add.
249  * @param[in] obj The object handling access to the property.
250  * @param[in] handle The method to call when the property is accessed.
251  */
252  void addProperty(const char *name,typename PropertyFunc::Handler handle)
253  {
254  if (m_map.find(name))
255  {
256  err("Error: adding property '%s' more than once",name);
257  }
258  else
259  {
260  m_map.insert(name,new PropertyFunc(handle));
261  }
262  }
263 
264  /** Gets the value of a property.
265  * @param[in] name The name of the property.
266  * @returns A variant representing the properties value or an
267  * invalid variant if it was not found.
268  */
269  TemplateVariant get(const T *obj,const char *name) const
270  {
271  //printf("PropertyMapper::get(%s)\n",name);
273  PropertyFuncIntf *func = m_map.find(name);
274  if (func)
275  {
276  result = (*func)(obj);
277  }
278  return result;
279  }
280 
281  private:
282  QDict<PropertyFuncIntf> m_map;
283 };
284 
285 
286 //------------------------------------------------------------------------
287 
288 //%% struct Config : configuration options
289 //%% {
291 {
292  public:
293  Private() { m_cachedLists.setAutoDelete(TRUE); }
294  virtual ~Private() { }
296  {
297  TemplateVariant *v = m_cachedLists.find(name);
298  if (v==0)
299  {
301  m_cachedLists.insert(name,new TemplateVariant(tlist));
302  QStrListIterator li(*list);
303  char *s;
304  for (li.toFirst();(s=li.current());++li)
305  {
306  tlist->append(s);
307  }
308  return tlist;
309  }
310  else
311  {
312  return *v;
313  }
314  }
315  private:
316  QDict<TemplateVariant> m_cachedLists;
317 };
318 //%% }
319 
321 {
322  p = new Private;
323 }
324 
326 {
327  delete p;
328 }
329 
331 {
333  if (name)
334  {
335  ConfigOption *option = Config::instance()->get(name);
336  if (option)
337  {
338  switch (option->kind())
339  {
341  return TemplateVariant(*((ConfigBool*)option)->valueRef());
342  case ConfigOption::O_Int:
343  return TemplateVariant(*((ConfigInt*)option)->valueRef());
345  return TemplateVariant(*((ConfigEnum*)option)->valueRef());
347  return TemplateVariant(*((ConfigString*)option)->valueRef());
349  return p->fetchList(name,((ConfigList*)option)->valueRef());
350  break;
351  default:
352  break;
353  }
354  }
355  }
356  return result;
357 }
358 
359 //------------------------------------------------------------------------
360 
361 //%% struct Doxygen: global information
362 //%% {
364 {
365  public:
367  {
368  return versionString;
369  }
371  {
372  return dateToString(TRUE);
373  }
375  {
376  return m_cache.maxJaxCodeFile;
377  }
379  {
380  static bool init=FALSE;
381  if (!init)
382  {
383  //%% string version
384  s_inst.addProperty("version", &Private::version);
385  //%% string date
386  s_inst.addProperty("date", &Private::date);
387  //%% string maxJaxCodeFile
388  s_inst.addProperty("mathJaxCodeFile", &Private::maxJaxCodeFile);
389  init=TRUE;
390  }
391  }
392  TemplateVariant get(const char *n) const
393  {
394  return s_inst.get(this,n);
395  }
396  private:
397  struct Cachable
398  {
399  Cachable() { maxJaxCodeFile=fileToString(Config_getString("MATHJAX_CODEFILE")); }
401  };
402  mutable Cachable m_cache;
404 };
405 //%% }
406 
408 // (PropertyMapper<DoxygenContext::Private>::instance());
409 
411 {
412  p = new Private;
413 }
414 
416 {
417  delete p;
418 }
419 
421 {
422  return p->get(n);
423 }
424 
425 //------------------------------------------------------------------------
426 
427 //%% struct Translator: translation methods
428 //%% {
430 {
431  public:
432 
434  {
435  if (args.count()==2)
436  {
437  return theTranslator->trGeneratedAt(args[0].toString(),args[1].toString());
438  }
439  else
440  {
441  err("tr.generateAt should take two arguments, got %d!\n",args.count());
442  }
443  return TemplateVariant();
444  }
446  {
447  if (args.count()==1)
448  {
449  return theTranslator->trClassDiagram(args[0].toString());
450  }
451  else
452  {
453  err("tr.inheritanceDiagramFor should take one argument, got %d!\n",args.count());
454  }
455  return TemplateVariant();
456  }
458  {
459  if (args.count()==1)
460  {
461  return theTranslator->trCollaborationDiagram(args[0].toString());
462  }
463  else
464  {
465  err("tr.collaborationDiagramFor should take one argument, got %d!\n",args.count());
466  }
467  return TemplateVariant();
468  }
470  {
471  if (args.count()==1)
472  {
473  return theTranslator->trDirDepGraph(args[0].toString());
474  }
475  else
476  {
477  err("tr.dirDependencyGraphFor should take one argument, got %d!\n",args.count());
478  }
479  return TemplateVariant();
480  }
482  {
483  if (args.count()==1)
484  {
485  return theTranslator->trInheritsList(args[0].toInt());
486  }
487  else
488  {
489  err("tr.inheritsList should take one integer argument, got %d!\n",args.count());
490  }
491  return TemplateVariant();
492  }
494  {
495  if (args.count()==1)
496  {
497  return theTranslator->trInheritedByList(args[0].toInt());
498  }
499  else
500  {
501  err("tr.inheritedByList should take one integer argument, got %d!\n",args.count());
502  }
503  return TemplateVariant();
504  }
506  {
507  if (args.count()==1)
508  {
509  return theTranslator->trWriteList(args[0].toInt());
510  }
511  else
512  {
513  err("tr.*List should take one integer argument, got %d!\n",args.count());
514  }
515  return TemplateVariant();
516  }
518  {
519  if (args.count()==1)
520  {
521  return theTranslator->trImplementedInList(args[0].toInt());
522  }
523  else
524  {
525  err("tr.implementedBy should take one integer argument, got %d!\n",args.count());
526  }
527  return TemplateVariant();
528  }
530  {
531  if (args.count()==1)
532  {
533  return theTranslator->trReimplementedInList(args[0].toInt());
534  }
535  else
536  {
537  err("tr.reimplementedBy should take one integer argument, got %d!\n",args.count());
538  }
539  return TemplateVariant();
540  }
542  {
543  if (args.count()==1)
544  {
545  return theTranslator->trReferences()+" "+theTranslator->trWriteList(args[0].toInt())+".";
546  }
547  else
548  {
549  err("tr.sourceRefs should take one integer argument, got %d\n",args.count());
550  }
551  return TemplateVariant();
552  }
554  {
555  if (args.count()==1)
556  {
557  return theTranslator->trReferencedBy()+" "+theTranslator->trWriteList(args[0].toInt())+".";
558  }
559  else
560  {
561  err("tr.sourceRefBys should take one integer argument, got %d\n",args.count());
562  }
563  return TemplateVariant();
564  }
566  {
567  if (args.count()==1)
568  {
569  return theTranslator->trInclDepGraph(args[0].toString());
570  }
571  else
572  {
573  err("tr.includeDependencyGraph should take one string argument, got %d\n",args.count());
574  }
575  return TemplateVariant();
576  }
577 
578 
579 
581  {
582  return theTranslator->trGeneratedBy();
583  }
585  {
586  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleGeneratedAt>(this);
587  }
589  {
590  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleInheritanceDiagramFor>(this);
591  }
593  {
594  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleCollaborationDiagramFor>(this);
595  }
597  {
598  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleDirDependencyGraphFor>(this);
599  }
601  {
602  return theTranslator->trSearch();
603  }
605  {
606  return theTranslator->trMainPage();
607  }
609  {
610  return theTranslator->trClasses();
611  // TODO: VHDL: trVhdlType(VhdlDocGen::ENTITY,FALSE)
612  // TODO: Fortran: trDataTypes()
613  }
615  {
616  return theTranslator->trCompoundList();
617  }
619  {
621  }
623  {
624  return theTranslator->trCompoundIndex();
625  }
627  {
629  }
631  {
633  }
635  {
637  }
639  {
640  return theTranslator->trModules();
641  }
643  {
644  return theTranslator->trModuleIndex();
645  }
647  {
648  if (m_javaOpt || m_vhdlOpt)
649  {
650  return theTranslator->trPackages();
651  }
652  else if (m_fortranOpt)
653  {
654  return theTranslator->trModules();
655  }
656  else
657  {
658  return theTranslator->trNamespaces();
659  }
660  }
662  {
663  return theTranslator->trFile(TRUE,FALSE);
664  }
666  {
667  return theTranslator->trFileIndex();
668  }
670  {
671  return theTranslator->trRelatedPages();
672  }
674  {
675  return theTranslator->trExamples();
676  }
678  {
679  if (m_javaOpt || m_vhdlOpt)
680  {
681  return theTranslator->trPackages();
682  }
683  else if (m_fortranOpt)
684  {
685  return theTranslator->trModulesList();
686  }
687  else
688  {
689  return theTranslator->trNamespaceList();
690  }
691  }
693  {
694  if (m_javaOpt || m_vhdlOpt)
695  {
697  }
698  else if (m_fortranOpt)
699  {
701  }
702  else
703  {
705  }
706  }
708  {
710  }
712  {
714  }
716  {
717  return theTranslator->trFileList();
718  }
720  {
721  return theTranslator->trFileMembers();
722  }
724  {
725  static bool extractAll = Config_getBool("EXTRACT_ALL");
726  return theTranslator->trFileMembersDescription(extractAll);
727  }
729  {
730  static bool extractAll = Config_getBool("EXTRACT_ALL");
731  return theTranslator->trNamespaceMemberDescription(extractAll);
732  }
734  {
736  }
738  {
740  }
742  {
744  }
746  {
747  static bool extractAll = Config_getBool("EXTRACT_ALL");
748  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
749  if (fortranOpt)
750  {
752  }
753  else
754  {
755  return theTranslator->trCompoundMembersDescription(extractAll);
756  }
757  }
759  {
761  }
763  {
764  return theTranslator->trMore();
765  }
767  {
769  }
771  {
772  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleInheritsList>(this);
773  }
775  {
776  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleInheritedByList>(this);
777  }
779  {
781  }
783  {
785  }
787  {
788  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleWriteList>(this);
789  }
791  {
793  }
795  {
796  return theTranslator->trMemberList();
797  }
799  {
801  }
803  {
805  }
807  {
808  return theTranslator->trDefineValue();
809  }
811  {
812  return theTranslator->trInitialValue();
813  }
815  {
817  }
819  {
821  }
823  {
825  }
827  {
828  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleImplementedBy>(this);
829  }
831  {
832  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleReimplementedBy>(this);
833  }
835  {
836  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleSourceRefs>(this);
837  }
839  {
840  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleSourceRefBys>(this);
841  }
843  {
844  return theTranslator->trCallGraph();
845  }
847  {
848  return theTranslator->trCallerGraph();
849  }
851  {
852  return theTranslator->trInheritedFrom("@0","@1");
853  }
855  {
857  }
859  {
860  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleIncludeDependencyGraph>(this);
861  }
863  {
865  }
867  {
869  }
871  {
873  }
875  {
877  }
879  {
881  }
883  {
885  }
887  {
889  }
891  {
892  return theTranslator->trDetailLevel();
893  }
895  {
896  bool extractAll = Config_getBool("EXTRACT_ALL");
897  return theTranslator->trFileListDescription(extractAll);
898  }
900  {
901  bool extractAll = Config_getBool("EXTRACT_ALL");
902  return theTranslator->trModulesListDescription(extractAll);
903  }
905  {
906  bool extractAll = Config_getBool("EXTRACT_ALL");
907  return theTranslator->trNamespaceListDescription(extractAll);
908  }
910  {
911  return theTranslator->trDirectories();
912  }
914  {
915  return theTranslator->trAll();
916  }
918  {
919  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
920  static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
921  return fortranOpt ? theTranslator->trSubprograms() :
922  vhdlOpt ? VhdlDocGen::trFunctionAndProc() :
924  }
926  {
927  return theTranslator->trVariables();
928  }
930  {
931  return theTranslator->trTypedefs();
932  }
934  {
935  return theTranslator->trEnumerations();
936  }
938  {
939  return theTranslator->trProperties();
940  }
942  {
943  return theTranslator->trEvents();
944  }
946  {
948  }
950  {
951  return theTranslator->trDefines();
952  }
954  {
955  return theTranslator->trLoading();
956  }
958  {
959  return theTranslator->trSearching();
960  }
962  {
963  return theTranslator->trNoMatches();
964  }
966  {
967  return theTranslator->trEnumName();
968  }
970  {
971  return theTranslator->trEnumValue();
972  }
974  {
976  }
978  {
980  }
982  {
984  }
986  {
988  }
990  {
992  }
994  {
995  return theTranslator->trExtendsClass();
996  }
998  {
1000  }
1002  {
1003  static bool init=FALSE;
1004  if (!init)
1005  {
1006  //%% string generatedBy
1007  s_inst.addProperty("generatedBy", &Private::generatedBy);
1008  //%% string generatedAt
1009  s_inst.addProperty("generatedAt", &Private::generatedAt);
1010  //%% string search
1011  s_inst.addProperty("search", &Private::search);
1012  //%% string mainPage
1013  s_inst.addProperty("mainPage", &Private::mainPage);
1014  //%% string classes
1015  s_inst.addProperty("classes", &Private::classes);
1016  //%% string classList
1017  s_inst.addProperty("classList", &Private::classList);
1018  //%% string classListDescription
1019  s_inst.addProperty("classListDescription", &Private::classListDescription);
1020  //%% string classIndex
1021  s_inst.addProperty("classIndex", &Private::classIndex);
1022  //%% string namespaceIndex
1023  s_inst.addProperty("namespaceIndex", &Private::namespaceIndex);
1024  //%% string classHierarchy
1025  s_inst.addProperty("classHierarchy", &Private::classHierarchy);
1026  //%% string classMembers
1027  s_inst.addProperty("classMembers", &Private::classMembers);
1028  //%% string classMembersDescription
1029  s_inst.addProperty("classMembersDescription",&Private::classMembersDescription);
1030  //%% string modules
1031  s_inst.addProperty("modules", &Private::modules);
1032  //%% string moduleIndex
1033  s_inst.addProperty("moduleIndex", &Private::moduleIndex);
1034  //%% string namespaces
1035  s_inst.addProperty("namespaces", &Private::namespaces);
1036  //%% string fileIndex
1037  s_inst.addProperty("fileIndex", &Private::fileIndex);
1038  //%% string files
1039  s_inst.addProperty("files", &Private::files);
1040  //%% string pages
1041  s_inst.addProperty("pages", &Private::pages);
1042  //%% string examples
1043  s_inst.addProperty("examples", &Private::examples);
1044  //%% string namespaceList
1045  s_inst.addProperty("namespaceList", &Private::namespaceList);
1046  //%% string namespaceMembers
1047  s_inst.addProperty("namespaceMembers", &Private::namespaceMembers);
1048  //%% srting fileList
1049  s_inst.addProperty("fileList", &Private::fileList);
1050  //%% string fileMembers
1051  s_inst.addProperty("fileMembers", &Private::fileMembers);
1052  //%% string fileMembersDescription
1053  s_inst.addProperty("fileMembersDescription", &Private::fileMembersDescription);
1054  //%% string relatedPagesDescripiton
1055  s_inst.addProperty("relatedPagesDesc", &Private::relatedPagesDesc);
1056  //%% string more
1057  s_inst.addProperty("more", &Private::more);
1058  //%% string detailedDescription
1059  s_inst.addProperty("detailedDesc", &Private::detailedDesc);
1060  //%% string inheritanceDiagramFor
1061  s_inst.addProperty("inheritanceDiagramFor", &Private::inheritanceDiagramFor);
1062  //%% string collaborationDiagramFor
1063  s_inst.addProperty("collaborationDiagramFor", &Private::collaborationDiagramFor);
1064  //%% markerstring inheritsList
1065  s_inst.addProperty("inheritsList", &Private::inheritsList);
1066  //%% markerstring inheritedByList
1067  s_inst.addProperty("inheritedByList", &Private::inheritedByList);
1068  //%% markerstring definedAtLineInSourceFile
1069  s_inst.addProperty("definedAtLineInSourceFile", &Private::definedAtLineInSourceFile);
1070  //%% string typeConstraints
1071  s_inst.addProperty("typeConstraints", &Private::typeConstraints);
1072  //%% string exampleList
1073  s_inst.addProperty("exampleList", &Private::exampleList);
1074  //%% string listOfAllMembers
1075  s_inst.addProperty("listOfAllMembers", &Private::listOfAllMembers);
1076  //%% string memberList
1077  s_inst.addProperty("memberList", &Private::memberList);
1078  //%% string theListOfAllMembers
1079  s_inst.addProperty("theListOfAllMembers",&Private::theListOfAllMembers);
1080  //%% string incInheritedMembers
1081  s_inst.addProperty("incInheritedMembers",&Private::incInheritedMembers);
1082  //%% string defineValue
1083  s_inst.addProperty("defineValue", &Private::defineValue);
1084  //%% string initialValue
1085  s_inst.addProperty("initialValue", &Private::initialValue);
1086  //%% markerstring implements
1087  s_inst.addProperty("implements", &Private::implements);
1088  //%% markerstring reimplements
1089  s_inst.addProperty("reimplements", &Private::reimplements);
1090  //%% markerstring implementedBy
1091  s_inst.addProperty("implementedBy", &Private::implementedBy);
1092  //%% markerstring reimplementedBy
1093  s_inst.addProperty("reimplementedBy", &Private::reimplementedBy);
1094  //%% markerstring sourceRefs
1095  s_inst.addProperty("sourceRefs", &Private::sourceRefs);
1096  //%% markerstring sourceRefBys
1097  s_inst.addProperty("sourceRefBys", &Private::sourceRefBys);
1098  //%% string callGraph
1099  s_inst.addProperty("callGraph", &Private::callGraph);
1100  //%% string callerGraph
1101  s_inst.addProperty("callerGraph", &Private::callerGraph);
1102  //%% markerstring inheritedFrom
1103  s_inst.addProperty("inheritedFrom", &Private::inheritedFrom);
1104  //%% string addtionalInheritedMembers
1105  s_inst.addProperty("additionalInheritedMembers",&Private::additionalInheritedMembers);
1106  //%% string includeDependencyGraph:container_name
1107  s_inst.addProperty("includeDependencyGraph",&Private::includeDependencyGraph);
1108  //%% string includedByDependencyGraph
1109  s_inst.addProperty("includedByDependencyGraph",&Private::includedByDependencyGraph);
1110  //%% string gotoSourceCode
1111  s_inst.addProperty("gotoSourceCode", &Private::gotoSourceCode);
1112  //%% string gotoDocumentation
1113  s_inst.addProperty("gotoDocumentation", &Private::gotoDocumentation);
1114  //%% string constantgroups
1115  s_inst.addProperty("constantgroups", &Private::constantgroups);
1116  //%% string classDocumentation
1117  s_inst.addProperty("classDocumentation", &Private::classDocumentation);
1118  //%% string namespaceDocumentation
1119  s_inst.addProperty("namespaceDocumentation", &Private::namespaceDocumentation);
1120  //%% string moduleDocumentation
1121  s_inst.addProperty("moduleDocumentation",&Private::moduleDocumentation);
1122  //%% string fileDocumentation
1123  s_inst.addProperty("fileDocumentation", &Private::fileDocumentation);
1124  //%% string compoundMembers
1125  s_inst.addProperty("compoundMembers", &Private::compoundMembers);
1126  //%% string detailLevel
1127  s_inst.addProperty("detailLevel", &Private::detailLevel);
1128  //%% string fileListDescription
1129  s_inst.addProperty("fileListDescription",&Private::fileListDescription);
1130  //%% string namespaceListDescription
1131  s_inst.addProperty("namespaceListDescription",&Private::namespaceListDescription);
1132  //%% string directories
1133  s_inst.addProperty("directories", &Private::directories);
1134  //%% string moduleDescription
1135  s_inst.addProperty("modulesDescription", &Private::modulesDescription);
1136  //%% string all
1137  s_inst.addProperty("all", &Private::all);
1138  //%% string functions
1139  s_inst.addProperty("functions", &Private::functions);
1140  //%% string variables
1141  s_inst.addProperty("variables", &Private::variables);
1142  //%% string typedefs
1143  s_inst.addProperty("typedefs", &Private::typedefs);
1144  //%% string enums
1145  s_inst.addProperty("enums", &Private::enums);
1146  //%% string enumValues
1147  s_inst.addProperty("enumValues", &Private::enumerationValues);
1148  //%% string properties
1149  s_inst.addProperty("properties", &Private::properties);
1150  //%% string events
1151  s_inst.addProperty("events", &Private::events);
1152  //%% string related
1153  s_inst.addProperty("related", &Private::related);
1154  //%% string macros
1155  s_inst.addProperty("macros", &Private::macros);
1156  //%% string namespaceMembersDescription
1157  s_inst.addProperty("namespaceMembersDescription",&Private::namespaceMembersDescription);
1158  //%% string classHierarchyDescription
1159  s_inst.addProperty("classHierarchyDescription",&Private::classHierarchyDescription);
1160  //%% string gotoGraphicalHierarchy
1161  s_inst.addProperty("gotoGraphicalHierarchy",&Private::gotoGraphicalHierarchy);
1162  //%% string gotoTextualHierarchy
1163  s_inst.addProperty("gotoTextualHierarchy",&Private::gotoTextualHierarchy);
1164  //%% string loading
1165  s_inst.addProperty("loading", &Private::loading);
1166  //%% string searching
1167  s_inst.addProperty("searching", &Private::searching);
1168  //%% string noMatches
1169  s_inst.addProperty("noMatches", &Private::noMatches);
1170  //%% string enumValue
1171  s_inst.addProperty("enumValue", &Private::enumValue);
1172  //%% string enumName
1173  s_inst.addProperty("enumName", &Private::enumName);
1174  //%% string referenceManual
1175  s_inst.addProperty("referenceManual", &Private::referenceManual);
1176  //%% string index
1177  s_inst.addProperty("index", &Private::index);
1178  //%% string panelSyncOn
1179  s_inst.addProperty("panelSyncOn", &Private::panelSyncOn);
1180  //%% string panelSyncOff
1181  s_inst.addProperty("panelSyncOff", &Private::panelSyncOff);
1182  //%% string dirDependencyGraph
1183  s_inst.addProperty("dirDependencyGraphFor", &Private::dirDependencyGraphFor);
1184  //%% string providedByCategory
1185  s_inst.addProperty("providedByCategory", &Private::providedByCategory);
1186  //%% string extendsClass
1187  s_inst.addProperty("extendsClass", &Private::extendsClass);
1188  //%% string examplesDescription
1189  s_inst.addProperty("examplesDescription",&Private::examplesDescription);
1190 
1191  init=TRUE;
1192  }
1193 
1194  m_javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
1195  m_fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
1196  m_vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
1197  }
1198  TemplateVariant get(const char *n) const
1199  {
1200  return s_inst.get(this,n);
1201  }
1202  private:
1207 };
1208 //%% }
1209 
1211 
1213 {
1214  p = new Private;
1215 }
1216 
1218 {
1219  delete p;
1220 }
1221 
1223 {
1224  return p->get(n);
1225 }
1226 
1228  const QCString &relPath,const QCString &docStr,bool isBrief)
1229 {
1231  DocRoot *root = validatingParseDoc(file,line,def,0,docStr,TRUE,FALSE,0,isBrief,FALSE);
1232  QGString docs;
1233  {
1234  FTextStream ts(&docs);
1235  switch (g_globals.outputFormat)
1236  {
1238  {
1239  HtmlCodeGenerator codeGen(ts,relPath);
1240  HtmlDocVisitor visitor(ts,codeGen,def);
1241  root->accept(&visitor);
1242  }
1243  break;
1245  {
1246  LatexCodeGenerator codeGen(ts,relPath,file);
1247  LatexDocVisitor visitor(ts,codeGen,def->getDefFileExtension(),FALSE);
1248  root->accept(&visitor);
1249  }
1250  break;
1251  // TODO: support other generators
1252  default:
1253  err("context.cpp: output format not yet supported");
1254  break;
1255  }
1256  }
1257  bool isEmpty = root->isEmpty();
1258  if (isEmpty)
1259  result = "";
1260  else
1261  result = TemplateVariant(docs,TRUE);
1262  delete root;
1263  return result;
1264 }
1265 
1266 static TemplateVariant parseCode(MemberDef *md,const QCString &scopeName,const QCString &relPath,
1267  const QCString &code,int startLine=-1,int endLine=-1,bool showLineNumbers=FALSE)
1268 {
1270  pIntf->resetCodeParserState();
1271  QGString s;
1272  FTextStream t(&s);
1273  switch (g_globals.outputFormat)
1274  {
1276  {
1277  HtmlCodeGenerator codeGen(t,relPath);
1278  pIntf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
1279  startLine,endLine,TRUE,md,showLineNumbers,md);
1280  }
1281  break;
1283  {
1284  LatexCodeGenerator codeGen(t,relPath,md->docFile());
1285  pIntf->parseCode(codeGen,scopeName,code,md->getLanguage(),FALSE,0,md->getBodyDef(),
1286  startLine,endLine,TRUE,md,showLineNumbers,md);
1287  }
1288  break;
1289  // TODO: support other generators
1290  default:
1291  err("context.cpp: output format not yet supported");
1292  break;
1293  }
1294  return TemplateVariant(s.data(),TRUE);
1295 }
1296 
1297 static TemplateVariant parseCode(FileDef *fd,const QCString &relPath)
1298 {
1299  static bool filterSourceFiles = Config_getBool("FILTER_SOURCE_FILES");
1301  pIntf->resetCodeParserState();
1302  QGString s;
1303  FTextStream t(&s);
1304  switch (g_globals.outputFormat)
1305  {
1307  {
1308  HtmlCodeGenerator codeGen(t,relPath);
1309  pIntf->parseCode(codeGen,0,
1310  fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
1311  fd->getLanguage(), // lang
1312  FALSE, // isExampleBlock
1313  0, // exampleName
1314  fd, // fileDef
1315  -1, // startLine
1316  -1, // endLine
1317  FALSE, // inlineFragment
1318  0, // memberDef
1319  TRUE, // showLineNumbers
1320  0, // searchCtx
1321  TRUE // collectXRefs, TODO: should become FALSE
1322  );
1323  }
1324  break;
1326  {
1327  LatexCodeGenerator codeGen(t,relPath,fd->docFile());
1328  pIntf->parseCode(codeGen,0,
1329  fileToString(fd->absFilePath(),filterSourceFiles,TRUE), // the sources
1330  fd->getLanguage(), // lang
1331  FALSE, // isExampleBlock
1332  0, // exampleName
1333  fd, // fileDef
1334  -1, // startLine
1335  -1, // endLine
1336  FALSE, // inlineFragment
1337  0, // memberDef
1338  TRUE, // showLineNumbers
1339  0, // searchCtx
1340  TRUE // collectXRefs, TODO: should become FALSE
1341  );
1342  }
1343  break;
1344  // TODO: support other generators
1345  default:
1346  err("context.cpp: output format not yet supported");
1347  break;
1348  }
1349  return TemplateVariant(s.data(),TRUE);
1350 }
1351 
1352 //------------------------------------------------------------------------
1353 
1354 //%% struct Symbol: shared info for all symbols
1355 //%% {
1356 template<typename T>
1358 {
1359  public:
1361  {
1362  assert(d!=0);
1363  }
1365  {
1366  //%% string name: the name of the symbol
1367  inst.addProperty("name",&DefinitionContext::name);
1368  //%% string bareName: the bare name of the symbol with scope info
1369  inst.addProperty("bareName",&DefinitionContext::bareName);
1370  //%% string relPath: the relative path to the root of the output (CREATE_SUBDIRS)
1371  inst.addProperty("relPath",&DefinitionContext::relPath);
1372  //%% string fileName: the file name of the output file associated with the symbol (without extension)
1373  inst.addProperty("fileName",&DefinitionContext::fileName);
1374  //%% string anchor: anchor within the page
1375  inst.addProperty("anchor",&DefinitionContext::anchor);
1376  //%% string details: the detailed documentation for this symbol
1377  inst.addProperty("details",&DefinitionContext::details);
1378  //%% string brief: the brief description for this symbol
1379  inst.addProperty("brief",&DefinitionContext::brief);
1380  //%% string inbodyDocs: the documentation found in the body
1381  inst.addProperty("inbodyDocs",&DefinitionContext::inbodyDocs);
1382  //%% string sourceFileName: the file name of the source file (without extension)
1383  inst.addProperty("sourceFileName",&DefinitionContext::sourceFileName);
1384  //%% bool isLinkable: can the symbol be linked to?
1385  inst.addProperty("isLinkable",&DefinitionContext::isLinkable);
1386  //%% bool isLinkableInProject: can the symbol be linked within this project?
1387  inst.addProperty("isLinkableInProject",&DefinitionContext::isLinkableInProject);
1388  //%% int dynSectionId: identifier that can be used for collapsable sections
1389  inst.addProperty("dynSectionId",&DefinitionContext::dynSectionId);
1390  //%% string language: the programming language in which the symbol is written
1391  inst.addProperty("language",&DefinitionContext::language);
1392  //%% string sourceDef: A link to the source definition
1393  inst.addProperty("sourceDef",&DefinitionContext::sourceDef);
1394  //%% list[Definition] navigationPath: Breadcrumb navigation path to this item
1395  inst.addProperty("navigationPath",&DefinitionContext::navigationPath);
1396  //%% string kind: Kind of compound object: class, namespace, module, package, page, dir
1397  inst.addProperty("compoundKind",&DefinitionContext::compoundKind);
1398  //%% bool isReference: is this definition imported via a tag file
1399  inst.addProperty("isReference",&DefinitionContext::isReference);
1400  //%% string externalReference: the link to the element in the remote documentation
1401  inst.addProperty("externalReference",&DefinitionContext::externalReference);
1402  }
1404  {
1405  return m_def->getOutputFileBase();
1406  }
1408  {
1409  return m_def->anchor();
1410  }
1412  {
1413  return m_def->getSourceFileBase();
1414  }
1416  {
1417  return m_def->isLinkable();
1418  }
1420  {
1421  return m_def->isLinkableInProject();
1422  }
1424  {
1425  return m_def->displayName(TRUE);
1426  }
1428  {
1429  return m_def->displayName(FALSE);
1430  }
1432  {
1433  static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
1434  return createSubdirs ? QCString("../../") : QCString("");
1435  }
1436  virtual TemplateVariant relPath() const
1437  {
1438  return relPathAsString();
1439  }
1441  {
1442  Cachable &cache = getCache();
1443  if (!cache.details || g_globals.outputFormat!=cache.detailsOutputFormat)
1444  {
1445  cache.details.reset(new TemplateVariant(parseDoc(m_def,m_def->docFile(),m_def->docLine(),
1446  relPathAsString(),m_def->documentation(),FALSE)));
1447  cache.detailsOutputFormat = g_globals.outputFormat;
1448  }
1449  return *cache.details;
1450  }
1452  {
1453  Cachable &cache = getCache();
1454  if (!cache.brief || g_globals.outputFormat!=cache.briefOutputFormat)
1455  {
1456  if (m_def->hasBriefDescription())
1457  {
1458  cache.brief.reset(new TemplateVariant(parseDoc(m_def,m_def->briefFile(),m_def->briefLine(),
1459  relPathAsString(),m_def->briefDescription(),TRUE)));
1460  cache.briefOutputFormat = g_globals.outputFormat;
1461  }
1462  else
1463  {
1464  cache.brief.reset(new TemplateVariant(""));
1465  }
1466  }
1467  return *cache.brief;
1468  }
1470  {
1471  Cachable &cache = getCache();
1472  if (!cache.inbodyDocs || g_globals.outputFormat!=cache.inbodyDocsOutputFormat)
1473  {
1474  if (!m_def->inbodyDocumentation().isEmpty())
1475  {
1476  cache.inbodyDocs.reset(new TemplateVariant(parseDoc(m_def,m_def->inbodyFile(),m_def->inbodyLine(),
1477  relPathAsString(),m_def->inbodyDocumentation(),FALSE)));
1478  cache.inbodyDocsOutputFormat = g_globals.outputFormat;
1479  }
1480  else
1481  {
1482  cache.inbodyDocs.reset(new TemplateVariant(""));
1483  }
1484  }
1485  return *cache.inbodyDocs;
1486  }
1488  {
1489  return g_globals.dynSectionId;
1490  }
1492  {
1493  SrcLangExt lang = m_def->getLanguage();
1494  QCString result = "unknown";
1495  switch (lang)
1496  {
1497  case SrcLangExt_Unknown: break;
1498  case SrcLangExt_IDL: result="idl"; break;
1499  case SrcLangExt_Java: result="java"; break;
1500  case SrcLangExt_CSharp: result="csharp"; break;
1501  case SrcLangExt_D: result="d"; break;
1502  case SrcLangExt_PHP: result="php"; break;
1503  case SrcLangExt_ObjC: result="objc"; break;
1504  case SrcLangExt_Cpp: result="cpp"; break;
1505  case SrcLangExt_JS: result="js"; break;
1506  case SrcLangExt_Python: result="python"; break;
1507  case SrcLangExt_Fortran: result="fortran"; break;
1508  case SrcLangExt_VHDL: result="vhdl"; break;
1509  case SrcLangExt_XML: result="xml"; break;
1510  case SrcLangExt_Tcl: result="tcl"; break;
1511  case SrcLangExt_Markdown: result="markdown"; break;
1512  }
1513  return result;
1514  }
1516  {
1517  QCString result = "unspecified";
1518  switch (m_def->definitionType())
1519  {
1520  case DefinitionIntf::TypeClass: result="class"; break;
1521  case DefinitionIntf::TypeFile: result="file"; break;
1522  case DefinitionIntf::TypeNamespace: result="namespace"; break;
1523  case DefinitionIntf::TypeGroup: result="module"; break;
1524  case DefinitionIntf::TypePackage: result="package"; break;
1525  case DefinitionIntf::TypePage: result="page"; break;
1526  case DefinitionIntf::TypeDir: result="dir"; break;
1527  case DefinitionIntf::TypeMember: // fall through
1529  break;
1530  }
1531  return result;
1532  }
1534  {
1535  Cachable &cache = getCache();
1536  if (cache.sourceDef->count()==2)
1537  {
1538  return cache.sourceDef.get();
1539  }
1540  else
1541  {
1542  return FALSE;
1543  }
1544  }
1545  void fillPath(Definition *def,TemplateList *list) const
1546  {
1547  Definition *outerScope = def->getOuterScope();
1549  if (outerScope && outerScope!=Doxygen::globalScope)
1550  {
1551  fillPath(outerScope,list);
1552  }
1553  else if (type==Definition::TypeFile && ((const FileDef*)def)->getDirDef())
1554  {
1555  fillPath(((const FileDef*)def)->getDirDef(),list);
1556  }
1557  list->append(NavPathElemContext::alloc(def));
1558  }
1560  {
1561  Cachable &cache = getCache();
1562  if (!cache.navPath)
1563  {
1565  if (m_def->getOuterScope() && m_def->getOuterScope()!=Doxygen::globalScope)
1566  {
1567  fillPath(m_def->getOuterScope(),list);
1568  }
1569  else if (m_def->definitionType()==Definition::TypeFile && ((const FileDef *)m_def)->getDirDef())
1570  {
1571  fillPath(((const FileDef *)m_def)->getDirDef(),list);
1572  }
1573  cache.navPath.reset(list);
1574  }
1575  return cache.navPath.get();
1576  }
1578  {
1579  return m_def->isReference();
1580  }
1582  {
1583  return m_def->externalReference(relPathAsString());
1584  }
1585 
1586  protected:
1588  {
1590  briefOutputFormat(ContextOutputFormat_Unspecified),
1591  inbodyDocsOutputFormat(ContextOutputFormat_Unspecified)
1592  {
1593  sourceDef.reset(TemplateList::alloc());
1594  lineLink.reset(TemplateStruct::alloc());
1595  fileLink.reset(TemplateStruct::alloc());
1596 
1597  if (def && !def->getSourceFileBase().isEmpty())
1598  {
1599  lineLink->set("text",def->getStartBodyLine());
1600  lineLink->set("isLinkable",TRUE);
1601  lineLink->set("fileName",def->getSourceFileBase());
1602  lineLink->set("anchor",def->getSourceAnchor());
1603  lineLink->set("isReference",FALSE);
1604  lineLink->set("externalReference","");
1606  {
1607  fileLink->set("text",def->name());
1608  }
1609  else if (def->getBodyDef())
1610  {
1611  fileLink->set("text",def->getBodyDef()->name());
1612  }
1613  else
1614  {
1615  fileLink->set("text",def->displayName(TRUE));
1616  }
1617  fileLink->set("isLinkable",TRUE);
1618  fileLink->set("fileName",def->getSourceFileBase());
1619  fileLink->set("anchor",QCString());
1620  fileLink->set("isReference",FALSE);
1621  fileLink->set("externalReference","");
1622  sourceDef->append(lineLink.get());
1623  sourceDef->append(fileLink.get());
1624  }
1625  }
1636  };
1637 
1638 
1639  private:
1640  Cachable &getCache() const
1641  {
1642  Cachable *c = static_cast<Cachable*>(m_def->cookie());
1643  assert(c!=0);
1644  return *c;
1645  }
1647 };
1648 //%% }
1649 
1650 //------------------------------------------------------------------------
1651 
1652 //%% struct IncludeInfo: include file information
1653 //%% {
1655 {
1656  public:
1658  m_info(info),
1659  m_lang(lang)
1660  {
1661  static bool init=FALSE;
1662  if (!init)
1663  {
1664  s_inst.addProperty("file",&Private::file);
1665  s_inst.addProperty("name",&Private::name);
1666  s_inst.addProperty("isImport",&Private::isImport);
1667  s_inst.addProperty("isLocal",&Private::isLocal);
1668  init=TRUE;
1669  }
1670  }
1671  TemplateVariant get(const char *n) const
1672  {
1673  return s_inst.get(this,n);
1674  }
1676  {
1677  bool isIDLorJava = m_lang==SrcLangExt_IDL || m_lang==SrcLangExt_Java;
1678  return m_info->local || isIDLorJava;
1679  }
1681  {
1682  return m_info->imported || m_lang==SrcLangExt_ObjC;
1683  }
1685  {
1686  if (!m_fileContext && m_info && m_info->fileDef)
1687  {
1688  m_fileContext.reset(FileContext::alloc(m_info->fileDef));
1689  }
1690  if (m_fileContext)
1691  {
1692  return m_fileContext.get();
1693  }
1694  else
1695  {
1696  return FALSE;
1697  }
1698  }
1700  {
1701  return m_info->includeName;
1702  }
1703  private:
1708 };
1709 
1711 
1713 {
1714  p = new Private(info,lang);
1715 }
1716 
1718 {
1719  delete p;
1720 }
1721 
1723 {
1724  return p->get(n);
1725 }
1726 //%% }
1727 
1728 //------------------------------------------------------------------------
1729 
1730 //%% list IncludeInfoList[Class] : list of nested classes
1732 {
1733  public:
1735  {
1736  QListIterator<IncludeInfo> li(list);
1737  IncludeInfo *ii;
1738  for (li.toFirst();(ii=li.current());++li)
1739  {
1740  if (!ii->indirect)
1741  {
1742  append(IncludeInfoContext::alloc(ii,lang));
1743  }
1744  }
1745  }
1746 };
1747 
1749 {
1750  p = new Private(list,lang);
1751 }
1752 
1754 {
1755  delete p;
1756 }
1757 
1758 // TemplateListIntf
1760 {
1761  return p->count();
1762 }
1763 
1765 {
1766  return p->at(index);
1767 }
1768 
1770 {
1771  return p->createIterator();
1772 }
1773 
1774 //------------------------------------------------------------------------
1775 
1776 //%% struct Class(Symbol): class information
1777 //%% {
1778 class ClassContext::Private : public DefinitionContext<ClassContext::Private>
1779 {
1780  public:
1782  m_classDef(cd)
1783  {
1784  static bool init=FALSE;
1785  if (!init)
1786  {
1787  addBaseProperties(s_inst);
1788  s_inst.addProperty("title", &Private::title);
1789  s_inst.addProperty("highlight", &Private::highlight);
1790  s_inst.addProperty("subhighlight", &Private::subHighlight);
1791  s_inst.addProperty("hasDetails", &Private::hasDetails);
1792  s_inst.addProperty("generatedFromFiles", &Private::generatedFromFiles);
1793  s_inst.addProperty("usedFiles", &Private::usedFiles);
1794  s_inst.addProperty("hasInheritanceDiagram", &Private::hasInheritanceDiagram);
1795  s_inst.addProperty("inheritanceDiagram", &Private::inheritanceDiagram);
1796  s_inst.addProperty("hasCollaborationDiagram", &Private::hasCollaborationDiagram);
1797  s_inst.addProperty("collaborationDiagram", &Private::collaborationDiagram);
1798  s_inst.addProperty("includeInfo", &Private::includeInfo);
1799  s_inst.addProperty("inherits", &Private::inherits);
1800  s_inst.addProperty("inheritedBy", &Private::inheritedBy);
1801  s_inst.addProperty("unoIDLServices", &Private::unoIDLServices);
1802  s_inst.addProperty("unoIDLInterfaces", &Private::unoIDLInterfaces);
1803  s_inst.addProperty("signals", &Private::signals);
1804  s_inst.addProperty("publicTypes", &Private::publicTypes);
1805  s_inst.addProperty("publicMethods", &Private::publicMethods);
1806  s_inst.addProperty("publicStaticMethods", &Private::publicStaticMethods);
1807  s_inst.addProperty("publicAttributes", &Private::publicAttributes);
1808  s_inst.addProperty("publicStaticAttributes", &Private::publicStaticAttributes);
1809  s_inst.addProperty("publicSlots", &Private::publicSlots);
1810  s_inst.addProperty("protectedTypes", &Private::protectedTypes);
1811  s_inst.addProperty("protectedMethods", &Private::protectedMethods);
1812  s_inst.addProperty("protectedStaticMethods", &Private::protectedStaticMethods);
1813  s_inst.addProperty("protectedAttributes", &Private::protectedAttributes);
1814  s_inst.addProperty("protectedStaticAttributes", &Private::protectedStaticAttributes);
1815  s_inst.addProperty("protectedSlots", &Private::protectedSlots);
1816  s_inst.addProperty("privateTypes", &Private::privateTypes);
1817  s_inst.addProperty("privateMethods", &Private::privateMethods);
1818  s_inst.addProperty("privateStaticMethods", &Private::privateStaticMethods);
1819  s_inst.addProperty("privateAttributes", &Private::privateAttributes);
1820  s_inst.addProperty("privateStaticAttributes", &Private::privateStaticAttributes);
1821  s_inst.addProperty("privateSlots", &Private::privateSlots);
1822  s_inst.addProperty("packageTypes", &Private::packageTypes);
1823  s_inst.addProperty("packageMethods", &Private::packageMethods);
1824  s_inst.addProperty("packageStaticMethods", &Private::packageStaticMethods);
1825  s_inst.addProperty("packageAttributes", &Private::packageAttributes);
1826  s_inst.addProperty("packageStaticAttributes", &Private::packageStaticAttributes);
1827  s_inst.addProperty("properties", &Private::properties);
1828  s_inst.addProperty("events", &Private::events);
1829  s_inst.addProperty("friends", &Private::friends);
1830  s_inst.addProperty("related", &Private::related);
1831  s_inst.addProperty("detailedTypedefs", &Private::detailedTypedefs);
1832  s_inst.addProperty("detailedEnums", &Private::detailedEnums);
1833  s_inst.addProperty("detailedServices", &Private::detailedServices);
1834  s_inst.addProperty("detailedInterfaces", &Private::detailedInterfaces);
1835  s_inst.addProperty("detailedConstructors", &Private::detailedConstructors);
1836  s_inst.addProperty("detailedMethods", &Private::detailedMethods);
1837  s_inst.addProperty("detailedRelated", &Private::detailedRelated);
1838  s_inst.addProperty("detailedVariables", &Private::detailedVariables);
1839  s_inst.addProperty("detailedProperties", &Private::detailedProperties);
1840  s_inst.addProperty("detailedEvents", &Private::detailedEvents);
1841  s_inst.addProperty("classes", &Private::classes);
1842  s_inst.addProperty("innerClasses", &Private::innerClasses);
1843  s_inst.addProperty("compoundType", &Private::compoundType);
1844  s_inst.addProperty("templateDecls", &Private::templateDecls);
1845  s_inst.addProperty("typeConstraints", &Private::typeConstraints);
1846  s_inst.addProperty("examples", &Private::examples);
1847  s_inst.addProperty("members", &Private::members);
1848  s_inst.addProperty("allMembersList", &Private::allMembersList);
1849  s_inst.addProperty("allMembersFileName", &Private::allMembersFileName);
1850  s_inst.addProperty("memberGroups", &Private::memberGroups);
1851  s_inst.addProperty("additionalInheritedMembers",&Private::additionalInheritedMembers);
1852  s_inst.addProperty("isSimple", &Private::isSimple);
1853  s_inst.addProperty("categoryOf", &Private::categoryOf);
1854  init=TRUE;
1855  }
1856  if (!cd->cookie()) { cd->setCookie(new ClassContext::Private::Cachable(cd)); }
1857  }
1858  virtual ~Private() {}
1859  TemplateVariant get(const char *n) const
1860  {
1861  return s_inst.get(this,n);
1862  }
1864  {
1865  return TemplateVariant(m_classDef->title());
1866  }
1868  {
1869  return TemplateVariant("classes");
1870  }
1872  {
1873  return TemplateVariant("");
1874  }
1876  {
1877  return m_classDef->hasDetailedDescription();
1878  }
1880  {
1881  return m_classDef->generatedFromFiles();
1882  }
1884  {
1885  Cachable &cache = getCache();
1886  if (!cache.usedFiles)
1887  {
1888  cache.usedFiles.reset(UsedFilesContext::alloc(m_classDef));
1889  }
1890  return cache.usedFiles.get();
1891  }
1893  {
1894  Cachable &cache = getCache();
1895  if (!cache.classGraph)
1896  {
1897  cache.classGraph.reset(new DotClassGraph(m_classDef,DotNode::Inheritance));
1898  }
1899  return cache.classGraph.get();
1900  }
1902  {
1903  Cachable &cache = getCache();
1904  if (cache.inheritanceNodes==-1)
1905  {
1906  cache.inheritanceNodes=m_classDef->countInheritanceNodes();
1907  }
1908  return cache.inheritanceNodes>0;
1909  }
1911  {
1912  bool result=FALSE;
1913  static bool haveDot = Config_getBool("HAVE_DOT");
1914  static bool classDiagrams = Config_getBool("CLASS_DIAGRAMS");
1915  static bool classGraph = Config_getBool("CLASS_GRAPH");
1916  if (haveDot && (classDiagrams || classGraph))
1917  {
1918  DotClassGraph *cg = getClassGraph();
1919  result = !cg->isTrivial() && !cg->isTooBig();
1920  }
1921  else if (classDiagrams)
1922  {
1923  result = numInheritanceNodes()>0;
1924  }
1925  return result;
1926  }
1928  {
1929  QGString result;
1930  static bool haveDot = Config_getBool("HAVE_DOT");
1931  static bool classDiagrams = Config_getBool("CLASS_DIAGRAMS");
1932  static bool classGraph = Config_getBool("CLASS_GRAPH");
1933  if (haveDot && (classDiagrams || classGraph))
1934  {
1935  DotClassGraph *cg = getClassGraph();
1936  FTextStream t(&result);
1937  switch (g_globals.outputFormat)
1938  {
1940  {
1943  g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
1944  relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
1945  );
1946  }
1947  break;
1949  {
1952  g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+".tex",
1953  relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
1954  );
1955  }
1956  break;
1957  // TODO: support other generators
1958  default:
1959  err("context.cpp: output format not yet supported");
1960  break;
1961  }
1963  }
1964  else if (classDiagrams)
1965  {
1966  ClassDiagram d(m_classDef);
1967  FTextStream t(&result);
1968  switch (g_globals.outputFormat)
1969  {
1971  {
1972  QCString name = convertToHtml(m_classDef->displayName());
1973  t << "<div class=\"center\">" << endl;
1974  t << "<img src=\"";
1975  t << relPathAsString() << m_classDef->getOutputFileBase();
1976  t << ".png\" usemap=\"#" << convertToId(name) << "_map\" alt=\"\"/>" << endl;
1977  t << "<map id=\"" << convertToId(name) << "_map\" name=\"" << name << "_map\">" << endl;
1979  relPathAsString(),
1980  m_classDef->getOutputFileBase());
1981  t << "</div>";
1982  }
1983  break;
1985  {
1986  d.writeFigure(t,g_globals.outputDir,m_classDef->getOutputFileBase());
1987  }
1988  break;
1989  // TODO: support other generators
1990  default:
1991  err("context.cpp: output format not yet supported");
1992  break;
1993  }
1995  }
1996  return TemplateVariant(result.data(),TRUE);
1997  }
1999  {
2000  Cachable &cache = getCache();
2001  if (!cache.collaborationGraph)
2002  {
2004  }
2005  return cache.collaborationGraph.get();
2006  }
2008  {
2009  static bool haveDot = Config_getBool("HAVE_DOT");
2010  return haveDot && !getCollaborationGraph()->isTrivial();
2011  }
2013  {
2014  static bool haveDot = Config_getBool("HAVE_DOT");
2015  QGString result;
2016  if (haveDot)
2017  {
2018  DotClassGraph *cg = getCollaborationGraph();
2019  FTextStream t(&result);
2020  switch (g_globals.outputFormat)
2021  {
2023  {
2026  g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+Doxygen::htmlFileExtension,
2027  relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
2028  );
2029  }
2030  break;
2032  {
2035  g_globals.outputDir+portable_pathSeparator()+m_classDef->getOutputFileBase()+".tex",
2036  relPathAsString(),TRUE,TRUE,g_globals.dynSectionId
2037  );
2038  }
2039  break;
2040  // TODO: support other generators
2041  default:
2042  err("context.cpp: output format not yet supported");
2043  break;
2044  }
2046  }
2047  return TemplateVariant(result.data(),TRUE);
2048  }
2049 
2051  {
2052  Cachable &cache = getCache();
2053  if (!cache.includeInfo && m_classDef->includeInfo())
2054  {
2055  cache.includeInfo.reset(IncludeInfoContext::alloc(m_classDef->includeInfo(),m_classDef->getLanguage()));
2056  }
2057  if (cache.includeInfo)
2058  {
2059  return cache.includeInfo.get();
2060  }
2061  else
2062  {
2063  return TemplateVariant(FALSE);
2064  }
2065  }
2067  {
2068  Cachable &cache = getCache();
2069  if (!cache.inheritsList)
2070  {
2071  cache.inheritsList.reset(InheritanceListContext::alloc(m_classDef->baseClasses(),TRUE));
2072  }
2073  return cache.inheritsList.get();
2074  }
2076  {
2077  Cachable &cache = getCache();
2078  if (!cache.inheritedByList)
2079  {
2080  cache.inheritedByList.reset(InheritanceListContext::alloc(m_classDef->subClasses(),FALSE));
2081  }
2082  return cache.inheritedByList.get();
2083  }
2085  MemberListType type,const char *title,bool detailed=FALSE) const
2086  {
2087  if (!list)
2088  {
2089  MemberList *ml = m_classDef->getMemberList(type);
2090  if (ml)
2091  {
2092  list.reset(MemberListInfoContext::alloc(m_classDef,relPathAsString(),ml,title,""));
2093  }
2094  }
2095  if (list)
2096  {
2097  return list.get();
2098  }
2099  else
2100  {
2101  return TemplateVariant(FALSE);
2102  }
2103  }
2105  {
2106  return getMemberList(getCache().unoIDLServices,MemberListType_services,theTranslator->trServices());
2107  }
2109  {
2110  return getMemberList(getCache().unoIDLInterfaces,MemberListType_interfaces,theTranslator->trInterfaces());
2111  }
2113  {
2114  return getMemberList(getCache().signals,MemberListType_signals,theTranslator->trSignals());
2115  }
2117  {
2118  return getMemberList(getCache().publicTypes,MemberListType_pubTypes,theTranslator->trPublicTypes());
2119  }
2121  {
2122  return getMemberList(getCache().publicMethods,MemberListType_pubMethods,
2123  m_classDef->getLanguage()==SrcLangExt_ObjC ? theTranslator->trInstanceMethods()
2125  }
2127  {
2128  return getMemberList(getCache().publicStaticMethods,MemberListType_pubStaticMethods,
2129  m_classDef->getLanguage()==SrcLangExt_ObjC ? theTranslator->trClassMethods()
2131  }
2133  {
2134  return getMemberList(getCache().publicAttributes,MemberListType_pubAttribs,theTranslator->trPublicAttribs());
2135  }
2137  {
2138  return getMemberList(getCache().publicStaticAttributes,MemberListType_pubStaticAttribs,theTranslator->trStaticPublicAttribs());
2139  }
2141  {
2142  return getMemberList(getCache().publicSlots,MemberListType_pubSlots,theTranslator->trPublicSlots());
2143  }
2145  {
2146  return getMemberList(getCache().protectedTypes,MemberListType_proTypes,theTranslator->trProtectedTypes());
2147  }
2149  {
2150  return getMemberList(getCache().protectedMethods,MemberListType_proMethods,theTranslator->trProtectedMembers());
2151  }
2153  {
2154  return getMemberList(getCache().protectedStaticMethods,MemberListType_proStaticMethods,theTranslator->trStaticProtectedMembers());
2155  }
2157  {
2158  return getMemberList(getCache().protectedAttributes,MemberListType_proAttribs,theTranslator->trProtectedAttribs());
2159  }
2161  {
2162  return getMemberList(getCache().protectedStaticAttributes,MemberListType_proStaticAttribs,theTranslator->trStaticProtectedAttribs());
2163  }
2165  {
2166  return getMemberList(getCache().protectedSlots,MemberListType_proSlots,theTranslator->trProtectedSlots());
2167  }
2169  {
2170  return getMemberList(getCache().privateTypes,MemberListType_priTypes,theTranslator->trPrivateTypes());
2171  }
2173  {
2174  return getMemberList(getCache().privateSlots,MemberListType_priSlots,theTranslator->trPrivateSlots());
2175  }
2177  {
2178  return getMemberList(getCache().privateMethods,MemberListType_priMethods,theTranslator->trPrivateMembers());
2179  }
2181  {
2182  return getMemberList(getCache().privateStaticMethods,MemberListType_priStaticMethods,theTranslator->trStaticPrivateMembers());
2183  }
2185  {
2186  return getMemberList(getCache().privateAttributes,MemberListType_priAttribs,theTranslator->trPrivateAttribs());
2187  }
2189  {
2190  return getMemberList(getCache().privateStaticAttributes,MemberListType_priStaticAttribs,theTranslator->trStaticPrivateAttribs());
2191  }
2193  {
2194  return getMemberList(getCache().packageTypes,MemberListType_pacTypes,theTranslator->trPackageTypes());
2195  }
2197  {
2198  return getMemberList(getCache().packageMethods,MemberListType_pacMethods,theTranslator->trPackageMembers());
2199  }
2201  {
2202  return getMemberList(getCache().packageStaticMethods,MemberListType_pacStaticMethods,theTranslator->trStaticPackageMembers());
2203  }
2205  {
2206  return getMemberList(getCache().packageAttributes,MemberListType_pacAttribs,theTranslator->trPackageAttribs());
2207  }
2209  {
2210  return getMemberList(getCache().packageStaticAttributes,MemberListType_pacStaticAttribs,theTranslator->trStaticPackageAttribs());
2211  }
2213  {
2214  return getMemberList(getCache().properties,MemberListType_properties,theTranslator->trProperties());
2215  }
2217  {
2218  return getMemberList(getCache().events,MemberListType_events,theTranslator->trEvents());
2219  }
2221  {
2222  return getMemberList(getCache().friends,MemberListType_friends,theTranslator->trFriends());
2223  }
2225  {
2226  return getMemberList(getCache().related,MemberListType_related,theTranslator->trRelatedFunctions());
2227  }
2229  {
2230  return getMemberList(getCache().detailedTypedefs,MemberListType_typedefMembers,theTranslator->trMemberTypedefDocumentation(),TRUE);
2231  }
2233  {
2234  return getMemberList(getCache().detailedEnums,MemberListType_enumMembers,theTranslator->trMemberEnumerationDocumentation(),TRUE);
2235  }
2237  {
2238  return getMemberList(getCache().detailedServices,MemberListType_serviceMembers,theTranslator->trServices(),TRUE);
2239  }
2241  {
2242  return getMemberList(getCache().detailedInterfaces,MemberListType_interfaceMembers,theTranslator->trInterfaces(),TRUE);
2243  }
2245  {
2246  return getMemberList(getCache().detailedConstructors,MemberListType_constructors,theTranslator->trConstructorDocumentation(),TRUE);
2247  }
2249  {
2250  return getMemberList(getCache().detailedMethods,MemberListType_functionMembers,theTranslator->trMemberFunctionDocumentation(),TRUE);
2251  }
2253  {
2254  return getMemberList(getCache().detailedRelated,MemberListType_relatedMembers,theTranslator->trRelatedFunctionDocumentation(),TRUE);
2255  }
2257  {
2258  return getMemberList(getCache().detailedVariables,MemberListType_variableMembers,theTranslator->trMemberDataDocumentation(),TRUE);
2259  }
2261  {
2262  return getMemberList(getCache().detailedProperties,MemberListType_propertyMembers,theTranslator->trPropertyDocumentation(),TRUE);
2263  }
2265  {
2266  return getMemberList(getCache().detailedEvents,MemberListType_eventMembers,theTranslator->trEventDocumentation(),TRUE);
2267  }
2269  {
2270  Cachable &cache = getCache();
2271  if (!cache.classes)
2272  {
2273  TemplateList *classList = TemplateList::alloc();
2274  if (m_classDef->getClassSDict())
2275  {
2276  ClassSDict::Iterator sdi(*m_classDef->getClassSDict());
2277  ClassDef *cd;
2278  for (sdi.toFirst();(cd=sdi.current());++sdi)
2279  {
2280  if (cd->visibleInParentsDeclList())
2281  {
2282  classList->append(ClassContext::alloc(cd));
2283  }
2284  }
2285  }
2286  cache.classes.reset(classList);
2287  }
2288  return cache.classes.get();
2289  }
2291  {
2292  Cachable &cache = getCache();
2293  if (!cache.innerClasses)
2294  {
2295  TemplateList *classList = TemplateList::alloc();
2296  if (m_classDef->getClassSDict())
2297  {
2298  ClassSDict::Iterator sdi(*m_classDef->getClassSDict());
2299  ClassDef *cd;
2300  for (sdi.toFirst();(cd=sdi.current());++sdi)
2301  {
2302  if (cd->name().find('@')==-1 &&
2303  cd->isLinkableInProject() &&
2304  cd->isEmbeddedInOuterScope() &&
2305  cd->partOfGroups()==0
2306  )
2307  {
2308  classList->append(ClassContext::alloc(cd));
2309  }
2310  }
2311  }
2312  cache.innerClasses.reset(classList);
2313  }
2314  return cache.innerClasses.get();
2315  }
2317  {
2318  return m_classDef->compoundTypeString();
2319  }
2321  {
2323  {
2325  if (parent)
2326  {
2327  addTemplateDecls(parent,tl);
2328  }
2329  ClassDef *cd=(ClassDef *)d;
2330  if (cd->templateArguments())
2331  {
2332  ArgumentListContext *al = ArgumentListContext::alloc(cd->templateArguments(),cd,relPathAsString());
2333  // since a TemplateVariant does take ownership of the object, we add it
2334  // a separate list just to be able to delete it and avoid a memory leak
2335  tl->append(al);
2336  }
2337  }
2338  }
2339  void addExamples(TemplateList *list) const
2340  {
2341  if (m_classDef->hasExamples())
2342  {
2343  ExampleSDict::Iterator it(*m_classDef->exampleList());
2344  Example *ex;
2345  for (it.toFirst();(ex=it.current());++it)
2346  {
2348  s->set("text",ex->name);
2349  s->set("isLinkable",TRUE);
2350  s->set("anchor",ex->anchor);
2351  s->set("fileName",ex->file);
2352  s->set("isReference",FALSE);
2353  s->set("externalReference","");
2354  list->append(s);
2355  }
2356  }
2357  }
2359  {
2360  Cachable &cache = getCache();
2361  if (!cache.templateDecls)
2362  {
2364  addTemplateDecls(m_classDef,tl);
2365  cache.templateDecls.reset(tl);
2366  }
2367  return cache.templateDecls.get();
2368  }
2370  {
2371  if (m_classDef->typeConstraints())
2372  {
2373  Cachable &cache = getCache();
2374  if (!cache.typeConstraints && m_classDef->typeConstraints())
2375  {
2376  cache.typeConstraints.reset(ArgumentListContext::alloc(m_classDef->typeConstraints(),m_classDef,relPathAsString()));
2377  }
2378  return cache.typeConstraints.get();
2379  }
2380  return FALSE;
2381  }
2383  {
2384  Cachable &cache = getCache();
2385  if (!cache.examples)
2386  {
2387  TemplateList *exampleList = TemplateList::alloc();
2388  addExamples(exampleList);
2389  cache.examples.reset(exampleList);
2390  }
2391  return cache.examples.get();
2392  }
2394  {
2395  MemberList *ml = cd->getMemberList(lt);
2396  if (ml)
2397  {
2398  Cachable &cache = getCache();
2399  MemberListIterator li(*ml);
2400  const MemberDef *md;
2401  for (li.toFirst();(md=li.current());++li)
2402  {
2403  if (md->isBriefSectionVisible())
2404  {
2405  cache.allMembers.append(md);
2406  }
2407  }
2408  }
2409  }
2411  {
2412  Cachable &cache = getCache();
2413  if (!cache.members)
2414  {
2415  addMembers(m_classDef,MemberListType_pubTypes);
2416  addMembers(m_classDef,MemberListType_services);
2417  addMembers(m_classDef,MemberListType_interfaces);
2418  addMembers(m_classDef,MemberListType_pubSlots);
2419  addMembers(m_classDef,MemberListType_signals);
2420  addMembers(m_classDef,MemberListType_pubMethods);
2421  addMembers(m_classDef,MemberListType_pubStaticMethods);
2422  addMembers(m_classDef,MemberListType_pubAttribs);
2423  addMembers(m_classDef,MemberListType_pubStaticAttribs);
2424  addMembers(m_classDef,MemberListType_proTypes);
2425  addMembers(m_classDef,MemberListType_proSlots);
2426  addMembers(m_classDef,MemberListType_proMethods);
2427  addMembers(m_classDef,MemberListType_proStaticMethods);
2428  addMembers(m_classDef,MemberListType_proAttribs);
2429  addMembers(m_classDef,MemberListType_proStaticAttribs);
2430  addMembers(m_classDef,MemberListType_pacTypes);
2431  addMembers(m_classDef,MemberListType_pacMethods);
2432  addMembers(m_classDef,MemberListType_pacStaticMethods);
2433  addMembers(m_classDef,MemberListType_pacAttribs);
2434  addMembers(m_classDef,MemberListType_pacStaticAttribs);
2435  addMembers(m_classDef,MemberListType_properties);
2436  addMembers(m_classDef,MemberListType_events);
2437  addMembers(m_classDef,MemberListType_priTypes);
2438  addMembers(m_classDef,MemberListType_priSlots);
2439  addMembers(m_classDef,MemberListType_priMethods);
2440  addMembers(m_classDef,MemberListType_priStaticMethods);
2441  addMembers(m_classDef,MemberListType_priAttribs);
2442  addMembers(m_classDef,MemberListType_priStaticAttribs);
2443  addMembers(m_classDef,MemberListType_related);
2445  }
2446  return cache.members.get();
2447  }
2449  {
2450  Cachable &cache = getCache();
2451  if (!cache.allMembersList)
2452  {
2453  if (m_classDef->memberNameInfoSDict())
2454  {
2455  AllMembersListContext *ml = AllMembersListContext::alloc(m_classDef->memberNameInfoSDict());
2456  cache.allMembersList.reset(ml);
2457  }
2458  else
2459  {
2461  }
2462  }
2463  return cache.allMembersList.get();
2464  }
2466  {
2467  return m_classDef->getMemberListFileName();
2468  }
2470  {
2471  Cachable &cache = getCache();
2472  if (!cache.memberGroups)
2473  {
2474  if (m_classDef->getMemberGroupSDict())
2475  {
2476  cache.memberGroups.reset(MemberGroupListContext::alloc(m_classDef,relPathAsString(),m_classDef->getMemberGroupSDict(),m_classDef->subGrouping()));
2477  }
2478  else
2479  {
2481  }
2482  }
2483  return cache.memberGroups.get();
2484  }
2486  {
2487  Cachable &cache = getCache();
2488  if (!cache.additionalInheritedMembers)
2489  {
2496  ctx->addMemberList(m_classDef,MemberListType_pubMethods,
2497  m_classDef->getLanguage()==SrcLangExt_ObjC ? theTranslator->trInstanceMethods()
2500  m_classDef->getLanguage()==SrcLangExt_ObjC ? theTranslator->trClassMethods()
2524  cache.additionalInheritedMembers.reset(ctx);
2525  }
2526  return cache.additionalInheritedMembers.get();
2527  }
2529  {
2530  return m_classDef->isSimple();
2531  }
2533  {
2534  Cachable &cache = getCache();
2535  if (!cache.categoryOf && m_classDef->categoryOf())
2536  {
2537  cache.categoryOf.reset(ClassContext::alloc(m_classDef->categoryOf()));
2538  }
2539  if (cache.categoryOf)
2540  {
2541  return cache.categoryOf.get();
2542  }
2543  else
2544  {
2545  return TemplateVariant(FALSE);
2546  }
2547  }
2548 
2549  private:
2551  struct Cachable : public DefinitionContext<ClassContext::Private>::Cachable
2552  {
2554  inheritanceNodes(-1) { }
2614  };
2616  {
2617  Cachable *c = static_cast<Cachable*>(m_classDef->cookie());
2618  assert(c!=0);
2619  return *c;
2620  }
2622 };
2623 //%% }
2624 
2626 
2628 {
2629  //printf("ClassContext::ClassContext(%s)\n",cd?cd->name().data():"<none>");
2630  p = new Private(cd);
2631 }
2632 
2634 {
2635  delete p;
2636 }
2637 
2639 {
2640  return p->get(n);
2641 }
2642 
2643 //------------------------------------------------------------------------
2644 
2645 //%% struct Namespace(Symbol): namespace information
2646 //%% {
2647 class NamespaceContext::Private : public DefinitionContext<NamespaceContext::Private>
2648 {
2649  public:
2651  m_namespaceDef(nd)
2652  {
2653  static bool init=FALSE;
2654  if (!init)
2655  {
2656  addBaseProperties(s_inst);
2657  s_inst.addProperty("title", &Private::title);
2658  s_inst.addProperty("highlight", &Private::highlight);
2659  s_inst.addProperty("subhighlight", &Private::subHighlight);
2660  s_inst.addProperty("compoundType", &Private::compoundType);
2661  s_inst.addProperty("hasDetails", &Private::hasDetails);
2662  s_inst.addProperty("classes", &Private::classes);
2663  s_inst.addProperty("namespaces", &Private::namespaces);
2664  s_inst.addProperty("constantgroups", &Private::constantgroups);
2665  s_inst.addProperty("typedefs", &Private::typedefs);
2666  s_inst.addProperty("enums", &Private::enums);
2667  s_inst.addProperty("functions", &Private::functions);
2668  s_inst.addProperty("variables", &Private::variables);
2669  s_inst.addProperty("memberGroups", &Private::memberGroups);
2670  s_inst.addProperty("detailedTypedefs", &Private::detailedTypedefs);
2671  s_inst.addProperty("detailedEnums", &Private::detailedEnums);
2672  s_inst.addProperty("detailedFunctions", &Private::detailedFunctions);
2673  s_inst.addProperty("detailedVariables", &Private::detailedVariables);
2674  s_inst.addProperty("inlineClasses", &Private::inlineClasses);
2675  init=TRUE;
2676  }
2677  if (!nd->cookie()) { nd->setCookie(new NamespaceContext::Private::Cachable(nd)); }
2678  }
2679  virtual ~Private() {}
2680  TemplateVariant get(const char *n) const
2681  {
2682  return s_inst.get(this,n);
2683  }
2685  {
2686  return TemplateVariant(m_namespaceDef->title());
2687  }
2689  {
2690  return TemplateVariant("namespaces");
2691  }
2693  {
2694  return TemplateVariant("");
2695  }
2697  {
2698  return m_namespaceDef->compoundTypeString();
2699  }
2701  {
2702  return m_namespaceDef->hasDetailedDescription();
2703  }
2705  {
2706  Cachable &cache = getCache();
2707  if (!cache.classes)
2708  {
2709  TemplateList *classList = TemplateList::alloc();
2710  if (m_namespaceDef->getClassSDict())
2711  {
2712  ClassSDict::Iterator sdi(*m_namespaceDef->getClassSDict());
2713  ClassDef *cd;
2714  for (sdi.toFirst();(cd=sdi.current());++sdi)
2715  {
2716  if (cd->visibleInParentsDeclList())
2717  {
2718  classList->append(ClassContext::alloc(cd));
2719  }
2720  }
2721  }
2722  cache.classes.reset(classList);
2723  }
2724  return cache.classes.get();
2725  }
2727  {
2728  Cachable &cache = getCache();
2729  if (!cache.namespaces)
2730  {
2731  TemplateList *namespaceList = TemplateList::alloc();
2732  if (m_namespaceDef->getNamespaceSDict())
2733  {
2734  NamespaceSDict::Iterator sdi(*m_namespaceDef->getNamespaceSDict());
2735  NamespaceDef *nd;
2736  for (sdi.toFirst();(nd=sdi.current());++sdi)
2737  {
2738  if (nd->isLinkable() && !nd->isConstantGroup())
2739  {
2740  namespaceList->append(NamespaceContext::alloc(nd));
2741  }
2742  }
2743  }
2744  cache.namespaces.reset(namespaceList);
2745  }
2746  return cache.namespaces.get();
2747  }
2749  {
2750  Cachable &cache = getCache();
2751  if (!cache.constantgroups)
2752  {
2753  TemplateList *namespaceList = TemplateList::alloc();
2754  if (m_namespaceDef->getNamespaceSDict())
2755  {
2756  NamespaceSDict::Iterator sdi(*m_namespaceDef->getNamespaceSDict());
2757  NamespaceDef *nd;
2758  for (sdi.toFirst();(nd=sdi.current());++sdi)
2759  {
2760  if (nd->isLinkable() && nd->isConstantGroup())
2761  {
2762  namespaceList->append(NamespaceContext::alloc(nd));
2763  }
2764  }
2765  }
2766  cache.constantgroups.reset(namespaceList);
2767  }
2768  return cache.constantgroups.get();
2769  }
2771  MemberListType type,const char *title,bool detailed=FALSE) const
2772  {
2773  if (!list)
2774  {
2775  MemberList *ml = m_namespaceDef->getMemberList(type);
2776  if (ml)
2777  {
2778  list.reset(MemberListInfoContext::alloc(m_namespaceDef,relPathAsString(),ml,title,""));
2779  }
2780  }
2781  if (list)
2782  {
2783  return list.get();
2784  }
2785  else
2786  {
2787  return TemplateVariant(FALSE);
2788  }
2789  }
2791  {
2792  return getMemberList(getCache().typedefs,MemberListType_decTypedefMembers,theTranslator->trTypedefs());
2793  }
2795  {
2796  return getMemberList(getCache().enums,MemberListType_decEnumMembers,theTranslator->trEnumerations());
2797  }
2799  {
2801  SrcLangExt lang = m_namespaceDef->getLanguage();
2802  if (lang==SrcLangExt_Fortran) title=theTranslator->trSubprograms();
2803  else if (lang==SrcLangExt_VHDL) title=VhdlDocGen::trFunctionAndProc();
2804  return getMemberList(getCache().functions,MemberListType_decFuncMembers,title);
2805  }
2807  {
2808  return getMemberList(getCache().variables,MemberListType_decVarMembers,theTranslator->trVariables());
2809  }
2811  {
2812  Cachable &cache = getCache();
2813  if (!cache.memberGroups)
2814  {
2815  if (m_namespaceDef->getMemberGroupSDict())
2816  {
2817  cache.memberGroups.reset(MemberGroupListContext::alloc(m_namespaceDef,relPathAsString(),m_namespaceDef->getMemberGroupSDict(),m_namespaceDef->subGrouping()));
2818  }
2819  else
2820  {
2822  }
2823  }
2824  return cache.memberGroups.get();
2825  }
2827  {
2828  return getMemberList(getCache().detailedTypedefs,MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation());
2829  }
2831  {
2832  return getMemberList(getCache().detailedEnums,MemberListType_docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
2833  }
2835  {
2837  SrcLangExt lang = m_namespaceDef->getLanguage();
2839  return getMemberList(getCache().detailedFunctions,MemberListType_docFuncMembers,title);
2840  }
2842  {
2843  return getMemberList(getCache().detailedVariables,MemberListType_docVarMembers,theTranslator->trVariableDocumentation());
2844  }
2846  {
2847  Cachable &cache = getCache();
2848  if (!cache.inlineClasses)
2849  {
2850  TemplateList *classList = TemplateList::alloc();
2851  if (m_namespaceDef->getClassSDict())
2852  {
2853  ClassSDict::Iterator sdi(*m_namespaceDef->getClassSDict());
2854  ClassDef *cd;
2855  for (sdi.toFirst();(cd=sdi.current());++sdi)
2856  {
2857  if (cd->name().find('@')==-1 &&
2858  cd->isLinkableInProject() &&
2859  cd->isEmbeddedInOuterScope() &&
2860  cd->partOfGroups()==0)
2861  {
2862  classList->append(ClassContext::alloc(cd));
2863  }
2864  }
2865  }
2866  cache.inlineClasses.reset(classList);
2867  }
2868  return cache.inlineClasses.get();
2869  }
2870  private:
2872  struct Cachable : public DefinitionContext<NamespaceContext::Private>::Cachable
2873  {
2888  };
2890  {
2891  Cachable *c = static_cast<Cachable*>(m_namespaceDef->cookie());
2892  assert(c!=0);
2893  return *c;
2894  }
2896 };
2897 //%% }
2898 
2900 
2902 {
2903  p = new Private(nd);
2904 }
2905 
2907 {
2908  delete p;
2909 }
2910 
2912 {
2913  return p->get(n);
2914 }
2915 
2916 //------------------------------------------------------------------------
2917 
2918 //%% struct File(Symbol): file information
2919 //%% {
2920 class FileContext::Private : public DefinitionContext<FileContext::Private>
2921 {
2922  public:
2923  Private(FileDef *fd) : DefinitionContext<FileContext::Private>(fd) , m_fileDef(fd)
2924  {
2925  if (fd==0) abort();
2926  static bool init=FALSE;
2927  if (!init)
2928  {
2929  addBaseProperties(s_inst);
2930  s_inst.addProperty("title", &Private::title);
2931  s_inst.addProperty("highlight", &Private::highlight);
2932  s_inst.addProperty("subhighlight", &Private::subHighlight);
2933  s_inst.addProperty("versionInfo", &Private::versionInfo);
2934  s_inst.addProperty("includeList", &Private::includeList);
2935  s_inst.addProperty("hasIncludeGraph", &Private::hasIncludeGraph);
2936  s_inst.addProperty("hasIncludedByGraph", &Private::hasIncludedByGraph);
2937  s_inst.addProperty("includeGraph", &Private::includeGraph);
2938  s_inst.addProperty("includedByGraph", &Private::includedByGraph);
2939  s_inst.addProperty("hasDetails", &Private::hasDetails);
2940  s_inst.addProperty("hasSourceFile", &Private::hasSourceFile);
2941  s_inst.addProperty("sources", &Private::sources);
2942  s_inst.addProperty("version", &Private::version);
2943  s_inst.addProperty("classes", &Private::classes);
2944  s_inst.addProperty("namespaces", &Private::namespaces);
2945  s_inst.addProperty("constantgroups", &Private::constantgroups);
2946  s_inst.addProperty("macros", &Private::macros);
2947  s_inst.addProperty("typedefs", &Private::typedefs);
2948  s_inst.addProperty("enums", &Private::enums);
2949  s_inst.addProperty("functions", &Private::functions);
2950  s_inst.addProperty("variables", &Private::variables);
2951  s_inst.addProperty("memberGroups", &Private::memberGroups);
2952  s_inst.addProperty("detailedMacros", &Private::detailedMacros);
2953  s_inst.addProperty("detailedTypedefs", &Private::detailedTypedefs);
2954  s_inst.addProperty("detailedEnums", &Private::detailedEnums);
2955  s_inst.addProperty("detailedFunctions", &Private::detailedFunctions);
2956  s_inst.addProperty("detailedVariables", &Private::detailedVariables);
2957  s_inst.addProperty("inlineClasses", &Private::inlineClasses);
2958  s_inst.addProperty("compoundType", &Private::compoundType);
2959  init=TRUE;
2960  }
2961  if (!fd->cookie()) { fd->setCookie(new FileContext::Private::Cachable(fd)); }
2962  }
2963  virtual ~Private() {}
2964  TemplateVariant get(const char *n) const
2965  {
2966  return s_inst.get(this,n);
2967  }
2969  {
2970  return m_fileDef->title();
2971  }
2973  {
2974  return TemplateVariant("files");
2975  }
2977  {
2978  return TemplateVariant("");
2979  }
2981  {
2982  return m_fileDef->getVersion();
2983  }
2985  {
2986  Cachable &cache = getCache();
2987  if (!cache.includeInfoList && m_fileDef->includeFileList())
2988  {
2990  *m_fileDef->includeFileList(),m_fileDef->getLanguage()));
2991  }
2992  if (cache.includeInfoList)
2993  {
2994  return cache.includeInfoList.get();
2995  }
2996  else
2997  {
2998  return TemplateVariant(FALSE);
2999  }
3000  }
3002  {
3003  Cachable &cache = getCache();
3004  if (!cache.includeGraph)
3005  {
3006  cache.includeGraph.reset(new DotInclDepGraph(m_fileDef,FALSE));
3007  }
3008  return cache.includeGraph.get();
3009  }
3011  {
3012  static bool haveDot = Config_getBool("HAVE_DOT");
3013  DotInclDepGraph *incGraph = getIncludeGraph();
3014  return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
3015  }
3017  {
3018  static bool haveDot = Config_getBool("HAVE_DOT");
3019  QGString result;
3020  if (haveDot)
3021  {
3022  DotInclDepGraph *cg = getIncludeGraph();
3023  FTextStream t(&result);
3024  switch (g_globals.outputFormat)
3025  {
3027  {
3030  g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
3031  relPathAsString(),TRUE,g_globals.dynSectionId
3032  );
3033  }
3034  break;
3036  {
3039  g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+".tex",
3040  relPathAsString(),TRUE,g_globals.dynSectionId
3041  );
3042  }
3043  break;
3044  // TODO: support other generators
3045  default:
3046  err("context.cpp: output format not yet supported");
3047  break;
3048  }
3050  }
3051  return TemplateVariant(result.data(),TRUE);
3052  }
3054  {
3055  Cachable &cache = getCache();
3056  if (!cache.includedByGraph)
3057  {
3058  cache.includedByGraph.reset(new DotInclDepGraph(m_fileDef,TRUE));
3059  }
3060  return cache.includedByGraph.get();
3061  }
3063  {
3064  static bool haveDot = Config_getBool("HAVE_DOT");
3065  DotInclDepGraph *incGraph = getIncludedByGraph();
3066  return (haveDot && !incGraph->isTooBig() && !incGraph->isTrivial());
3067  }
3069  {
3070  static bool haveDot = Config_getBool("HAVE_DOT");
3071  QGString result;
3072  if (haveDot)
3073  {
3074  DotInclDepGraph *cg = getIncludedByGraph();
3075  FTextStream t(&result);
3076  switch (g_globals.outputFormat)
3077  {
3079  {
3082  g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+Doxygen::htmlFileExtension,
3083  relPathAsString(),TRUE,g_globals.dynSectionId
3084  );
3085  }
3086  break;
3088  {
3091  g_globals.outputDir+portable_pathSeparator()+m_fileDef->getOutputFileBase()+".tex",
3092  relPathAsString(),TRUE,g_globals.dynSectionId
3093  );
3094  }
3095  break;
3096  // TODO: support other generators
3097  default:
3098  err("context.cpp: output format not yet supported");
3099  break;
3100  }
3102  }
3103  return TemplateVariant(result.data(),TRUE);
3104  }
3106  {
3107  return m_fileDef->hasDetailedDescription();
3108  }
3110  {
3111  return m_fileDef->generateSourceFile();
3112  }
3114  {
3115  Cachable &cache = getCache();
3116  if (!cache.sources)
3117  {
3118  if (m_fileDef->generateSourceFile())
3119  {
3120  cache.sources.reset(new TemplateVariant(parseCode(m_fileDef,relPathAsString())));
3121  }
3122  else
3123  {
3124  cache.sources.reset(new TemplateVariant(""));
3125  }
3126  }
3127  return *cache.sources;
3128  }
3130  {
3131  return m_fileDef->fileVersion();
3132  }
3134  {
3135  Cachable &cache = getCache();
3136  if (!cache.classes)
3137  {
3138  TemplateList *classList = TemplateList::alloc();
3139  if (m_fileDef->getClassSDict())
3140  {
3141  ClassSDict::Iterator sdi(*m_fileDef->getClassSDict());
3142  ClassDef *cd;
3143  for (sdi.toFirst();(cd=sdi.current());++sdi)
3144  {
3145  if (cd->visibleInParentsDeclList())
3146  {
3147  classList->append(ClassContext::alloc(cd));
3148  }
3149  }
3150  }
3151  cache.classes.reset(classList);
3152  }
3153  return cache.classes.get();
3154  }
3156  {
3157  Cachable &cache = getCache();
3158  if (!cache.namespaces)
3159  {
3160  TemplateList *namespaceList = TemplateList::alloc();
3161  if (m_fileDef->getNamespaceSDict())
3162  {
3163  NamespaceSDict::Iterator sdi(*m_fileDef->getNamespaceSDict());
3164  NamespaceDef *nd;
3165  for (sdi.toFirst();(nd=sdi.current());++sdi)
3166  {
3167  if (nd->isLinkable() && !nd->isConstantGroup())
3168  {
3169  namespaceList->append(NamespaceContext::alloc(nd));
3170  }
3171  }
3172  }
3173  cache.namespaces.reset(namespaceList);
3174  }
3175  return cache.namespaces.get();
3176  }
3178  {
3179  Cachable &cache = getCache();
3180  if (!cache.constantgroups)
3181  {
3182  TemplateList *namespaceList = TemplateList::alloc();
3183  if (m_fileDef->getNamespaceSDict())
3184  {
3185  NamespaceSDict::Iterator sdi(*m_fileDef->getNamespaceSDict());
3186  NamespaceDef *nd;
3187  for (sdi.toFirst();(nd=sdi.current());++sdi)
3188  {
3189  if (nd->isLinkable() && nd->isConstantGroup())
3190  {
3191  namespaceList->append(NamespaceContext::alloc(nd));
3192  }
3193  }
3194  }
3195  cache.constantgroups.reset(namespaceList);
3196  }
3197  return cache.constantgroups.get();
3198  }
3200  MemberListType type,const char *title,bool detailed=FALSE) const
3201  {
3202  if (!list)
3203  {
3204  MemberList *ml = m_fileDef->getMemberList(type);
3205  if (ml)
3206  {
3207  list.reset(MemberListInfoContext::alloc(m_fileDef,relPathAsString(),ml,title,""));
3208  }
3209  }
3210  if (list)
3211  {
3212  return list.get();
3213  }
3214  else
3215  {
3216  return TemplateVariant(FALSE);
3217  }
3218  }
3220  {
3221  return getMemberList(getCache().macros,MemberListType_decDefineMembers,theTranslator->trDefines());
3222  }
3224  {
3225  return getMemberList(getCache().typedefs,MemberListType_decTypedefMembers,theTranslator->trTypedefs());
3226  }
3228  {
3229  return getMemberList(getCache().enums,MemberListType_decEnumMembers,theTranslator->trEnumerations());
3230  }
3232  {
3234  SrcLangExt lang = m_fileDef->getLanguage();
3235  if (lang==SrcLangExt_Fortran) title=theTranslator->trSubprograms();
3236  else if (lang==SrcLangExt_VHDL) title=VhdlDocGen::trFunctionAndProc();
3237  return getMemberList(getCache().functions,MemberListType_decFuncMembers,title);
3238  }
3240  {
3241  return getMemberList(getCache().variables,MemberListType_decVarMembers,theTranslator->trVariables());
3242  }
3244  {
3245  Cachable &cache = getCache();
3246  if (!cache.memberGroups)
3247  {
3248  if (m_fileDef->getMemberGroupSDict())
3249  {
3250  cache.memberGroups.reset(MemberGroupListContext::alloc(m_fileDef,relPathAsString(),m_fileDef->getMemberGroupSDict(),m_fileDef->subGrouping()));
3251  }
3252  else
3253  {
3255  }
3256  }
3257  return cache.memberGroups.get();
3258  }
3260  {
3261  return getMemberList(getCache().detailedMacros,MemberListType_docDefineMembers,theTranslator->trDefineDocumentation());
3262  }
3264  {
3265  return getMemberList(getCache().detailedTypedefs,MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation());
3266  }
3268  {
3269  return getMemberList(getCache().detailedEnums,MemberListType_docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
3270  }
3272  {
3274  SrcLangExt lang = m_fileDef->getLanguage();
3276  return getMemberList(getCache().detailedFunctions,MemberListType_docFuncMembers,title);
3277  }
3279  {
3280  return getMemberList(getCache().detailedVariables,MemberListType_docVarMembers,theTranslator->trVariableDocumentation());
3281  }
3283  {
3284  Cachable &cache = getCache();
3285  if (!cache.inlineClasses)
3286  {
3287  TemplateList *classList = TemplateList::alloc();
3288  if (m_fileDef->getClassSDict())
3289  {
3290  ClassSDict::Iterator sdi(*m_fileDef->getClassSDict());
3291  ClassDef *cd;
3292  for (sdi.toFirst();(cd=sdi.current());++sdi)
3293  {
3294  if (cd->name().find('@')==-1 &&
3295  cd->isLinkableInProject() &&
3296  cd->isEmbeddedInOuterScope() &&
3297  cd->partOfGroups()==0)
3298  {
3299  classList->append(ClassContext::alloc(cd));
3300  }
3301  }
3302  }
3303  cache.inlineClasses.reset(classList);
3304  }
3305  return cache.inlineClasses.get();
3306  }
3308  {
3309  return theTranslator->trFile(FALSE,TRUE);
3310  }
3311 
3312  private:
3314  struct Cachable : public DefinitionContext<FileContext::Private>::Cachable
3315  {
3336  };
3338  {
3339  Cachable *c = static_cast<Cachable*>(m_fileDef->cookie());
3340  assert(c!=0);
3341  return *c;
3342  }
3344 };
3345 //%% }
3346 
3348 
3350 {
3351  p = new Private(fd);
3352 }
3353 
3355 {
3356  delete p;
3357 }
3358 
3360 {
3361  return p->get(n);
3362 }
3363 
3364 //------------------------------------------------------------------------
3365 
3366 //%% struct Dir(Symbol): directory information
3367 //%% {
3368 class DirContext::Private : public DefinitionContext<DirContext::Private>
3369 {
3370  public:
3371  Private(DirDef *dd) : DefinitionContext<DirContext::Private>(dd) , m_dirDef(dd)
3372  {
3373  static bool init=FALSE;
3374  if (!init)
3375  {
3376  addBaseProperties(s_inst);
3377  s_inst.addProperty("title", &Private::title);
3378  s_inst.addProperty("highlight", &Private::highlight);
3379  s_inst.addProperty("subhighlight", &Private::subHighlight);
3380  s_inst.addProperty("dirName", &Private::dirName);
3381  s_inst.addProperty("dirs", &Private::dirs);
3382  s_inst.addProperty("files", &Private::files);
3383  s_inst.addProperty("hasDetails", &Private::hasDetails);
3384  s_inst.addProperty("hasDirGraph", &Private::hasDirGraph);
3385  s_inst.addProperty("dirGraph", &Private::dirGraph);
3386  s_inst.addProperty("compoundType", &Private::compoundType);
3387  init=TRUE;
3388  }
3389  if (!dd->cookie()) { dd->setCookie(new DirContext::Private::Cachable(dd)); }
3390  }
3391  virtual ~Private() {}
3392  TemplateVariant get(const char *n) const
3393  {
3394  return s_inst.get(this,n);
3395  }
3397  {
3398  return TemplateVariant(m_dirDef->shortTitle());
3399  }
3401  {
3402  return TemplateVariant("files");
3403  }
3405  {
3406  return TemplateVariant("");
3407  }
3409  {
3410  return TemplateVariant(m_dirDef->shortName());
3411  }
3413  {
3414  Cachable &cache = getCache();
3415  if (!cache.dirs)
3416  {
3417  cache.dirs.reset(TemplateList::alloc());
3418  const DirList &subDirs = m_dirDef->subDirs();
3419  QListIterator<DirDef> it(subDirs);
3420  DirDef *dd;
3421  for (it.toFirst();(dd=it.current());++it)
3422  {
3423  DirContext *dc = new DirContext(dd);
3424  cache.dirs->append(dc);
3425  }
3426  }
3427  return cache.dirs.get();
3428  }
3430  {
3431  Cachable &cache = getCache();
3432  if (!cache.files)
3433  {
3434  cache.files.reset(TemplateList::alloc());
3435  FileList *files = m_dirDef->getFiles();
3436  if (files)
3437  {
3438  QListIterator<FileDef> it(*files);
3439  FileDef *fd;
3440  for (it.toFirst();(fd=it.current());++it)
3441  {
3442  FileContext *fc = FileContext::alloc(fd);
3443  cache.files->append(fc);
3444  }
3445  }
3446  }
3447  return cache.files.get();
3448  }
3450  {
3451  return m_dirDef->hasDetailedDescription();
3452  }
3454  {
3455  return theTranslator->trDir(FALSE,TRUE);
3456  }
3458  {
3459  return "";
3460  }
3462  {
3463  Cachable &cache = getCache();
3464  if (!cache.dirDepsGraph)
3465  {
3466  cache.dirDepsGraph.reset(new DotDirDeps(m_dirDef));
3467  }
3468  return cache.dirDepsGraph.get();
3469  }
3471  {
3472  bool result=FALSE;
3473  static bool haveDot = Config_getBool("HAVE_DOT");
3474  static bool dirGraph = Config_getBool("DIRECTORY_GRAPH");
3475  if (haveDot && dirGraph)
3476  {
3477  DotDirDeps *graph = getDirDepsGraph();
3478  result = !graph->isTrivial();
3479  }
3480  return result;
3481  }
3483  {
3484  QGString result;
3485  static bool haveDot = Config_getBool("HAVE_DOT");
3486  static bool dirGraph = Config_getBool("DIRECTORY_GRAPH");
3487  if (haveDot && dirGraph)
3488  {
3489  DotDirDeps *graph = getDirDepsGraph();
3490  FTextStream t(&result);
3491  switch (g_globals.outputFormat)
3492  {
3494  {
3495  graph->writeGraph(t,GOF_BITMAP,
3496  EOF_Html,
3498  g_globals.outputDir+portable_pathSeparator()+m_dirDef->getOutputFileBase()+Doxygen::htmlFileExtension,
3499  relPathAsString(),
3500  TRUE,
3502  FALSE);
3503  }
3504  break;
3506  {
3507  graph->writeGraph(t,GOF_EPS,
3508  EOF_LaTeX,
3510  g_globals.outputDir+portable_pathSeparator()+m_dirDef->getOutputFileBase()+".tex",
3511  relPathAsString(),
3512  TRUE,
3514  FALSE);
3515  }
3516  break;
3517  // TODO: support other generators
3518  default:
3519  err("context.cpp: output format not yet supported");
3520  break;
3521  }
3523  }
3524  return TemplateVariant(result.data(),TRUE);
3525  }
3526 
3527  private:
3529  struct Cachable : public DefinitionContext<DirContext::Private>::Cachable
3530  {
3535  };
3537  {
3538  Cachable *c = static_cast<Cachable*>(m_dirDef->cookie());
3539  assert(c!=0);
3540  return *c;
3541  }
3543 };
3544 //%% }
3545 
3547 
3549 {
3550  p = new Private(fd);
3551 }
3552 
3554 {
3555  delete p;
3556 }
3557 
3559 {
3560  return p->get(n);
3561 }
3562 
3563 //------------------------------------------------------------------------
3564 
3565 //%% struct Page(Symbol): page information
3566 //%% {
3567 class PageContext::Private : public DefinitionContext<PageContext::Private>
3568 {
3569  public:
3570  Private(PageDef *pd,bool isMainPage,bool isExample)
3571  : DefinitionContext<PageContext::Private>(pd) , m_pageDef(pd), m_isMainPage(isMainPage),
3572  m_isExample(isExample)
3573  {
3574  static bool init=FALSE;
3575  if (!init)
3576  {
3577  addBaseProperties(s_inst);
3578  s_inst.addProperty("title", &Private::title);
3579  s_inst.addProperty("highlight", &Private::highlight);
3580  s_inst.addProperty("subhighlight",&Private::subHighlight);
3581  s_inst.addProperty("example", &Private::example);
3582  init=TRUE;
3583  }
3584  if (!pd->cookie()) { pd->setCookie(new PageContext::Private::Cachable(pd)); }
3585  }
3586  virtual ~Private() {}
3587  TemplateVariant get(const char *n) const
3588  {
3589  return s_inst.get(this,n);
3590  }
3592  {
3593  if (m_isMainPage)
3594  {
3595  if (mainPageHasTitle())
3596  {
3597  return m_pageDef->title();
3598  }
3599  else
3600  {
3601  return theTranslator->trMainPage();
3602  }
3603  }
3604  else if (m_isExample)
3605  {
3606  return m_pageDef->name();
3607  }
3608  else
3609  {
3610  return m_pageDef->title();
3611  }
3612  }
3614  {
3615  if (m_isMainPage)
3616  {
3617  return "";
3618  }
3619  else
3620  {
3622  }
3623  }
3625  {
3626  if (m_isMainPage)
3627  {
3628  return "main";
3629  }
3630  else
3631  {
3632  return "pages";
3633  }
3634  }
3636  {
3637  return "";
3638  }
3640  {
3641  if (m_isExample)
3642  {
3643  Cachable &cache = getCache();
3644  if (!cache.example || g_globals.outputFormat!=cache.exampleOutputFormat)
3645  {
3646  cache.example.reset(new TemplateVariant(
3647  parseDoc(m_pageDef,m_pageDef->docFile(),m_pageDef->docLine(),
3648  relPathAsString(),"\\include "+m_pageDef->name(),FALSE)));
3650  }
3651  return *cache.example;
3652  }
3653  else
3654  {
3655  return TemplateVariant("");
3656  }
3657  }
3658  private:
3660  struct Cachable : public DefinitionContext<PageContext::Private>::Cachable
3661  {
3663  exampleOutputFormat(ContextOutputFormat_Unspecified) { }
3666  };
3668  {
3669  Cachable *c = static_cast<Cachable*>(m_pageDef->cookie());
3670  assert(c!=0);
3671  return *c;
3672  }
3676 };
3677 //%% }
3678 
3680 
3681 PageContext::PageContext(PageDef *pd,bool isMainPage,bool isExample) : RefCountedContext("PageContext")
3682 {
3683  p = new Private(pd,isMainPage,isExample);
3684 }
3685 
3687 {
3688  delete p;
3689 }
3690 
3692 {
3693  return p->get(n);
3694 }
3695 
3696 //------------------------------------------------------------------------
3697 
3699 {
3700  public:
3702  : m_ts(ts), m_relPath(relPath) {}
3703  void writeString(const char *s,bool keepSpaces) const
3704  {
3705  if (s==0) return;
3706  if (keepSpaces)
3707  {
3708  const char *p=s;
3709  char c;
3710  while ((c=*p++))
3711  {
3712  switch(c)
3713  {
3714  case '<': m_ts << "&lt;"; break;
3715  case '>': m_ts << "&gt;"; break;
3716  case '\'': m_ts << "&#39;"; break;
3717  case '"': m_ts << "&quot;"; break;
3718  case '&': m_ts << "&amp;"; break;
3719  case ' ': m_ts << "&#160;"; break;
3720  }
3721  }
3722  }
3723  else
3724  {
3725  m_ts << convertToHtml(s);
3726  }
3727  }
3728 
3729  void writeBreak(int indent) const
3730  {
3731  m_ts << "<br />";
3732  for (int i=0;i<indent;i++)
3733  {
3734  m_ts << "&#160;";
3735  }
3736  }
3737 
3738  void writeLink(const char *ref,const char *f,
3739  const char *anchor,const char *name
3740  ) const
3741  {
3742  if (ref)
3743  {
3744  m_ts << "<a class=\"elRef\" ";
3745  m_ts << externalLinkTarget() << externalRef(m_relPath,ref,FALSE);
3746  }
3747  else
3748  {
3749  m_ts << "<a class=\"el\" ";
3750  }
3751  m_ts << "href=\"";
3752  m_ts << externalRef(m_relPath,ref,TRUE);
3753  if (f) m_ts << f << Doxygen::htmlFileExtension;
3754  if (anchor) m_ts << "#" << anchor;
3755  m_ts << "\">";
3756  m_ts << convertToHtml(name);
3757  m_ts << "</a>";
3758  }
3759 
3760  private:
3763 };
3764 
3765 //------------------------------------------------------------------------
3766 
3768 {
3769  public:
3770  TextGeneratorLatex(FTextStream &ts) : m_ts(ts) {}
3771  void writeString(const char *s,bool keepSpaces) const
3772  {
3773  if (s==0) return;
3774  m_ts << convertToLaTeX(s,FALSE,keepSpaces);
3775  }
3776  void writeBreak(int indent) const
3777  {
3778  m_ts << "\\\\*\n";
3779  for (int i=0;i<indent;i++)
3780  {
3781  m_ts << "~";
3782  }
3783  }
3784  void writeLink(const char *ref,const char *f,
3785  const char *anchor,const char *text
3786  ) const
3787  {
3788  static bool pdfHyperlinks = Config_getBool("PDF_HYPERLINKS");
3789  if (!ref && pdfHyperlinks)
3790  {
3791  m_ts << "\\hyperlink{";
3792  if (f) m_ts << stripPath(f);
3793  if (f && anchor) m_ts << "_";
3794  if (anchor) m_ts << anchor;
3795  m_ts << "}{";
3796  filterLatexString(m_ts,text);
3797  m_ts << "}";
3798  }
3799  else
3800  {
3801  m_ts << "{\\bf ";
3802  filterLatexString(m_ts,text);
3803  m_ts << "}";
3804  }
3805  }
3806 
3807  private:
3809 };
3810 
3811 //------------------------------------------------------------------------
3812 
3814 {
3815  public:
3817  {
3818  static TextGeneratorFactory *instance = 0;
3819  if (instance==0) instance = new TextGeneratorFactory;
3820  return instance;
3821  }
3823  {
3824  switch (g_globals.outputFormat)
3825  {
3827  return new TextGeneratorHtml(ts,relPath);
3829  return new TextGeneratorLatex(ts);
3830  default:
3831  break;
3832  }
3833  return 0;
3834  }
3835  private:
3838 };
3839 
3841 {
3842  QGString s;
3843  FTextStream ts(&s);
3845  if (tg)
3846  {
3847  linkifyText(*tg,def->getOuterScope(),def->getBodyDef(),def,text);
3848  delete tg;
3849  return TemplateVariant(s.data(),TRUE);
3850  }
3851  else
3852  {
3853  return text;
3854  }
3855 }
3856 
3857 //%% struct Member(Symbol): member information
3858 //%% {
3859 class MemberContext::Private : public DefinitionContext<MemberContext::Private>
3860 {
3861  public:
3863  {
3864  static bool init=FALSE;
3865  if (!init)
3866  {
3867  addBaseProperties(s_inst);
3868  s_inst.addProperty("isSignal", &Private::isSignal);
3869  s_inst.addProperty("isSlot", &Private::isSlot);
3870  s_inst.addProperty("isVariable", &Private::isVariable);
3871  s_inst.addProperty("isEnumeration", &Private::isEnumeration);
3872  s_inst.addProperty("isEnumValue", &Private::isEnumValue);
3873  s_inst.addProperty("isTypedef", &Private::isTypedef);
3874  s_inst.addProperty("isFunction", &Private::isFunction);
3875  s_inst.addProperty("isFunctionPtr", &Private::isFunctionPtr);
3876  s_inst.addProperty("isDefine", &Private::isDefine);
3877  s_inst.addProperty("isFriend", &Private::isFriend);
3878  s_inst.addProperty("isProperty", &Private::isProperty);
3879  s_inst.addProperty("isEvent", &Private::isEvent);
3880  s_inst.addProperty("isRelated", &Private::isRelated);
3881  s_inst.addProperty("isForeign", &Private::isForeign);
3882  s_inst.addProperty("isStatic", &Private::isStatic);
3883  s_inst.addProperty("isInline", &Private::isInline);
3884  s_inst.addProperty("isExplicit", &Private::isExplicit);
3885  s_inst.addProperty("isMutable", &Private::isMutable);
3886  s_inst.addProperty("isGettable", &Private::isGettable);
3887  s_inst.addProperty("isPrivateGettable", &Private::isPrivateGettable);
3888  s_inst.addProperty("isProtectedGettable", &Private::isProtectedGettable);
3889  s_inst.addProperty("isSettable", &Private::isSettable);
3890  s_inst.addProperty("isPrivateSettable", &Private::isPrivateSettable);
3891  s_inst.addProperty("isProtectedSettable", &Private::isProtectedSettable);
3892  s_inst.addProperty("isReadable", &Private::isReadable);
3893  s_inst.addProperty("isWritable", &Private::isWritable);
3894  s_inst.addProperty("isAddable", &Private::isAddable);
3895  s_inst.addProperty("isRemovable", &Private::isRemovable);
3896  s_inst.addProperty("isRaisable", &Private::isRaisable);
3897  s_inst.addProperty("isFinal", &Private::isFinal);
3898  s_inst.addProperty("isAbstract", &Private::isAbstract);
3899  s_inst.addProperty("isOverride", &Private::isOverride);
3900  s_inst.addProperty("isInitonly", &Private::isInitonly);
3901  s_inst.addProperty("isOptional", &Private::isOptional);
3902  s_inst.addProperty("isRequired", &Private::isRequired);
3903  s_inst.addProperty("isNonAtomic", &Private::isNonAtomic);
3904  s_inst.addProperty("isCopy", &Private::isCopy);
3905  s_inst.addProperty("isAssign", &Private::isAssign);
3906  s_inst.addProperty("isRetain", &Private::isRetain);
3907  s_inst.addProperty("isWeak", &Private::isWeak);
3908  s_inst.addProperty("isStrong", &Private::isStrong);
3909  s_inst.addProperty("isUnretained", &Private::isUnretained);
3910  s_inst.addProperty("isNew", &Private::isNew);
3911  s_inst.addProperty("isSealed", &Private::isSealed);
3912  s_inst.addProperty("isImplementation", &Private::isImplementation);
3913  s_inst.addProperty("isExternal", &Private::isExternal);
3914  s_inst.addProperty("isAlias", &Private::isAlias);
3915  s_inst.addProperty("isDefault", &Private::isDefault);
3916  s_inst.addProperty("isDelete", &Private::isDelete);
3917  s_inst.addProperty("isNoExcept", &Private::isNoExcept);
3918  s_inst.addProperty("isAttribute", &Private::isAttribute);
3919  s_inst.addProperty("isUNOProperty", &Private::isUNOProperty);
3920  s_inst.addProperty("isReadonly", &Private::isReadonly);
3921  s_inst.addProperty("isBound", &Private::isBound);
3922  s_inst.addProperty("isConstrained", &Private::isConstrained);
3923  s_inst.addProperty("isTransient", &Private::isTransient);
3924  s_inst.addProperty("isMaybeVoid", &Private::isMaybeVoid);
3925  s_inst.addProperty("isMaybeDefault", &Private::isMaybeDefault);
3926  s_inst.addProperty("isMaybeAmbiguous", &Private::isMaybeAmbiguous);
3927  s_inst.addProperty("isPublished", &Private::isPublished);
3928  s_inst.addProperty("isTemplateSpecialization",&Private::isTemplateSpecialization);
3929  s_inst.addProperty("isObjCMethod", &Private::isObjCMethod);
3930  s_inst.addProperty("isObjCProperty", &Private::isObjCProperty);
3931  s_inst.addProperty("isAnonymous", &Private::isAnonymous);
3932  s_inst.addProperty("hasParameters", &Private::hasParameters);
3933  s_inst.addProperty("declType", &Private::declType);
3934  s_inst.addProperty("declArgs", &Private::declArgs);
3935  s_inst.addProperty("anonymousType", &Private::anonymousType);
3936  s_inst.addProperty("anonymousMember", &Private::anonymousMember);
3937  s_inst.addProperty("hasDetails", &Private::hasDetails);
3938  s_inst.addProperty("exception", &Private::exception);
3939  s_inst.addProperty("bitfields", &Private::bitfields);
3940  s_inst.addProperty("initializer", &Private::initializer);
3941  s_inst.addProperty("initializerAsCode", &Private::initializerAsCode);
3942  s_inst.addProperty("hasOneLineInitializer", &Private::hasOneLineInitializer);
3943  s_inst.addProperty("hasMultiLineInitializer", &Private::hasMultiLineInitializer);
3944  s_inst.addProperty("templateArgs", &Private::templateArgs);
3945  s_inst.addProperty("templateAlias", &Private::templateAlias);
3946  s_inst.addProperty("propertyAttrs", &Private::propertyAttrs);
3947  s_inst.addProperty("eventAttrs", &Private::eventAttrs);
3948  s_inst.addProperty("category", &Private::category);
3949  s_inst.addProperty("categoryRelation", &Private::categoryRelation);
3950  s_inst.addProperty("class", &Private::getClass);
3951  s_inst.addProperty("file", &Private::getFile);
3952  s_inst.addProperty("namespace", &Private::getNamespace);
3953  s_inst.addProperty("definition", &Private::definition);
3954  s_inst.addProperty("parameters", &Private::parameters);
3955  s_inst.addProperty("hasConstQualifier", &Private::hasConstQualifier);
3956  s_inst.addProperty("hasVolatileQualifier",&Private::hasVolatileQualifier);
3957  s_inst.addProperty("trailingReturnType", &Private::trailingReturnType);
3958  s_inst.addProperty("extraTypeChars", &Private::extraTypeChars);
3959  s_inst.addProperty("templateDecls", &Private::templateDecls);
3960  s_inst.addProperty("labels", &Private::labels);
3961  s_inst.addProperty("enumBaseType", &Private::enumBaseType);
3962  s_inst.addProperty("enumValues", &Private::enumValues);
3963  s_inst.addProperty("paramDocs", &Private::paramDocs);
3964  s_inst.addProperty("reimplements", &Private::reimplements);
3965  s_inst.addProperty("implements", &Private::implements);
3966  s_inst.addProperty("reimplementedBy", &Private::reimplementedBy);
3967  s_inst.addProperty("implementedBy", &Private::implementedBy);
3968  s_inst.addProperty("examples", &Private::examples);
3969  s_inst.addProperty("typeConstraints", &Private::typeConstraints);
3970  s_inst.addProperty("functionQualifier", &Private::functionQualifier);
3971  s_inst.addProperty("sourceRefs", &Private::sourceRefs);
3972  s_inst.addProperty("sourceRefBys", &Private::sourceRefBys);
3973  s_inst.addProperty("hasSources", &Private::hasSources);
3974  s_inst.addProperty("sourceCode", &Private::sourceCode);
3975  s_inst.addProperty("hasCallGraph", &Private::hasCallGraph);
3976  s_inst.addProperty("callGraph", &Private::callGraph);
3977  s_inst.addProperty("hasCallerGraph", &Private::hasCallerGraph);
3978  s_inst.addProperty("callerGraph", &Private::callerGraph);
3979  s_inst.addProperty("fieldType", &Private::fieldType);
3980  s_inst.addProperty("type", &Private::type);
3981  s_inst.addProperty("detailsVisibleFor", &Private::detailsVisibleFor);
3982  s_inst.addProperty("nameWithContextFor", &Private::nameWithContextFor);
3983  init=TRUE;
3984  }
3985  if (!md->cookie()) { md->setCookie(new MemberContext::Private::Cachable(md)); }
3986 
3987  Cachable &cache = getCache();
3989  if (md && md->isProperty())
3990  {
3991  if (md->isGettable()) cache.propertyAttrs->append("get");
3992  if (md->isPrivateGettable()) cache.propertyAttrs->append("private get");
3993  if (md->isProtectedGettable()) cache.propertyAttrs->append("protected get");
3994  if (md->isSettable()) cache.propertyAttrs->append("set");
3995  if (md->isPrivateSettable()) cache.propertyAttrs->append("private set");
3996  if (md->isProtectedSettable()) cache.propertyAttrs->append("protected set");
3997  }
3999  if (md && md->isEvent())
4000  {
4001  if (md->isAddable()) cache.eventAttrs->append("add");
4002  if (md->isRemovable()) cache.eventAttrs->append("remove");
4003  if (md->isRaisable()) cache.eventAttrs->append("raise");
4004  }
4005  }
4006  virtual ~Private() {}
4007  TemplateVariant get(const char *n) const
4008  {
4009  return s_inst.get(this,n);
4010  }
4012  {
4013  return createLinkedText(m_memberDef,relPathAsString(),m_memberDef->fieldType());
4014  }
4016  {
4017  Cachable &cache = getCache();
4018  if (!cache.declTypeParsed)
4019  {
4020  cache.declType=createLinkedText(m_memberDef,relPathAsString(),m_memberDef->getDeclType());
4021  cache.declTypeParsed = TRUE;
4022  return cache.declType;
4023  }
4024  else
4025  {
4026  return cache.declType;
4027  }
4028  }
4030  {
4031  Cachable &cache = getCache();
4032  if (!cache.declArgsParsed)
4033  {
4034  cache.declArgs=createLinkedText(m_memberDef,relPathAsString(),m_memberDef->argsString());
4035  cache.declArgsParsed = TRUE;
4036  return cache.declArgs;
4037  }
4038  else
4039  {
4040  return cache.declArgs;
4041  }
4042  }
4044  {
4045  return createLinkedText(m_memberDef,relPathAsString(),m_memberDef->excpString());
4046  }
4048  {
4049  return createLinkedText(m_memberDef,relPathAsString(),m_memberDef->bitfieldString());
4050  }
4052  {
4053  return m_memberDef->isStatic();
4054  }
4056  {
4057  return m_memberDef->isObjCMethod();
4058  }
4060  {
4061  return m_memberDef->isObjCProperty();
4062  }
4064  {
4065  return m_memberDef->isImplementation();
4066  }
4068  {
4069  return m_memberDef->isSignal();
4070  }
4072  {
4073  return m_memberDef->isSlot();
4074  }
4076  {
4077  return m_memberDef->isTypedef();
4078  }
4080  {
4081  return m_memberDef->isFunction();
4082  }
4084  {
4085  return m_memberDef->isFunctionPtr();
4086  }
4088  {
4089  return m_memberDef->isFriend();
4090  }
4092  {
4093  return m_memberDef->isForeign();
4094  }
4096  {
4097  return m_memberDef->isEvent();
4098  }
4100  {
4101  return m_memberDef->isInline();
4102  }
4104  {
4105  return m_memberDef->isExplicit();
4106  }
4108  {
4109  return m_memberDef->isMutable();
4110  }
4112  {
4113  return m_memberDef->isGettable();
4114  }
4116  {
4117  return m_memberDef->isPrivateGettable();
4118  }
4120  {
4121  return m_memberDef->isProtectedGettable();
4122  }
4124  {
4125  return m_memberDef->isSettable();
4126  }
4128  {
4129  return m_memberDef->isPrivateSettable();
4130  }
4132  {
4133  return m_memberDef->isProtectedSettable();
4134  }
4136  {
4137  return m_memberDef->isReadable();
4138  }
4140  {
4141  return m_memberDef->isWritable();
4142  }
4144  {
4145  return m_memberDef->isAddable();
4146  }
4148  {
4149  return m_memberDef->isRemovable();
4150  }
4152  {
4153  return m_memberDef->isRaisable();
4154  }
4156  {
4157  return m_memberDef->isFinal();
4158  }
4160  {
4161  return m_memberDef->isAbstract();
4162  }
4164  {
4165  return m_memberDef->isOverride();
4166  }
4168  {
4169  return m_memberDef->isInitonly();
4170  }
4172  {
4173  return m_memberDef->isOptional();
4174  }
4176  {
4177  return m_memberDef->isRequired();
4178  }
4180  {
4181  return m_memberDef->isNonAtomic();
4182  }
4184  {
4185  return m_memberDef->isCopy();
4186  }
4188  {
4189  return m_memberDef->isAssign();
4190  }
4192  {
4193  return m_memberDef->isRetain();
4194  }
4196  {
4197  return m_memberDef->isWeak();
4198  }
4200  {
4201  return m_memberDef->isStrong();
4202  }
4204  {
4205  return m_memberDef->isUnretained();
4206  }
4208  {
4209  return m_memberDef->isNew();
4210  }
4212  {
4213  return m_memberDef->isSealed();
4214  }
4216  {
4217  return m_memberDef->isExternal();
4218  }
4220  {
4221  return m_memberDef->isAlias();
4222  }
4224  {
4225  return m_memberDef->isDefault();
4226  }
4228  {
4229  return m_memberDef->isDelete();
4230  }
4232  {
4233  return m_memberDef->isNoExcept();
4234  }
4236  {
4237  return m_memberDef->isAttribute();
4238  }
4240  {
4241  return m_memberDef->isUNOProperty();
4242  }
4244  {
4245  return m_memberDef->isReadonly();
4246  }
4248  {
4249  return m_memberDef->isBound();
4250  }
4252  {
4253  return m_memberDef->isConstrained();
4254  }
4256  {
4257  return m_memberDef->isTransient();
4258  }
4260  {
4261  return m_memberDef->isMaybeVoid();
4262  }
4264  {
4265  return m_memberDef->isMaybeDefault();
4266  }
4268  {
4269  return m_memberDef->isMaybeAmbiguous();
4270  }
4272  {
4273  return m_memberDef->isPublished();
4274  }
4276  {
4277  return m_memberDef->isTemplateSpecialization();
4278  }
4280  {
4281  return m_memberDef->isProperty();
4282  }
4284  {
4285  return m_memberDef->isEnumValue();
4286  }
4288  {
4289  return m_memberDef->isVariable();
4290  }
4292  {
4293  return m_memberDef->isEnumerate();
4294  }
4296  {
4297  return m_memberDef->isDetailedSectionLinkable();
4298  }
4300  {
4301  return createLinkedText(m_memberDef,relPathAsString(),m_memberDef->initializer());
4302  }
4304  {
4305  Cachable &cache = getCache();
4306  if (!cache.initializerParsed)
4307  {
4308  QCString scopeName;
4309  if (m_memberDef->getClassDef())
4310  {
4311  scopeName = m_memberDef->getClassDef()->name();
4312  }
4313  else if (m_memberDef->getNamespaceDef())
4314  {
4315  scopeName = m_memberDef->getNamespaceDef()->name();
4316  }
4317  cache.initializer = parseCode(m_memberDef,scopeName,relPathAsString(),
4318  m_memberDef->initializer());
4319  cache.initializerParsed = TRUE;
4320  }
4321  return cache.initializer;
4322  }
4324  {
4325  return m_memberDef->isDefine();
4326  }
4328  {
4329  QCString name = m_memberDef->name();
4330  return !name.isEmpty() && name.at(0)=='@';
4331  }
4333  {
4334  Cachable &cache = getCache();
4335  if (!cache.anonymousType)
4336  {
4337  ClassDef *cd = m_memberDef->getClassDefOfAnonymousType();
4338  if (cd)
4339  {
4341  }
4342  }
4343  if (cache.anonymousType)
4344  {
4345  return cache.anonymousType.get();
4346  }
4347  else
4348  {
4349  return FALSE;
4350  }
4351  }
4353  {
4354  Cachable &cache = getCache();
4355  if (!cache.anonymousMember)
4356  {
4357  MemberDef *md = m_memberDef->fromAnonymousMember();
4358  if (md)
4359  {
4361  }
4362  }
4363  if (cache.anonymousMember)
4364  {
4365  return cache.anonymousMember.get();
4366  }
4367  else
4368  {
4369  return FALSE;
4370  }
4371  }
4373  {
4374  return m_memberDef->isRelated();
4375  }
4377  {
4378  return m_memberDef->enumBaseType();
4379  }
4381  {
4382  return m_memberDef->hasOneLineInitializer();
4383  }
4385  {
4386  return m_memberDef->hasMultiLineInitializer();
4387  }
4389  {
4390  Cachable &cache = getCache();
4391  if (!cache.enumValues)
4392  {
4393  MemberList *ml = m_memberDef->enumFieldList();
4394  if (ml)
4395  {
4397  }
4398  else
4399  {
4401  }
4402  }
4403  return cache.enumValues.get();
4404  }
4406  {
4407  Cachable &cache = getCache();
4408  if (!cache.templateArgs && m_memberDef->templateArguments())
4409  {
4410  cache.templateArgs.reset(ArgumentListContext::alloc(m_memberDef->templateArguments(),m_memberDef,relPathAsString()));
4411  }
4412  if (cache.templateArgs)
4413  {
4414  return cache.templateArgs.get();
4415  }
4416  else
4417  {
4418  return TemplateVariant(FALSE);
4419  }
4420  }
4422  {
4423  if (m_memberDef->isAlias())
4424  {
4425  return createLinkedText(m_memberDef,relPathAsString(),
4426  QCString(" = ")+m_memberDef->typeString());
4427  }
4428  return "";
4429  }
4431  {
4432  return getCache().propertyAttrs.get();
4433  }
4435  {
4436  return getCache().eventAttrs.get();
4437  }
4439  {
4440  Cachable &cache = getCache();
4441  if (!cache.classDef && m_memberDef->getClassDef())
4442  {
4443  cache.classDef.reset(ClassContext::alloc(m_memberDef->getClassDef()));
4444  }
4445  if (cache.classDef)
4446  {
4447  return cache.classDef.get();
4448  }
4449  else
4450  {
4451  return TemplateVariant(FALSE);
4452  }
4453  }
4455  {
4456  Cachable &cache = getCache();
4457  if (!cache.category && m_memberDef->category())
4458  {
4459  cache.category.reset(ClassContext::alloc(m_memberDef->category()));
4460  }
4461  if (cache.category)
4462  {
4463  return cache.category.get();
4464  }
4465  else
4466  {
4467  return TemplateVariant(FALSE);
4468  }
4469  }
4471  {
4472  Cachable &cache = getCache();
4473  if (!cache.categoryRelation && m_memberDef->categoryRelation())
4474  {
4475  cache.categoryRelation.reset(MemberContext::alloc(m_memberDef->categoryRelation()));
4476  }
4477  if (cache.categoryRelation)
4478  {
4479  return cache.categoryRelation.get();
4480  }
4481  else
4482  {
4483  return TemplateVariant(FALSE);
4484  }
4485  }
4487  {
4488  Cachable &cache = getCache();
4489  if (!cache.fileDef && m_memberDef->getFileDef())
4490  {
4491  cache.fileDef.reset(FileContext::alloc(m_memberDef->getFileDef()));
4492  }
4493  if (cache.fileDef)
4494  {
4495  return cache.fileDef.get();
4496  }
4497  else
4498  {
4499  return TemplateVariant(FALSE);
4500  }
4501  }
4503  {
4504  Cachable &cache = getCache();
4505  if (!cache.namespaceDef && m_memberDef->getNamespaceDef())
4506  {
4507  cache.namespaceDef.reset(NamespaceContext::alloc(m_memberDef->getNamespaceDef()));
4508  }
4509  if (cache.namespaceDef)
4510  {
4511  return cache.namespaceDef.get();
4512  }
4513  else
4514  {
4515  return TemplateVariant(FALSE);
4516  }
4517  }
4519  {
4520  return createLinkedText(m_memberDef,relPathAsString(),
4521  m_memberDef->displayDefinition());
4522  }
4524  {
4525  return (m_memberDef->isDocsForDefinition()) ?
4526  m_memberDef->argumentList() : m_memberDef->declArgumentList();
4527  }
4529  {
4530  Cachable &cache = getCache();
4531  if (!cache.arguments)
4532  {
4533  ArgumentList *defArgList = getDefArgList();
4534  if (defArgList && !m_memberDef->isProperty())
4535  {
4536  cache.arguments.reset(ArgumentListContext::alloc(defArgList,m_memberDef,relPathAsString()));
4537  }
4538  else
4539  {
4541  }
4542  }
4543  return cache.arguments.get();
4544  }
4546  {
4547  return getDefArgList()!=0;
4548  }
4550  {
4551  ArgumentList *al = getDefArgList();
4552  return al ? al->constSpecifier : FALSE;
4553  }
4555  {
4556  ArgumentList *al = getDefArgList();
4557  return al ? al->volatileSpecifier : FALSE;
4558  }
4560  {
4561  ArgumentList *al = getDefArgList();
4562  if (al && !al->trailingReturnType.isEmpty())
4563  {
4564  return createLinkedText(m_memberDef,relPathAsString(),
4565  al->trailingReturnType);
4566  }
4567  else
4568  {
4569  return "";
4570  }
4571  }
4573  {
4574  return m_memberDef->extraTypeChars();
4575  }
4577  {
4578  ClassDef *cd=m_memberDef->getClassDef();
4579  if (m_memberDef->definitionTemplateParameterLists())
4580  {
4581  QListIterator<ArgumentList> ali(*m_memberDef->definitionTemplateParameterLists());
4582  ArgumentList *tal;
4583  for (ali.toFirst();(tal=ali.current());++ali)
4584  {
4585  if (tal->count()>0)
4586  {
4587  ArgumentListContext *al = ArgumentListContext::alloc(tal,m_memberDef,relPathAsString());
4588  tl->append(al);
4589  }
4590  }
4591  }
4592  else
4593  {
4594  if (cd && !m_memberDef->isRelated() && !m_memberDef->isTemplateSpecialization())
4595  {
4596  QList<ArgumentList> tempParamLists;
4597  cd->getTemplateParameterLists(tempParamLists);
4598  //printf("#tempParamLists=%d\n",tempParamLists.count());
4599  QListIterator<ArgumentList> ali(tempParamLists);
4600  ArgumentList *tal;
4601  for (ali.toFirst();(tal=ali.current());++ali)
4602  {
4603  if (tal->count()>0)
4604  {
4605  ArgumentListContext *al = ArgumentListContext::alloc(tal,m_memberDef,relPathAsString());
4606  tl->append(al);
4607  }
4608  }
4609  }
4610  if (m_memberDef->templateArguments()) // function template prefix
4611  {
4613  m_memberDef->templateArguments(),m_memberDef,relPathAsString());
4614  tl->append(al);
4615  }
4616  }
4617  }
4619  {
4620  Cachable &cache = getCache();
4621  if (!cache.templateDecls)
4622  {
4624  addTemplateDecls(tl);
4625  cache.templateDecls.reset(tl);
4626  }
4627  return cache.templateDecls.get();
4628  }
4630  {
4631  Cachable &cache = getCache();
4632  if (!cache.labels)
4633  {
4634  QStrList sl;
4635  m_memberDef->getLabels(sl,m_memberDef->getOuterScope());
4637  if (sl.count()>0)
4638  {
4639  QStrListIterator it(sl);
4640  for (;it.current();++it)
4641  {
4642  tl->append(*it);
4643  }
4644  }
4645  cache.labels.reset(tl);
4646  }
4647  return cache.labels.get();
4648  }
4650  {
4651  Cachable &cache = getCache();
4652  if (!cache.paramDocs)
4653  {
4654  if (m_memberDef->argumentList() && m_memberDef->argumentList()->hasDocumentation())
4655  {
4656  QCString paramDocs;
4657  ArgumentListIterator ali(*m_memberDef->argumentList());
4658  Argument *a;
4659  // convert the parameter documentation into a list of @param commands
4660  for (ali.toFirst();(a=ali.current());++ali)
4661  {
4662  if (a->hasDocumentation())
4663  {
4664  QCString direction = extractDirection(a->docs);
4665  paramDocs+="@param"+direction+" "+a->name+" "+a->docs;
4666  }
4667  }
4668  cache.paramDocs.reset(new TemplateVariant(parseDoc(m_memberDef,
4669  m_memberDef->docFile(),m_memberDef->docLine(),
4670  relPathAsString(),paramDocs,FALSE)));
4671  }
4672  else
4673  {
4674  cache.paramDocs.reset(new TemplateVariant(""));
4675  }
4676  }
4677  return *cache.paramDocs;
4678  }
4680  {
4681  Cachable &cache = getCache();
4682  if (!cache.implements)
4683  {
4684  MemberDef *md = m_memberDef->reimplements();
4686  if (md)
4687  {
4688  ClassDef *cd = md->getClassDef();
4689  if (cd && (md->virtualness()==Pure || cd->compoundType()==ClassDef::Interface))
4690  {
4692  cache.implements->append(mc);
4693  }
4694  }
4695  }
4696  return cache.implements.get();
4697  }
4699  {
4700  Cachable &cache = getCache();
4701  if (!cache.reimplements)
4702  {
4703  MemberDef *md = m_memberDef->reimplements();
4705  if (md)
4706  {
4707  ClassDef *cd = md->getClassDef();
4708  if (cd && md->virtualness()!=Pure && cd->compoundType()!=ClassDef::Interface)
4709  {
4711  cache.reimplements->append(mc);
4712  }
4713  }
4714  }
4715  return cache.reimplements.get();
4716  }
4718  {
4719  Cachable &cache = getCache();
4720  if (!cache.implementedBy)
4721  {
4722  MemberList *ml = m_memberDef->reimplementedBy();
4724  if (ml)
4725  {
4726  MemberListIterator mli(*ml);
4727  MemberDef *md=0;
4728  for (mli.toFirst();(md=mli.current());++mli)
4729  {
4730  ClassDef *cd = md->getClassDef();
4731  if (cd && (md->virtualness()==Pure || cd->compoundType()==ClassDef::Interface))
4732  {
4733  MemberContext *mc = new MemberContext(md);
4734  cache.implementedBy->append(mc);
4735  }
4736  }
4737  }
4738  }
4739  return cache.implementedBy.get();
4740  }
4742  {
4743  Cachable &cache = getCache();
4744  if (!cache.reimplementedBy)
4745  {
4747  MemberList *ml = m_memberDef->reimplementedBy();
4748  if (ml)
4749  {
4750  MemberListIterator mli(*ml);
4751  MemberDef *md=0;
4752  for (mli.toFirst();(md=mli.current());++mli)
4753  {
4754  ClassDef *cd = md->getClassDef();
4755  if (cd && md->virtualness()!=Pure && cd->compoundType()!=ClassDef::Interface)
4756  {
4757  MemberContext *mc = new MemberContext(md);
4758  cache.reimplementedBy->append(mc);
4759  }
4760  }
4761  }
4762  }
4763  return cache.reimplementedBy.get();
4764  }
4765  void addExamples(TemplateList *list) const
4766  {
4767  if (m_memberDef->hasExamples())
4768  {
4769  ExampleSDict::Iterator it(*m_memberDef->getExamples());
4770  Example *ex;
4771  for (it.toFirst();(ex=it.current());++it)
4772  {
4774  s->set("text",ex->name);
4775  s->set("isLinkable",TRUE);
4776  s->set("anchor",ex->anchor);
4777  s->set("fileName",ex->file);
4778  s->set("isReference",FALSE);
4779  s->set("externalReference","");
4780  list->append(s);
4781  }
4782  }
4783  }
4785  {
4786  Cachable &cache = getCache();
4787  if (!cache.examples)
4788  {
4789  TemplateList *exampleList = TemplateList::alloc();
4790  addExamples(exampleList);
4791  cache.examples.reset(exampleList);
4792  }
4793  return cache.examples.get();
4794  }
4796  {
4797  Cachable &cache = getCache();
4798  if (!cache.typeConstraints && m_memberDef->typeConstraints())
4799  {
4800  cache.typeConstraints.reset(ArgumentListContext::alloc(m_memberDef->typeConstraints(),m_memberDef,relPathAsString()));
4801  }
4802  else
4803  {
4805  }
4806  return cache.typeConstraints.get();
4807  }
4809  {
4810  if (!m_memberDef->isObjCMethod() &&
4811  (m_memberDef->isFunction() || m_memberDef->isSlot() ||
4812  m_memberDef->isPrototype() || m_memberDef->isSignal()
4813  )
4814  )
4815  {
4816  return "()";
4817  }
4818  else
4819  {
4820  return "";
4821  }
4822  }
4824  {
4825  Cachable &cache = getCache();
4826  if (!cache.sourceRefs)
4827  {
4828  cache.sourceRefs.reset(MemberListContext::alloc(m_memberDef->getReferencesMembers(),TRUE));
4829  }
4830  return cache.sourceRefs.get();
4831  }
4833  {
4834  Cachable &cache = getCache();
4835  if (!cache.sourceRefBys)
4836  {
4837  cache.sourceRefBys.reset(MemberListContext::alloc(m_memberDef->getReferencedByMembers(),TRUE));
4838  }
4839  return cache.sourceRefBys.get();
4840  }
4842  {
4843  return TemplateVariant(m_memberDef->hasSources());
4844  }
4846  {
4847  Cachable &cache = getCache();
4848  if (!cache.sourceCodeParsed)
4849  {
4850  QCString codeFragment;
4851  FileDef *fd = m_memberDef->getBodyDef();
4852  int startLine = m_memberDef->getStartBodyLine();
4853  int endLine = m_memberDef->getEndBodyLine();
4854  if (fd && readCodeFragment(fd->absFilePath(),
4855  startLine,endLine,codeFragment)
4856  )
4857  {
4858  QCString scopeName;
4859  if (m_memberDef->getClassDef())
4860  {
4861  scopeName = m_memberDef->getClassDef()->name();
4862  }
4863  else if (m_memberDef->getNamespaceDef())
4864  {
4865  scopeName = m_memberDef->getNamespaceDef()->name();
4866  }
4867  cache.sourceCode = parseCode(m_memberDef,scopeName,relPathAsString(),codeFragment,startLine,endLine,TRUE);
4868  cache.sourceCodeParsed = TRUE;
4869  }
4870  }
4871  return cache.sourceCode;
4872  }
4874  {
4875  Cachable &cache = getCache();
4876  if (!cache.callGraph)
4877  {
4878  cache.callGraph.reset(new DotCallGraph(m_memberDef,FALSE));
4879  }
4880  return cache.callGraph.get();
4881  }
4883  {
4884  static bool haveDot = Config_getBool("HAVE_DOT");
4885  if (m_memberDef->hasCallGraph() && haveDot &&
4886  (m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal()))
4887  {
4888  DotCallGraph *cg = getCallGraph();
4889  return !cg->isTooBig() && !cg->isTrivial();
4890  }
4891  return TemplateVariant(FALSE);
4892  }
4894  {
4895  if (hasCallGraph().toBool())
4896  {
4897  DotCallGraph *cg = getCallGraph();
4898  QGString result;
4899  FTextStream t(&result);
4900  switch (g_globals.outputFormat)
4901  {
4903  {
4906  g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
4907  relPathAsString(),TRUE,g_globals.dynSectionId
4908  );
4909  }
4910  break;
4912  {
4915  g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+".tex",
4916  relPathAsString(),TRUE,g_globals.dynSectionId
4917  );
4918  }
4919  break;
4920  // TODO: support other generators
4921  default:
4922  err("context.cpp: output format not yet supported");
4923  break;
4924  }
4926  return TemplateVariant(result.data(),TRUE);
4927  }
4928  else
4929  {
4930  return TemplateVariant("");
4931  }
4932  }
4934  {
4935  Cachable &cache = getCache();
4936  if (!cache.callerGraph)
4937  {
4938  cache.callerGraph.reset(new DotCallGraph(m_memberDef,TRUE));
4939  }
4940  return cache.callerGraph.get();
4941  }
4943  {
4944  static bool haveDot = Config_getBool("HAVE_DOT");
4945  if (m_memberDef->hasCallerGraph() && haveDot &&
4946  (m_memberDef->isFunction() || m_memberDef->isSlot() || m_memberDef->isSignal()))
4947  {
4948  DotCallGraph *cg = getCallerGraph();
4949  return !cg->isTooBig() && !cg->isTrivial();
4950  }
4951  return TemplateVariant(FALSE);
4952  }
4954  {
4955  if (hasCallerGraph().toBool())
4956  {
4957  DotCallGraph *cg = getCallerGraph();
4958  QGString result;
4959  FTextStream t(&result);
4960  switch (g_globals.outputFormat)
4961  {
4963  {
4966  g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+Doxygen::htmlFileExtension,
4967  relPathAsString(),TRUE,g_globals.dynSectionId
4968  );
4969  }
4970  break;
4972  {
4975  g_globals.outputDir+portable_pathSeparator()+m_memberDef->getOutputFileBase()+".tex",
4976  relPathAsString(),TRUE,g_globals.dynSectionId
4977  );
4978  }
4979  break;
4980  // TODO: support other generators
4981  default:
4982  err("context.cpp: output format not yet supported");
4983  break;
4984  }
4986  return TemplateVariant(result.data(),TRUE);
4987  }
4988  else
4989  {
4990  return TemplateVariant("");
4991  }
4992  }
4994  {
4995  return m_memberDef->typeString();
4996  }
4998  {
4999  if (args.count()==1)
5000  {
5001  return m_memberDef->isDetailedSectionVisible(args[0].toString()=="module",args[0].toString()=="file");
5002  }
5003  else
5004  {
5005  err(".detailsVisibleFor should take one string argument, got %d\n",args.count());
5006  }
5007  return TemplateVariant();
5008  }
5010  {
5011  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleDetailsVisibleFor>(this);
5012  }
5014  {
5015  if (args.count()==1)
5016  {
5017  SrcLangExt lang = m_memberDef->getLanguage();
5018  QCString n = m_memberDef->name();
5019  QCString ctx = args[0].toString();
5021  if (m_memberDef->getEnumScope() && m_memberDef->livesInsideEnum())
5022  {
5023  n.prepend(m_memberDef->getEnumScope()->displayName()+sep);
5024  }
5025  if (ctx=="module" && m_memberDef->getClassDef() && !m_memberDef->isRelated())
5026  {
5027  n.prepend(m_memberDef->getClassDef()->displayName()+sep);
5028  }
5029  else if ((ctx=="module" || ctx=="file") && m_memberDef->getNamespaceDef())
5030  {
5031  n.prepend(m_memberDef->getNamespaceDef()->displayName()+sep);
5032  }
5033  return n;
5034  }
5035  else
5036  {
5037  err(".nameWithContextFor should take one string argument, got %d\n",args.count());
5038  }
5039  return TemplateVariant();
5040  }
5042  {
5043  return TemplateVariant::Delegate::fromMethod<Private,&Private::handleNameWithContextFor>(this);
5044  }
5045  private:
5047  struct Cachable : public DefinitionContext<MemberContext::Private>::Cachable
5048  {
5050  initializerParsed(FALSE), sourceCodeParsed(FALSE),
5051  declArgsParsed(FALSE), declTypeParsed(FALSE) { }
5086  };
5088  {
5089  Cachable *c = static_cast<Cachable*>(m_memberDef->cookie());
5090  assert(c!=0);
5091  return *c;
5092  }
5094 };
5095 //%% }
5096 
5098 
5100 {
5101  p = new Private(md);
5102 }
5103 
5105 {
5106  delete p;
5107 }
5108 
5110 {
5111  return p->get(n);
5112 }
5113 
5114 
5115 //------------------------------------------------------------------------
5116 
5117 //%% struct Module(Symbol): group information
5118 //%% {
5119 class ModuleContext::Private : public DefinitionContext<ModuleContext::Private>
5120 {
5121  public:
5123  {
5124  static bool init=FALSE;
5125  if (!init)
5126  {
5127  addBaseProperties(s_inst);
5128  s_inst.addProperty("title", &Private::title);
5129  s_inst.addProperty("highlight", &Private::highlight);
5130  s_inst.addProperty("subhighlight", &Private::subHighlight);
5131  s_inst.addProperty("hasGroupGraph", &Private::hasGroupGraph);
5132  s_inst.addProperty("groupGraph", &Private::groupGraph);
5133  s_inst.addProperty("hasDetails", &Private::hasDetails);
5134  s_inst.addProperty("modules", &Private::modules);
5135  s_inst.addProperty("dirs", &Private::dirs);
5136  s_inst.addProperty("files", &Private::files);
5137  s_inst.addProperty("namespaces", &Private::namespaces);
5138  s_inst.addProperty("classes", &Private::classes);
5139  s_inst.addProperty("constantgroups", &Private::constantgroups);
5140  s_inst.addProperty("examples", &Private::examples);
5141  s_inst.addProperty("macros", &Private::macros);
5142  s_inst.addProperty("typedefs", &Private::typedefs);
5143  s_inst.addProperty("enums", &Private::enums);
5144  s_inst.addProperty("enumvalues", &Private::enumValues);
5145  s_inst.addProperty("functions", &Private::functions);
5146  s_inst.addProperty("variables", &Private::variables);
5147  s_inst.addProperty("signals", &Private::signals);
5148  s_inst.addProperty("publicSlots", &Private::publicSlots);
5149  s_inst.addProperty("protectedSlots", &Private::protectedSlots);
5150  s_inst.addProperty("privateSlots", &Private::privateSlots);
5151  s_inst.addProperty("events", &Private::events);
5152  s_inst.addProperty("properties", &Private::properties);
5153  s_inst.addProperty("friends", &Private::friends);
5154  s_inst.addProperty("memberGroups", &Private::memberGroups);
5155  s_inst.addProperty("detailedMacros", &Private::detailedMacros);
5156  s_inst.addProperty("detailedTypedefs", &Private::detailedTypedefs);
5157  s_inst.addProperty("detailedEnums", &Private::detailedEnums);
5158  s_inst.addProperty("detailedEnumValues", &Private::detailedEnumValues);
5159  s_inst.addProperty("detailedFunctions", &Private::detailedFunctions);
5160  s_inst.addProperty("detailedVariables", &Private::detailedVariables);
5161  s_inst.addProperty("detailedSignals", &Private::detailedSignals);
5162  s_inst.addProperty("detailedPublicSlots", &Private::detailedPublicSlots);
5163  s_inst.addProperty("detailedProtectedSlots", &Private::detailedProtectedSlots);
5164  s_inst.addProperty("detailedPrivateSlots", &Private::detailedPrivateSlots);
5165  s_inst.addProperty("detailedEvents", &Private::detailedEvents);
5166  s_inst.addProperty("detailedProperties", &Private::detailedProperties);
5167  s_inst.addProperty("detailedFriends", &Private::detailedFriends);
5168  s_inst.addProperty("inlineClasses", &Private::inlineClasses);
5169  s_inst.addProperty("compoundType", &Private::compoundType);
5170  init=TRUE;
5171  }
5172  if (!gd->cookie()) { gd->setCookie(new ModuleContext::Private::Cachable(gd)); }
5173  }
5174  virtual ~Private() {}
5175  TemplateVariant get(const char *n) const
5176  {
5177  return s_inst.get(this,n);
5178  }
5180  {
5181  return TemplateVariant(m_groupDef->groupTitle());
5182  }
5184  {
5185  return TemplateVariant("modules");
5186  }
5188  {
5189  return TemplateVariant("");
5190  }
5192  {
5193  Cachable &cache = getCache();
5194  if (!cache.groupGraph)
5195  {
5196  cache.groupGraph.reset(new DotGroupCollaboration(m_groupDef));
5197  }
5198  return cache.groupGraph.get();
5199  }
5201  {
5202  bool result=FALSE;
5203  static bool haveDot = Config_getBool("HAVE_DOT");
5204  static bool groupGraphs = Config_getBool("GROUP_GRAPHS");
5205  if (haveDot && groupGraphs)
5206  {
5207  DotGroupCollaboration *graph = getGroupGraph();
5208  result = !graph->isTrivial();
5209  }
5210  return result;
5211  }
5213  {
5214  QGString result;
5215  static bool haveDot = Config_getBool("HAVE_DOT");
5216  static bool groupGraphs = Config_getBool("GROUP_GRAPHS");
5217  if (haveDot && groupGraphs)
5218  {
5219  DotGroupCollaboration *graph = getGroupGraph();
5220  FTextStream t(&result);
5221  switch (g_globals.outputFormat)
5222  {
5224  {
5225  graph->writeGraph(t,GOF_BITMAP,
5226  EOF_Html,
5228  g_globals.outputDir+portable_pathSeparator()+m_groupDef->getOutputFileBase()+Doxygen::htmlFileExtension,
5229  relPathAsString(),
5230  TRUE,
5232  }
5233  break;
5235  {
5236  graph->writeGraph(t,GOF_EPS,
5237  EOF_LaTeX,
5239  g_globals.outputDir+portable_pathSeparator()+m_groupDef->getOutputFileBase()+".tex",
5240  relPathAsString(),
5241  TRUE,
5243  }
5244  break;
5245  // TODO: support other generators
5246  default:
5247  err("context.cpp: output format not yet supported");
5248  break;
5249  }
5251  }
5252  return TemplateVariant(result.data(),TRUE);
5253  }
5255  {
5256  return m_groupDef->hasDetailedDescription();
5257  }
5259  {
5260  Cachable &cache = getCache();
5261  if (!cache.modules)
5262  {
5263  TemplateList *moduleList = TemplateList::alloc();
5264  if (m_groupDef->getSubGroups())
5265  {
5266  GroupListIterator gli(*m_groupDef->getSubGroups());
5267  GroupDef *gd;
5268  for (gli.toFirst();(gd=gli.current());++gli)
5269  {
5270  if (gd->isVisible())
5271  {
5272  moduleList->append(ModuleContext::alloc(gd));
5273  }
5274  }
5275  }
5276  cache.modules.reset(moduleList);
5277  }
5278  return cache.modules.get();
5279  }
5281  {
5282  Cachable &cache = getCache();
5283  if (!cache.examples)
5284  {
5285  TemplateList *exampleList = TemplateList::alloc();
5286  if (m_groupDef->getExamples())
5287  {
5288  PageSDict::Iterator eli(*m_groupDef->getExamples());
5289  PageDef *ex;
5290  for (eli.toFirst();(ex=eli.current());++eli)
5291  {
5292  exampleList->append(PageContext::alloc(ex,FALSE,TRUE));
5293  }
5294  }
5295  cache.examples.reset(exampleList);
5296  }
5297  return cache.examples.get();
5298  }
5300  {
5301  Cachable &cache = getCache();
5302  if (!cache.pages)
5303  {
5304  TemplateList *pageList = TemplateList::alloc();
5305  if (m_groupDef->getExamples())
5306  {
5307  PageSDict::Iterator eli(*m_groupDef->getPages());
5308  PageDef *ex;
5309  for (eli.toFirst();(ex=eli.current());++eli)
5310  {
5311  pageList->append(PageContext::alloc(ex,FALSE,TRUE));
5312  }
5313  }
5314  cache.pages.reset(pageList);
5315  }
5316  return cache.pages.get();
5317  }
5319  {
5320  Cachable &cache = getCache();
5321  if (!cache.dirs)
5322  {
5323  TemplateList *dirList = TemplateList::alloc();
5324  if (m_groupDef->getDirs())
5325  {
5326  QListIterator<DirDef> it(*m_groupDef->getDirs());
5327  DirDef *dd;
5328  for (it.toFirst();(dd=it.current());++it)
5329  {
5330  dirList->append(DirContext::alloc(dd));
5331  }
5332  }
5333  cache.dirs.reset(dirList);
5334  }
5335  return cache.dirs.get();
5336  }
5338  {
5339  Cachable &cache = getCache();
5340  if (!cache.files)
5341  {
5342  TemplateList *fileList = TemplateList::alloc();
5343  if (m_groupDef->getFiles())
5344  {
5345  QListIterator<FileDef> it(*m_groupDef->getFiles());
5346  FileDef *fd;
5347  for (it.toFirst();(fd=it.current());++it)
5348  {
5349  fileList->append(FileContext::alloc(fd));
5350  }
5351  }
5352  cache.files.reset(fileList);
5353  }
5354  return cache.files.get();
5355  }
5357  {
5358  Cachable &cache = getCache();
5359  if (!cache.classes)
5360  {
5361  TemplateList *classList = TemplateList::alloc();
5362  if (m_groupDef->getClasses())
5363  {
5364  ClassSDict::Iterator sdi(*m_groupDef->getClasses());
5365  ClassDef *cd;
5366  for (sdi.toFirst();(cd=sdi.current());++sdi)
5367  {
5368  if (cd->visibleInParentsDeclList())
5369  {
5370  classList->append(ClassContext::alloc(cd));
5371  }
5372  }
5373  }
5374  cache.classes.reset(classList);
5375  }
5376  return cache.classes.get();
5377  }
5379  {
5380  Cachable &cache = getCache();
5381  if (!cache.namespaces)
5382  {
5383  TemplateList *namespaceList = TemplateList::alloc();
5384  if (m_groupDef->getNamespaces())
5385  {
5386  NamespaceSDict::Iterator sdi(*m_groupDef->getNamespaces());
5387  NamespaceDef *nd;
5388  for (sdi.toFirst();(nd=sdi.current());++sdi)
5389  {
5390  if (nd->isLinkable() && !nd->isConstantGroup())
5391  {
5392  namespaceList->append(NamespaceContext::alloc(nd));
5393  }
5394  }
5395  }
5396  cache.namespaces.reset(namespaceList);
5397  }
5398  return cache.namespaces.get();
5399  }
5401  {
5402  Cachable &cache = getCache();
5403  if (!cache.constantgroups)
5404  {
5405  TemplateList *namespaceList = TemplateList::alloc();
5406  if (m_groupDef->getNamespaces())
5407  {
5408  NamespaceSDict::Iterator sdi(*m_groupDef->getNamespaces());
5409  NamespaceDef *nd;
5410  for (sdi.toFirst();(nd=sdi.current());++sdi)
5411  {
5412  if (nd->isLinkable() && nd->isConstantGroup())
5413  {
5414  namespaceList->append(NamespaceContext::alloc(nd));
5415  }
5416  }
5417  }
5418  cache.constantgroups.reset(namespaceList);
5419  }
5420  return cache.constantgroups.get();
5421  }
5422 
5424  MemberListType type,const char *title,bool detailed=FALSE) const
5425  {
5426  if (!list)
5427  {
5428  MemberList *ml = m_groupDef->getMemberList(type);
5429  if (ml)
5430  {
5431  list.reset(MemberListInfoContext::alloc(m_groupDef,relPathAsString(),ml,title,""));
5432  }
5433  }
5434  if (list)
5435  {
5436  return list.get();
5437  }
5438  else
5439  {
5440  return TemplateVariant(FALSE);
5441  }
5442  }
5444  {
5445  return getMemberList(getCache().macros,MemberListType_decDefineMembers,theTranslator->trDefines());
5446  }
5448  {
5449  return getMemberList(getCache().typedefs,MemberListType_decTypedefMembers,theTranslator->trTypedefs());
5450  }
5452  {
5453  return getMemberList(getCache().enums,MemberListType_decEnumMembers,theTranslator->trEnumerations());
5454  }
5456  {
5457  return getMemberList(getCache().enums,MemberListType_decEnumValMembers,theTranslator->trEnumerationValues());
5458  }
5460  {
5462  SrcLangExt lang = m_groupDef->getLanguage();
5463  if (lang==SrcLangExt_Fortran) title=theTranslator->trSubprograms();
5464  else if (lang==SrcLangExt_VHDL) title=VhdlDocGen::trFunctionAndProc();
5465  return getMemberList(getCache().functions,MemberListType_decFuncMembers,title);
5466  }
5468  {
5469  return getMemberList(getCache().variables,MemberListType_decVarMembers,theTranslator->trVariables());
5470  }
5472  {
5473  return getMemberList(getCache().signals,MemberListType_signals,theTranslator->trSignals());
5474  }
5476  {
5477  return getMemberList(getCache().publicSlots,MemberListType_pubSlots,theTranslator->trPublicSlots());
5478  }
5480  {
5481  return getMemberList(getCache().protectedSlots,MemberListType_proSlots,theTranslator->trProtectedSlots());
5482  }
5484  {
5485  return getMemberList(getCache().privateSlots,MemberListType_priSlots,theTranslator->trPrivateSlots());
5486  }
5488  {
5489  return getMemberList(getCache().events,MemberListType_events,theTranslator->trEvents());
5490  }
5492  {
5493  return getMemberList(getCache().properties,MemberListType_properties,theTranslator->trProperties());
5494  }
5496  {
5497  return getMemberList(getCache().friends,MemberListType_friends,theTranslator->trFriends());
5498  }
5500  {
5501  Cachable &cache = getCache();
5502  if (!cache.memberGroups)
5503  {
5504  if (m_groupDef->getMemberGroupSDict())
5505  {
5506  cache.memberGroups.reset(MemberGroupListContext::alloc(m_groupDef,relPathAsString(),m_groupDef->getMemberGroupSDict(),m_groupDef->subGrouping()));
5507  }
5508  else
5509  {
5511  }
5512  }
5513  return cache.memberGroups.get();
5514  }
5516  {
5517  return getMemberList(getCache().detailedMacros,MemberListType_docDefineMembers,theTranslator->trDefineDocumentation());
5518  }
5520  {
5521  return getMemberList(getCache().detailedTypedefs,MemberListType_docTypedefMembers,theTranslator->trTypedefDocumentation());
5522  }
5524  {
5525  return getMemberList(getCache().detailedEnums,MemberListType_docEnumMembers,theTranslator->trEnumerationTypeDocumentation());
5526  }
5528  {
5529  return getMemberList(getCache().detailedEnumValues,MemberListType_docEnumValMembers,theTranslator->trEnumerationValueDocumentation());
5530  }
5532  {
5534  SrcLangExt lang = m_groupDef->getLanguage();
5536  return getMemberList(getCache().detailedFunctions,MemberListType_docFuncMembers,title);
5537  }
5539  {
5540  return getMemberList(getCache().detailedVariables,MemberListType_docVarMembers,theTranslator->trVariableDocumentation());
5541  }
5543  {
5544  return getMemberList(getCache().detailedSignals,MemberListType_docSignalMembers,theTranslator->trSignals());
5545  }
5547  {
5548  return getMemberList(getCache().detailedPublicSlots,MemberListType_docPubSlotMembers,theTranslator->trPublicSlots());
5549  }
5551  {
5552  return getMemberList(getCache().detailedProtectedSlots,MemberListType_docProSlotMembers,theTranslator->trProtectedSlots());
5553  }
5555  {
5556  return getMemberList(getCache().detailedPrivateSlots,MemberListType_docPriSlotMembers,theTranslator->trPrivateSlots());
5557  }
5559  {
5560  return getMemberList(getCache().detailedEvents,MemberListType_docEventMembers,theTranslator->trEventDocumentation(),TRUE);
5561  }
5563  {
5564  return getMemberList(getCache().detailedProperties,MemberListType_docPropMembers,theTranslator->trPropertyDocumentation(),TRUE);
5565  }
5567  {
5568  return getMemberList(getCache().detailedFriends,MemberListType_docFriendMembers,theTranslator->trFriends(),TRUE);
5569  }
5571  {
5572  Cachable &cache = getCache();
5573  if (!cache.inlineClasses)
5574  {
5575  TemplateList *classList = TemplateList::alloc();
5576  if (m_groupDef->getClasses())
5577  {
5578  ClassSDict::Iterator sdi(*m_groupDef->getClasses());
5579  ClassDef *cd;
5580  for (sdi.toFirst();(cd=sdi.current());++sdi)
5581  {
5582  if (cd->name().find('@')==-1 &&
5583  cd->isLinkableInProject() &&
5584  cd->isEmbeddedInOuterScope() &&
5585  cd->partOfGroups()==0)
5586  {
5587  classList->append(ClassContext::alloc(cd));
5588  }
5589  }
5590  }
5591  cache.inlineClasses.reset(classList);
5592  }
5593  return cache.inlineClasses.get();
5594  }
5596  {
5597  return "module"; //theTranslator->trGroup(FALSE,TRUE);
5598  }
5599  private:
5601  struct Cachable : public DefinitionContext<ModuleContext::Private>::Cachable
5602  {
5641  };
5643  {
5644  Cachable *c = static_cast<Cachable*>(m_groupDef->cookie());
5645  assert(c!=0);
5646  return *c;
5647  }
5649 };
5650 //%% }
5651 
5653 
5655 {
5656  p = new Private(gd);
5657 }
5658 
5660 {
5661  delete p;
5662 }
5663 
5665 {
5666  return p->get(n);
5667 }
5668 
5669 //------------------------------------------------------------------------
5670 
5671 //%% list ClassList[Class] : list of classes
5673 {
5674  public:
5675  void addClasses(const ClassSDict &classSDict)
5676  {
5677  ClassSDict::Iterator cli(classSDict);
5678  ClassDef *cd;
5679  for (cli.toFirst() ; (cd=cli.current()) ; ++cli )
5680  {
5681  if (cd->getLanguage()==SrcLangExt_VHDL &&
5684  ) // no architecture
5685  {
5686  continue;
5687  }
5688  if (cd->isLinkableInProject() && cd->templateMaster()==0 &&
5689  !cd->isHidden() && !cd->isEmbeddedInOuterScope())
5690  {
5691  append(ClassContext::alloc(cd));
5692  }
5693  }
5694  }
5695 };
5696 
5698 {
5699  p = new Private;
5702 }
5703 
5705 {
5706  delete p;
5707 }
5708 
5709 // TemplateListIntf
5711 {
5712  return p->count();
5713 }
5714 
5716 {
5717  return p->at(index);
5718 }
5719 
5721 {
5722  return p->createIterator();
5723 }
5724 
5725 //------------------------------------------------------------------------
5726 
5727 //%% list ClassIndex[Class] : list of classes
5729 {
5730  public:
5732  {
5733  static bool init=FALSE;
5734  if (!init)
5735  {
5736  s_inst.addProperty("list", &Private::list);
5737  s_inst.addProperty("fileName", &Private::fileName);
5738  s_inst.addProperty("relPath", &Private::relPath);
5739  s_inst.addProperty("highlight", &Private::highlight);
5740  s_inst.addProperty("subhighlight",&Private::subhighlight);
5741  s_inst.addProperty("title", &Private::title);
5742  init=TRUE;
5743  }
5744  }
5745  TemplateVariant get(const char *n) const
5746  {
5747  return s_inst.get(this,n);
5748  }
5750  {
5751  if (!m_cache.classes)
5752  {
5753  TemplateList *classList = TemplateList::alloc();
5754  if (Doxygen::classSDict)
5755  {
5757  ClassDef *cd;
5758  for (cli.toFirst() ; (cd=cli.current()) ; ++cli )
5759  {
5760  if (cd->getLanguage()==SrcLangExt_VHDL &&
5763  ) // no architecture
5764  {
5765  continue;
5766  }
5767  if (cd->isLinkableInProject() && cd->templateMaster()==0)
5768  {
5769  classList->append(ClassContext::alloc(cd));
5770  }
5771  }
5772  }
5773  m_cache.classes.reset(classList);
5774  }
5775  return m_cache.classes.get();
5776  }
5778  {
5779  return "classes";
5780  }
5782  {
5783  return "";
5784  }
5786  {
5787  return "classes";
5788  }
5790  {
5791  return "classindex";
5792  }
5794  {
5795  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
5796  static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
5797  if (fortranOpt)
5798  {
5799  return theTranslator->trDataTypes();
5800  }
5801  else if (vhdlOpt)
5802  {
5803  return VhdlDocGen::trDesignUnits();
5804  }
5805  else
5806  {
5807  return theTranslator->trCompoundIndex();
5808  }
5809  }
5810  private:
5811  struct Cachable
5812  {
5814  };
5817 };
5818 
5820 
5822 {
5823  p = new Private;
5824  //p->addClasses(*Doxygen::hiddenClasses);
5825 }
5826 
5828 {
5829  delete p;
5830 }
5831 
5832 // TemplateStructIntf
5834 {
5835  return p->get(n);
5836 }
5837 
5838 //------------------------------------------------------------------------
5839 
5840 static int computeMaxDepth(const TemplateListIntf *list)
5841 {
5842  int maxDepth=0;
5843  if (list)
5844  {
5846  TemplateVariant v;
5847  for (it->toFirst();it->current(v);it->toNext())
5848  {
5849  const TemplateStructIntf *s = v.toStruct();
5850  TemplateVariant child = s->get("children");
5851  int d = computeMaxDepth(child.toList())+1;
5852  if (d>maxDepth) maxDepth=d;
5853  }
5854  delete it;
5855  }
5856  return maxDepth;
5857 }
5858 
5859 static int computeNumNodesAtLevel(const TemplateStructIntf *s,int level,int maxLevel)
5860 {
5861  int num=0;
5862  if (level<maxLevel)
5863  {
5864  num++;
5865  TemplateVariant child = s->get("children");
5866  if (child.toList())
5867  {
5869  TemplateVariant v;
5870  for (it->toFirst();it->current(v);it->toNext())
5871  {
5872  num+=computeNumNodesAtLevel(v.toStruct(),level+1,maxLevel);
5873  }
5874  delete it;
5875  }
5876  }
5877  return num;
5878 }
5879 
5880 static int computePreferredDepth(const TemplateListIntf *list,int maxDepth)
5881 {
5882  int preferredNumEntries = Config_getInt("HTML_INDEX_NUM_ENTRIES");
5883  int preferredDepth=1;
5884  if (preferredNumEntries>0)
5885  {
5886  int depth = maxDepth;
5887  for (int i=1;i<=depth;i++)
5888  {
5889  int num=0;
5891  TemplateVariant v;
5892  for (it->toFirst();it->current(v);it->toNext())
5893  {
5894  num+=computeNumNodesAtLevel(v.toStruct(),0,i);
5895  }
5896  delete it;
5897  if (num<=preferredNumEntries)
5898  {
5899  preferredDepth=i;
5900  }
5901  else
5902  {
5903  break;
5904  }
5905  }
5906  }
5907  return preferredDepth;
5908 }
5909 
5910 //------------------------------------------------------------------------
5911 
5912 //%% struct ClassHierarchy: inheritance tree
5913 //%% {
5915 {
5916  public:
5918  {
5919  m_classTree.reset(NestingContext::alloc(0,0));
5922  m_classTree->addClassHierarchy(*Doxygen::classSDict,TRUE);
5923  m_classTree->addClassHierarchy(*Doxygen::hiddenClasses,TRUE);
5924  //%% ClassInheritance tree
5925  static bool init=FALSE;
5926  if (!init)
5927  {
5928  s_inst.addProperty("tree", &Private::tree);
5929  s_inst.addProperty("fileName", &Private::fileName);
5930  s_inst.addProperty("relPath", &Private::relPath);
5931  s_inst.addProperty("highlight", &Private::highlight);
5932  s_inst.addProperty("subhighlight", &Private::subhighlight);
5933  s_inst.addProperty("title", &Private::title);
5934  s_inst.addProperty("preferredDepth", &Private::preferredDepth);
5935  s_inst.addProperty("maxDepth", &Private::maxDepth);
5936  s_inst.addProperty("diagrams", &Private::diagrams);
5937  init=TRUE;
5938  }
5939  }
5940  TemplateVariant get(const char *n) const
5941  {
5942  return s_inst.get(this,n);
5943  }
5945  {
5946  return m_classTree.get();
5947  }
5949  {
5950  return "hierarchy";
5951  }
5953  {
5954  return "";
5955  }
5957  {
5958  return "classes";
5959  }
5961  {
5962  return "classhierarchy";
5963  }
5965  {
5966  if (!m_cache.hierarchy)
5967  {
5968  m_cache.hierarchy.reset(new DotGfxHierarchyTable());
5969  }
5970  return m_cache.hierarchy.get();
5971  }
5973  {
5974  if (!m_cache.diagrams)
5975  {
5976  TemplateList *diagrams = TemplateList::alloc();
5977  DotGfxHierarchyTable *hierarchy = getHierarchy();
5978  if (hierarchy->subGraphs())
5979  {
5980  int id=0;
5981  QListIterator<DotNode> li(*hierarchy->subGraphs());
5982  DotNode *n;
5983  for (li.toFirst();(n=li.current());++li)
5984  {
5985  diagrams->append(InheritanceGraphContext::alloc(hierarchy,n,id++));
5986  }
5987  }
5988  m_cache.diagrams.reset(diagrams);
5989  }
5990  return m_cache.diagrams.get();
5991  }
5993  {
5994  static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
5995  if (vhdlOpt)
5996  {
5998  }
5999  else
6000  {
6001  return theTranslator->trClassHierarchy();
6002  }
6003  }
6005  {
6006  if (!m_cache.maxDepthComputed)
6007  {
6008  m_cache.maxDepth = computeMaxDepth(m_classTree.get());
6009  m_cache.maxDepthComputed=TRUE;
6010  }
6011  return m_cache.maxDepth;
6012  }
6014  {
6015  if (!m_cache.preferredDepthComputed)
6016  {
6017  m_cache.preferredDepth = computePreferredDepth(m_classTree.get(),maxDepth().toInt());
6018  m_cache.preferredDepthComputed=TRUE;
6019  }
6020  return m_cache.preferredDepth;
6021  }
6022  private:
6024  struct Cachable
6025  {
6026  Cachable() : maxDepth(0), maxDepthComputed(FALSE),
6027  preferredDepth(0), preferredDepthComputed(FALSE), hierarchy(0) {}
6034  };
6037 };
6038 //%% }
6039 
6041 
6043 {
6044  p = new Private;
6045 }
6046 
6048 {
6049  delete p;
6050 }
6051 
6053 {
6054  return p->get(name);
6055 }
6056 
6057 //------------------------------------------------------------------------
6058 
6059 //%% struct NestingNode: node is a nesting relation tree
6060 //%% {
6062 {
6063  public:
6065  Definition *d,int index,int level,bool addCls,bool inherit, bool hideSuper)
6066  : m_parent(parent), m_def(d), m_level(level), m_index(index)
6067  {
6068  m_children.reset(NestingContext::alloc(thisNode,level+1));
6069  static bool init=FALSE;
6070  if (!init)
6071  {
6072  //%% bool is_leaf_node: true if this node does not have any children
6073  s_inst.addProperty("is_leaf_node",&Private::isLeafNode);
6074  //%% Nesting children: list of nested classes/namespaces
6075  s_inst.addProperty("children",&Private::children);
6076  //%% [optional] Class class: class info (if this node represents a class)
6077  s_inst.addProperty("class",&Private::getClass);
6078  //%% [optional] Namespace namespace: namespace info (if this node represents a namespace)
6079  s_inst.addProperty("namespace",&Private::getNamespace);
6080  //%% [optional] File file: file info (if this node represents a file)
6081  s_inst.addProperty("file",&Private::getFile);
6082  //%% [optional] Dir dir: directory info (if this node represents a directory)
6083  s_inst.addProperty("dir",&Private::getDir);
6084  //%% [optional] Page page: page info (if this node represents a page)
6085  s_inst.addProperty("page",&Private::getPage);
6086  //%% [optional] Module module: module info (if this node represents a module)
6087  s_inst.addProperty("module",&Private::getModule);
6088  //%% int id
6089  s_inst.addProperty("id",&Private::id);
6090  //%% string level
6091  s_inst.addProperty("level",&Private::level);
6092  //%% string name
6093  s_inst.addProperty("name",&Private::name);
6094  //%% string brief
6095  s_inst.addProperty("brief",&Private::brief);
6096  //%% bool isLinkable
6097  s_inst.addProperty("isLinkable",&Private::isLinkable);
6098  s_inst.addProperty("anchor",&Private::anchor);
6099  s_inst.addProperty("fileName",&Private::fileName);
6100  s_inst.addProperty("isReference",&Private::isReference);
6101  s_inst.addProperty("externalReference",&Private::externalReference);
6102  init=TRUE;
6103  }
6104 
6105  addNamespaces(addCls);
6106  addClasses(inherit,hideSuper);
6107  addDirFiles();
6108  addPages();
6109  addModules();
6110  }
6111  TemplateVariant get(const char *n) const
6112  {
6113  return s_inst.get(this,n);
6114  }
6116  {
6117  return m_children->count()==0;
6118  }
6120  {
6121  return m_children.get();
6122  }
6124  {
6125  if (!m_cache.classContext && m_def->definitionType()==Definition::TypeClass)
6126  {
6127  m_cache.classContext.reset(ClassContext::alloc((ClassDef*)m_def));
6128  }
6129  if (m_cache.classContext)
6130  {
6131  return m_cache.classContext.get();
6132  }
6133  else
6134  {
6135  return TemplateVariant(FALSE);
6136  }
6137  }
6139  {
6140  if (!m_cache.namespaceContext && m_def->definitionType()==Definition::TypeNamespace)
6141  {
6142  m_cache.namespaceContext.reset(NamespaceContext::alloc((NamespaceDef*)m_def));
6143  }
6144  if (m_cache.namespaceContext)
6145  {
6146  return m_cache.namespaceContext.get();
6147  }
6148  else
6149  {
6150  return TemplateVariant(FALSE);
6151  }
6152  }
6154  {
6155  if (!m_cache.dirContext && m_def->definitionType()==Definition::TypeDir)
6156  {
6157  m_cache.dirContext.reset(DirContext::alloc((DirDef*)m_def));
6158  }
6159  if (m_cache.dirContext)
6160  {
6161  return m_cache.dirContext.get();
6162  }
6163  else
6164  {
6165  return TemplateVariant(FALSE);
6166  }
6167  }
6169  {
6170  if (!m_cache.fileContext && m_def->definitionType()==Definition::TypeFile)
6171  {
6172  m_cache.fileContext.reset(FileContext::alloc((FileDef*)m_def));
6173  }
6174  if (m_cache.fileContext)
6175  {
6176  return m_cache.fileContext.get();
6177  }
6178  else
6179  {
6180  return TemplateVariant(FALSE);
6181  }
6182  }
6184  {
6185  if (!m_cache.pageContext && m_def->definitionType()==Definition::TypePage)
6186  {
6187  m_cache.pageContext.reset(PageContext::alloc((PageDef*)m_def,FALSE,FALSE));
6188  }
6189  if (m_cache.pageContext)
6190  {
6191  return m_cache.pageContext.get();
6192  }
6193  else
6194  {
6195  return TemplateVariant(FALSE);
6196  }
6197  }
6199  {
6200  if (!m_cache.moduleContext && m_def->definitionType()==Definition::TypeGroup)
6201  {
6202  m_cache.moduleContext.reset(ModuleContext::alloc((GroupDef*)m_def));
6203  }
6204  if (m_cache.moduleContext)
6205  {
6206  return m_cache.moduleContext.get();
6207  }
6208  else
6209  {
6210  return TemplateVariant(FALSE);
6211  }
6212  }
6214  {
6215  return m_level;
6216  }
6218  {
6219  QCString result;
6220  if (m_parent) result=m_parent->id();
6221  result+=QCString().setNum(m_index)+"_";
6222  return result;
6223  }
6225  {
6226  return m_def->displayName(FALSE);
6227  }
6229  {
6230  static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
6231  return createSubdirs ? QCString("../../") : QCString("");
6232  }
6234  {
6235  if (!m_cache.brief)
6236  {
6237  if (m_def->hasBriefDescription())
6238  {
6239  m_cache.brief.reset(new TemplateVariant(parseDoc(m_def,m_def->briefFile(),m_def->briefLine(),
6240  "",m_def->briefDescription(),TRUE)));
6241  }
6242  else
6243  {
6244  m_cache.brief.reset(new TemplateVariant(""));
6245  }
6246  }
6247  return *m_cache.brief;
6248  }
6250  {
6251  return m_def->isLinkable();
6252  }
6254  {
6255  return m_def->anchor();
6256  }
6258  {
6259  return m_def->getOutputFileBase();
6260  }
6262  {
6263  return m_def->isReference();
6264  }
6266  {
6267  return m_def->externalReference(relPathAsString());
6268  }
6269 
6270  //------------------------------------------------------------------
6271 
6272  void addClasses(bool inherit, bool hideSuper)
6273  {
6274  ClassDef *cd = m_def->definitionType()==Definition::TypeClass ? (ClassDef*)m_def : 0;
6275  if (cd && inherit)
6276  {
6277  bool hasChildren = !cd->visited && !hideSuper && classHasVisibleChildren(cd);
6278  if (hasChildren)
6279  {
6280  bool wasVisited=cd->visited;
6281  cd->visited=TRUE;
6282  if (cd->getLanguage()==SrcLangExt_VHDL)
6283  {
6284  m_children->addDerivedClasses(cd->baseClasses(),wasVisited);
6285  }
6286  else
6287  {
6288  m_children->addDerivedClasses(cd->subClasses(),wasVisited);
6289  }
6290  }
6291  }
6292  else
6293  {
6294  if (cd && cd->getClassSDict())
6295  {
6296  m_children->addClasses(*cd->getClassSDict(),FALSE);
6297  }
6298  }
6299  }
6300  void addNamespaces(bool addClasses)
6301  {
6302  NamespaceDef *nd = m_def->definitionType()==Definition::TypeNamespace ? (NamespaceDef*)m_def : 0;
6303  if (nd && nd->getNamespaceSDict())
6304  {
6305  m_children->addNamespaces(*nd->getNamespaceSDict(),FALSE,addClasses);
6306  }
6307  if (addClasses && nd && nd->getClassSDict())
6308  {
6309  m_children->addClasses(*nd->getClassSDict(),FALSE);
6310  }
6311  }
6313  {
6314  DirDef *dd = m_def->definitionType()==Definition::TypeDir ? (DirDef*)m_def : 0;
6315  if (dd)
6316  {
6317  m_children->addDirs(dd->subDirs());
6318  if (dd && dd->getFiles())
6319  {
6320  m_children->addFiles(*dd->getFiles());
6321  }
6322  }
6323  }
6324  void addPages()
6325  {
6326  PageDef *pd = m_def->definitionType()==Definition::TypePage ? (PageDef*)m_def : 0;
6327  if (pd && pd->getSubPages())
6328  {
6329  m_children->addPages(*pd->getSubPages(),FALSE);
6330  }
6331  }
6332  void addModules()
6333  {
6334  GroupDef *gd = m_def->definitionType()==Definition::TypeGroup ? (GroupDef*)m_def : 0;
6335  if (gd && gd->getSubGroups())
6336  {
6337  m_children->addModules(*gd->getSubGroups());
6338  }
6339  }
6340  private:
6344  int m_level;
6345  int m_index;
6346  struct Cachable
6347  {
6355  };
6358 };
6359 //%% }
6360 
6362 
6364  Definition *d,int index,int level,bool addClass,bool inherit,bool hideSuper)
6365  : RefCountedContext("NestingNodeContext")
6366 {
6367  p = new Private(parent,this,d,index,level,addClass,inherit,hideSuper);
6368 }
6369 
6371 {
6372  delete p;
6373 }
6374 
6376 {
6377  return p->get(n);
6378 }
6379 
6381 {
6382  return p->id().toString();
6383 }
6384 
6385 //------------------------------------------------------------------------
6386 
6387 //%% list Nesting[NestingNode]: namespace and class nesting relations
6389 {
6390  public:
6392  : m_parent(parent), m_level(level), m_index(0) {}
6393 
6394  void addNamespaces(const NamespaceSDict &nsDict,bool rootOnly,bool addClasses)
6395  {
6396  NamespaceSDict::Iterator nli(nsDict);
6397  NamespaceDef *nd;
6398  for (nli.toFirst();(nd=nli.current());++nli)
6399  {
6400  if (nd->localName().find('@')==-1 &&
6401  (!rootOnly || nd->getOuterScope()==Doxygen::globalScope))
6402  {
6403  bool hasChildren = namespaceHasVisibleChild(nd,addClasses);
6404  bool isLinkable = nd->isLinkableInProject();
6405  if (isLinkable || hasChildren)
6406  {
6407  NestingNodeContext *nnc = NestingNodeContext::alloc(m_parent,nd,m_index,m_level,addClasses,FALSE,FALSE);
6408  append(nnc);
6409  m_index++;
6410  }
6411  }
6412  }
6413  }
6414  void addClasses(const ClassSDict &clDict,bool rootOnly)
6415  {
6416  ClassSDict::Iterator cli(clDict);
6417  ClassDef *cd;
6418  for (;(cd=cli.current());++cli)
6419  {
6420  if (cd->getLanguage()==SrcLangExt_VHDL)
6421  {
6424  )// no architecture
6425  {
6426  continue;
6427  }
6428  }
6429  if (!rootOnly ||
6430  cd->getOuterScope()==0 ||
6432  )
6433  {
6434  if (classVisibleInIndex(cd) && cd->templateMaster()==0)
6435  {
6436  NestingNodeContext *nnc = NestingNodeContext::alloc(m_parent,cd,m_index,m_level,TRUE,FALSE,FALSE);
6437  append(nnc);
6438  m_index++;
6439  }
6440  }
6441  }
6442  }
6443  void addDirs(const DirSDict &dirDict)
6444  {
6445  SDict<DirDef>::Iterator dli(dirDict);
6446  DirDef *dd;
6447  for (dli.toFirst();(dd=dli.current());++dli)
6448  {
6450  {
6451  append(NestingNodeContext::alloc(m_parent,dd,m_index,m_level,FALSE,FALSE,FALSE));
6452  m_index++;
6453  }
6454  }
6455  }
6456  void addDirs(const DirList &dirList)
6457  {
6458  QListIterator<DirDef> li(dirList);
6459  DirDef *dd;
6460  for (li.toFirst();(dd=li.current());++li)
6461  {
6462  append(NestingNodeContext::alloc(m_parent,dd,m_index,m_level,FALSE,FALSE,FALSE));
6463  m_index++;
6464  }
6465  }
6466  void addFiles(const FileNameList &fnList)
6467  {
6468  FileNameListIterator fnli(fnList);
6469  FileName *fn;
6470  for (fnli.toFirst();(fn=fnli.current());++fnli)
6471  {
6472  FileNameIterator fni(*fn);
6473  FileDef *fd;
6474  for (;(fd=fni.current());++fni)
6475  {
6476  if (fd->getDirDef()==0) // top level file
6477  {
6478  append(NestingNodeContext::alloc(m_parent,fd,m_index,m_level,FALSE,FALSE,FALSE));
6479  m_index++;
6480  }
6481  }
6482  }
6483  }
6484  void addFiles(const FileList &fList)
6485  {
6486  QListIterator<FileDef> li(fList);
6487  FileDef *fd;
6488  for (li.toFirst();(fd=li.current());++li)
6489  {
6490  append(NestingNodeContext::alloc(m_parent,fd,m_index,m_level,FALSE,FALSE,FALSE));
6491  m_index++;
6492  }
6493  }
6494  void addPages(const PageSDict &pages,bool rootOnly)
6495  {
6496  SDict<PageDef>::Iterator pli(pages);
6497  PageDef *pd;
6498  for (pli.toFirst();(pd=pli.current());++pli)
6499  {
6500  if (!rootOnly ||
6501  pd->getOuterScope()==0 ||
6503  {
6504  append(NestingNodeContext::alloc(m_parent,pd,m_index,m_level,FALSE,FALSE,FALSE));
6505  m_index++;
6506  }
6507  }
6508  }
6509  void addModules(const GroupSDict &groups)
6510  {
6511  GroupSDict::Iterator gli(groups);
6512  GroupDef *gd;
6513  for (gli.toFirst();(gd=gli.current());++gli)
6514  {
6515  static bool externalGroups = Config_getBool("EXTERNAL_GROUPS");
6516  if (!gd->isASubGroup() && gd->isVisible() &&
6517  (!gd->isReference() || externalGroups)
6518  )
6519  {
6520  append(NestingNodeContext::alloc(m_parent,gd,m_index,m_level,FALSE,FALSE,FALSE));
6521  m_index++;
6522  }
6523  }
6524  }
6525  void addModules(const GroupList &list)
6526  {
6527  GroupListIterator gli(list);
6528  GroupDef *gd;
6529  for (gli.toFirst();(gd=gli.current());++gli)
6530  {
6531  if (gd->isVisible())
6532  {
6533  append(NestingNodeContext::alloc(m_parent,gd,m_index,m_level,FALSE,FALSE,FALSE));
6534  m_index++;
6535  }
6536  }
6537  }
6538  void addDerivedClasses(const BaseClassList *bcl,bool hideSuper)
6539  {
6540  if (bcl==0) return;
6541  BaseClassListIterator bcli(*bcl);
6542  BaseClassDef *bcd;
6543  for (bcli.toFirst() ; (bcd=bcli.current()) ; ++bcli)
6544  {
6545  ClassDef *cd=bcd->classDef;
6547  {
6548  continue;
6549  }
6550 
6551  bool b;
6552  if (cd->getLanguage()==SrcLangExt_VHDL)
6553  {
6554  b=hasVisibleRoot(cd->subClasses());
6555  }
6556  else
6557  {
6558  b=hasVisibleRoot(cd->baseClasses());
6559  }
6560 
6561  if (cd->isVisibleInHierarchy() && b)
6562  {
6563  NestingNodeContext *tnc = NestingNodeContext::alloc(m_parent,cd,m_index,m_level,TRUE,TRUE,hideSuper);
6564  append(tnc);
6565  m_index++;
6566  }
6567  }
6568  }
6569  void addClassHierarchy(const ClassSDict &classSDict,bool)
6570  {
6571  ClassSDict::Iterator cli(classSDict);
6572  ClassDef *cd;
6573  for (cli.toFirst();(cd=cli.current());++cli)
6574  {
6575  bool b;
6576  if (cd->getLanguage()==SrcLangExt_VHDL)
6577  {
6579  {
6580  continue;
6581  }
6582  b=!hasVisibleRoot(cd->subClasses());
6583  }
6584  else
6585  {
6586  b=!hasVisibleRoot(cd->baseClasses());
6587  }
6588  if (b)
6589  {
6590  if (cd->isVisibleInHierarchy()) // should it be visible
6591  {
6592  // new root level class
6593  NestingNodeContext *nnc = NestingNodeContext::alloc(m_parent,cd,m_index,m_level,TRUE,TRUE,cd->visited);
6594  append(nnc);
6595  m_index++;
6596  }
6597  }
6598  }
6599  }
6600 
6601  private:
6603  int m_level;
6604  int m_index;
6605 };
6606 
6608 {
6609  p = new Private(parent,level);
6610 }
6611 
6613 {
6614  delete p;
6615 }
6616 
6617 // TemplateListIntf
6619 {
6620  return p->count();
6621 }
6622 
6624 {
6625  return p->at(index);
6626 }
6627 
6629 {
6630  return p->createIterator();
6631 }
6632 
6633 void NestingContext::addClasses(const ClassSDict &clDict,bool rootOnly)
6634 {
6635  p->addClasses(clDict,rootOnly);
6636 }
6637 
6638 void NestingContext::addNamespaces(const NamespaceSDict &nsDict,bool rootOnly,bool addClasses)
6639 {
6640  p->addNamespaces(nsDict,rootOnly,addClasses);
6641 }
6642 
6644 {
6645  p->addDirs(dirs);
6646 }
6647 
6649 {
6650  p->addDirs(dirs);
6651 }
6652 
6654 {
6655  p->addFiles(files);
6656 }
6657 
6659 {
6660  p->addFiles(files);
6661 }
6662 
6663 void NestingContext::addPages(const PageSDict &pages,bool rootOnly)
6664 {
6665  p->addPages(pages,rootOnly);
6666 }
6667 
6669 {
6670  p->addModules(modules);
6671 }
6672 
6674 {
6675  p->addModules(modules);
6676 }
6677 
6678 void NestingContext::addClassHierarchy(const ClassSDict &classSDict,bool rootOnly)
6679 {
6680  p->addClassHierarchy(classSDict,rootOnly);
6681 }
6682 
6683 void NestingContext::addDerivedClasses(const BaseClassList *bcl,bool hideSuper)
6684 {
6685  p->addDerivedClasses(bcl,hideSuper);
6686 }
6687 
6688 //------------------------------------------------------------------------
6689 
6690 //%% struct ClassTree: Class nesting relations
6691 //%% {
6693 {
6694  public:
6696  {
6697  m_classTree.reset(NestingContext::alloc(0,0));
6699  {
6700  m_classTree->addNamespaces(*Doxygen::namespaceSDict,TRUE,TRUE);
6701  }
6702  if (Doxygen::classSDict)
6703  {
6704  m_classTree->addClasses(*Doxygen::classSDict,TRUE);
6705  }
6706  //%% Nesting tree
6707  static bool init=FALSE;
6708  if (!init)
6709  {
6710  s_inst.addProperty("tree", &Private::tree);
6711  s_inst.addProperty("fileName", &Private::fileName);
6712  s_inst.addProperty("relPath", &Private::relPath);
6713  s_inst.addProperty("highlight", &Private::highlight);
6714  s_inst.addProperty("subhighlight", &Private::subhighlight);
6715  s_inst.addProperty("title", &Private::title);
6716  s_inst.addProperty("preferredDepth",&Private::preferredDepth);
6717  s_inst.addProperty("maxDepth", &Private::maxDepth);
6718  init=TRUE;
6719  }
6720  }
6721  TemplateVariant get(const char *n) const
6722  {
6723  return s_inst.get(this,n);
6724  }
6726  {
6727  return m_classTree.get();
6728  }
6730  {
6731  return "annotated";
6732  }
6734  {
6735  return "";
6736  }
6738  {
6739  return "classes";
6740  }
6742  {
6743  return "classlist";
6744  }
6746  {
6747  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
6748  static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
6749  if (fortranOpt)
6750  {
6752  }
6753  else if (vhdlOpt)
6754  {
6756  }
6757  else
6758  {
6759  return theTranslator->trClasses();
6760  }
6761  }
6763  {
6764  if (!m_cache.maxDepthComputed)
6765  {
6766  m_cache.maxDepth = computeMaxDepth(m_classTree.get());
6767  m_cache.maxDepthComputed=TRUE;
6768  }
6769  return m_cache.maxDepth;
6770  }
6772  {
6773  if (!m_cache.preferredDepthComputed)
6774  {
6775  m_cache.preferredDepth = computePreferredDepth(m_classTree.get(),maxDepth().toInt());
6776  m_cache.preferredDepthComputed=TRUE;
6777  }
6778  return m_cache.preferredDepth;
6779  }
6780  private:
6782  struct Cachable
6783  {
6784  Cachable() : maxDepth(0), maxDepthComputed(FALSE),
6785  preferredDepth(0), preferredDepthComputed(FALSE) {}
6790  };
6793 };
6794 //%% }
6795 
6797 
6799 {
6800  p = new Private;
6801 }
6802 
6804 {
6805  delete p;
6806 }
6807 
6809 {
6810  return p->get(name);
6811 }
6812 
6813 //------------------------------------------------------------------------
6814 
6815 //%% list NamespaceList[Namespace] : list of namespaces
6817 {
6818  public:
6819  void addNamespaces(const NamespaceSDict &nsDict)
6820  {
6821  NamespaceSDict::Iterator nli(nsDict);
6822  NamespaceDef *nd;
6823  for (nli.toFirst();(nd=nli.current());++nli)
6824  {
6825  if (nd->isLinkableInProject())
6826  {
6827  append(NamespaceContext::alloc(nd));
6828  }
6829  }
6830  }
6831 };
6832 
6834 {
6835  p = new Private;
6837 }
6838 
6840 {
6841  delete p;
6842 }
6843 
6844 // TemplateListIntf
6846 {
6847  return p->count();
6848 }
6849 
6851 {
6852  return p->at(index);
6853 }
6854 
6856 {
6857  return p->createIterator();
6858 }
6859 
6860 //------------------------------------------------------------------------
6861 
6862 //%% struct NamespaceTree: tree of nested namespace
6863 //%% {
6865 {
6866  public:
6868  {
6869  m_namespaceTree.reset(NestingContext::alloc(0,0));
6871  {
6872  m_namespaceTree->addNamespaces(*Doxygen::namespaceSDict,TRUE,FALSE);
6873  }
6874  //%% Nesting tree
6875  static bool init=FALSE;
6876  if (!init)
6877  {
6878  s_inst.addProperty("tree", &Private::tree);
6879  s_inst.addProperty("fileName", &Private::fileName);
6880  s_inst.addProperty("relPath", &Private::relPath);
6881  s_inst.addProperty("highlight", &Private::highlight);
6882  s_inst.addProperty("subhighlight", &Private::subhighlight);
6883  s_inst.addProperty("title", &Private::title);
6884  s_inst.addProperty("preferredDepth",&Private::preferredDepth);
6885  s_inst.addProperty("maxDepth", &Private::maxDepth);
6886  init=TRUE;
6887  }
6888  }
6889  TemplateVariant get(const char *n) const
6890  {
6891  return s_inst.get(this,n);
6892  }
6894  {
6895  return m_namespaceTree.get();
6896  }
6898  {
6899  return "namespaces";
6900  }
6902  {
6903  return "";
6904  }
6906  {
6907  return "namespaces";
6908  }
6910  {
6911  return "namespacelist";
6912  }
6914  {
6915  static bool javaOpt = Config_getBool("OPTIMIZE_OUTPUT_JAVA");
6916  static bool fortranOpt = Config_getBool("OPTIMIZE_FOR_FORTRAN");
6917  static bool vhdlOpt = Config_getBool("OPTIMIZE_OUTPUT_VHDL");
6918  if (javaOpt || vhdlOpt)
6919  {
6920  return theTranslator->trPackages();
6921  }
6922  else if (fortranOpt)
6923  {
6924  return theTranslator->trModulesList();
6925  }
6926  else
6927  {
6928  return theTranslator->trNamespaceList();
6929  }
6930  }
6932  {
6933  if (!m_cache.maxDepthComputed)
6934  {
6935  m_cache.maxDepth = computeMaxDepth(m_namespaceTree.get());
6936  m_cache.maxDepthComputed=TRUE;
6937  }
6938  return m_cache.maxDepth;
6939  }
6941  {
6942  if (!m_cache.preferredDepthComputed)
6943  {
6944  m_cache.preferredDepth = computePreferredDepth(m_namespaceTree.get(),maxDepth().toInt());
6945  m_cache.preferredDepthComputed=TRUE;
6946  }
6947  return m_cache.preferredDepth;
6948  }
6949  private:
6951  struct Cachable
6952  {
6953  Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {}
6958  };
6961 };
6962 //%% }
6963 
6965 
6967 {
6968  p = new Private;
6969 }
6970 
6972 {
6973  delete p;
6974 }
6975 
6977 {
6978  return p->get(name);
6979 }
6980 
6981 //------------------------------------------------------------------------
6982 
6983 //%% list FileList[File] : list of files
6985 {
6986  public:
6987  void addFiles(const FileNameList &fnList)
6988  {
6989  // TODO: if FULL_PATH_NAMES is enabled, the ordering should be dir+file
6990  FileNameListIterator fnli(fnList);
6991  FileName *fn;
6992  for (fnli.toFirst();(fn=fnli.current());++fnli)
6993  {
6994  FileNameIterator fni(*fn);
6995  FileDef *fd;
6996  for (fni.toFirst();(fd=fni.current());++fni)
6997  {
6998  bool doc = fd->isLinkableInProject();
6999  bool src = fd->generateSourceFile();
7000  bool nameOk = !fd->isDocumentationFile();
7001  if (nameOk && (doc || src) && !fd->isReference())
7002  {
7003  append(FileContext::alloc(fd));
7004  }
7005  }
7006  }
7007  }
7008 };
7009 
7011 {
7012  p = new Private;
7014 }
7015 
7017 {
7018  delete p;
7019 }
7020 
7021 // TemplateListIntf
7023 {
7024  return p->count();
7025 }
7026 
7028 {
7029  return p->at(index);
7030 }
7031 
7033 {
7034  return p->createIterator();
7035 }
7036 
7037 //------------------------------------------------------------------------
7038 
7039 //%% list DirList[Dir] : list of files
7041 {
7042  public:
7044  {
7045  DirDef *dir;
7047  for (sdi.toFirst();(dir=sdi.current());++sdi)
7048  {
7049  append(DirContext::alloc(dir));
7050  }
7051  }
7052 };
7053 
7055 {
7056  p = new Private;
7057 }
7058 
7060 {
7061  delete p;
7062 }
7063 
7064 // TemplateListIntf
7066 {
7067  return p->count();
7068 }
7069 
7071 {
7072  return p->at(index);
7073 }
7074 
7076 {
7077  return p->createIterator();
7078 }
7079 
7080 
7081 //------------------------------------------------------------------------
7082 
7083 //%% list UsedFiles[File] : list of files
7085 {
7086  public:
7087  void addFile(FileDef *fd)
7088  {
7089  append(FileContext::alloc(fd));
7090  }
7091 };
7092 
7094 {
7095  p = new Private;
7096  if (cd)
7097  {
7099  FileDef *fd;
7100  for (li.toFirst();(fd=li.current());++li)
7101  {
7102  p->addFile(fd);
7103  }
7104  }
7105 }
7106 
7108 {
7109  delete p;
7110 }
7111 
7112 // TemplateListIntf
7114 {
7115  return p->count();
7116 }
7117 
7119 {
7120  return p->at(index);
7121 }
7122 
7124 {
7125  return p->createIterator();
7126 }
7127 
7129 {
7130  p->addFile(fd);
7131 }
7132 
7133 //------------------------------------------------------------------------
7134 
7135 //%% struct FileTree: tree of directories and files
7136 //%% {
7138 {
7139  public:
7141  {
7142  // Add dirs tree
7143  m_dirFileTree.reset(NestingContext::alloc(0,0));
7145  {
7146  m_dirFileTree->addDirs(*Doxygen::directories);
7147  }
7149  {
7150  m_dirFileTree->addFiles(*Doxygen::inputNameList);
7151  }
7152  //%% DirFile tree:
7153  static bool init=FALSE;
7154  if (!init)
7155  {
7156  s_inst.addProperty("tree", &Private::tree);
7157  s_inst.addProperty("fileName", &Private::fileName);
7158  s_inst.addProperty("relPath", &Private::relPath);
7159  s_inst.addProperty("highlight", &Private::highlight);
7160  s_inst.addProperty("subhighlight", &Private::subhighlight);
7161  s_inst.addProperty("title", &Private::title);
7162  s_inst.addProperty("preferredDepth",&Private::preferredDepth);
7163  s_inst.addProperty("maxDepth", &Private::maxDepth);
7164  init=TRUE;
7165  }
7166  }
7167  TemplateVariant get(const char *n) const
7168  {
7169  return s_inst.get(this,n);
7170  }
7172  {
7173  return m_dirFileTree.get();
7174  }
7176  {
7177  return "files";
7178  }
7180  {
7181  return "";
7182  }
7184  {
7185  return "files";
7186  }
7188  {
7189  return "filelist";
7190  }
7192  {
7193  return theTranslator->trFileList();
7194  }
7196  {
7197  if (!m_cache.maxDepthComputed)
7198  {
7199  m_cache.maxDepth = computeMaxDepth(m_dirFileTree.get());
7200  m_cache.maxDepthComputed=TRUE;
7201  }
7202  return m_cache.maxDepth;
7203  }
7205  {
7206  if (!m_cache.preferredDepthComputed)
7207  {
7208  m_cache.preferredDepth = computePreferredDepth(m_dirFileTree.get(),maxDepth().toInt());
7209  m_cache.preferredDepthComputed=TRUE;
7210  }
7211  return m_cache.preferredDepth;
7212  }
7213  private:
7215  struct Cachable
7216  {
7217  Cachable() : maxDepth(0), maxDepthComputed(FALSE),
7218  preferredDepth(0), preferredDepthComputed(FALSE) {}
7223  };
7226 };
7227 //%% }
7228 
7230 
7232 {
7233  p = new Private;
7234 }
7235 
7237 {
7238  delete p;
7239 }
7240 
7242 {
7243  return p->get(name);
7244 }
7245 
7246 //------------------------------------------------------------------------
7247 
7248 //%% struct PageTree: tree of related pages
7249 //%% {
7251 {
7252  public:
7253  Private(const PageSDict *pages)
7254  {
7255  m_pageTree.reset(NestingContext::alloc(0,0));
7256  // Add pages
7257  if (pages)
7258  {
7259  m_pageTree->addPages(*pages,TRUE);
7260  }
7261 
7262  //%% PageNodeList tree:
7263  static bool init=FALSE;
7264  if (!init)
7265  {
7266  s_inst.addProperty("tree", &Private::tree);
7267  s_inst.addProperty("fileName", &Private::fileName);
7268  s_inst.addProperty("relPath", &Private::relPath);
7269  s_inst.addProperty("highlight", &Private::highlight);
7270  s_inst.addProperty("subhighlight", &Private::subhighlight);
7271  s_inst.addProperty("title", &Private::title);
7272  s_inst.addProperty("preferredDepth",&Private::preferredDepth);
7273  s_inst.addProperty("maxDepth", &Private::maxDepth);
7274  init=TRUE;
7275  }
7276  }
7277  TemplateVariant get(const char *n) const
7278  {
7279  return s_inst.get(this,n);
7280  }
7282  {
7283  return m_pageTree.get();
7284  }
7286  {
7287  return "pages";
7288  }
7290  {
7291  return "";
7292  }
7294  {
7295  return "pages";
7296  }
7298  {
7299  return "";
7300  }
7302  {
7303  return theTranslator->trRelatedPages();
7304  }
7306  {
7307  if (!m_cache.maxDepthComputed)
7308  {
7309  m_cache.maxDepth = computeMaxDepth(m_pageTree.get());
7310  m_cache.maxDepthComputed=TRUE;
7311  }
7312  return m_cache.maxDepth;
7313  }
7315  {
7316  if (!m_cache.preferredDepthComputed)
7317  {
7318  m_cache.preferredDepth = computePreferredDepth(m_pageTree.get(),maxDepth().toInt());
7319  m_cache.preferredDepthComputed=TRUE;
7320  }
7321  return m_cache.preferredDepth;
7322  }
7323  private:
7325  struct Cachable
7326  {
7327  Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {}
7332  };
7335 };
7336 //%% }
7337 
7339 
7341 {
7342  p = new Private(pages);
7343 }
7344 
7346 {
7347  delete p;
7348 }
7349 
7351 {
7352  return p->get(name);
7353 }
7354 
7355 //------------------------------------------------------------------------
7356 
7357 //%% list PageList[Page]: list of pages
7359 {
7360  public:
7361  void addPages(const PageSDict &pages)
7362  {
7363  PageSDict::Iterator pdi(pages);
7364  PageDef *pd=0;
7365  for (pdi.toFirst();(pd=pdi.current());++pdi)
7366  {
7367  if (!pd->getGroupDef() && !pd->isReference())
7368  {
7369  append(PageContext::alloc(pd,FALSE,FALSE));
7370  }
7371  }
7372  }
7373 };
7374 
7376 {
7377  p = new Private;
7378  if (pages) p->addPages(*pages);
7379 }
7380 
7382 {
7383  delete p;
7384 }
7385 
7386 // TemplateListIntf
7388 {
7389  return p->count();
7390 }
7391 
7393 {
7394  return p->at(index);
7395 }
7396 
7398 {
7399  return p->createIterator();
7400 }
7401 
7402 //------------------------------------------------------------------------
7403 
7404 //%% list ExampleList[Page]: list of pages
7406 {
7407  public:
7409  {
7411  {
7413  PageDef *pd=0;
7414  for (pdi.toFirst();(pd=pdi.current());++pdi)
7415  {
7416  if (!pd->getGroupDef() && !pd->isReference())
7417  {
7418  append(PageContext::alloc(pd,FALSE,TRUE));
7419  }
7420  }
7421  }
7422  }
7423 };
7424 
7426 {
7427  p = new Private;
7428 }
7429 
7431 {
7432  delete p;
7433 }
7434 
7435 // TemplateListIntf
7437 {
7438  return p->count();
7439 }
7440 
7442 {
7443  return p->at(index);
7444 }
7445 
7447 {
7448  return p->createIterator();
7449 }
7450 
7451 //------------------------------------------------------------------------
7452 
7453 //%% list ModuleList[ModuleNode]: list of directories and/or files
7455 {
7456  public:
7457  void addModules()
7458  {
7460  GroupDef *gd;
7461  for (gli.toFirst();(gd=gli.current());++gli)
7462  {
7463  if (!gd->isReference())
7464  {
7465  append(ModuleContext::alloc(gd));
7466  }
7467  }
7468  }
7469 };
7470 
7472 {
7473  p = new Private;
7474  p->addModules();
7475 }
7476 
7478 {
7479  delete p;
7480 }
7481 
7482 // TemplateListIntf
7484 {
7485  return p->count();
7486 }
7487 
7489 {
7490  return p->at(index);
7491 }
7492 
7494 {
7495  return p->createIterator();
7496 }
7497 
7498 //------------------------------------------------------------------------
7499 
7500 //%% struct ModuleTree: tree of modules
7501 //%% {
7503 {
7504  public:
7506  {
7507  m_moduleTree.reset(NestingContext::alloc(0,0));
7508  // Add modules
7509  if (Doxygen::groupSDict)
7510  {
7511  m_moduleTree->addModules(*Doxygen::groupSDict);
7512  }
7513 
7514  //%% ModuleList tree:
7515  static bool init=FALSE;
7516  if (!init)
7517  {
7518  s_inst.addProperty("tree", &Private::tree);
7519  s_inst.addProperty("fileName", &Private::fileName);
7520  s_inst.addProperty("relPath", &Private::relPath);
7521  s_inst.addProperty("highlight", &Private::highlight);
7522  s_inst.addProperty("subhighlight", &Private::subhighlight);
7523  s_inst.addProperty("title", &Private::title);
7524  s_inst.addProperty("preferredDepth",&Private::preferredDepth);
7525  s_inst.addProperty("maxDepth", &Private::maxDepth);
7526  init=TRUE;
7527  }
7528  }
7529  TemplateVariant get(const char *n) const
7530  {
7531  return s_inst.get(this,n);
7532  }
7534  {
7535  return m_moduleTree.get();
7536  }
7538  {
7539  return "modules";
7540  }
7542  {
7543  return "";
7544  }
7546  {
7547  return "modules";
7548  }
7550  {
7551  return "";
7552  }
7554  {
7555  return theTranslator->trModules();
7556  }
7558  {
7559  if (!m_cache.maxDepthComputed)
7560  {
7561  m_cache.maxDepth = computeMaxDepth(m_moduleTree.get());
7562  m_cache.maxDepthComputed=TRUE;
7563  }
7564  return m_cache.maxDepth;
7565  }
7567  {
7568  if (!m_cache.preferredDepthComputed)
7569  {
7570  m_cache.preferredDepth = computePreferredDepth(m_moduleTree.get(),maxDepth().toInt());
7571  m_cache.preferredDepthComputed=TRUE;
7572  }
7573  return m_cache.preferredDepth;
7574  }
7575  private:
7577  struct Cachable
7578  {
7579  Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {}
7584  };
7587 };
7588 //%% }
7589 
7591 
7593 {
7594  p = new Private;
7595 }
7596 
7598 {
7599  delete p;
7600 }
7601 
7603 {
7604  return p->get(name);
7605 }
7606 
7607 //------------------------------------------------------------------------
7608 
7609 //%% struct NavPathElem: list of examples page
7610 //%% {
7612 {
7613  public:
7614  Private(Definition *def) : m_def(def)
7615  {
7616  static bool init=FALSE;
7617  if (!init)
7618  {
7619  s_inst.addProperty("isLinkable", &Private::isLinkable);
7620  s_inst.addProperty("fileName", &Private::fileName);
7621  s_inst.addProperty("anchor", &Private::anchor);
7622  s_inst.addProperty("text", &Private::text);
7623  s_inst.addProperty("isReference", &Private::isReference);
7624  s_inst.addProperty("externalReference",&Private::externalReference);
7625  init=TRUE;
7626  }
7627  }
7628  TemplateVariant get(const char *n) const
7629  {
7630  return s_inst.get(this,n);
7631  }
7633  {
7634  return m_def->isLinkable();
7635  }
7637  {
7638  return m_def->anchor();
7639  }
7641  {
7642  return m_def->getOutputFileBase();
7643  }
7645  {
7646  Definition::DefType type = m_def->definitionType();
7647  QCString text = m_def->localName();
7648  if (type==Definition::TypeGroup)
7649  {
7650  text = ((const GroupDef*)m_def)->groupTitle();
7651  }
7652  else if (type==Definition::TypePage && !(((const PageDef*)m_def)->title().isEmpty()))
7653  {
7654  text = ((const PageDef*)m_def)->title();
7655  }
7656  else if (type==Definition::TypeClass)
7657  {
7658  if (text.right(2)=="-p")
7659  {
7660  text = text.left(text.length()-2);
7661  }
7662  }
7663  return text;
7664  }
7666  {
7667  return m_def->isReference();
7668  }
7670  {
7671  static bool createSubdirs = Config_getBool("CREATE_SUBDIRS");
7672  return createSubdirs ? QCString("../../") : QCString("");
7673  }
7675  {
7676  return m_def->externalReference(relPathAsString());
7677  }
7678  private:
7681 };
7682 //%% }
7683 
7685 
7687 {
7688  p = new Private(def);
7689 }
7690 
7692 {
7693  delete p;
7694 }
7695 
7697 {
7698  return p->get(name);
7699 }
7700 
7701 
7702 //------------------------------------------------------------------------
7703 
7704 //%% struct ExampleList: list of examples page
7705 //%% {
7707 {
7708  public:
7710  {
7711  m_exampleTree.reset(NestingContext::alloc(0,0));
7712  // Add pages
7714  {
7715  m_exampleTree->addPages(*Doxygen::exampleSDict,TRUE);
7716  }
7717 
7718  static bool init=FALSE;
7719  if (!init)
7720  {
7721  s_inst.addProperty("tree", &Private::tree);
7722  s_inst.addProperty("fileName", &Private::fileName);
7723  s_inst.addProperty("relPath", &Private::relPath);
7724  s_inst.addProperty("highlight", &Private::highlight);
7725  s_inst.addProperty("subhighlight", &Private::subhighlight);
7726  s_inst.addProperty("title", &Private::title);
7727  s_inst.addProperty("preferredDepth",&Private::preferredDepth);
7728  s_inst.addProperty("maxDepth", &Private::maxDepth);
7729  init=TRUE;
7730  }
7731  }
7732  TemplateVariant get(const char *n) const
7733  {
7734  return s_inst.get(this,n);
7735  }
7737  {
7738  return m_exampleTree.get();
7739  }
7741  {
7742  return "examples";
7743  }
7745  {
7746  return "";
7747  }
7749  {
7750  return "examples";
7751  }
7753  {
7754  return "";
7755  }
7757  {
7758  return theTranslator->trExamples();
7759  }
7761  {
7762  if (!m_cache.maxDepthComputed)
7763  {
7764  m_cache.maxDepth = computeMaxDepth(m_exampleTree.get());
7765  m_cache.maxDepthComputed=TRUE;
7766  }
7767  return m_cache.maxDepth;
7768  }
7770  {
7771  if (!m_cache.preferredDepthComputed)
7772  {
7773  m_cache.preferredDepth = computePreferredDepth(m_exampleTree.get(),maxDepth().toInt());
7774  m_cache.preferredDepthComputed=TRUE;
7775  }
7776  return m_cache.preferredDepth;
7777  }
7778  private:
7780  struct Cachable
7781  {
7782  Cachable() : maxDepthComputed(FALSE), preferredDepthComputed(FALSE) {}
7787  };
7790 };
7791 //%% }
7792 
7794 
7796 {
7797  p = new Private;
7798 }
7799 
7801 {
7802  delete p;
7803 }
7804 
7806 {
7807  return p->get(name);
7808 }
7809 
7810 //------------------------------------------------------------------------
7811 
7812 //%% struct GlobalsIndex: list of examples page
7813 //%% {
7815 {
7816  public:
7818  {
7819  static bool init=FALSE;
7820  if (!init)
7821  {
7822  s_inst.addProperty("all", &Private::all);
7823  s_inst.addProperty("functions", &Private::functions);
7824  s_inst.addProperty("variables", &Private::variables);
7825  s_inst.addProperty("typedefs", &Private::typedefs);
7826  s_inst.addProperty("enums", &Private::enums);
7827  s_inst.addProperty("enumValues", &Private::enumValues);
7828  s_inst.addProperty("macros", &Private::macros);
7829  s_inst.addProperty("properties", &Private::properties);
7830  s_inst.addProperty("events", &Private::events);
7831  s_inst.addProperty("related", &Private::related);
7832  s_inst.addProperty("fileName", &Private::fileName);
7833  s_inst.addProperty("relPath", &Private::relPath);
7834  s_inst.addProperty("highlight", &Private::highlight);
7835  s_inst.addProperty("subhighlight",&Private::subhighlight);
7836  s_inst.addProperty("title", &Private::title);
7837  init=TRUE;
7838  }
7839  }
7840  TemplateVariant get(const char *n) const
7841  {
7842  return s_inst.get(this,n);
7843  }
7844  typedef bool (MemberDef::*MemberFunc)() const;
7846  {
7847  if (!listRef)
7848  {
7850  MemberName *mn;
7852  for (fnli.toFirst();(mn=fnli.current());++fnli)
7853  {
7854  MemberDef *md;
7855  MemberNameIterator mni(*mn);
7856  for (mni.toFirst();(md=mni.current());++mni)
7857  {
7858  FileDef *fd=md->getFileDef();
7859  if (fd && fd->isLinkableInProject() &&
7860  !md->name().isEmpty() && !md->getNamespaceDef() && md->isLinkableInProject())
7861  {
7862  if (filter==0 || (md->*filter)())
7863  {
7864  list->append(MemberContext::alloc(md));
7865  }
7866  }
7867  }
7868  }
7869  listRef.reset(list);
7870  }
7871  return listRef.get();
7872  }
7874  {
7875  return getMembersFiltered(m_cache.all,0);
7876  }
7878  {
7879  return getMembersFiltered(m_cache.functions,&MemberDef::isFunction);
7880  }
7882  {
7883  return getMembersFiltered(m_cache.variables,&MemberDef::isVariable);
7884  }
7886  {
7887  return getMembersFiltered(m_cache.typedefs,&MemberDef::isTypedef);
7888  }
7890  {
7891  return getMembersFiltered(m_cache.enums,&MemberDef::isEnumerate);
7892  }
7894  {
7895  return getMembersFiltered(m_cache.enumValues,&MemberDef::isEnumValue);
7896  }
7898  {
7899  return getMembersFiltered(m_cache.macros,&MemberDef::isDefine);
7900  }
7902  {
7903  return FALSE;
7904  }
7906  {
7907  return FALSE;
7908  }
7910  {
7911  return FALSE;
7912  }
7914  {
7915  return "globals";
7916  }
7918  {
7919  return "";
7920  }
7922  {
7923  return "files";
7924  }
7926  {
7927  return "filemembers";
7928  }
7930  {
7931  return theTranslator->trFileMembers();
7932  }
7933  private:
7934  struct Cachable
7935  {
7944  };
7947 };
7948 //%% }
7949 
7951 
7953 {
7954  p = new Private;
7955 }
7956 
7958 {
7959  delete p;
7960 }
7961 
7963 {
7964  return p->get(name);
7965 }
7966 
7967 //------------------------------------------------------------------------
7968 
7969 //%% struct ClassMembersIndex: list of examples page
7970 //%% {
7972 {
7973  public:
7975  {
7976  static bool init=FALSE;
7977  if (!init)
7978  {
7979  s_inst.addProperty("all", &Private::all);
7980  s_inst.addProperty("functions", &Private::functions);
7981  s_inst.addProperty("variables", &Private::variables);
7982  s_inst.addProperty("typedefs", &Private::typedefs);
7983  s_inst.addProperty("enums", &Private::enums);
7984  s_inst.addProperty("enumValues", &Private::enumValues);
7985  s_inst.addProperty("macros", &Private::macros);
7986  s_inst.addProperty("properties", &Private::properties);
7987  s_inst.addProperty("events", &Private::events);
7988  s_inst.addProperty("related", &Private::related);
7989  s_inst.addProperty("fileName", &Private::fileName);
7990  s_inst.addProperty("relPath", &Private::relPath);
7991  s_inst.addProperty("highlight", &Private::highlight);
7992  s_inst.addProperty("subhighlight",&Private::subhighlight);
7993  s_inst.addProperty("title", &Private::title);
7994  init=TRUE;
7995  }
7996  }
7997  TemplateVariant get(const char *n) const
7998  {
7999  return s_inst.get(this,n);
8000  }
8001  typedef bool (MemberDef::*MemberFunc)() const;
8003  {
8004  if (!listRef)
8005  {
8007  MemberName *mn;
8009  for (mnli.toFirst();(mn=mnli.current());++mnli)
8010  {
8011  MemberDef *md;
8012  MemberNameIterator mni(*mn);
8013  for (mni.toFirst();(md=mni.current());++mni)
8014  {
8015  ClassDef *cd = md->getClassDef();
8016  if (cd && cd->isLinkableInProject() && cd->templateMaster()==0 &&
8017  md->isLinkableInProject() && !md->name().isEmpty())
8018  {
8019  if (filter==0 || (md->*filter)())
8020  {
8021  list->append(MemberContext::alloc(md));
8022  }
8023  }
8024  }
8025  }
8026  listRef.reset(list);
8027  }
8028  return listRef.get();
8029  }
8031  {
8032  return getMembersFiltered(m_cache.all,&MemberDef::isNotFriend);
8033  }
8035  {
8036  return getMembersFiltered(m_cache.functions,&MemberDef::isFunctionOrSignalSlot);
8037  }
8039  {
8040  return getMembersFiltered(m_cache.variables,&MemberDef::isVariable);
8041  }
8043  {
8044  return getMembersFiltered(m_cache.typedefs,&MemberDef::isTypedef);
8045  }
8047  {
8048  return getMembersFiltered(m_cache.enums,&MemberDef::isEnumerate);
8049  }
8051  {
8052  return getMembersFiltered(m_cache.enumValues,&MemberDef::isEnumValue);
8053  }
8055  {
8056  return FALSE;
8057  }
8059  {
8060  return getMembersFiltered(m_cache.properties,&MemberDef::isProperty);
8061  }
8063  {
8064  return getMembersFiltered(m_cache.events,&MemberDef::isEvent);
8065  }
8067  {
8068  return getMembersFiltered(m_cache.related,&MemberDef::isRelated);
8069  }
8071  {
8072  return "functions";
8073  }
8075  {
8076  return "";
8077  }
8079  {
8080  return "classes";
8081  }
8083  {
8084  return "classmembers";
8085  }
8087  {
8088  return theTranslator->trCompoundMembers();
8089  }
8090  private:
8091  struct Cachable
8092  {
8103  };
8106 };
8107 //%% }
8108 
8110 
8112 {
8113  p = new Private;
8114 }
8115 
8117 {
8118  delete p;
8119 }
8120 
8122 {
8123  return p->get(name);
8124 }
8125 
8126 //------------------------------------------------------------------------
8127 
8128 //%% struct NamespaceMembersIndex: list of examples page
8129 //%% {
8131 {
8132  public:
8134  {
8135  static bool init=FALSE;
8136  if (!init)
8137  {
8138  s_inst.addProperty("all", &Private::all);
8139  s_inst.addProperty("functions", &Private::functions);
8140  s_inst.addProperty("variables", &Private::variables);
8141  s_inst.addProperty("typedefs", &Private::typedefs);
8142  s_inst.addProperty("enums", &Private::enums);
8143  s_inst.addProperty("enumValues", &Private::enumValues);
8144  s_inst.addProperty("macros", &Private::macros);
8145  s_inst.addProperty("properties", &Private::properties);
8146  s_inst.addProperty("events", &Private::events);
8147  s_inst.addProperty("related", &Private::related);
8148  s_inst.addProperty("fileName", &Private::fileName);
8149  s_inst.addProperty("relPath", &Private::relPath);
8150  s_inst.addProperty("highlight", &Private::highlight);
8151  s_inst.addProperty("subhighlight",&Private::subhighlight);
8152  s_inst.addProperty("title", &Private::title);
8153  init=TRUE;
8154  }
8155  }
8156  TemplateVariant get(const char *n) const
8157  {
8158  return s_inst.get(this,n);
8159  }
8160  typedef bool (MemberDef::*MemberFunc)() const;
8162  {
8163  if (!listRef)
8164  {
8166  MemberName *mn;
8168  for (fnli.toFirst();(mn=fnli.current());++fnli)
8169  {
8170  MemberDef *md;
8171  MemberNameIterator mni(*mn);
8172  for (mni.toFirst();(md=mni.current());++mni)
8173  {
8174  NamespaceDef *nd=md->getNamespaceDef();
8175  if (nd && nd->isLinkableInProject() &&
8176  !md->name().isEmpty() && md->isLinkableInProject())
8177  {
8178  if (filter==0 || (md->*filter)())
8179  {
8180  list->append(MemberContext::alloc(md));
8181  }
8182  }
8183  }
8184  }
8185  listRef.reset(list);
8186  }
8187  return listRef.get();
8188  }
8190  {
8191  return getMembersFiltered(m_cache.all,0);
8192  }
8194  {
8195  return getMembersFiltered(m_cache.functions,&MemberDef::isFunction);
8196  }
8198  {
8199  return getMembersFiltered(m_cache.variables,&MemberDef::isVariable);
8200  }
8202  {
8203  return getMembersFiltered(m_cache.typedefs,&MemberDef::isTypedef);
8204  }
8206  {
8207  return getMembersFiltered(m_cache.enums,&MemberDef::isEnumerate);
8208  }
8210  {
8211  return getMembersFiltered(m_cache.enumValues,&MemberDef::isEnumValue);
8212  }
8214  {
8215  return FALSE;
8216  }
8218  {
8219  return FALSE;
8220  }
8222  {
8223  return FALSE;
8224  }
8226  {
8227  return FALSE;
8228  }
8230  {
8231  return "namespacemembers";
8232  }
8234  {
8235  return "";
8236  }
8238  {
8239  return "namespaces";
8240  }
8242  {
8243  return "namespacemembers";
8244  }
8246  {
8248  }
8249  private:
8250  struct Cachable
8251  {
8259  };
8262 };
8263 //%% }
8264 
8266 
8268 {
8269  p = new Private;
8270 }
8271 
8273 {
8274  delete p;
8275 }
8276 
8278 {
8279  return p->get(name);
8280 }
8281 
8282 //------------------------------------------------------------------------
8283 
8284 //%% struct InheritanceGraph: a connected graph reprenting part of the overall interitance tree
8285 //%% {
8287 {
8288  public:
8289  Private(DotGfxHierarchyTable *hierarchy,DotNode *n,int id) : m_hierarchy(hierarchy), m_node(n), m_id(id)
8290  {
8291  static bool init=FALSE;
8292  if (!init)
8293  {
8294  s_inst.addProperty("graph",&Private::graph);
8295  init=TRUE;
8296  }
8297  }
8298  TemplateVariant get(const char *n) const
8299  {
8300  return s_inst.get(this,n);
8301  }
8303  {
8304  QGString result;
8305  static bool haveDot = Config_getBool("HAVE_DOT");
8306  static bool graphicalHierarchy = Config_getBool("GRAPHICAL_HIERARCHY");
8307  if (haveDot && graphicalHierarchy)
8308  {
8309  FTextStream t(&result);
8310  m_hierarchy->createGraph(m_node,t,
8311  /*GOF_BITMAP,
8312  EOF_Html,*/
8315  m_id);
8316  }
8317  return TemplateVariant(result.data(),TRUE);
8318  }
8319  private:
8322  int m_id;
8324 };
8325 
8327 
8329  : RefCountedContext("InheritanceGraphContext")
8330 {
8331  p = new Private(hierarchy,n,id);
8332 }
8333 
8335 {
8336  delete p;
8337 }
8338 
8340 {
8341  return p->get(name);
8342 }
8343 
8344 
8345 //------------------------------------------------------------------------
8346 
8347 //%% struct InheritanceNode: a class in the inheritance list
8348 //%% {
8350 {
8351  public:
8352  Private(ClassDef *cd,const QCString &name) : m_classDef(cd), m_name(name)
8353  {
8354  static bool init=FALSE;
8355  if (!init)
8356  {
8357  s_inst.addProperty("class",&Private::getClass);
8358  s_inst.addProperty("name", &Private::name);
8359  init=TRUE;
8360  }
8361  }
8362  TemplateVariant get(const char *n) const
8363  {
8364  return s_inst.get(this,n);
8365  }
8367  {
8368  if (!m_classContext)
8369  {
8370  m_classContext.reset(ClassContext::alloc(m_classDef));
8371  }
8372  return m_classContext.get();
8373  }
8375  {
8376  return m_name;
8377  }
8378  private:
8383 };
8384 //%% }
8385 
8387 
8389 {
8390  p = new Private(cd,name);
8391 }
8392 
8394 {
8395  delete p;
8396 }
8397 
8399 {
8400  return p->get(name);
8401 }
8402 
8403 //------------------------------------------------------------------------
8404 
8405 //%% list InheritanceList[InheritanceNode] : list of inherited classes
8407 {
8408  public:
8409  void addClass(ClassDef *cd,const QCString &name)
8410  {
8411  append(InheritanceNodeContext::alloc(cd,name));
8412  }
8413 };
8414 
8415 InheritanceListContext::InheritanceListContext(const BaseClassList *list, bool baseClasses) : RefCountedContext("InheritanceListContext")
8416 {
8417  p = new Private;
8418  if (list)
8419  {
8420  BaseClassListIterator li(*list);
8421  BaseClassDef *bcd;
8422  for (li.toFirst();(bcd=li.current());++li)
8423  {
8424  ClassDef *cd=bcd->classDef;
8425  QCString name;
8426  if (baseClasses)
8427  {
8429  cd->displayName(),bcd->templSpecifiers);
8430  }
8431  else
8432  {
8433  name = cd->displayName();
8434  }
8435  //printf("InheritanceListContext: adding %s baseClass=%d\n",name.data(),baseClasses);
8436  p->addClass(cd,name);
8437  }
8438  }
8439 }
8440 
8442 {
8443  delete p;
8444 }
8445 
8446 // TemplateListIntf
8448 {
8449  return p->count();
8450 }
8451 
8453 {
8454  return p->at(index);
8455 }
8456 
8458 {
8459  return p->createIterator();
8460 }
8461 
8462 //------------------------------------------------------------------------
8463 
8464 //%% list MemberList[Member] : list of inherited classes
8466 {
8467  public:
8469  {
8470  append(MemberContext::alloc(md));
8471  }
8472 };
8473 
8475 {
8476  p = new Private;
8477 }
8478 
8480 {
8481  p = new Private;
8482  if (list)
8483  {
8485  MemberListIterator mli(*list);
8486  MemberDef *md;
8487  for (mli.toFirst();(md=mli.current());++mli)
8488  {
8489  if ((md->isBriefSectionVisible() && !details) ||
8490  (md->isDetailedSectionLinkable() && details)
8491  )
8492  {
8493  p->addMember(md);
8494  }
8495  }
8496  }
8497 }
8498 
8499 MemberListContext::MemberListContext(MemberSDict *list,bool doSort) : RefCountedContext("MemberListContext")
8500 {
8501  p = new Private;
8502  if (list)
8503  {
8504  if (doSort)
8505  {
8506  list->sort();
8507  }
8508  MemberSDict::Iterator it(*list);
8509  MemberDef *md;
8510  for (it.toFirst();(md=it.current());++it)
8511  {
8512  p->addMember(md);
8513  }
8514  }
8515 }
8516 
8518 {
8519  delete p;
8520 }
8521 
8522 // TemplateListIntf
8524 {
8525  return p->count();
8526 }
8527 
8529 {
8530  return p->at(index);
8531 }
8532 
8534 {
8535  return p->createIterator();
8536 }
8537 
8538 //------------------------------------------------------------------------
8539 
8540 //%% struct MemberInfo: member information
8541 //%% {
8543 {
8544  public:
8545  Private(const MemberInfo *mi) : m_memberInfo(mi)
8546  {
8547  static bool init=FALSE;
8548  if (!init)
8549  {
8550  //%% string protection
8551  s_inst.addProperty("protection", &Private::protection);
8552  //%% string virtualness
8553  s_inst.addProperty("virtualness", &Private::virtualness);
8554  //%% string ambiguityScope
8555  s_inst.addProperty("ambiguityScope",&Private::ambiguityScope);
8556  //%% Member member
8557  s_inst.addProperty("member", &Private::member);
8558  init=TRUE;
8559  }
8560  }
8561  TemplateVariant get(const char *n) const
8562  {
8563  return s_inst.get(this,n);
8564  }
8566  {
8567  switch (m_memberInfo->prot)
8568  {
8569  case ::Public: return "public";
8570  case ::Protected: return "protected";
8571  case ::Private: return "private";
8572  case ::Package: return "package";
8573  }
8574  return "";
8575  }
8577  {
8578  switch (m_memberInfo->virt)
8579  {
8580  case ::Normal: return "normal";
8581  case ::Virtual: return "virtual";
8582  case ::Pure: return "pure";
8583  }
8584  return "";
8585  }
8587  {
8588  return m_memberInfo->ambiguityResolutionScope;
8589  }
8591  {
8592  if (!m_member && m_memberInfo->memberDef)
8593  {
8594  m_member.reset(MemberContext::alloc(m_memberInfo->memberDef));
8595  }
8596  if (m_member)
8597  {
8598  return m_member.get();
8599  }
8600  else
8601  {
8602  return TemplateVariant(FALSE);
8603  }
8604  }
8605  private:
8609 };
8610 //%% }
8611 
8613 
8615 {
8616  p = new Private(mi);
8617 }
8618 
8620 {
8621  delete p;
8622 }
8623 
8625 {
8626  return p->get(name);
8627 }
8628 
8629 
8630 //------------------------------------------------------------------------
8631 
8632 //%% list AllMembersList[MemberList] : list of inherited classes
8634 {
8635  public:
8637  {
8638  if (ml)
8639  {
8640  static bool hideUndocMembers = Config_getBool("HIDE_UNDOC_MEMBERS");
8642  MemberNameInfo *mni;
8643  for (mnii.toFirst();(mni=mnii.current());++mnii)
8644  {
8645  MemberNameInfoIterator mnii2(*mni);
8646  MemberInfo *mi;
8647  for (mnii2.toFirst();(mi=mnii2.current());++mnii2)
8648  {
8649  MemberDef *md=mi->memberDef;
8650  ClassDef *cd=md->getClassDef();
8651  if (cd && !md->name().isEmpty() && md->name()[0]!='@')
8652  {
8653  if ((cd->isLinkable() && md->isLinkable()) ||
8654  (!cd->isArtificial() && !hideUndocMembers &&
8655  (protectionLevelVisible(md->protection()) || md->isFriend())
8656  )
8657  )
8658  {
8659  append(MemberInfoContext::alloc(mi));
8660  }
8661  }
8662  }
8663  }
8664  }
8665  }
8666 };
8667 
8669 {
8670  p = new Private(0);
8671 }
8672 
8674 {
8675  p = new Private(ml);
8676 }
8677 
8679 {
8680  delete p;
8681 }
8682 
8683 // TemplateListIntf
8685 {
8686  return p->count();
8687 }
8688 
8690 {
8691  return p->at(index);
8692 }
8693 
8695 {
8696  return p->createIterator();
8697 }
8698 
8699 //------------------------------------------------------------------------
8700 
8701 //%% struct MemberGroupInfo: member group information
8702 //%% {
8704 {
8705  public:
8706  Private(Definition *def,const QCString &relPath,const MemberGroup *mg) :
8707  m_def(def),
8708  m_relPath(relPath),
8709  m_memberGroup(mg)
8710  {
8711  static bool init=FALSE;
8712  if (!init)
8713  {
8714  s_inst.addProperty("members", &Private::members);
8715  s_inst.addProperty("title", &Private::groupTitle);
8716  s_inst.addProperty("subtitle", &Private::groupSubtitle);
8717  s_inst.addProperty("anchor", &Private::groupAnchor);
8718  s_inst.addProperty("memberGroups", &Private::memberGroups);
8719  s_inst.addProperty("docs", &Private::docs);
8720  s_inst.addProperty("inherited", &Private::inherited);
8721  init=TRUE;
8722  }
8723  }
8724  TemplateVariant get(const char *n) const
8725  {
8726  return s_inst.get(this,n);
8727  }
8729  {
8730  if (!m_cache.memberListContext)
8731  {
8732  m_cache.memberListContext.reset(MemberListContext::alloc(m_memberGroup->members()));
8733  }
8734  return m_cache.memberListContext.get();
8735  }
8737  {
8738  return m_memberGroup->header();
8739  }
8741  {
8742  return "";
8743  }
8745  {
8746  return m_memberGroup->anchor();
8747  }
8749  {
8750  if (!m_cache.memberGroups)
8751  {
8752  m_cache.memberGroups.reset(MemberGroupListContext::alloc(m_def,m_relPath,0));
8753  }
8754  return m_cache.memberGroups.get();
8755  }
8757  {
8758  if (!m_cache.docs)
8759  {
8760  QCString docs = m_memberGroup->documentation();
8761  if (!docs.isEmpty())
8762  {
8763  m_cache.docs.reset(new TemplateVariant(
8764  parseDoc(m_def,"[@name docs]",-1, // TODO store file & line
8765  m_relPath,
8766  m_memberGroup->documentation()+"\n",FALSE)));
8767  }
8768  else
8769  {
8770  m_cache.docs.reset(new TemplateVariant(""));
8771  }
8772  }
8773  return *m_cache.docs;
8774  }
8776  {
8777  return FALSE;
8778  }
8779  private:
8783  struct Cachable
8784  {
8788  };
8791 };
8792 //%% }
8793 
8795 
8797  const QCString &relPath,const MemberGroup *mg) : RefCountedContext("MemberGroupInfoContext")
8798 {
8799  p = new Private(def,relPath,mg);
8800 }
8801 
8803 {
8804  delete p;
8805 }
8806 
8808 {
8809  return p->get(name);
8810 }
8811 
8812 //------------------------------------------------------------------------
8813 
8814 //%% list MemberGroupList[MemberGroupInfo] : list of member groups
8816 {
8817  public:
8818  void addMemberGroup(Definition *def,const QCString &relPath,const MemberGroup *mg)
8819  {
8820  append(MemberGroupInfoContext::alloc(def,relPath,mg));
8821  }
8822 };
8823 
8825 {
8826  p = new Private;
8827 }
8828 
8830 {
8831  p = new Private;
8832  if (list)
8833  {
8834  MemberGroupListIterator mgli(*list);
8835  MemberGroup *mg;
8836  for (;(mg=mgli.current());++mgli)
8837  {
8838  p->addMemberGroup(def,relPath,mg);
8839  }
8840  }
8841 }
8842 
8843 MemberGroupListContext::MemberGroupListContext(Definition *def,const QCString &relPath,const MemberGroupSDict *dict,bool subGrouping) : RefCountedContext("MemberGroupListContext")
8844 {
8845  p = new Private;
8846  if (dict)
8847  {
8848  MemberGroupSDict::Iterator di(*dict);
8849  const MemberGroup *mg;
8850  for (di.toFirst();(mg=di.current());++di)
8851  {
8852  if (!mg->allMembersInSameSection() || !subGrouping)
8853  {
8854  p->addMemberGroup(def,relPath,mg);
8855  }
8856  }
8857  }
8858 }
8859 
8861 {
8862  delete p;
8863 }
8864 
8865 // TemplateListIntf
8867 {
8868  return p->count();
8869 }
8870 
8872 {
8873  return p->at(index);
8874 }
8875 
8877 {
8878  return p->createIterator();
8879 }
8880 
8881 
8882 //------------------------------------------------------------------------
8883 
8884 //%% struct MemberListInfo: member list information
8885 //%% {
8887 {
8888  public:
8889  Private(Definition *def,const QCString &relPath,const MemberList *ml,const QCString &title,const QCString &subtitle) :
8890  m_def(def),
8891  m_memberList(ml),
8892  m_relPath(relPath),
8893  m_title(title),
8894  m_subtitle(subtitle)
8895  {
8896  static bool init=FALSE;
8897  if (!init)
8898  {
8899  s_inst.addProperty("members", &Private::members);
8900  s_inst.addProperty("title", &Private::title);
8901  s_inst.addProperty("subtitle", &Private::subtitle);
8902  s_inst.addProperty("anchor", &Private::anchor);
8903  s_inst.addProperty("memberGroups", &Private::memberGroups);
8904  s_inst.addProperty("inherited", &Private::inherited);
8905  init=TRUE;
8906  }
8907  }
8908  TemplateVariant get(const char *n) const
8909  {
8910  return s_inst.get(this,n);
8911  }
8913  {
8914  if (!m_cache.memberListContext)
8915  {
8916  m_cache.memberListContext.reset(MemberListContext::alloc(m_memberList));
8917  }
8918  return m_cache.memberListContext.get();
8919  }
8921  {
8922  return m_title;
8923  }
8925  {
8926  return m_subtitle;
8927  }
8929  {
8930  return MemberList::listTypeAsString(m_memberList->listType());
8931  }
8933  {
8934  if (!m_cache.memberGroups)
8935  {
8936  m_cache.memberGroups.reset(MemberGroupListContext::alloc(m_def,m_relPath,m_memberList->getMemberGroupList()));
8937  }
8938  return m_cache.memberGroups.get();
8939  }
8941  {
8942  if (!m_cache.inherited && (m_memberList->listType()&MemberListType_detailedLists)==0 &&
8943  m_def->definitionType()==Definition::TypeClass)
8944  {
8946  ctx->addMemberList((ClassDef*)m_def,m_memberList->listType(),m_title,FALSE);
8947  m_cache.inherited.reset(ctx);
8948  }
8949  if (m_cache.inherited)
8950  {
8951  return m_cache.inherited.get();
8952  }
8953  else
8954  {
8955  return TemplateVariant(FALSE);
8956  }
8957  }
8958  private:
8964  struct Cachable
8965  {
8969  };
8972 };
8973 //%% }
8974 
8976 
8978  Definition *def,const QCString &relPath,const MemberList *ml,
8979  const QCString &title,const QCString &subtitle) : RefCountedContext("MemberListInfoContext")
8980 {
8981  p = new Private(def,relPath,ml,title,subtitle);
8982 }
8983 
8985 {
8986  delete p;
8987 }
8988 
8990 {
8991  return p->get(name);
8992 }
8993 
8994 //------------------------------------------------------------------------
8995 
8996 //%% struct InheritedMemberInfo: inherited member information
8997 //%% {
8999 {
9000  public:
9002  : m_class(cd), m_memberList(ml), m_title(title)
9003  {
9004  static bool init=FALSE;
9005  if (!init)
9006  {
9007  s_inst.addProperty("class", &Private::getClass);
9008  s_inst.addProperty("title", &Private::title);
9009  s_inst.addProperty("members", &Private::members);
9010  s_inst.addProperty("id", &Private::id);
9011  s_inst.addProperty("inheritedFrom", &Private::inheritedFrom);
9012  init=TRUE;
9013  }
9014  }
9015  TemplateVariant get(const char *n) const
9016  {
9017  return s_inst.get(this,n);
9018  }
9019  virtual ~Private()
9020  {
9021  delete m_memberList;
9022  }
9024  {
9025  if (!m_classCtx)
9026  {
9027  m_classCtx.reset(ClassContext::alloc(m_class));
9028  }
9029  return m_classCtx.get();
9030  }
9032  {
9033  return m_title;
9034  }
9036  {
9037  if (!m_memberListCtx)
9038  {
9039  m_memberListCtx.reset(MemberListContext::alloc(m_memberList));
9040  }
9041  return m_memberListCtx.get();
9042  }
9044  {
9045  return substitute(MemberList::listTypeAsString(m_memberList->listType()),"-","_")+"_"+
9046  stripPath(m_class->getOutputFileBase());
9047  }
9049  {
9050  if (!m_inheritedFrom)
9051  {
9052  m_inheritedFrom.reset(TemplateList::alloc());
9053  m_inheritedFrom->append(title());
9054  m_inheritedFrom->append(getClass());
9055  }
9056  return m_inheritedFrom.get();
9057  }
9058 
9059  private:
9067 };
9068 //%% }
9069 
9071 
9073  const QCString &title) : RefCountedContext("InheritedMemberInfoContext")
9074 {
9075  p = new Private(cd,ml,title);
9076 }
9077 
9079 {
9080  delete p;
9081 }
9082 
9084 {
9085  return p->get(name);
9086 }
9087 
9088 //------------------------------------------------------------------------
9089 
9090 //%% list InheritedMemberList[InheritedMemberInfo] : list of inherited classes
9092 {
9093  public:
9094  void addMemberList(ClassDef *inheritedFrom,MemberList *ml,MemberList *combinedList)
9095  {
9096  if (ml)
9097  {
9098  MemberListIterator li(*ml);
9099  MemberDef *md;
9100  for (li.toFirst();(md=li.current());++li)
9101  {
9102  if (md->isBriefSectionVisible() && !md->isReimplementedBy(inheritedFrom))
9103  {
9104  combinedList->append(md);
9105  }
9106  }
9107  }
9108  }
9109  void addMemberListIncludingGrouped(ClassDef *inheritedFrom,MemberList *ml,MemberList *combinedList)
9110  {
9111  if (ml)
9112  {
9113  addMemberList(inheritedFrom,ml,combinedList);
9114  if (ml->getMemberGroupList())
9115  {
9117  MemberGroup *mg;
9118  for (mgli.toFirst();(mg=mgli.current());++mgli)
9119  {
9120  addMemberList(inheritedFrom,mg->members(),combinedList);
9121  }
9122  }
9123  }
9124  }
9125  void addMemberGroupsOfClass(ClassDef *inheritedFrom,
9126  ClassDef *cd,MemberListType lt,MemberList *combinedList)
9127  {
9128  if (cd->getMemberGroupSDict())
9129  {
9131  MemberGroup *mg;
9132  for (;(mg=mgli.current());++mgli)
9133  {
9134  if (mg->members() && (!mg->allMembersInSameSection() || !cd->subGrouping())) // group is in its own section
9135  {
9136  MemberListIterator li(*mg->members());
9137  MemberDef *md;
9138  for (li.toFirst();(md=li.current());++li)
9139  {
9140  if (lt==md->getSectionList(mg->parent())->listType() &&
9141  !md->isReimplementedBy(inheritedFrom) &&
9142  md->isBriefSectionVisible())
9143  {
9144  combinedList->append(md);
9145  }
9146  }
9147  }
9148  }
9149  }
9150  }
9152  MemberListType lt1,int lt2,const QCString &title,bool additionalList)
9153  {
9154  int count = cd->countMembersIncludingGrouped(lt1,inheritedFrom,additionalList);
9155  if (lt2!=-1) count += cd->countMembersIncludingGrouped((MemberListType)lt2,inheritedFrom,additionalList);
9156  if (count>0)
9157  {
9158  MemberList *ml = cd->getMemberList(lt1);
9159  MemberList *ml2 = lt2!=-1 ? cd->getMemberList((MemberListType)lt2) : 0;
9160  MemberList *combinedList = new MemberList(lt);
9161  addMemberListIncludingGrouped(inheritedFrom,ml,combinedList);
9162  addMemberListIncludingGrouped(inheritedFrom,ml2,combinedList);
9163  addMemberGroupsOfClass(inheritedFrom,cd,lt,combinedList);
9164  if (lt2!=-1) addMemberGroupsOfClass(inheritedFrom,cd,(MemberListType)lt2,combinedList);
9165  append(InheritedMemberInfoContext::alloc(cd,combinedList,title));
9166  }
9167  }
9169  int lt2, const QCString &title,bool additionalList,
9170  QPtrDict<void> *visitedClasses)
9171  {
9172  if (cd->baseClasses())
9173  {
9175  BaseClassDef *ibcd;
9176  for (it.toFirst();(ibcd=it.current());++it)
9177  {
9178  ClassDef *icd=ibcd->classDef;
9179  if (icd->isLinkable())
9180  {
9181  int lt1,lt3;
9182  convertProtectionLevel(lt,ibcd->prot,&lt1,&lt3);
9183  if (lt2==-1 && lt3!=-1)
9184  {
9185  lt2=lt3;
9186  }
9187  if (visitedClasses->find(icd)==0)
9188  {
9189  visitedClasses->insert(icd,icd); // guard for multiple virtual inheritance
9190  if (lt1!=-1)
9191  {
9192  // add member info for members of cd with list type lt
9193  addInheritedMembers(inheritedFrom,icd,lt,(MemberListType)lt1,lt2,title,additionalList);
9194  // recurse down the inheritance tree
9195  findInheritedMembers(inheritedFrom,icd,(MemberListType)lt1,lt2,title,additionalList,visitedClasses);
9196  }
9197  }
9198  }
9199  }
9200  }
9201  }
9202 };
9203 
9205 {
9206  p = new Private;
9207 }
9208 
9210  ClassDef *cd,MemberListType lt,const QCString &title,bool additionalList)
9211 {
9212  QPtrDict<void> visited(17);
9213  bool memberInSection = cd->countMembersIncludingGrouped(lt,cd,FALSE)>0;
9214  bool show = (additionalList && !memberInSection) || // inherited member to show in the additional inherited members list
9215  (!additionalList && memberInSection); // inherited member to show in a member list of the class
9216  //printf("%s:%s show=%d\n",cd->name().data(),MemberList::listTypeAsString(lt).data(),show);
9217  if (show)
9218  {
9219  p->findInheritedMembers(cd,cd,lt,-1,title,additionalList,&visited);
9220  }
9221 }
9222 
9224 {
9225  delete p;
9226 }
9227 
9228 // TemplateListIntf
9230 {
9231  return p->count();
9232 }
9233 
9235 {
9236  return p->at(index);
9237 }
9238 
9240 {
9241  return p->createIterator();
9242 }
9243 
9244 //------------------------------------------------------------------------
9245 
9246 //%% struct Argument: parameter information
9247 //%% {
9249 {
9250  public:
9251  Private(const Argument *arg,Definition *def,const QCString &relPath) :
9252  m_argument(arg), m_def(def), m_relPath(relPath)
9253  {
9254  static bool init=FALSE;
9255  if (!init)
9256  {
9257  s_inst.addProperty("type", &Private::type);
9258  s_inst.addProperty("name", &Private::name);
9259  s_inst.addProperty("defVal", &Private::defVal);
9260  s_inst.addProperty("docs", &Private::docs);
9261  s_inst.addProperty("attrib", &Private::attrib);
9262  s_inst.addProperty("array", &Private::array);
9263  s_inst.addProperty("namePart", &Private::namePart);
9264  init=TRUE;
9265  }
9266  }
9267  TemplateVariant get(const char *n) const
9268  {
9269  return s_inst.get(this,n);
9270  }
9272  {
9273  return createLinkedText(m_def,m_relPath,m_argument->type);
9274  }
9276  {
9277  return m_argument->attrib;
9278  }
9280  {
9281  return m_argument->name;
9282  }
9284  {
9285  return createLinkedText(m_def,m_relPath,m_argument->defval);
9286  }
9288  {
9289  return m_argument->array;
9290  }
9292  {
9293  if (!m_cache.docs && m_def)
9294  {
9295  if (!m_argument->docs.isEmpty())
9296  {
9297  m_cache.docs.reset(new TemplateVariant(
9298  parseDoc(m_def,m_def->docFile(),m_def->docLine(),
9299  m_relPath,m_argument->docs,TRUE)));
9300  }
9301  else
9302  {
9303  m_cache.docs.reset(new TemplateVariant(""));
9304  }
9305  }
9306  return *m_cache.docs;
9307  }
9309  {
9310  QCString result = m_argument->attrib;
9311  int l = result.length();
9312  if (l>2 && result.at(0)=='[' && result.at(l-1)==']')
9313  {
9314  result = result.mid(1,l-2);
9315  if (result!=",") result+=":"; // for normal keywords add colon
9316  }
9317  return result;
9318  }
9319  private:
9323  struct Cachable
9324  {
9326  };
9329 };
9330 //%% }
9331 
9333 
9334 ArgumentContext::ArgumentContext(const Argument *al,Definition *def,const QCString &relPath) : RefCountedContext("ArgumentContext")
9335 {
9336  p = new Private(al,def,relPath);
9337 }
9338 
9340 {
9341  delete p;
9342 }
9343 
9345 {
9346  return p->get(name);
9347 }
9348 
9349 //------------------------------------------------------------------------
9350 
9351 //%% list ArgumentList[Argument] : list of inherited classes
9353 {
9354  public:
9355  void addArgument(const Argument *arg,Definition *def,const QCString &relPath)
9356  {
9357  append(ArgumentContext::alloc(arg,def,relPath));
9358  }
9359 };
9360 
9362 {
9363  p = new Private;
9364 }
9365 
9367  Definition *def,const QCString &relPath) : RefCountedContext("ArgumentListContext")
9368 {
9369  p = new Private;
9370  if (list)
9371  {
9372  ArgumentListIterator ali(*list);
9373  const Argument *arg;
9374  for (ali.toFirst();(arg=ali.current());++ali)
9375  {
9376  p->addArgument(arg,def,relPath);
9377  }
9378  }
9379 }
9380 
9382 {
9383  delete p;
9384 }
9385 
9386 // TemplateListIntf
9388 {
9389  return p->count();
9390 }
9391 
9393 {
9394  return p->at(index);
9395 }
9396 
9398 {
9399  return p->createIterator();
9400 }
9401 
9402 //------------------------------------------------------------------------
9403 
9404 // SymbolIndex
9405 // - name: string
9406 // - letter: string
9407 // - symbolGroups: SymbolGroupList
9408 // SymbolGroupList: list of SymbolGroups
9409 // SymbolGroup
9410 // - id
9411 // - name
9412 // - symbols: SymbolList
9413 // SymbolList: list of Symbols
9414 // Symbol
9415 // - obj
9416 // - scope
9417 // - relPath
9418 
9419 //------------------------------------------------------------------------
9420 
9421 //%% struct SymbolGroup: search group of similar symbols
9422 //%% {
9424 {
9425  public:
9426  Private(const Definition *d,const Definition *prev,
9427  const Definition *next) : m_def(d), m_prevDef(prev), m_nextDef(next)
9428  {
9429  static bool init=FALSE;
9430  if (!init)
9431  {
9432  s_inst.addProperty("fileName",&Private::fileName);
9433  s_inst.addProperty("anchor", &Private::anchor);
9434  s_inst.addProperty("scope", &Private::scope);
9435  s_inst.addProperty("relPath", &Private::relPath);
9436  init=TRUE;
9437  }
9438  }
9439  TemplateVariant get(const char *n) const
9440  {
9441  return s_inst.get(this,n);
9442  }
9444  {
9445  return m_def->getOutputFileBase();
9446  }
9448  {
9449  return m_def->anchor();
9450  }
9452  {
9453  const Definition *scope = m_def->getOuterScope();
9454  const Definition *next = m_nextDef;
9455  const Definition *prev = m_prevDef;
9456  const Definition *nextScope = next ? next->getOuterScope() : 0;
9457  const Definition *prevScope = prev ? prev->getOuterScope() : 0;
9458  bool isMemberDef = m_def->definitionType()==Definition::TypeMember;
9459  const MemberDef *md = isMemberDef ? (const MemberDef*)m_def : 0;
9460  bool isFunctionLike = md && (md->isFunction() || md->isSlot() || md->isSignal());
9461  bool overloadedFunction = isFunctionLike &&
9462  ((prevScope!=0 && scope==prevScope) || (scope && scope==nextScope));
9463  QCString prefix;
9464  if (md) prefix=md->localName();
9465  if (overloadedFunction) // overloaded member function
9466  {
9467  prefix+=md->argsString();
9468  // show argument list to disambiguate overloaded functions
9469  }
9470  else if (md && isFunctionLike) // unique member function
9471  {
9472  prefix+="()"; // only to show it is a function
9473  }
9474  bool found=FALSE;
9475  QCString name;
9476  if (m_def->definitionType()==Definition::TypeClass)
9477  {
9478  name = m_def->displayName();
9479  found = TRUE;
9480  }
9481  else if (m_def->definitionType()==Definition::TypeNamespace)
9482  {
9483  name = m_def->displayName();
9484  found = TRUE;
9485  }
9486  else if (scope==0 || scope==Doxygen::globalScope) // in global scope
9487  {
9488  if (md)
9489  {
9490  FileDef *fd = md->getBodyDef();
9491  if (fd==0) fd = md->getFileDef();
9492  if (fd)
9493  {
9494  if (!prefix.isEmpty()) prefix+=": ";
9495  name = prefix + convertToXML(fd->localName());
9496  found = TRUE;
9497  }
9498  }
9499  }
9500  else if (md && (md->getClassDef() || md->getNamespaceDef()))
9501  // member in class or namespace scope
9502  {
9503  SrcLangExt lang = md->getLanguage();
9504  name = m_def->getOuterScope()->qualifiedName()
9506  found = TRUE;
9507  }
9508  else if (scope) // some thing else? -> show scope
9509  {
9510  name = prefix + convertToXML(scope->name());
9511  found = TRUE;
9512  }
9513  if (!found) // fallback
9514  {
9515  name = prefix + "("+theTranslator->trGlobalNamespace()+")";
9516  }
9517  return name;
9518  }
9520  {
9521  return externalRef("../",m_def->getReference(),TRUE);
9522  }
9523  private:
9528 };
9529 //%% }
9530 
9532 
9533 SymbolContext::SymbolContext(const Definition *def,const Definition *prevDef,const Definition *nextDef)
9534  : RefCountedContext("SymbolContext")
9535 {
9536  p = new Private(def,prevDef,nextDef);
9537 }
9538 
9540 {
9541  delete p;
9542 }
9543 
9545 {
9546  return p->get(name);
9547 }
9548 
9549 //------------------------------------------------------------------------
9550 
9551 //%% list SymbolList[Symbol] : list of search symbols with the same name
9553 {
9554  public:
9556  {
9557  QListIterator<Definition> li(*sdl);
9558  Definition *def;
9559  Definition *prev = 0;
9560  for (li.toFirst();(def=li.current());)
9561  {
9562  ++li;
9563  const Definition *next = li.current();
9564  append(SymbolContext::alloc(def,prev,next));
9565  prev = def;
9566  }
9567  }
9568 };
9569 
9571  : RefCountedContext("SymbolListContext")
9572 {
9573  p = new Private(sdl);
9574 }
9575 
9577 {
9578  delete p;
9579 }
9580 
9581 // TemplateListIntf
9583 {
9584  return p->count();
9585 }
9586 
9588 {
9589  return p->at(index);
9590 }
9591 
9593 {
9594  return p->createIterator();
9595 }
9596 
9597 //------------------------------------------------------------------------
9598 
9599 //%% struct SymbolGroup: search group of similar symbols
9600 //%% {
9602 {
9603  public:
9604  Private(const SearchDefinitionList *sdl) : m_sdl(sdl)
9605  {
9606  static bool init=FALSE;
9607  if (!init)
9608  {
9609  s_inst.addProperty("id", &Private::id);
9610  s_inst.addProperty("name", &Private::name);
9611  s_inst.addProperty("symbols",&Private::symbolList);
9612  init=TRUE;
9613  }
9614  }
9615  TemplateVariant get(const char *n) const
9616  {
9617  return s_inst.get(this,n);
9618  }
9620  {
9621  return m_sdl->id();
9622  }
9624  {
9625  return m_sdl->name();
9626  }
9628  {
9629  if (!m_cache.symbolList)
9630  {
9631  m_cache.symbolList.reset(SymbolListContext::alloc(m_sdl));
9632  }
9633  return m_cache.symbolList.get();
9634  }
9635  private:
9637  struct Cachable
9638  {
9640  };
9643 };
9644 //%% }
9645 
9647 
9649  : RefCountedContext("SymbolGroupContext")
9650 {
9651  p = new Private(sdl);
9652 }
9653 
9655 {
9656  delete p;
9657 }
9658 
9660 {
9661  return p->get(name);
9662 }
9663 
9664 //------------------------------------------------------------------------
9665 
9666 //%% list SymbolGroupList[SymbolGroup] : list of search groups one per by name
9668 {
9669  public:
9671  {
9674  for (li.toFirst();(dl=li.current());++li)
9675  {
9676  append(SymbolGroupContext::alloc(dl));
9677  }
9678  }
9679 };
9680 
9682  : RefCountedContext("SymbolGroupListContext")
9683 {
9684  p = new Private(sil);
9685 }
9686 
9688 {
9689  delete p;
9690 }
9691 
9692 // TemplateListIntf
9694 {
9695  return p->count();
9696 }
9697 
9699 {
9700  return p->at(index);
9701 }
9702 
9704 {
9705  return p->createIterator();
9706 }
9707 
9708 //------------------------------------------------------------------------
9709 
9710 //%% struct SymbolIndex: search index
9711 //%% {
9713 {
9714  public:
9715  Private(const SearchIndexList *sl,const QCString &name) : m_searchList(sl), m_name(name)
9716  {
9717  static bool init=FALSE;
9718  if (!init)
9719  {
9720  s_inst.addProperty("name", &Private::name);
9721  s_inst.addProperty("letter", &Private::letter);
9722  s_inst.addProperty("symbolGroups",&Private::symbolGroups);
9723  init=TRUE;
9724  }
9725  }
9726  TemplateVariant get(const char *n) const
9727  {
9728  return s_inst.get(this,n);
9729  }
9731  {
9732  return m_name;
9733  }
9735  {
9736  return QString(QChar(m_searchList->letter())).utf8();
9737  }
9739  {
9740  if (!m_cache.symbolGroups)
9741  {
9742  m_cache.symbolGroups.reset(SymbolGroupListContext::alloc(m_searchList));
9743  }
9744  return m_cache.symbolGroups.get();
9745  }
9746  private:
9749  struct Cachable
9750  {
9752  };
9755 };
9756 //%% }
9757 
9759 
9761  : RefCountedContext("SymbolIndexContext")
9762 {
9763  p = new Private(sl,name);
9764 }
9765 
9767 {
9768  delete p;
9769 }
9770 
9772 {
9773  return p->get(name);
9774 }
9775 
9776 //------------------------------------------------------------------------
9777 
9778 //%% list SymbolIndices[SymbolIndex] : list of search indices one per by type
9780 {
9781  public:
9783  {
9784  // use info->symbolList to populate the list
9786  const SearchIndexList *sl;
9787  for (it.toFirst();(sl=it.current());++it) // for each letter
9788  {
9789  append(SymbolIndexContext::alloc(sl,info->name));
9790  }
9791  }
9792 };
9793 
9795 {
9796  p = new Private(info);
9797 }
9798 
9800 {
9801  delete p;
9802 }
9803 
9804 // TemplateListIntf
9806 {
9807  return p->count();
9808 }
9809 
9811 {
9812  return p->at(index);
9813 }
9814 
9816 {
9817  return p->createIterator();
9818 }
9819 
9820 //------------------------------------------------------------------------
9821 
9822 //%% struct SearchIndex: search index
9823 //%% {
9825 {
9826  public:
9827  Private(const SearchIndexInfo *info) : m_info(info)
9828  {
9829  static bool init=FALSE;
9830  if (!init)
9831  {
9832  s_inst.addProperty("name", &Private::name);
9833  s_inst.addProperty("text", &Private::text);
9834  s_inst.addProperty("symbolIndices",&Private::symbolIndices);
9835  init=TRUE;
9836  }
9837  }
9838  TemplateVariant get(const char *n) const
9839  {
9840  return s_inst.get(this,n);
9841  }
9843  {
9844  return m_info->name;
9845  }
9847  {
9848  return m_info->text;
9849  }
9851  {
9852  if (!m_cache.symbolIndices)
9853  {
9854  m_cache.symbolIndices.reset(SymbolIndicesContext::alloc(m_info));
9855  }
9856  return m_cache.symbolIndices.get();
9857  }
9858  private:
9860  struct Cachable
9861  {
9863  };
9866 };
9867 //%% }
9868 
9870 
9872  : RefCountedContext("SearchIndexContext")
9873 {
9874  p = new Private(info);
9875 }
9876 
9878 {
9879  delete p;
9880 }
9881 
9883 {
9884  return p->get(name);
9885 }
9886 
9887 //------------------------------------------------------------------------
9888 
9889 //%% list SearchIndices[SearchIndex] : list of search indices one per by type
9891 {
9892  public:
9894  {
9896  for (int i=0;i<NUM_SEARCH_INDICES;i++)
9897  {
9898  append(SearchIndexContext::alloc(&indices[i]));
9899  }
9900  }
9901 };
9902 
9904 {
9905  p = new Private;
9906 }
9907 
9909 {
9910  delete p;
9911 }
9912 
9913 // TemplateListIntf
9915 {
9916  return p->count();
9917 }
9918 
9920 {
9921  return p->at(index);
9922 }
9923 
9925 {
9926  return p->createIterator();
9927 }
9928 
9929 
9930 //------------------------------------------------------------------------
9931 
9933 {
9934  public:
9936  {
9937  return convertToHtml(s,TRUE);
9938  }
9939  void enableTabbing(bool) {}
9940 };
9941 
9942 //------------------------------------------------------------------------
9943 
9945 {
9946  public:
9948  void reset() { }
9949  QCString remove(const QCString &s)
9950  {
9951  QGString result;
9952  const char *p = s.data();
9953  char c;
9954  while ((c=*p++))
9955  {
9956  switch(c)
9957  {
9958  case '\t': case ' ': case '\n':
9959  break;
9960  default:
9961  result+=c;
9962  break;
9963  }
9964  }
9965  result+='\0';
9966  return result.data();
9967  }
9968  private:
9969 };
9970 
9971 //------------------------------------------------------------------------
9972 
9974 {
9975  public:
9977  void reset()
9978  {
9979  m_insideTag = FALSE;
9980  m_insideString = '\0';
9981  m_removeSpaces = TRUE;
9982  }
9983  QCString remove(const QCString &s)
9984  {
9985  QGString result;
9986  const char *p = s.data();
9987  char c;
9988  while ((c=*p++))
9989  {
9990  switch(c)
9991  {
9992  case '<': // start of a tag
9993  if (!m_insideString) m_insideTag=TRUE,m_removeSpaces=FALSE;
9994  result+=c;
9995  break;
9996  case '>': // end of a tag
9997  if (!m_insideString) m_insideTag=FALSE,m_removeSpaces=TRUE;
9998  result+=c;
9999  break;
10000  case '\\': // escaped character in a string
10001  result+=c;
10002  if (m_insideString && *p) result+=*p++;
10003  break;
10004  case '"': case '\'':
10005  if (m_insideTag)
10006  {
10007  if (m_insideString==c) // end of string
10008  {
10009  m_insideString='\0';
10010  }
10011  else if (m_insideString=='\0') // start of string
10012  {
10013  m_insideString=c;
10014  }
10015  }
10016  result+=c;
10017  break;
10018  case ' ': case '\t': case '\n': // whitespace
10019  if (!m_insideTag) // outside tags strip consecutive whitespace
10020  {
10021  m_removeSpaces=TRUE;
10022  }
10023  else
10024  {
10025  result+=' ';
10026  }
10027  break;
10028  default:
10029  //if (m_removeSpaces) result+=' ';
10030  result+=c;
10031  m_removeSpaces=FALSE;
10032  break;
10033  }
10034  }
10035  result+='\0';
10036  //printf("HtmlSpaceless::remove({%s})={%s} m_insideTag=%d m_insideString=%c (%d) removeSpaces=%d\n",s.data(),result.data(),
10037  // m_insideTag,m_insideString,m_insideString,m_removeSpaces);
10038  return result.data();
10039  }
10040  private:
10044 };
10045 
10046 //------------------------------------------------------------------------
10047 
10049 {
10050  public:
10051  LatexEscaper() : m_tabbing(FALSE) {}
10053  {
10054  return convertToLaTeX(s,m_tabbing);
10055  }
10056  void enableTabbing(bool b) { m_tabbing=b; }
10057  private:
10059 };
10060 
10061 
10062 //------------------------------------------------------------------------
10063 
10064 #if DEBUG_REF
10065 int RefCountedContext::s_totalCount;
10066 #endif
10067 
10069 {
10070  msg("Generating output via template engine...\n");
10071  {
10072  TemplateEngine e;
10073  TemplateContext *ctx = e.createContext();
10074  if (ctx)
10075  {
10098 
10099  //%% Doxygen doxygen:
10100  ctx->set("doxygen",doxygen.get());
10101  //%% Translator tr:
10102  ctx->set("tr",tr.get());
10103  //%% Config config:
10104  ctx->set("config",config.get());
10105  //%% ClassList classList:
10106  ctx->set("classList",classList.get()); // not used for standard HTML
10107  //%% ClassTree classTree:
10108  ctx->set("classTree",classTree.get());
10109  //%% ClassIndex classIndex:
10110  ctx->set("classIndex",classIndex.get());
10111  //%% ClassHierarchy classHierarchy:
10112  ctx->set("classHierarchy",classHierarchy.get());
10113  //%% NamespaceList namespaceList:
10114  ctx->set("namespaceList",namespaceList.get());
10115  //%% NamespaceTree namespaceTree:
10116  ctx->set("namespaceTree",namespaceTree.get());
10117  //%% FileList fileList:
10118  ctx->set("fileList",fileList.get());
10119  //%% FileTree fileTree:
10120  ctx->set("fileTree",fileTree.get());
10121  //%% PageList pageList
10122  ctx->set("pageList",pageList.get());
10123  //%% PageTree pageTree
10124  ctx->set("pageTree",pageTree.get());
10125  //%% ExampleTree exampleTree
10126  ctx->set("exampleTree",exampleTree.get());
10127  //%% ExampleList exampleList
10128  ctx->set("exampleList",exampleList.get());
10129  //%% ModuleTree moduleTree
10130  ctx->set("moduleTree",moduleTree.get());
10131  //%% ModuleList moduleList
10132  ctx->set("moduleList",moduleList.get());
10133  //%% DirList dirList
10134  ctx->set("dirList",dirList.get());
10135  //%% Page mainPage
10136  if (Doxygen::mainPage)
10137  {
10139  ctx->set("mainPage",mainPage.get());
10140  }
10141  else
10142  {
10143  // TODO: for LaTeX output index should be main... => solve in template
10144  Doxygen::mainPage = new PageDef("[generated]",1,"index","",theTranslator->trMainPage());
10145  Doxygen::mainPage->setFileName("index");
10147  ctx->set("mainPage",mainPage.get());
10148  }
10149  //%% GlobalsIndex globalsIndex:
10150  ctx->set("globalsIndex",globalsIndex.get());
10151  //%% ClassMembersIndex classMembersIndex:
10152  ctx->set("classMembersIndex",classMembersIndex.get());
10153  //%% NamespaceMembersIndex namespaceMembersIndex:
10154  ctx->set("namespaceMembersIndex",namespaceMembersIndex.get());
10155  //%% SearchIndicaes searchindicaes
10156  ctx->set("searchIndices",searchIndices.get());
10157  //%% string space
10158  ctx->set("space"," ");
10159 
10160  //if (Config_getBool("GENERATE_HTML"))
10161  { // render HTML output
10162  Template *tpl = e.loadByName("htmllayout.tpl",1);
10163  if (tpl)
10164  {
10166  g_globals.dynSectionId = 0;
10167  g_globals.outputDir = Config_getString("HTML_OUTPUT");
10169  createSubDirs(dir);
10170  HtmlEscaper htmlEsc;
10171  ctx->setEscapeIntf(Config_getString("HTML_FILE_EXTENSION"),&htmlEsc);
10172  HtmlSpaceless spl;
10173  ctx->setSpacelessIntf(&spl);
10175  FTextStream ts;
10176  tpl->render(ts,ctx);
10177  e.unload(tpl);
10178  }
10179  }
10180 
10181  // TODO: clean index before each run...
10182 
10183  //if (Config_getBool("GENERATE_LATEX"))
10184  if (0)
10185  { // render LaTeX output
10186  Template *tpl = e.loadByName("latexlayout.tpl",1);
10187  if (tpl)
10188  {
10190  g_globals.dynSectionId = 0;
10191  g_globals.outputDir = Config_getString("LATEX_OUTPUT");
10193  createSubDirs(dir);
10194  LatexEscaper latexEsc;
10195  ctx->setEscapeIntf(".tex",&latexEsc);
10196  LatexSpaceless spl;
10197  ctx->setSpacelessIntf(&spl);
10199  FTextStream ts;
10200  tpl->render(ts,ctx);
10201  e.unload(tpl);
10202  }
10203  }
10204 
10205  // clear all cached data in Definition objects.
10206  QDictIterator<DefinitionIntf> di(*Doxygen::symbolMap);
10207  DefinitionIntf *intf;
10208  for (;(intf=di.current());++di)
10209  {
10210  if (intf->definitionType()==DefinitionIntf::TypeSymbolList) // list of symbols
10211  {
10213  Definition *d;
10214  // for each symbol
10215  for (dli.toFirst();(d=dli.current());++dli)
10216  {
10217  d->setCookie(0);
10218  }
10219  }
10220  else // single symbol
10221  {
10222  Definition *d = (Definition *)intf;
10223  d->setCookie(0);
10224  }
10225  }
10226 
10227  e.destroyContext(ctx);
10228  }
10229  }
10230 #if DEBUG_REF // should be 0, i.e. all objects are deleted
10231  printf("==== total ref count %d\n",RefCountedContext::s_totalCount);
10232 #endif
10233 }
10234 
TemplateVariant tree() const
Definition: context.cpp:7171
Reference counting smart pointer.
Definition: context.cpp:96
static QCString name
Definition: declinfo.cpp:673
TemplateVariant detailedEnums() const
Definition: context.cpp:2830
void addMemberGroupsOfClass(ClassDef *inheritedFrom, ClassDef *cd, MemberListType lt, MemberList *combinedList)
Definition: context.cpp:9125
virtual QCString trSubprograms()=0
Private * p
Definition: context.h:766
Traverses directory structures and contents in a platform-independent way.
Definition: qdir.h:52
TemplateVariant name() const
Definition: context.cpp:9279
TemplateVariant maxDepth() const
Definition: context.cpp:7557
GenericConstIterator(const QList< TemplateVariant > &list)
Definition: context.cpp:125
virtual QCString trPublicMembers()=0
QCString convertToXML(const char *s)
Definition: util.cpp:5717
TemplateVariant tree() const
Definition: context.cpp:6893
TemplateVariant get(const char *n) const
Definition: context.cpp:9439
TemplateVariant variables() const
Definition: context.cpp:8197
ClassDef * classDef
Definition: classdef.h:520
virtual QCString trExamples()=0
TemplateVariant anchor() const
Definition: context.cpp:8928
Private * p
Definition: context.h:806
virtual QCString trTypedefs()=0
CompoundType compoundType() const
Definition: classdef.cpp:4394
TemplateVariant tree() const
Definition: context.cpp:5944
TemplateVariant createLinkedText(Definition *def, const QCString &relPath, const QCString &text)
Definition: context.cpp:3840
virtual QCString trCallerGraph()=0
SharedPtr< TemplateList > enumValues
Definition: context.cpp:7942
SharedPtr< FileContext > m_fileContext
Definition: context.cpp:1705
TemplateVariant templateArgs() const
Definition: context.cpp:4405
void addNamespaces(const NamespaceSDict &nsDict)
Definition: context.cpp:6819
void append(const TemplateVariant &ctn)
Definition: context.cpp:195
TemplateVariant isMaybeVoid() const
Definition: context.cpp:4259
MemberListType listType() const
Definition: memberlist.h:38
TemplateVariant fileName() const
Definition: context.cpp:8070
TemplateVariant isReference() const
Definition: context.cpp:6261
TemplateVariant detailedConstructors() const
Definition: context.cpp:2244
TemplateVariant anchor() const
Definition: context.cpp:9447
TemplateVariant variables() const
Definition: context.cpp:7881
static GroupSDict * groupSDict
Definition: doxygen.h:119
TemplateVariant inherited() const
Definition: context.cpp:8940
TemplateVariant subhighlight() const
Definition: context.cpp:7187
Private(const PageSDict *pages)
Definition: context.cpp:7253
static MemberNameSDict * functionNameSDict
Definition: doxygen.h:116
TemplateVariant collaborationDiagramFor() const
Definition: context.cpp:592
bool isAddable() const
Definition: memberdef.cpp:4255
TemplateVariant enumerationValues() const
Definition: context.cpp:814
TemplateVariant listOfAllMembers() const
Definition: context.cpp:790
TemplateVariant hasIncludeGraph() const
Definition: context.cpp:3010
ClassContext(ClassDef *)
Definition: context.cpp:2627
QCString docFile() const
DefType definitionType() const
Definition: dirdef.h:51
SharedPtr< MemberGroupListContext > memberGroups
Definition: context.cpp:3329
QDict< TemplateVariant > m_cachedLists
Definition: context.cpp:316
TemplateVariant subtitle() const
Definition: context.cpp:8924
TemplateVariant language() const
Definition: context.cpp:1491
virtual QCString trPackageTypes()=0
virtual QCString trEnumerationTypeDocumentation()=0
SharedPtr< TemplateList > examples
Definition: context.cpp:2605
static SymbolIndexContext * alloc(const SearchIndexList *sl, const QCString &name)
Definition: context.h:1269
T * operator->() const
Definition: context.cpp:110
bool isProperty() const
Definition: memberdef.cpp:4185
ModuleContext(GroupDef *)
Definition: context.cpp:5654
Private(FileDef *fd)
Definition: context.cpp:2923
TemplateVariant detailedVariables() const
Definition: context.cpp:2841
QList< TemplateVariant > m_children
Definition: context.cpp:217
virtual QCString trInheritsList(int numEntries)=0
SharedPtr< ArgumentListContext > templateArgs
Definition: context.cpp:5052
Private(GroupDef *gd)
Definition: context.cpp:5122
ParserInterface * getParser(const char *extension)
Definition: parserintf.h:191
SharedPtr< TemplateStruct > fileLink
Definition: context.cpp:1634
Abstract interface for a template context.
Definition: template.h:489
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:6375
TemplateVariant examples() const
Definition: context.cpp:2382
TemplateVariant relPath() const
Definition: context.cpp:7541
bool isTrivial() const
Definition: dot.cpp:4120
void append(const MemberDef *md)
Definition: memberlist.cpp:246
NavPathElemContext(Definition *def)
Definition: context.cpp:7686
TemplateVariant example() const
Definition: context.cpp:3639
TemplateVariant packageAttributes() const
Definition: context.cpp:2204
virtual QCString trNamespaceDocumentation()=0
TemplateVariant typedefs() const
Definition: context.cpp:929
virtual QCString trClassHierarchy()=0
TemplateVariant title() const
Definition: context.cpp:3396
TemplateVariant get(const char *n) const
Definition: context.cpp:1671
T & operator*() const
Definition: context.cpp:109
const IncludeInfo * m_info
Definition: context.cpp:1704
SharedPtr< TemplateList > modules
Definition: context.cpp:5604
TemplateVariant eventAttrs() const
Definition: context.cpp:4434
TemplateVariant implementedBy() const
Definition: context.cpp:826
PageSDict * getSubPages() const
Definition: pagedef.h:56
Cookie * cookie() const
Definition: definition.h:352
TemplateVariant fileIndex() const
Definition: context.cpp:665
TemplateVariant get(const char *n) const
Definition: context.cpp:9015
ScopedPtr< DotGfxHierarchyTable > hierarchy
Definition: context.cpp:6033
SharedPtr< MemberListInfoContext > variables
Definition: context.cpp:5617
virtual QCString trStaticProtectedMembers()=0
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:6628
void addModules(const GroupList &list)
Definition: context.cpp:6525
TemplateVariant preferredDepth() const
Definition: context.cpp:7204
QCString fileToString(const char *name, bool filter, bool isSourceCode)
Definition: util.cpp:2418
TemplateVariant publicSlots() const
Definition: context.cpp:5475
virtual ~TextGeneratorFactory()
Definition: context.cpp:3837
TemplateVariant symbolIndices() const
Definition: context.cpp:9850
virtual TemplateVariant at(int index) const
Definition: context.cpp:7027
TemplateVariant fileMembersDescription() const
Definition: context.cpp:723
This class represents an function or template argument list.
Definition: arguments.h:82
MemberGroupList * getMemberGroupList() const
Definition: memberlist.h:78
TemplateVariant get(const char *n) const
Definition: context.cpp:7167
virtual QCString trDefineValue()=0
SharedPtr< MemberListInfoContext > detailedEvents
Definition: context.cpp:2601
TemplateVariant title() const
Definition: context.cpp:6913
TemplateVariant subhighlight() const
Definition: context.cpp:8241
TemplateVariant subhighlight() const
Definition: context.cpp:6909
TemplateVariant inherits() const
Definition: context.cpp:2066
void generateOutputViaTemplate()
Definition: context.cpp:10068
TemplateVariant hasVolatileQualifier() const
Definition: context.cpp:4554
TemplateVariant operator()(const T *obj) const
Definition: context.cpp:237
TemplateVariant name() const
Definition: context.cpp:9842
char * data() const
Definition: qgstring.h:42
bool isLinkableInProject() const
Definition: classdef.cpp:2707
TemplateVariant isImplementation() const
Definition: context.cpp:4063
void addInheritedMembers(ClassDef *inheritedFrom, ClassDef *cd, MemberListType lt, MemberListType lt1, int lt2, const QCString &title, bool additionalList)
Definition: context.cpp:9151
bool isArtificial() const
static PropertyMapper< InheritanceGraphContext::Private > s_inst
Definition: context.cpp:8323
Private(ClassDef *cd, MemberList *ml, const QCString &title)
Definition: context.cpp:9001
static QCString scope
Definition: declinfo.cpp:668
SharedPtr< TemplateList > variables
Definition: context.cpp:7939
TemplateVariant highlight() const
Definition: context.cpp:2972
TemplateVariant detailedTypedefs() const
Definition: context.cpp:2826
static TemplateList * alloc()
Definition: template.cpp:420
TemplateVariant innerClasses() const
Definition: context.cpp:2290
SharedPtr< MemberListInfoContext > protectedSlots
Definition: context.cpp:2573
TemplateVariant publicMethods() const
Definition: context.cpp:2120
TemplateVariant relPath() const
Definition: context.cpp:8233
TemplateVariant preferredDepth() const
Definition: context.cpp:7314
SharedPtr< MemberListInfoContext > detailedVariables
Definition: context.cpp:5631
void addNamespaces(const NamespaceSDict &nsDict, bool rootOnly, bool addClasses)
Definition: context.cpp:6638
ContextOutputFormat
Definition: context.cpp:55
TemplateVariant properties() const
Definition: context.cpp:7901
static ExampleTreeContext * alloc()
Definition: context.h:816
static PropertyMapper< InheritanceNodeContext::Private > s_inst
Definition: context.cpp:8382
static PageContext * alloc(PageDef *pd, bool isMainPage, bool isExample)
Definition: context.h:332
virtual QCString trClasses()=0
static FileContext * alloc(FileDef *fd)
Definition: context.h:294
Abstract interface for a template.
Definition: template.h:542
TemplateVariant properties() const
Definition: context.cpp:2212
SharedPtr< MemberListInfoContext > detailedEvents
Definition: context.cpp:5636
static NavPathElemContext * alloc(Definition *def)
Definition: context.h:892
TemplateVariant getModule() const
Definition: context.cpp:6198
SharedPtr< SymbolGroupListContext > symbolGroups
Definition: context.cpp:9751
SharedPtr< MemberListInfoContext > enumValues
Definition: context.cpp:5615
InheritanceListContext(const BaseClassList *list, bool baseClasses)
Definition: context.cpp:8415
DotInclDepGraph * getIncludedByGraph() const
Definition: context.cpp:3053
Cachable & getCache() const
Definition: context.cpp:3667
static PropertyMapper< MemberGroupInfoContext::Private > s_inst
Definition: context.cpp:8790
virtual QCString trFile(bool first_capital, bool singular)=0
TemplateVariant detailedProperties() const
Definition: context.cpp:5562
TemplateVariant detailedFriends() const
Definition: context.cpp:5566
BaseClassList * subClasses() const
Definition: classdef.cpp:4404
bool brief
TemplateVariant detailedVariables() const
Definition: context.cpp:3278
static NestingContext * alloc(const NestingNodeContext *parent, int level)
Definition: context.h:536
SharedPtr< MemberListInfoContext > detailedMacros
Definition: context.cpp:3330
SharedPtr< ArgumentListContext > typeConstraints
Definition: context.cpp:5083
TemplateVariant get(const char *n) const
Definition: context.cpp:7840
virtual QCString trCompoundListFortran()=0
Definition: types.h:29
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:2638
TemplateVariant properties() const
Definition: context.cpp:5491
SharedPtr< MemberListInfoContext > publicSlots
Definition: context.cpp:5619
TemplateVariant declType() const
Definition: context.cpp:4015
static NamespaceContext * alloc(NamespaceDef *nd)
Definition: context.h:275
bool isTooBig() const
Definition: dot.cpp:3959
TemplateVariant dirs() const
Definition: context.cpp:3412
T * operator->() const
Definition: context.cpp:89
virtual TemplateVariant at(int index) const
Definition: context.cpp:7118
TemplateVariant get(const char *n) const
Definition: context.cpp:7529
void writeFigure(FTextStream &t, const char *path, const char *file) const
Definition: diagram.cpp:1057
TemplateVariant relPath() const
Definition: context.cpp:6901
SharedPtr< TemplateList > classes
Definition: context.cpp:2560
void addModules(const GroupSDict &modules)
Definition: context.cpp:6668
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:9592
TemplateVariant detailedTypedefs() const
Definition: context.cpp:3263
TemplateVariant fileName() const
Definition: context.cpp:6897
virtual void set(const char *name, const TemplateVariant &v)
Definition: template.cpp:275
static PropertyMapper< ClassIndexContext::Private > s_inst
Definition: context.cpp:5816
static PageSDict * exampleSDict
Definition: doxygen.h:101
Private * p
Definition: context.h:304
SharedPtr< NestingContext > m_moduleTree
Definition: context.cpp:7576
TemplateVariant enums() const
Definition: context.cpp:2794
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
SharedPtr< MemberListInfoContext > typedefs
Definition: context.cpp:5613
SharedPtr< MemberListInfoContext > detailedMacros
Definition: context.cpp:5626
virtual QCString trStaticPrivateMembers()=0
NamespaceContext(NamespaceDef *)
Definition: context.cpp:2901
SharedPtr< TemplateList > classes
Definition: context.cpp:5607
TemplateVariant detailedPublicSlots() const
Definition: context.cpp:5546
TemplateVariant getMembersFiltered(SharedPtr< TemplateList > &listRef, MemberFunc filter) const
Definition: context.cpp:7845
TemplateVariant variables() const
Definition: context.cpp:925
TemplateVariant isCopy() const
Definition: context.cpp:4183
bool isFriend() const
Definition: memberdef.cpp:4175
TemplateVariant isRetain() const
Definition: context.cpp:4191
TemplateVariant protectedSlots() const
Definition: context.cpp:2164
ScopedPtr< TemplateVariant > details
Definition: context.cpp:1626
void msg(const char *fmt,...)
Definition: message.cpp:107
TemplateVariant detailedTypedefs() const
Definition: context.cpp:2228
TemplateVariant file() const
Definition: context.cpp:1684
void findInheritedMembers(ClassDef *inheritedFrom, ClassDef *cd, MemberListType lt, int lt2, const QCString &title, bool additionalList, QPtrDict< void > *visitedClasses)
Definition: context.cpp:9168
TemplateVariant enums() const
Definition: context.cpp:933
static bool isTypedef
Definition: scanner.cpp:10883
MemberDef * m_memberDef
Definition: context.cpp:5046
TemplateVariant typedefs() const
Definition: context.cpp:3223
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:9083
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:9924
virtual QCString trGotoGraphicalHierarchy()=0
Private(const SearchDefinitionList *sdl)
Definition: context.cpp:9604
int dynSectionId
Definition: context.cpp:69
TemplateVariant name() const
Definition: context.cpp:8374
static TemplateVariant parseCode(MemberDef *md, const QCString &scopeName, const QCString &relPath, const QCString &code, int startLine=-1, int endLine=-1, bool showLineNumbers=FALSE)
Definition: context.cpp:1266
static PropertyMapper< InheritedMemberInfoContext::Private > s_inst
Definition: context.cpp:9066
SharedPtr< TemplateList > implements
Definition: context.cpp:5063
uint length() const
Definition: qcstring.h:195
TemplateVariant hasParameters() const
Definition: context.cpp:4545
SharedPtr< MemberListInfoContext > packageTypes
Definition: context.cpp:2580
TemplateVariant privateAttributes() const
Definition: context.cpp:2184
TemplateVariant functions() const
Definition: context.cpp:917
virtual QCString trEnumerationValues()=0
SharedPtr< MemberListContext > members
Definition: context.cpp:2608
virtual QCString trStaticPackageAttribs()=0
virtual QCString trInheritedFrom(const char *members, const char *what)=0
TemplateVariant anchor() const
Definition: context.cpp:7636
static PropertyMapper< TranslateContext::Private > s_inst
Definition: context.cpp:1206
virtual bool current(TemplateVariant &v) const =0
TemplateVariant privateSlots() const
Definition: context.cpp:5483
static ClassSDict * hiddenClasses
Definition: doxygen.h:100
Cachable & getCache() const
Definition: context.cpp:5087
TemplateVariant getNamespace() const
Definition: context.cpp:4502
TemplateVariant title() const
Definition: context.cpp:1863
bool isTrivial() const
Definition: dot.cpp:3636
void addArgument(const Argument *arg, Definition *def, const QCString &relPath)
Definition: context.cpp:9355
const Definition * m_def
Definition: context.cpp:9524
void addDirs(const DirList &dirList)
Definition: context.cpp:6456
SharedPtr< MemberListInfoContext > detailedMethods
Definition: context.cpp:2597
TemplateVariant get(const char *n) const
Definition: context.cpp:1198
SharedPtr< ClassContext > categoryOf
Definition: context.cpp:2611
bool isEvent() const
Definition: memberdef.cpp:4190
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:5664
Definition * m_def
Definition: context.cpp:1646
TemplateVariant variables() const
Definition: context.cpp:8038
TemplateVariant examples() const
Definition: context.cpp:673
void writeLink(const char *ref, const char *f, const char *anchor, const char *text) const
Definition: context.cpp:3784
virtual QCString trGotoTextualHierarchy()=0
Definition: types.h:29
TemplateVariant typeConstraints() const
Definition: context.cpp:2369
bool generateSourceFile() const
Definition: filedef.cpp:1396
SharedPtr< TemplateList > classes
Definition: context.cpp:5813
SharedPtr< AllMembersListContext > allMembersList
Definition: context.cpp:2603
virtual QCString trInheritedByList(int numEntries)=0
SharedPtr< ClassContext > classDef
Definition: context.cpp:5059
SharedPtr< MemberListInfoContext > detailedServices
Definition: context.cpp:2594
Abstract interface for programming language parsers.
Definition: parserintf.h:38
TemplateVariant name() const
Definition: context.cpp:9730
Protection protection() const
Definition: memberdef.cpp:4120
TemplateVariant highlight() const
Definition: context.cpp:8237
void accept(DocVisitor *v)
Definition: docparser.h:1405
virtual TemplateVariant at(int index) const
Definition: context.cpp:9392
Definition: types.h:26
SharedPtr< MemberListInfoContext > friends
Definition: context.cpp:5624
static QCString htmlFileExtension
Definition: doxygen.h:130
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:7075
const NestingNodeContext * m_parent
Definition: context.cpp:6341
static QCString trFunctionAndProc()
TemplateVariant events() const
Definition: context.cpp:7905
TemplateVariant allMembersFileName() const
Definition: context.cpp:2465
static InheritanceGraphContext * alloc(DotGfxHierarchyTable *hierarchy, DotNode *n, int id)
Definition: context.h:430
SharedPtr< MemberListInfoContext > detailedEnumValues
Definition: context.cpp:5629
TemplateVariant fileName() const
Definition: context.cpp:1403
TemplateVariant list() const
Definition: context.cpp:5749
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:9882
virtual QCString trModuleIndex()=0
TemplateVariant searching() const
Definition: context.cpp:957
static PropertyMapper< SymbolIndexContext::Private > s_inst
Definition: context.cpp:9754
TemplateVariant namespaceList() const
Definition: context.cpp:677
TemplateVariant packageStaticMethods() const
Definition: context.cpp:2200
TemplateVariant hasDetails() const
Definition: context.cpp:3449
~SharedPtr()
Definition: context.cpp:108
TemplateVariant isUNOProperty() const
Definition: context.cpp:4239
TemplateVariant classListDescription() const
Definition: context.cpp:618
TemplateVariant functions() const
Definition: context.cpp:2798
SharedPtr< MemberListInfoContext > functions
Definition: context.cpp:2880
ScopedPtr< DotClassGraph > collaborationGraph
Definition: context.cpp:2559
virtual QCString trNoMatches()=0
SharedPtr< UsedFilesContext > usedFiles
Definition: context.cpp:2609
Concrete visitor implementation for HTML output.
virtual QCString trInstanceMethods()=0
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:9344
TemplateVariant functions() const
Definition: context.cpp:8034
virtual TemplateVariant get(const char *name) const =0
SharedPtr< TemplateList > propertyAttrs
Definition: context.cpp:5084
TemplateVariant panelSyncOn() const
Definition: context.cpp:981
TemplateVariant pages() const
Definition: context.cpp:5299
ScopedPtr< TemplateVariant > sources
Definition: context.cpp:3320
TemplateVariant members() const
Definition: context.cpp:2410
virtual QCString trFriends()=0
ArgumentList * templateArguments() const
Definition: classdef.cpp:4419
TemplateVariant typedefs() const
Definition: context.cpp:7885
TemplateVariant hasCollaborationDiagram() const
Definition: context.cpp:2007
TemplateVariant parameters() const
Definition: context.cpp:4528
TemplateVariant versionInfo() const
Definition: context.cpp:2980
void enableTabbing(bool)
Definition: context.cpp:9939
SharedPtr< ClassContext > anonymousType
Definition: context.cpp:5060
TemplateVariant functions() const
Definition: context.cpp:3231
QCString m_relPath
Definition: context.cpp:3762
SharedPtr< MemberListInfoContext > privateMethods
Definition: context.cpp:2575
SharedPtr< TemplateList > dirs
Definition: context.cpp:3532
TemplateVariant compoundType() const
Definition: context.cpp:3307
SharedPtr< TemplateList > all
Definition: context.cpp:7937
TemplateVariant inherited() const
Definition: context.cpp:8775
char & at(uint i) const
Definition: qcstring.h:326
virtual QCString trCollaborationDiagram(const char *clName)=0
virtual QCString trEnumName()=0
SharedPtr< NestingContext > m_dirFileTree
Definition: context.cpp:7214
TemplateVariant classes() const
Definition: context.cpp:2704
ScopedPtr< DotInclDepGraph > includeGraph
Definition: context.cpp:3318
TemplateVariant sourceRefs() const
Definition: context.cpp:834
TemplateVariant reimplementedBy() const
Definition: context.cpp:4741
TemplateVariant categoryOf() const
Definition: context.cpp:2532
virtual TemplateVariant at(int index) const
Definition: context.cpp:8871
FileDef * getBodyDef() const
SharedPtr< MemberListInfoContext > privateTypes
Definition: context.cpp:2574
static PropertyMapper< MemberInfoContext::Private > s_inst
Definition: context.cpp:8608
SharedPtr< TemplateList > examples
Definition: context.cpp:5081
TemplateVariant detailedProtectedSlots() const
Definition: context.cpp:5550
TemplateVariant templateDecls() const
Definition: context.cpp:4618
bool mainPageHasTitle()
Definition: util.cpp:8554
TemplateVariant packageMethods() const
Definition: context.cpp:2196
TemplateVariant getClass() const
Definition: context.cpp:4438
TemplateVariant namePart() const
Definition: context.cpp:9308
TemplateVariant fileName() const
Definition: context.cpp:7640
TemplateVariant protectedAttributes() const
Definition: context.cpp:2156
virtual QCString trClassMethods()=0
TemplateVariant implements() const
Definition: context.cpp:4679
TemplateVariant classes() const
Definition: context.cpp:2268
void addClasses(bool inherit, bool hideSuper)
Definition: context.cpp:6272
static InheritedMemberInfoContext * alloc(ClassDef *cd, MemberList *ml, const QCString &title)
Definition: context.h:1074
SharedPtr< IncludeInfoListContext > includeInfoList
Definition: context.cpp:3317
TemplateVariant macros() const
Definition: context.cpp:5443
TemplateVariant labels() const
Definition: context.cpp:4629
static PageListContext * alloc(const PageSDict *pages)
Definition: context.h:690
TemplateVariant handleInheritsList(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:481
virtual QCString trCompoundIndex()=0
virtual QCString trRelatedFunctions()=0
void addMemberGroup(Definition *def, const QCString &relPath, const MemberGroup *mg)
Definition: context.cpp:8818
Definition: dot.h:60
TemplateVariant isConstrained() const
Definition: context.cpp:4251
static QCString trDesignUnitList()
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:8533
void addFiles(const FileNameList &fnList)
Definition: context.cpp:6987
TemplateVariant title() const
Definition: context.cpp:2968
TemplateVariant get(const char *n) const
Definition: context.cpp:9726
TemplateListIntf * toList() const
Definition: template.h:256
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:9544
TemplateVariant privateStaticAttributes() const
Definition: context.cpp:2188
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:8398
virtual int count() const
Definition: context.cpp:7113
Private * p
Definition: context.h:723
SharedPtr< MemberListInfoContext > signals
Definition: context.cpp:5618
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:3359
FTextStream & m_ts
Definition: context.cpp:3808
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:330
TemplateVariant get(const char *n) const
Definition: context.cpp:5940
TemplateVariant allMembersList() const
Definition: context.cpp:2448
TemplateVariant hasCallerGraph() const
Definition: context.cpp:4942
Private * p
Definition: context.h:704
const bool FALSE
Definition: qglobal.h:370
virtual int count() const
Definition: context.cpp:8866
friend class Iterator
Definition: sortdict.h:598
static FileNameList * inputNameList
Definition: doxygen.h:109
SharedPtr< FileContext > fileDef
Definition: context.cpp:5055
QDict< PropertyFuncIntf > m_map
Definition: context.cpp:282
~ScopedPtr()
Definition: context.cpp:87
TemplateVariant members() const
Definition: context.cpp:9035
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:420
TemplateVariant enumValues() const
Definition: context.cpp:8050
SharedPtr< InheritedMemberInfoListContext > additionalInheritedMembers
Definition: context.cpp:2607
SharedPtr< MemberListInfoContext > packageStaticAttributes
Definition: context.cpp:2584
Definition: types.h:26
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:4519
void addFiles(const FileList &fList)
Definition: context.cpp:6484
TemplateVariant brief() const
Definition: context.cpp:6233
Private(DotGfxHierarchyTable *hierarchy, DotNode *n, int id)
Definition: context.cpp:8289
virtual QCString trMemberFunctionDocumentation()=0
TemplateVariant detailedFunctions() const
Definition: context.cpp:5531
TemplateVariant getClass() const
Definition: context.cpp:6123
TemplateVariant highlight() const
Definition: context.cpp:5956
TemplateVariant isSettable() const
Definition: context.cpp:4123
def graph(desc, maker=maker)
Definition: apa.py:294
TemplateVariant includeGraph() const
Definition: context.cpp:3016
static QCString trDesignUnits()
SharedPtr< SymbolIndicesContext > symbolIndices
Definition: context.cpp:9862
static PropertyMapper< FileContext::Private > s_inst
Definition: context.cpp:3343
TemplateVariant isReference() const
Definition: context.cpp:1577
virtual TemplateVariant at(int index) const
Definition: context.cpp:8452
bool isLinkableInProject() const
Definition: memberdef.cpp:1150
virtual TemplateVariant at(int index) const
Definition: context.cpp:7392
Private(const NestingNodeContext *parent, int level)
Definition: context.cpp:6391
virtual QCString trDirDepGraph(const char *name)=0
SharedPtr< MemberGroupListContext > memberGroups
Definition: context.cpp:2882
QCString id() const
Definition: context.cpp:6380
SharedPtr< TemplateList > classes
Definition: context.cpp:3321
const SearchIndexList * m_searchList
Definition: context.cpp:9747
TemplateVariant dynSectionId() const
Definition: context.cpp:1487
void addPages(const PageSDict &pages, bool rootOnly)
Definition: context.cpp:6663
SharedPtr< MemberListContext > memberListContext
Definition: context.cpp:8966
SharedPtr< MemberListInfoContext > properties
Definition: context.cpp:2588
TemplateVariant bareName() const
Definition: context.cpp:1427
virtual QCString trProvidedByCategory()=0
const std::string instance
TemplateVariant classIndex() const
Definition: context.cpp:622
TemplateVariant highlight() const
Definition: context.cpp:7183
virtual QCString trImplementedFromList(int numEntries)=0
TemplateVariant sourceFileName() const
Definition: context.cpp:1411
IncludeInfoContext(const IncludeInfo *, SrcLangExt lang)
Definition: context.cpp:1712
static PropertyMapper< DoxygenContext::Private > s_inst
Definition: context.cpp:403
TemplateVariant isTransient() const
Definition: context.cpp:4255
TemplateVariant letter() const
Definition: context.cpp:9734
TemplateVariant detailedVariables() const
Definition: context.cpp:2256
TemplateVariant theListOfAllMembers() const
Definition: context.cpp:798
DefType definitionType() const
Definition: namespacedef.h:47
static QCString initializer
Default implementation of a context value of type list.
Definition: template.h:376
TemplateVariant propertyAttrs() const
Definition: context.cpp:4430
SharedPtr< MemberListInfoContext > unoIDLInterfaces
Definition: context.cpp:2586
virtual QCString trDetailedDescription()=0
TemplateVariant title() const
Definition: context.cpp:7553
SharedPtr< NamespaceContext > namespaceContext
Definition: context.cpp:6349
TemplateVariant isReadable() const
Definition: context.cpp:4135
static QCString stripPath(const QCString &s)
Definition: tagreader.cpp:1287
FileContext(FileDef *)
Definition: context.cpp:3349
static ClassHierarchyContext * alloc()
Definition: context.h:493
char m_insideString
Definition: context.cpp:10042
TemplateVariant hasDetails() const
Definition: context.cpp:3105
virtual QCString trPrivateTypes()=0
virtual QCString trProtectedMembers()=0
Private(NamespaceDef *nd)
Definition: context.cpp:2650
virtual QCString trMemberList()=0
SharedPtr< TemplateList > typedefs
Definition: context.cpp:7940
TemplateVariant callGraph() const
Definition: context.cpp:842
TemplateVariant maxDepth() const
Definition: context.cpp:6004
int countMembersIncludingGrouped(MemberListType lt, ClassDef *inheritedFrom, bool additional)
Definition: classdef.cpp:4213
SharedPtr< TemplateList > namespaces
Definition: context.cpp:2876
TemplateVariant events() const
Definition: context.cpp:8062
QCString left(uint len) const
Definition: qcstring.cpp:213
TemplateVariant isLocal() const
Definition: context.cpp:1675
void reset(T *p=0)
Definition: context.cpp:92
bool isDefine() const
Definition: memberdef.cpp:4170
TemplateVariant fieldType() const
Definition: context.cpp:4011
bool isASubGroup() const
Definition: groupdef.cpp:541
MemberDef * memberDef
Definition: membername.h:62
virtual QCString trDefinedAtLineInSourceFile()=0
TemplateVariant name() const
Definition: context.cpp:6224
The QString class provides an abstraction of Unicode text and the classic C null-terminated char arra...
Definition: qstring.h:350
TemplateVariant fileName() const
Definition: context.cpp:7740
SharedPtr< TemplateList > files
Definition: context.cpp:5606
DocRoot * validatingParseDoc(const char *fileName, int startLine, Definition *ctx, MemberDef *md, const char *input, bool indexWords, bool isExample, const char *exampleName, bool singleLine, bool linkFromIndex)
Definition: docparser.cpp:7179
TemplateVariant detailedPrivateSlots() const
Definition: context.cpp:5554
virtual QCString trMemberTypedefDocumentation()=0
virtual QCString trRelatedPagesDescription()=0
TemplateVariant title() const
Definition: context.cpp:9031
SharedPtr< TemplateList > constantgroups
Definition: context.cpp:2877
virtual QCString trEnumValue()=0
SharedPtr< MemberListInfoContext > enums
Definition: context.cpp:3326
SharedPtr< MemberListInfoContext > variables
Definition: context.cpp:2881
SymbolListContext(const SearchDefinitionList *sdl)
Definition: context.cpp:9570
virtual QCString trFileMembers()=0
TemplateVariant functions() const
Definition: context.cpp:8193
const MemberGroup * m_memberGroup
Definition: context.cpp:8782
TemplateVariant extraTypeChars() const
Definition: context.cpp:4572
virtual bool isReference() const
bool protectionLevelVisible(Protection prot)
Definition: util.cpp:8098
TemplateVariant anchor() const
Definition: context.cpp:1407
InheritedMemberInfoContext(ClassDef *cd, MemberList *ml, const QCString &title)
Definition: context.cpp:9072
QCString convertToLaTeX(const QCString &s, bool insideTabbing, bool keepSpaces)
Definition: util.cpp:5812
TemplateVariant get(const char *n) const
Definition: context.cpp:3587
bool isSignal() const
Definition: memberdef.cpp:4130
Private * p
Definition: context.h:142
Cachable & getCache() const
Definition: context.cpp:3536
TemplateVariant isNonAtomic() const
Definition: context.cpp:4179
TemplateVariant templateAlias() const
Definition: context.cpp:4421
TemplateVariant hasConstQualifier() const
Definition: context.cpp:4549
SharedPtr< TemplateList > reimplementedBy
Definition: context.cpp:5071
TemplateVariant detailedProperties() const
Definition: context.cpp:2260
Simplified and optimized version of QTextStream.
Definition: ftextstream.h:11
TemplateVariant text() const
Definition: context.cpp:7644
TemplateVariant get(const char *n) const
Definition: context.cpp:7997
virtual int count() const
Definition: context.cpp:9387
bool isSlot() const
Definition: memberdef.cpp:4135
Abstract interface for a context value of type struct.
Definition: template.h:406
TemplateVariant hasDirGraph() const
Definition: context.cpp:3470
string dir
TemplateVariant isProtectedGettable() const
Definition: context.cpp:4119
SharedPtr< MemberListInfoContext > detailedEnums
Definition: context.cpp:2884
TemplateVariant properties() const
Definition: context.cpp:937
TemplateVariant typeConstraints() const
Definition: context.cpp:4795
DirDef * getDirDef() const
Definition: filedef.h:121
Private(PageDef *pd, bool isMainPage, bool isExample)
Definition: context.cpp:3570
init
Definition: train.py:42
void addFile(FileDef *fd)
Definition: context.cpp:7087
SharedPtr< TemplateList > labels
Definition: context.cpp:5072
TextGeneratorHtml(FTextStream &ts, const QCString &relPath)
Definition: context.cpp:3701
TemplateVariant handleImplementedBy(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:517
const Definition * m_nextDef
Definition: context.cpp:9526
QCString displayName(bool includeScope=TRUE) const
Definition: classdef.cpp:312
TemplateVariant fileName() const
Definition: context.cpp:6729
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
virtual QCString trCompoundMembersDescriptionFortran(bool extractAll)=0
virtual QCString trMemberEnumerationDocumentation()=0
TemplateVariant namespaceMembersDescription() const
Definition: context.cpp:728
TemplateVariant array() const
Definition: context.cpp:9287
OptionType kind() const
Definition: config.h:65
SharedPtr< TemplateList > namespaces
Definition: context.cpp:5608
TemplateVariant publicTypes() const
Definition: context.cpp:2116
virtual QCString trModuleDocumentation()=0
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:9703
SharedPtr< MemberListInfoContext > packageAttributes
Definition: context.cpp:2583
TemplateVariant memberGroups() const
Definition: context.cpp:2469
TemplateVariant publicSlots() const
Definition: context.cpp:2140
bool isFunctionOrSignalSlot() const
Definition: memberdef.cpp:5117
SharedPtr< TemplateList > namespaces
Definition: context.cpp:3322
TemplateVariant get(const char *n) const
Definition: context.cpp:5175
TemplateVariant subHighlight() const
Definition: context.cpp:1871
static int computeMaxDepth(const TemplateListIntf *list)
Definition: context.cpp:5840
SharedPtr< ArgumentListContext > typeConstraints
Definition: context.cpp:2604
virtual QCString trGotoDocumentation()=0
bool isVariable() const
Definition: memberdef.cpp:4140
virtual TemplateVariant at(int index) const
Definition: context.cpp:7070
SharedPtr< MemberListInfoContext > typedefs
Definition: context.cpp:3325
TemplateVariant groupSubtitle() const
Definition: context.cpp:8740
static PageTreeContext * alloc(const PageSDict *pages)
Definition: context.h:713
Private * p
Definition: context.h:580
TemplateVariant classes() const
Definition: context.cpp:608
bool namespaceHasVisibleChild(NamespaceDef *nd, bool includeClasses)
Definition: util.cpp:8299
TemplateVariant detailsVisibleFor() const
Definition: context.cpp:5009
TemplateVariant exception() const
Definition: context.cpp:4043
void addClasses(const ClassSDict &clDict, bool rootOnly)
Definition: context.cpp:6414
static SymbolContext * alloc(const Definition *def, const Definition *prev, const Definition *next)
Definition: context.h:1185
TemplateVariant generatedAt() const
Definition: context.cpp:584
TemplateVariant isLinkableInProject() const
Definition: context.cpp:1419
NestingNodeContext(const NestingNodeContext *parent, Definition *, int index, int level, bool addClasses, bool inherit, bool hideSuper)
Definition: context.cpp:6363
virtual QCString trDirectories()=0
static PropertyMapper< ExampleTreeContext::Private > s_inst
Definition: context.cpp:7789
static GenericNodeListContext * alloc()
Definition: context.cpp:171
TemplateVariant isOverride() const
Definition: context.cpp:4163
TemplateVariant namespaces() const
Definition: context.cpp:3155
SharedPtr< MemberGroupListContext > memberGroups
Definition: context.cpp:8786
virtual QCString displayName(bool includeScope=TRUE) const =0
The QChar class provides a light-weight Unicode character.
Definition: qstring.h:56
virtual QCString trDetailLevel()=0
TemplateVariant fileName() const
Definition: context.cpp:7537
static InheritanceListContext * alloc(const BaseClassList *list, bool baseClasses)
Definition: context.h:932
virtual void append(const TemplateVariant &v)
Definition: template.cpp:343
virtual QCString trPublicTypes()=0
TemplateVariant isMutable() const
Definition: context.cpp:4107
SharedPtr< MemberListInfoContext > enums
Definition: context.cpp:2879
TemplateVariant highlight() const
Definition: context.cpp:7293
SharedPtr< MemberListInfoContext > detailedTypedefs
Definition: context.cpp:2883
static ConfigContext * alloc()
Definition: context.h:132
TemplateVariant maxDepth() const
Definition: context.cpp:6931
Private * p
Definition: context.h:826
SharedPtr< MemberListInfoContext > packageStaticMethods
Definition: context.cpp:2582
static constexpr double mg
Definition: Units.h:145
TemplateVariant hasDetails() const
Definition: context.cpp:2700
TemplateVariant macros() const
Definition: context.cpp:8054
static QCString args
Definition: declinfo.cpp:674
void addDirs(const DirSDict &)
Definition: context.cpp:6643
bool subGrouping() const
Definition: classdef.cpp:4738
SrcLangExt
Definition: types.h:41
static QStrList * l
Definition: config.cpp:1044
virtual int count() const
Definition: context.cpp:9693
Definition: types.h:26
Private * p
Definition: context.h:1152
SharedPtr< MemberListInfoContext > friends
Definition: context.cpp:2590
TemplateVariant get(const char *n) const
Definition: context.cpp:6721
static PropertyMapper< NestingNodeContext::Private > s_inst
Definition: context.cpp:6357
static NamespaceListContext * alloc()
Definition: context.h:589
TemplateVariant get(const char *n) const
Definition: context.cpp:9838
SharedPtr< MemberListContext > m_memberListCtx
Definition: context.cpp:9064
const MemberInfo * m_memberInfo
Definition: context.cpp:8606
TemplateVariant title() const
Definition: context.cpp:8086
TemplateVariant detailedMacros() const
Definition: context.cpp:5515
SharedPtr< MemberListContext > enumValues
Definition: context.cpp:5054
TemplateVariant unoIDLInterfaces() const
Definition: context.cpp:2108
TemplateVariant tree() const
Definition: context.cpp:7736
TemplateVariant fileName() const
Definition: context.cpp:7175
Definition: types.h:29
TemplateVariant handleGeneratedAt(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:433
QCString outputDir
Definition: context.cpp:70
uint count() const
Definition: qvaluelist.h:394
bool operator!=(ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept
TemplateVariant preferredDepth() const
Definition: context.cpp:6771
TemplateVariant memberGroups() const
Definition: context.cpp:3243
TemplateVariant isRemovable() const
Definition: context.cpp:4147
static SymbolListContext * alloc(const SearchDefinitionList *sdl)
Definition: context.h:1205
TemplateVariant highlight() const
Definition: context.cpp:5183
TemplateVariant events() const
Definition: context.cpp:8221
ClassSDict * getClassSDict()
Definition: classdef.cpp:4389
SharedPtr< TemplateList > implementedBy
Definition: context.cpp:5065
virtual QCString trGotoSourceCode()=0
TemplateVariant dirName() const
Definition: context.cpp:3408
SymbolIndexContext(const SearchIndexList *sl, const QCString &name)
Definition: context.cpp:9760
TemplateVariant fileName() const
Definition: context.cpp:8229
SharedPtr< MemberListInfoContext > protectedAttributes
Definition: context.cpp:2571
TemplateVariant relPath() const
Definition: context.cpp:3613
TemplateVariant title() const
Definition: context.cpp:7191
TemplateVariant classHierarchyDescription() const
Definition: context.cpp:733
TemplateVariant title() const
Definition: context.cpp:7756
SharedPtr< MemberListInfoContext > detailedPublicSlots
Definition: context.cpp:5633
SharedPtr< FileContext > fileContext
Definition: context.cpp:6351
SymbolContext(const Definition *def, const Definition *prev, const Definition *next)
Definition: context.cpp:9533
TemplateVariant isPrivateSettable() const
Definition: context.cpp:4127
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:9239
void reset()
Definition: context.cpp:9977
TemplateVariant isDefine() const
Definition: context.cpp:4323
TemplateVariant isSimple() const
Definition: context.cpp:2528
TemplateVariant highlight() const
Definition: context.cpp:7921
TemplateVariant inheritedFrom() const
Definition: context.cpp:850
static TemplateVariant parseDoc(Definition *def, const QCString &file, int line, const QCString &relPath, const QCString &docStr, bool isBrief)
Definition: context.cpp:1227
GroupList * getSubGroups() const
Definition: groupdef.h:103
Protection protection() const
Definition: classdef.cpp:4414
void setFileName(const char *name)
Definition: pagedef.cpp:66
TemplateVariant getFile() const
Definition: context.cpp:4486
virtual QCString trFileListDescription(bool extractAll)=0
TemplateVariant defineValue() const
Definition: context.cpp:806
Concrete visitor implementation for LaTeX output.
TemplateVariant highlight() const
Definition: context.cpp:8078
TemplateVariant isTemplateSpecialization() const
Definition: context.cpp:4275
TemplateVariant memberGroups() const
Definition: context.cpp:8748
void writeLink(const char *ref, const char *f, const char *anchor, const char *name) const
Definition: context.cpp:3738
virtual QCString trMemberDataDocumentation()=0
TemplateVariant enums() const
Definition: context.cpp:8046
Private * p
Definition: context.h:1196
QCString getDefFileExtension() const
Cachable & getCache() const
Definition: context.cpp:2615
SharedPtr< MemberListInfoContext > publicAttributes
Definition: context.cpp:2565
NamespaceDef * m_namespaceDef
Definition: context.cpp:2871
virtual QCString trLoading()=0
static PropertyMapper< PageTreeContext::Private > s_inst
Definition: context.cpp:7334
ClassDef * getClass(const char *n)
Definition: util.cpp:472
static QCString trDesignUnitHierarchy()
TemplateVariant detailedInterfaces() const
Definition: context.cpp:2240
TemplateVariant detailedTypedefs() const
Definition: context.cpp:5519
Private(const SearchIndexInfo *info)
Definition: context.cpp:9827
TemplateVariant subhighlight() const
Definition: context.cpp:7297
bool isNotFriend() const
Definition: memberdef.cpp:5112
static ModuleTreeContext * alloc()
Definition: context.h:775
DotCallGraph * getCallerGraph() const
Definition: context.cpp:4933
static MemberListInfoContext * alloc(Definition *def, const QCString &relPath, const MemberList *ml, const QCString &title, const QCString &subtitle=QCString())
Definition: context.h:1031
bool current(TemplateVariant &v) const
Definition: context.cpp:144
bool constSpecifier
Definition: arguments.h:99
TemplateVariant hasDetails() const
Definition: context.cpp:1875
void insert(void *k, const type *d)
Definition: qptrdict.h:57
Private(Definition *def)
Definition: context.cpp:7614
TemplateVariant all() const
Definition: context.cpp:8189
InheritanceGraphContext(DotGfxHierarchyTable *hierarchy, DotNode *n, int id)
Definition: context.cpp:8328
virtual TemplateVariant at(int index) const
Definition: context.cpp:7488
SharedPtr< NamespaceContext > namespaceDef
Definition: context.cpp:5056
SharedPtr< MemberListInfoContext > detailedProperties
Definition: context.cpp:5637
TemplateVariant type() const
Definition: context.cpp:4993
static PropertyMapper< SearchIndexContext::Private > s_inst
Definition: context.cpp:9865
static DoxygenContext * alloc()
Definition: context.h:151
void addClassHierarchy(const ClassSDict &classSDict, bool)
Definition: context.cpp:6569
virtual QCString trDataTypes()=0
ScopedPtr< TemplateVariant > docs
Definition: context.cpp:8787
TemplateVariant includedByDependencyGraph() const
Definition: context.cpp:862
virtual QCString trInclDepGraph(const char *fName)=0
virtual QCString trInitialValue()=0
TemplateVariant additionalInheritedMembers() const
Definition: context.cpp:854
SharedPtr< MemberListInfoContext > events
Definition: context.cpp:2589
MemberListInfoContext(Definition *def, const QCString &relPath, const MemberList *ml, const QCString &title, const QCString &subtitle=QCString())
Definition: context.cpp:8977
QCString extractDirection(QCString &docs)
Definition: util.cpp:8342
TemplateVariant isInline() const
Definition: context.cpp:4099
bool isBriefSectionVisible() const
Definition: memberdef.cpp:1289
TemplateVariant anchor() const
Definition: context.cpp:6253
QCString convertToId(const char *s)
Definition: util.cpp:5685
TemplateVariant isPublished() const
Definition: context.cpp:4271
TemplateVariant includeDependencyGraph() const
Definition: context.cpp:858
static SymbolGroupListContext * alloc(const SearchIndexList *sil)
Definition: context.h:1247
TemplateContext * createContext() const
Definition: template.cpp:4961
TemplateVariant moduleDocumentation() const
Definition: context.cpp:707
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:9771
virtual TemplateVariant at(int index) const
Definition: context.cpp:1764
IncludeInfoListContext(const QList< IncludeInfo > &list, SrcLangExt lang)
Definition: context.cpp:1748
DotClassGraph * getCollaborationGraph() const
Definition: context.cpp:1998
TemplateVariant id() const
Definition: context.cpp:9619
#define Config_getInt(val)
Definition: config.cpp:661
static DirContext * alloc(DirDef *dd)
Definition: context.h:312
FileDef * getFileDef() const
Definition: memberdef.cpp:4075
TemplateVariant version() const
Definition: context.cpp:366
TemplateVariant subhighlight() const
Definition: context.cpp:7752
static PropertyMapper< SymbolContext::Private > s_inst
Definition: context.cpp:9527
TemplateVariant gotoDocumentation() const
Definition: context.cpp:870
static NamespaceSDict * namespaceSDict
Definition: doxygen.h:120
SharedPtr< NestingContext > m_namespaceTree
Definition: context.cpp:6950
static NamespaceDef * globalScope
Definition: doxygen.h:128
static int computeNumNodesAtLevel(const TemplateStructIntf *s, int level, int maxLevel)
Definition: context.cpp:5859
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool TBRank=TRUE, bool imageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3133
virtual QCString trClassDiagram(const char *clName)=0
TemplateVariant detailedServices() const
Definition: context.cpp:2236
TemplateVariant preferredDepth() const
Definition: context.cpp:6940
Private(const SearchIndexInfo *info)
Definition: context.cpp:9782
SharedPtr< TemplateList > classes
Definition: context.cpp:2875
ContextOutputFormat detailsOutputFormat
Definition: context.cpp:1627
SharedPtr< MemberListInfoContext > macros
Definition: context.cpp:5612
virtual int count() const
Definition: context.cpp:9229
TemplateVariant get(const char *n) const
Definition: context.cpp:392
virtual QCString trGlobalNamespace()=0
TemplateVariant isDefault() const
Definition: context.cpp:4223
TemplateVariant isStrong() const
Definition: context.cpp:4199
virtual QCString trStaticPublicMembers()=0
static ParserManager * parserManager
Definition: doxygen.h:141
bool isTrivial() const
Definition: dot.cpp:4740
Private * p
Definition: context.h:902
list files
Definition: languages.py:9
ClassDef * templateMaster() const
Definition: classdef.cpp:4439
virtual DefType definitionType() const =0
Specifier virtualness(int count=0) const
Definition: memberdef.cpp:3560
TemplateVariant detailedFunctions() const
Definition: context.cpp:2834
virtual TemplateVariant at(int index) const
Definition: context.cpp:6850
SharedPtr< MemberGroupListContext > memberGroups
Definition: context.cpp:8967
TemplateVariant related() const
Definition: context.cpp:8066
def cli(ctx)
Definition: main.py:7
Private * p
Definition: context.h:785
SharedPtr< TemplateStruct > lineLink
Definition: context.cpp:1635
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
TemplateVariant memberGroups() const
Definition: context.cpp:8932
Definition: sortdict.h:73
TemplateVariant isProtectedSettable() const
Definition: context.cpp:4131
TemplateVariant id() const
Definition: context.cpp:6217
TemplateVariant related() const
Definition: context.cpp:945
InheritanceNodeContext(ClassDef *cd, const QCString &name)
Definition: context.cpp:8388
TemplateVariant classDocumentation() const
Definition: context.cpp:878
SymbolIndicesContext(const SearchIndexInfo *info)
Definition: context.cpp:9794
QCString getLanguageSpecificSeparator(SrcLangExt lang, bool classScope)
Definition: util.cpp:8065
void addPages(const PageSDict &pages)
Definition: context.cpp:7361
uint count() const
Definition: qlist.h:66
SharedPtr< IncludeInfoContext > includeInfo
Definition: context.cpp:2555
TemplateVariant related() const
Definition: context.cpp:7909
TemplateVariant tree() const
Definition: context.cpp:7533
TemplateVariant functionQualifier() const
Definition: context.cpp:4808
TemplateVariant fileName() const
Definition: context.cpp:9443
TemplateVariant mainPage() const
Definition: context.cpp:604
TemplateVariant privateStaticMethods() const
Definition: context.cpp:2180
ScopedPtr< TemplateVariant > example
Definition: context.cpp:3664
TemplateVariant additionalInheritedMembers() const
Definition: context.cpp:2485
SharedPtr< TemplateList > enumValues
Definition: context.cpp:8099
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:6052
TemplateVariant compoundType() const
Definition: context.cpp:2696
SharedPtr< TemplateList > properties
Definition: context.cpp:8100
virtual QCString trProtectedSlots()=0
Cachable & getCache() const
Definition: context.cpp:3337
virtual int count() const
Definition: context.cpp:8447
void writeString(const char *s, bool keepSpaces) const
Definition: context.cpp:3703
SharedPtr< NestingContext > m_classTree
Definition: context.cpp:6023
static PropertyMapper< NamespaceTreeContext::Private > s_inst
Definition: context.cpp:6960
TemplateVariant isFunctionPtr() const
Definition: context.cpp:4083
bool volatileSpecifier
Definition: arguments.h:101
TemplateVariant hasIncludedByGraph() const
Definition: context.cpp:3062
virtual QCString trMainPage()=0
static PropertyMapper< NamespaceMembersIndexContext::Private > s_inst
Definition: context.cpp:8261
QAsciiDict< Entry > fn
QCString relPathAsString() const
Definition: context.cpp:7669
TemplateVariant subhighlight() const
Definition: context.cpp:5960
TemplateVariant type() const
Definition: context.cpp:9271
TemplateVariant getMemberList(SharedPtr< MemberListInfoContext > &list, MemberListType type, const char *title, bool detailed=FALSE) const
Definition: context.cpp:5423
QTextStream & reset(QTextStream &s)
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:1222
void addExamples(TemplateList *list) const
Definition: context.cpp:4765
bool indirect
Definition: filedef.h:53
SharedPtr< MemberListInfoContext > detailedEnums
Definition: context.cpp:3332
TemplateVariant signals() const
Definition: context.cpp:2112
TemplateVariant initializer() const
Definition: context.cpp:4299
Private * p
Definition: context.h:204
TemplateVariant referenceManual() const
Definition: context.cpp:973
TemplateVariant isSlot() const
Definition: context.cpp:4071
SharedPtr< MemberListInfoContext > privateStaticAttributes
Definition: context.cpp:2578
virtual void set(const char *name, const TemplateVariant &v)=0
TemplateVariant sourceCode() const
Definition: context.cpp:4845
int numInheritanceNodes() const
Definition: context.cpp:1901
NestingContext(const NestingNodeContext *parent, int level)
Definition: context.cpp:6607
TemplateVariant get(const char *n) const
Definition: context.cpp:9267
QCString toString() const
Definition: template.h:232
TemplateVariant sourceRefBys() const
Definition: context.cpp:838
TemplateVariant getMemberList(SharedPtr< MemberListInfoContext > &list, MemberListType type, const char *title, bool detailed=FALSE) const
Definition: context.cpp:2084
TemplateVariant events() const
Definition: context.cpp:5487
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:7123
type * current() const
Definition: dot.h:43
const QCString & name() const
Definition: definition.h:114
Definition: dirdef.h:37
Private(const Argument *arg, Definition *def, const QCString &relPath)
Definition: context.cpp:9251
TemplateVariant virtualness() const
Definition: context.cpp:8576
TemplateVariant getNamespace() const
Definition: context.cpp:6138
SharedPtr< MemberListInfoContext > macros
Definition: context.cpp:3324
bool isDetailedSectionLinkable() const
Definition: memberdef.cpp:1852
const double e
TemplateVariant date() const
Definition: context.cpp:370
TemplateVariant classList() const
Definition: context.cpp:614
Helper class to map a property name to a handler member function.
Definition: context.cpp:225
TemplateVariant enumValue() const
Definition: context.cpp:969
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:5720
bool isEnumValue() const
Definition: memberdef.cpp:4150
DefType definitionType() const
Definition: pagedef.h:40
TemplateVariant classMembersDescription() const
Definition: context.cpp:745
TemplateVariant name() const
Definition: context.cpp:9623
TemplateVariant isRequired() const
Definition: context.cpp:4175
virtual TemplateVariant at(int index) const
Definition: context.cpp:6623
virtual int count() const
Definition: context.cpp:8523
ScopedPtr< DotClassGraph > classGraph
Definition: context.cpp:2558
TemplateVariant namespaceDocumentation() const
Definition: context.cpp:882
SharedPtr< MemberListInfoContext > protectedTypes
Definition: context.cpp:2568
virtual QCString trGeneratedBy()=0
PageListContext(const PageSDict *pages)
Definition: context.cpp:7375
TemplateVariant usedFiles() const
Definition: context.cpp:1883
TemplateVariant compoundMembers() const
Definition: context.cpp:886
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:6976
Scoped smart pointer.
Definition: context.cpp:75
TemplateVariant isObjCProperty() const
Definition: context.cpp:4059
TemplateVariant symbolList() const
Definition: context.cpp:9627
virtual QCString trFileDocumentation()=0
void setCookie(Cookie *cookie)
Definition: definition.h:351
fileName
Definition: dumpTree.py:9
TemplateVariant fileListDescription() const
Definition: context.cpp:894
uint count() const
Definition: qlist.h:131
SharedPtr< TemplateList > inlineClasses
Definition: context.cpp:3335
TemplateVariant gotoTextualHierarchy() const
Definition: context.cpp:741
static NestingNodeContext * alloc(const NestingNodeContext *parent, Definition *def, int index, int level, bool addClasses, bool inherit, bool hideSuper)
Definition: context.h:512
TemplateVariant get(const char *n) const
Definition: context.cpp:6111
static MemberListContext * alloc()
Definition: context.h:954
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:2911
bool allMembersInSameSection() const
Definition: membergroup.h:67
bool isRemovable() const
Definition: memberdef.cpp:4260
static ArgumentListContext * alloc()
Definition: context.h:1161
bool isLinkableInProject() const
Definition: filedef.cpp:1877
TextGeneratorIntf * create(FTextStream &ts, const QCString &relPath)
Definition: context.cpp:3822
TemplateVariant constantgroups() const
Definition: context.cpp:2748
TemplateVariant highlight() const
Definition: context.cpp:1867
void writeImage(FTextStream &t, const char *path, const char *relPath, const char *file, bool generateMap=TRUE) const
Definition: diagram.cpp:1353
QCString name() const
Definition: filedef.cpp:1193
bool isTrivial() const
Definition: dot.cpp:3954
virtual QCString getSourceFileBase() const
Definition: definition.cpp:885
TemplateVariant fileName() const
Definition: context.cpp:6257
TemplateVariant exampleList() const
Definition: context.cpp:786
virtual int count() const
Definition: context.cpp:5710
DefType definitionType() const
Definition: classdef.h:106
virtual QCString getSourceAnchor() const
Definition: definition.cpp:898
Private * p
Definition: context.h:662
static PropertyMapper< ClassMembersIndexContext::Private > s_inst
Definition: context.cpp:8105
void addBaseProperties(PropertyMapper< T > &inst)
Definition: context.cpp:1364
TemplateVariant isLinkable() const
Definition: context.cpp:6249
TemplateVariant reimplements() const
Definition: context.cpp:822
SharedPtr< TemplateList > reimplements
Definition: context.cpp:5064
virtual void setEscapeIntf(const QCString &extension, TemplateEscapeIntf *intf)=0
virtual QCString trVariables()=0
static Config * config
Definition: config.cpp:1054
QCString convertToHtml(const char *s, bool keepEntities)
Definition: util.cpp:5746
FTextStream & m_ts
Definition: context.cpp:3761
SharedPtr< ClassContext > m_classCtx
Definition: context.cpp:9063
TemplateVariant compoundKind() const
Definition: context.cpp:1515
QCString right(uint len) const
Definition: qcstring.cpp:231
Private * p
Definition: context.h:421
virtual QCString trStaticPrivateAttribs()=0
SharedPtr< MemberContext > m_member
Definition: context.cpp:8607
ScopedPtr< TemplateVariant > brief
Definition: context.cpp:1628
ScopedPtr(T *p=0)
Definition: context.cpp:86
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:7446
SrcLangExt getLanguage() const
std::void_t< T > n
static TextGeneratorFactory * instance()
Definition: context.cpp:3816
const double a
TemplateVariant handleReimplementedBy(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:529
TemplateVariant subhighlight() const
Definition: context.cpp:5789
TemplateVariant isExternal() const
Definition: context.cpp:4215
SharedPtr< InheritedMemberInfoListContext > inherited
Definition: context.cpp:8968
TemplateVariant detailedEvents() const
Definition: context.cpp:2264
ScopedPtr< TemplateVariant > inbodyDocs
Definition: context.cpp:1630
SharedPtr< MemberListInfoContext > detailedRelated
Definition: context.cpp:2598
TemplateVariant detailedRelated() const
Definition: context.cpp:2252
TemplateVariant collaborationDiagram() const
Definition: context.cpp:2012
SymbolGroupListContext(const SearchIndexList *sil)
Definition: context.cpp:9681
TemplateVariant tree() const
Definition: context.cpp:7281
SharedPtr< MemberListInfoContext > signals
Definition: context.cpp:2587
static DirSDict * directories
Definition: doxygen.h:139
SharedPtr< MemberListInfoContext > detailedInterfaces
Definition: context.cpp:2595
TemplateVariant typeConstraints() const
Definition: context.cpp:782
SharedPtr< MemberListContext > memberListContext
Definition: context.cpp:8785
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:8694
virtual QCString trInterfaces()=0
virtual QCString trFileMembersDescription(bool extractAll)=0
Private(const IncludeInfo *info, SrcLangExt lang)
Definition: context.cpp:1657
TemplateVariant get(const char *n) const
Definition: context.cpp:7732
virtual void setOutputDirectory(const QCString &dir)=0
TemplateVariant detailedEnumValues() const
Definition: context.cpp:5527
TemplateVariant anonymousMember() const
Definition: context.cpp:4352
Private(MemberDef *md)
Definition: context.cpp:3862
char versionString[]
Definition: version.cpp:1
TemplateVariant includeInfo() const
Definition: context.cpp:2050
TemplateVariant isLinkable() const
Definition: context.cpp:1415
TemplateVariant graph() const
Definition: context.cpp:8302
TemplateVariant subHighlight() const
Definition: context.cpp:2976
ScopedPtr< DotInclDepGraph > includedByGraph
Definition: context.cpp:3319
Private * p
Definition: context.h:224
TemplateVariant memberGroups() const
Definition: context.cpp:2810
constexpr std::array< std::size_t, geo::vect::dimension< Vector >)> indices()
Returns a sequence of indices valid for a vector of the specified type.
TemplateVariant title() const
Definition: context.cpp:7929
TemplateVariant attrib() const
Definition: context.cpp:9275
void addTemplateDecls(TemplateList *tl) const
Definition: context.cpp:4576
TemplateVariant enumValues() const
Definition: context.cpp:4388
SharedPtr< MemberListInfoContext > detailedSignals
Definition: context.cpp:5632
SharedPtr< MemberListInfoContext > detailedTypedefs
Definition: context.cpp:2592
TemplateVariant tree() const
Definition: context.cpp:6725
virtual QCString trSignals()=0
void addDerivedClasses(const BaseClassList *bcl, bool hideSuper)
Definition: context.cpp:6683
TemplateVariant compoundType() const
Definition: context.cpp:5595
void addMemberListIncludingGrouped(ClassDef *inheritedFrom, MemberList *ml, MemberList *combinedList)
Definition: context.cpp:9109
virtual int count() const
Definition: context.cpp:1759
SharedPtr< MemberListInfoContext > functions
Definition: context.cpp:5616
SharedPtr< MemberGroupListContext > memberGroups
Definition: context.cpp:5625
void unload(Template *t)
Definition: template.cpp:4976
bool classHasVisibleChildren(ClassDef *cd)
Definition: util.cpp:5182
TemplateVariant dirs() const
Definition: context.cpp:5318
const DirList & subDirs() const
Definition: dirdef.h:61
virtual void render(FTextStream &ts, TemplateContext *c)=0
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:7350
virtual QCString trPublicSlots()=0
type * find(void *k) const
Definition: qptrdict.h:63
TemplateVariant isAbstract() const
Definition: context.cpp:4159
TemplateVariant publicStaticAttributes() const
Definition: context.cpp:2136
TemplateVariant detailedFunctions() const
Definition: context.cpp:3271
TemplateVariant relPath() const
Definition: context.cpp:6733
TemplateVariant variables() const
Definition: context.cpp:3239
TemplateVariant getMemberList(SharedPtr< MemberListInfoContext > &list, MemberListType type, const char *title, bool detailed=FALSE) const
Definition: context.cpp:2770
virtual int count() const
Definition: context.cpp:8684
virtual QCString trClassDocumentation()=0
static AllMembersListContext * alloc()
Definition: context.h:1116
TemplateVariant initialValue() const
Definition: context.cpp:810
static FileListContext * alloc()
Definition: context.h:650
SharedPtr< TemplateList > macros
Definition: context.cpp:7943
TemplateVariant groupAnchor() const
Definition: context.cpp:8744
SharedPtr< TemplateList > innerClasses
Definition: context.cpp:2561
QCString relPathAsString() const
Definition: context.cpp:6228
TemplateVariant declArgs() const
Definition: context.cpp:4029
static QDict< DefinitionIntf > * symbolMap
Definition: doxygen.h:134
TemplateVariant get(const char *n) const
Definition: context.cpp:2680
TemplateVariant getDir() const
Definition: context.cpp:6153
ScopedPtr< DotGroupCollaboration > groupGraph
Definition: context.cpp:5640
TemplateVariant classes() const
Definition: context.cpp:5356
SharedPtr< MemberListInfoContext > publicStaticAttributes
Definition: context.cpp:2566
static TranslateContext * alloc()
Definition: context.h:170
SharedPtr< MemberListInfoContext > typedefs
Definition: context.cpp:2878
QCString & prepend(const char *s)
Definition: qcstring.cpp:387
TemplateVariant inlineClasses() const
Definition: context.cpp:5570
virtual void setSpacelessIntf(TemplateSpacelessIntf *intf)=0
TemplateVariant get(const char *n) const
Definition: context.cpp:8362
T * get() const
Definition: context.cpp:90
T & operator*() const
Definition: context.cpp:88
virtual QCString trFunctions()=0
TemplateVariant level() const
Definition: context.cpp:6213
TemplateVariant enums() const
Definition: context.cpp:5451
Abstract interface for a iterator of a list.
Definition: template.h:333
p
Definition: test.py:223
TemplateVariant get(const char *n) const
Definition: context.cpp:9615
virtual QCString trFileIndex()=0
TemplateVariant functions() const
Definition: context.cpp:7877
SharedPtr< MemberListContext > sourceRefBys
Definition: context.cpp:5067
TemplateVariant isAssign() const
Definition: context.cpp:4187
TemplateVariant hasInheritanceDiagram() const
Definition: context.cpp:1910
static ArgumentContext * alloc(const Argument *arg, Definition *def, const QCString &relPath)
Definition: context.h:1141
bool isSettable() const
Definition: memberdef.cpp:4240
void writeBreak(int indent) const
Definition: context.cpp:3776
SharedPtr< TemplateList > constantgroups
Definition: context.cpp:3323
TemplateVariant implements() const
Definition: context.cpp:818
TemplateVariant title() const
Definition: context.cpp:3591
void addNamespaces(const NamespaceSDict &nsDict, bool rootOnly, bool addClasses)
Definition: context.cpp:6394
static UsedFilesContext * alloc(ClassDef *cd)
Definition: context.h:189
SharedPtr< MemberListInfoContext > related
Definition: context.cpp:2591
A bunch of utility functions.
TemplateVariant macros() const
Definition: context.cpp:7897
MemberContext(MemberDef *)
Definition: context.cpp:5099
static PageSDict * pageSDict
Definition: doxygen.h:102
SharedPtr< TemplateList > templateDecls
Definition: context.cpp:5061
SharedPtr< TemplateList > files
Definition: context.cpp:3533
TemplateVariant category() const
Definition: context.cpp:4454
void addTemplateDecls(Definition *d, TemplateList *tl) const
Definition: context.cpp:2320
TemplateVariant events() const
Definition: context.cpp:941
Interface used to escape characters in a string.
Definition: template.h:457
ClassDef * m_classDef
Definition: context.cpp:2550
TemplateVariant handleSourceRefBys(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:553
const char * data() const
Definition: qcstring.h:207
virtual QCString trPrivateSlots()=0
bool isEmbeddedInOuterScope() const
Definition: classdef.cpp:4630
Definition: dirdef.h:44
Private(const MemberNameInfoSDict *ml)
Definition: context.cpp:8636
bool isLinkable() const
Definition: classdef.cpp:2729
Private * p
Definition: context.h:361
TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:190
TemplateVariant member() const
Definition: context.cpp:8590
TemplateVariant highlight() const
Definition: context.cpp:6905
CodeOutputInterface * code
QCString dateToString(bool includeTime)
Definition: util.cpp:2473
TemplateVariant properties() const
Definition: context.cpp:8058
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:9659
#define Config_getString(val)
Definition: config.cpp:660
TemplateVariant namespaceMembers() const
Definition: context.cpp:692
type * current() const
Definition: qlist.h:146
bool isGettable() const
Definition: memberdef.cpp:4225
SharedPtr< MemberListInfoContext > detailedVariables
Definition: context.cpp:2886
QCString relPathAsString() const
Definition: context.cpp:1431
SharedPtr< TemplateList > examples
Definition: context.cpp:5610
TemplateVariant hasCallGraph() const
Definition: context.cpp:4882
TemplateVariant isInitonly() const
Definition: context.cpp:4167
static ExampleListContext * alloc()
Definition: context.h:794
TemplateVariant friends() const
Definition: context.cpp:5495
TemplateVariant macros() const
Definition: context.cpp:3219
TemplateVariant get(const char *n) const
Definition: context.cpp:8724
SharedPtr< TemplateList > variables
Definition: context.cpp:8096
virtual QCString trPanelSynchronisationTooltip(bool enable)=0
#define Config_getBool(val)
Definition: config.cpp:664
SharedPtr< PageContext > pageContext
Definition: context.cpp:6352
static InheritanceNodeContext * alloc(ClassDef *cd, const QCString &name)
Definition: context.h:912
Private * p
Definition: context.h:285
void reset(T *p=0)
Definition: context.cpp:113
virtual QCString trExamplesDescription()=0
ClassDef * getClassDef() const
Definition: memberdef.cpp:4070
TemplateVariant files() const
Definition: context.cpp:5337
static PropertyMapper< ClassTreeContext::Private > s_inst
Definition: context.cpp:6792
TemplateVariant scope() const
Definition: context.cpp:9451
const Definition * m_prevDef
Definition: context.cpp:9525
TemplateVariant fileMembers() const
Definition: context.cpp:719
TemplateVariant text() const
Definition: context.cpp:9846
TemplateVariant enumValues() const
Definition: context.cpp:8209
Private * p
Definition: context.h:1218
virtual bool isVisible() const
bool isPrivateGettable() const
Definition: memberdef.cpp:4230
ScopedPtr< DotCallGraph > callGraph
Definition: context.cpp:5068
TemplateVariant loading() const
Definition: context.cpp:953
TemplateVariant constantgroups() const
Definition: context.cpp:5400
static ModuleListContext * alloc()
Definition: context.h:751
virtual QCString trProtectedTypes()=0
virtual int count() const
Definition: context.cpp:9582
SharedPtr< MemberListInfoContext > privateSlots
Definition: context.cpp:5621
bool isTrivial() const
Definition: dot.cpp:2988
TemplateVariant isObjCMethod() const
Definition: context.cpp:4055
TemplateVariant isAlias() const
Definition: context.cpp:4219
virtual TemplateListIntf::ConstIterator * createIterator() const =0
SharedPtr< MemberListInfoContext > detailedPrivateSlots
Definition: context.cpp:5635
static MemberInfoContext * alloc(const MemberInfo *mi)
Definition: context.h:1055
T * m_ptr
Definition: context.cpp:99
Private(ClassDef *cd, const QCString &name)
Definition: context.cpp:8352
virtual QCString trModulesMembers()=0
void addFile(FileDef *fd)
Definition: context.cpp:7128
TemplateVariant get(const char *n) const
Definition: context.cpp:1859
static ModuleContext * alloc(GroupDef *gd)
Definition: context.h:371
TemplateVariant all() const
Definition: context.cpp:8030
TemplateVariant externalReference() const
Definition: context.cpp:6265
Private * p
Definition: context.h:161
TemplateVariant fileName() const
Definition: context.cpp:7285
SharedPtr< NestingContext > m_exampleTree
Definition: context.cpp:7779
virtual QCString trCompoundMembersDescription(bool extractAll)=0
TemplateVariant protectedStaticMethods() const
Definition: context.cpp:2152
TemplateVariant hasSourceFile() const
Definition: context.cpp:3109
virtual int count() const
Definition: context.cpp:6845
SharedPtr< MemberListInfoContext > detailedVariables
Definition: context.cpp:3334
TemplateVariant isBound() const
Definition: context.cpp:4247
Definition: dot.h:42
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:3558
SharedPtr< TemplateList > dirs
Definition: context.cpp:5605
TemplateVariant unoIDLServices() const
Definition: context.cpp:2104
ArgumentList * getDefArgList() const
Definition: context.cpp:4523
TemplateVariant isAddable() const
Definition: context.cpp:4143
TemplateVariant preferredDepth() const
Definition: context.cpp:6013
virtual int count() const
Definition: context.cpp:9805
string toString(const TVector3 &xyz, int w=9)
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:1769
QListIterator< TemplateVariant > m_it
Definition: context.cpp:158
TemplateVariant isVariable() const
Definition: context.cpp:4287
void initClassHierarchy(ClassSDict *cl)
Definition: util.cpp:5211
virtual TemplateVariant at(int index) const
Definition: context.cpp:9810
TemplateVariant detailedSignals() const
Definition: context.cpp:5542
const DotNodeList * subGraphs() const
Definition: dot.h:155
TemplateVariant isPrivateGettable() const
Definition: context.cpp:4115
SharedPtr< ModuleContext > moduleContext
Definition: context.cpp:6353
SharedPtr< ArgumentListContext > arguments
Definition: context.cpp:5053
TemplateVariant title() const
Definition: context.cpp:8245
TemplateVariant subhighlight() const
Definition: context.cpp:7549
void err(const char *fmt,...)
Definition: message.cpp:226
bool visited
Definition: classdef.h:402
SharedPtr< SymbolListContext > symbolList
Definition: context.cpp:9639
void filterLatexString(FTextStream &t, const char *str, bool insideTabbing, bool insidePre, bool insideItem, bool keepSpaces)
Definition: util.cpp:6533
TemplateVariant subhighlight() const
Definition: context.cpp:6741
virtual QCString trNamespaceMembers()=0
const MemberList * m_memberList
Definition: context.cpp:8960
TemplateVariant isRelated() const
Definition: context.cpp:4372
TemplateVariant isFunction() const
Definition: context.cpp:4079
TemplateVariant variables() const
Definition: context.cpp:5467
TemplateVariant preferredDepth() const
Definition: context.cpp:7566
SharedPtr< MemberListInfoContext > publicMethods
Definition: context.cpp:2563
SharedPtr< TemplateList > enums
Definition: context.cpp:7941
virtual QCString trPackageAttribs()=0
TemplateVariant hasDetails() const
Definition: context.cpp:5254
SharedPtr< InheritanceListContext > inheritsList
Definition: context.cpp:2556
virtual int count() const
Definition: context.cpp:7387
TemplateVariant definition() const
Definition: context.cpp:4518
TemplateVariant definedAtLineInSourceFile() const
Definition: context.cpp:778
TemplateVariant detailedMethods() const
Definition: context.cpp:2248
static GlobalsIndexContext * alloc()
Definition: context.h:835
TemplateVariant publicAttributes() const
Definition: context.cpp:2132
TemplateVariant anonymousType() const
Definition: context.cpp:4332
virtual QCString trModulesListDescription(bool extractAll)=0
TemplateVariant handleInheritanceDiagramFor(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:445
TemplateVariant fileName() const
Definition: context.cpp:7913
SharedPtr< TemplateList > functions
Definition: context.cpp:8095
virtual QCString trMore()=0
TemplateVariant isMaybeAmbiguous() const
Definition: context.cpp:4267
QCString absFilePath() const
Definition: filedef.h:96
bool isTooBig() const
Definition: dot.cpp:2997
static PropertyMapper< NavPathElemContext::Private > s_inst
Definition: context.cpp:7680
static PropertyMapper< ClassContext::Private > s_inst
Definition: context.cpp:2621
TemplateVariant namespaceListDescription() const
Definition: context.cpp:904
TemplateVariant namespaceIndex() const
Definition: context.cpp:626
Private(Definition *def, const QCString &relPath, const MemberGroup *mg)
Definition: context.cpp:8706
TemplateVariant getFile() const
Definition: context.cpp:6168
TemplateVariant inheritedBy() const
Definition: context.cpp:2075
virtual QCString trExtendsClass()=0
DotDirDeps * getDirDepsGraph() const
Definition: context.cpp:3461
virtual QCString trEnumerations()=0
TemplateVariant diagrams() const
Definition: context.cpp:5972
TemplateVariant name() const
Definition: context.cpp:1699
TemplateVariant isWeak() const
Definition: context.cpp:4195
virtual QCString trPackageMembers()=0
static NamespaceTreeContext * alloc()
Definition: context.h:610
void enableTabbing(bool b)
Definition: context.cpp:10056
TemplateVariant friends() const
Definition: context.cpp:2220
Variant type which can hold one value of a fixed set of types.
Definition: template.h:90
TemplateVariant files() const
Definition: context.cpp:661
TemplateVariant get(const char *n) const
Definition: context.cpp:2964
TemplateVariant nameWithContextFor() const
Definition: context.cpp:5041
virtual int count() const
Definition: context.cpp:7065
TemplateVariant relPath() const
Definition: context.cpp:7289
TemplateVariant externalReference() const
Definition: context.cpp:7674
PageTreeContext(const PageSDict *pages)
Definition: context.cpp:7340
QCString mid(uint index, uint len=0xffffffff) const
Definition: qcstring.cpp:246
virtual TemplateVariant relPath() const
Definition: context.cpp:1436
void destroyContext(TemplateContext *ctx)
Definition: template.cpp:4966
TextGeneratorLatex(FTextStream &ts)
Definition: context.cpp:3770
SharedPtr< MemberListInfoContext > detailedConstructors
Definition: context.cpp:2596
TemplateVariant fileName() const
Definition: context.cpp:5948
TemplateVariant title() const
Definition: context.cpp:5793
void addClassHierarchy(const ClassSDict &clDict, bool rootOnly)
Definition: context.cpp:6678
virtual QCString trAll()=0
Private(const Definition *d, const Definition *prev, const Definition *next)
Definition: context.cpp:9426
TemplateVariant get(const char *n) const
Definition: context.cpp:8156
TemplateVariant isReference() const
Definition: context.cpp:7665
static SearchIndexContext * alloc(const SearchIndexInfo *info)
Definition: context.h:1311
TemplateVariant title() const
Definition: context.cpp:2684
TemplateVariant subHighlight() const
Definition: context.cpp:2692
TemplateVariant relPath() const
Definition: context.cpp:9519
TemplateVariant packageTypes() const
Definition: context.cpp:2192
TemplateVariant isEnumeration() const
Definition: context.cpp:4291
SharedPtr< MemberListInfoContext > privateStaticMethods
Definition: context.cpp:2576
TemplateVariant handleWriteList(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:505
Template * loadByName(const QCString &fileName, int fromLine)
Definition: template.cpp:4971
NamespaceSDict * getNamespaceSDict() const
Definition: namespacedef.h:101
static MemberGroupInfoContext * alloc(Definition *def, const QCString &relPath, const MemberGroup *mg)
Definition: context.h:982
Private(const QList< IncludeInfo > &list, SrcLangExt lang)
Definition: context.cpp:1734
TemplateVariant typedefs() const
Definition: context.cpp:2790
TemplateVariant events() const
Definition: context.cpp:2216
Private * p
Definition: context.h:681
SharedPtr< TemplateList > pages
Definition: context.cpp:5611
virtual QCString trPackages()=0
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:6808
TemplateVariant inheritsList() const
Definition: context.cpp:770
SharedPtr< TemplateList > navPath
Definition: context.cpp:1632
Engine to create templates and template contexts.
Definition: template.h:559
TemplateVariant protectedMethods() const
Definition: context.cpp:2148
TemplateVariant gotoSourceCode() const
Definition: context.cpp:866
SharedPtr< MemberListInfoContext > detailedProtectedSlots
Definition: context.cpp:5634
DotGfxHierarchyTable * getHierarchy() const
Definition: context.cpp:5964
static PropertyMapper< IncludeInfoContext::Private > s_inst
Definition: context.cpp:1707
TemplateVariant get(const char *n) const
Definition: context.cpp:6889
Private(const MemberInfo *mi)
Definition: context.cpp:8545
MemberGroupSDict * getMemberGroupSDict() const
Definition: classdef.cpp:4524
QCString localName() const
TemplateVariant preferredDepth() const
Definition: context.cpp:7769
void addProperty(const char *name, typename PropertyFunc::Handler handle)
Definition: context.cpp:252
QCString & setNum(short n)
Definition: qcstring.cpp:469
static SearchIndicesContext * alloc()
Definition: context.h:1331
SharedPtr< InheritanceListContext > inheritedByList
Definition: context.cpp:2557
bool m_removeSpaces
Definition: context.cpp:10043
TemplateVariant paramDocs() const
Definition: context.cpp:4649
TemplateVariant highlight() const
Definition: context.cpp:3400
SharedPtr< TemplateList > inlineClasses
Definition: context.cpp:5639
TemplateVariant members() const
Definition: context.cpp:8728
TemplateVariant relPath() const
Definition: context.cpp:7179
TemplateVariant docs() const
Definition: context.cpp:8756
TemplateVariant generatedBy() const
Definition: context.cpp:580
TemplateVariant isAttribute() const
Definition: context.cpp:4235
virtual QCString trEvents()=0
void addClasses(const ClassSDict &clDict, bool rootOnly)
Definition: context.cpp:6633
virtual QCString trGeneratedAt(const char *date, const char *projName)=0
virtual int count() const
Definition: context.cpp:7436
TemplateVariant macros() const
Definition: context.cpp:949
TemplateVariant inheritanceDiagramFor() const
Definition: context.cpp:588
TemplateVariant getMembersFiltered(SharedPtr< TemplateList > &listRef, MemberFunc filter) const
Definition: context.cpp:8002
TemplateVariant subHighlight() const
Definition: context.cpp:3404
virtual QCString trCompoundList()=0
TemplateVariant enumBaseType() const
Definition: context.cpp:4376
TemplateVariant macros() const
Definition: context.cpp:8213
virtual QCString trRelatedPages()=0
const SearchIndexInfo * m_info
Definition: context.cpp:9859
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:8121
virtual Definition * getOuterScope() const
TemplateVariant callGraph() const
Definition: context.cpp:4893
auto array(Array const &a)
Returns a manipulator which will print the specified array.
Definition: DumpUtils.h:228
SharedPtr< ClassContext > classContext
Definition: context.cpp:6348
TemplateVariant details() const
Definition: context.cpp:1440
bool isHidden() const
virtual TemplateVariant at(int index) const
Definition: context.cpp:5715
TemplateVariant inheritedFrom() const
Definition: context.cpp:9048
virtual QCString trReferences()=0
virtual QCString trPrivateAttribs()=0
TemplateVariant templateDecls() const
Definition: context.cpp:2358
SharedPtr< TemplateList > exampleList
Definition: context.cpp:5082
SharedPtr< MemberListInfoContext > detailedEnums
Definition: context.cpp:2593
SharedPtr< MemberContext > categoryRelation
Definition: context.cpp:5058
void sort()
Definition: sortdict.h:188
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3824
SharedPtr< MemberListContext > sourceRefs
Definition: context.cpp:5066
virtual QCString trServices()=0
TemplateVariant handleCollaborationDiagramFor(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:457
void addMemberList(ClassDef *cd, MemberListType lt, const QCString &title, bool additionalList=TRUE)
Definition: context.cpp:9209
TemplateVariant highlight() const
Definition: context.cpp:3624
virtual QCString trReimplementedFromList(int numEntries)=0
#define NUM_SEARCH_INDICES
Definition: searchindex.h:130
static QInternalList< QTextCodec > * all
Definition: qtextcodec.cpp:63
TemplateVariant children() const
Definition: context.cpp:6119
TemplateVariant enumName() const
Definition: context.cpp:965
TemplateVariant highlight() const
Definition: context.cpp:6737
virtual QCString trNamespaceIndex()=0
MemberGroupInfoContext(Definition *def, const QCString &relPath, const MemberGroup *mg)
Definition: context.cpp:8796
bool readCodeFragment(const char *fileName, int &startLine, int &endLine, QCString &result)
Definition: definition.cpp:728
TemplateVariant hasOneLineInitializer() const
Definition: context.cpp:4380
virtual ~GenericConstIterator()
Definition: context.cpp:127
void addExamples(TemplateList *list) const
Definition: context.cpp:2339
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:1722
QCString templSpecifiers
Definition: classdef.h:538
TemplateVariant groupGraph() const
Definition: context.cpp:5212
TemplateVariant subhighlight() const
Definition: context.cpp:7925
TemplateVariant all() const
Definition: context.cpp:913
TemplateVariant extendsClass() const
Definition: context.cpp:993
virtual QCString trNamespaceMemberDescription(bool extractAll)=0
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:7241
TemplateVariant get(const char *n) const
Definition: context.cpp:5745
SharedPtr< TemplateList > templateDecls
Definition: context.cpp:2606
TemplateVariant maxJaxCodeFile() const
Definition: context.cpp:374
bool isEmpty() const
Definition: context.cpp:199
bool isVisibleInHierarchy()
Definition: classdef.cpp:2743
static IncludeInfoContext * alloc(const IncludeInfo *info, SrcLangExt lang)
Definition: context.h:213
int getStartBodyLine() const
TemplateVariant detailedVariables() const
Definition: context.cpp:5538
TemplateVariant isGettable() const
Definition: context.cpp:4111
Private(ClassDef *cd)
Definition: context.cpp:1781
TemplateVariant index() const
Definition: context.cpp:977
PageContext(PageDef *, bool isMainPage, bool isExample)
Definition: context.cpp:3681
ScopedPtr< TemplateVariant > brief
Definition: context.cpp:6354
static MemberNameSDict * memberNameSDict
Definition: doxygen.h:115
TemplateVariant relPath() const
Definition: context.cpp:7744
SharedPtr< MemberListInfoContext > variables
Definition: context.cpp:3328
TemplateVariant pages() const
Definition: context.cpp:669
TemplateVariant handleDirDependencyGraphFor(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:469
virtual QCString trSearch()=0
SharedPtr< DirContext > dirContext
Definition: context.cpp:6350
TemplateVariant hasMultiLineInitializer() const
Definition: context.cpp:4384
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:8624
TemplateVariant inbodyDocs() const
Definition: context.cpp:1469
TemplateVariant subhighlight() const
Definition: context.cpp:8082
SharedPtr< MemberListInfoContext > protectedStaticMethods
Definition: context.cpp:2570
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:7493
SharedPtr< TemplateList > functions
Definition: context.cpp:7938
TemplateVariant isExplicit() const
Definition: context.cpp:4103
ScopedPtr< TemplateVariant > docs
Definition: context.cpp:9325
TemplateVariant sourceRefs() const
Definition: context.cpp:4823
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:5833
TemplateVariant relPath() const
Definition: context.cpp:3457
Private * p
Definition: context.h:381
TemplateVariant related() const
Definition: context.cpp:2224
TemplateVariant privateMethods() const
Definition: context.cpp:2176
TemplateVariant hasSources() const
Definition: context.cpp:4841
static SymbolGroupContext * alloc(const SearchDefinitionList *sdl)
Definition: context.h:1227
virtual QCString trListOfAllMembers()=0
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:7962
DirContext(DirDef *)
Definition: context.cpp:3548
TemplateVariant classes() const
Definition: context.cpp:3133
TemplateVariant maxDepth() const
Definition: context.cpp:7195
TemplateVariant sourceDef() const
Definition: context.cpp:1533
TemplateVariant highlight() const
Definition: context.cpp:2688
virtual QCString trEnumerationValueDocumentation()=0
SharedPtr< MemberListInfoContext > detailedTypedefs
Definition: context.cpp:5627
static PropertyMapper< PageContext::Private > s_inst
Definition: context.cpp:3675
ContextOutputFormat outputFormat
Definition: context.cpp:71
SharedPtr< MemberGroupListContext > memberGroups
Definition: context.cpp:2602
TemplateVariant enums() const
Definition: context.cpp:7889
virtual QCString trConstantGroups()=0
TemplateVariant classMembers() const
Definition: context.cpp:634
static PropertyMapper< ModuleContext::Private > s_inst
Definition: context.cpp:5648
TemplateVariant dirGraph() const
Definition: context.cpp:3482
TemplateVariant isForeign() const
Definition: context.cpp:4091
virtual QCString trStaticPackageMembers()=0
TemplateVariant navigationPath() const
Definition: context.cpp:1559
virtual int count() const
Definition: context.cpp:6618
TemplateVariant getClass() const
Definition: context.cpp:8366
TemplateVariant hasGroupGraph() const
Definition: context.cpp:5200
virtual QCString trAdditionalInheritedMembers()=0
TemplateVariant memberList() const
Definition: context.cpp:794
SharedPtr< MemberListInfoContext > detailedVariables
Definition: context.cpp:2599
TemplateVariant isLinkable() const
Definition: context.cpp:7632
SharedPtr< ClassContext > category
Definition: context.cpp:5057
A model of a page symbol.
Definition: pagedef.h:29
TemplateVariant getPage() const
Definition: context.cpp:6183
SharedPtr< NestingContext > m_classTree
Definition: context.cpp:6781
static MemberGroupListContext * alloc()
Definition: context.h:1002
DotGfxHierarchyTable * m_hierarchy
Definition: context.cpp:8320
TemplateVariant isMaybeDefault() const
Definition: context.cpp:4263
standard template list implementation
Definition: context.cpp:164
SharedPtr< MemberListInfoContext > privateSlots
Definition: context.cpp:2579
TemplateVariant get(const char *n) const
Definition: context.cpp:7628
void addModules(const GroupSDict &groups)
Definition: context.cpp:6509
void addNamespaces(bool addClasses)
Definition: context.cpp:6300
TemplateVariant reimplements() const
Definition: context.cpp:4698
TemplateVariant namespaces() const
Definition: context.cpp:5378
DotCallGraph * getCallGraph() const
Definition: context.cpp:4873
TemplateVariant sourceRefBys() const
Definition: context.cpp:4832
void line(double t, double *p, double &x, double &y, double &z)
SharedPtr< TemplateList > diagrams
Definition: context.cpp:6032
TemplateVariant getClass() const
Definition: context.cpp:9023
TemplateVariant properties() const
Definition: context.cpp:8217
Protection protection
virtual QCString trReferencedBy()=0
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:7602
TemplateVariant inlineClasses() const
Definition: context.cpp:3282
void addFiles(const FileNameList &fnList)
Definition: context.cpp:6466
Cachable & getCache() const
Definition: context.cpp:2889
virtual QCString trPropertyDocumentation()=0
static QCString type
Definition: declinfo.cpp:672
T * get() const
Definition: context.cpp:111
TemplateVariant title() const
Definition: context.cpp:7301
virtual QCString trClassHierarchyDescription()=0
void addMembers(ClassDef *cd, MemberListType lt) const
Definition: context.cpp:2393
TemplateVariant directories() const
Definition: context.cpp:909
def func()
Definition: docstring.py:7
Private(const SearchIndexList *sl, const QCString &name)
Definition: context.cpp:9715
TemplateVariant get(const char *n) const
Definition: context.cpp:8908
TemplateVariant fileDocumentation() const
Definition: context.cpp:711
virtual TemplateVariant at(int index) const
Definition: context.cpp:7441
QCString doc
virtual QCString trTypedefDocumentation()=0
TemplateVariant typedefs() const
Definition: context.cpp:5447
TemplateVariant members() const
Definition: context.cpp:8912
virtual QCString trReimplementedInList(int numEntries)=0
TemplateVariant hasDetails() const
Definition: context.cpp:4295
QCString insertTemplateSpecifierInScope(const QCString &scope, const QCString &templ)
Definition: util.cpp:5527
static PropertyMapper< FileTreeContext::Private > s_inst
Definition: context.cpp:7225
virtual QCString trModules()=0
TemplateVariant isFriend() const
Definition: context.cpp:4087
TemplateVariant enumValues() const
Definition: context.cpp:7893
static IncludeInfoListContext * alloc(const QList< IncludeInfo > &list, SrcLangExt lang)
Definition: context.h:233
Private * p
Definition: context.h:973
virtual QCString trNamespaces()=0
TemplateVariant version() const
Definition: context.cpp:3129
static ClassMembersIndexContext * alloc()
Definition: context.h:854
TemplateVariant detailLevel() const
Definition: context.cpp:890
ContextOutputFormat briefOutputFormat
Definition: context.cpp:1629
TemplateVariant highlight() const
Definition: context.cpp:7545
TemplateVariant defVal() const
Definition: context.cpp:9283
TemplateVariant categoryRelation() const
Definition: context.cpp:4470
static ClassTreeContext * alloc()
Definition: context.h:570
virtual QCString trEventDocumentation()=0
TemplateVariant publicStaticMethods() const
Definition: context.cpp:2126
Private * p
Definition: context.h:641
QCString trailingReturnType
Definition: arguments.h:105
Private * p
Definition: context.h:322
Private * p
Definition: context.h:266
virtual QCString trProtectedAttribs()=0
TemplateVariant privateTypes() const
Definition: context.cpp:2168
ArgumentContext(const Argument *arg, Definition *def, const QCString &relPath)
Definition: context.cpp:9334
bool hasVisibleRoot(BaseClassList *bcl)
Definition: util.cpp:5224
Private(const SearchIndexList *sil)
Definition: context.cpp:9670
TemplateVariant isStatic() const
Definition: context.cpp:4051
static bool * b
Definition: config.cpp:1043
TemplateVariant inlineClasses() const
Definition: context.cpp:2845
bool isPrivateSettable() const
Definition: memberdef.cpp:4245
SharedPtr< TemplateList > inlineClasses
Definition: context.cpp:2887
SharedPtr< MemberListInfoContext > detailedFunctions
Definition: context.cpp:2885
TemplateVariant protectedStaticAttributes() const
Definition: context.cpp:2160
TemplateVariant isImport() const
Definition: context.cpp:1680
Private * p
Definition: context.h:402
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:5109
SharedPtr< MemberListInfoContext > publicStaticMethods
Definition: context.cpp:2564
TemplateVariant detailedEnums() const
Definition: context.cpp:2232
NamespaceDef * getNamespaceDef() const
Definition: memberdef.cpp:4080
Private * p
Definition: context.h:1065
virtual QCString trStaticProtectedAttribs()=0
TemplateVariant relatedPagesDesc() const
Definition: context.cpp:758
TemplateVariant subHighlight() const
Definition: context.cpp:5187
static DirListContext * alloc()
Definition: context.h:629
TemplateVariant all() const
Definition: context.cpp:7873
Translator * theTranslator
Definition: language.cpp:157
static SymbolIndicesContext * alloc(const SearchIndexInfo *info)
Definition: context.h:1289
TemplateVariant fileList() const
Definition: context.cpp:715
static msg_handler handler
Definition: qglobal.cpp:234
TemplateVariant maxDepth() const
Definition: context.cpp:7305
TemplateVariant maxDepth() const
Definition: context.cpp:7760
virtual QCString trDir(bool first_capital, bool singular)=0
TemplateVariant modules() const
Definition: context.cpp:638
TemplateVariant inheritedByList() const
Definition: context.cpp:774
QCString writeGraph(FTextStream &out, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1, bool linkRelations=TRUE) const
Definition: dot.cpp:3977
bool isDocumentationFile() const
Definition: filedef.cpp:1728
SharedPtr< MemberListInfoContext > unoIDLServices
Definition: context.cpp:2585
static QCString listTypeAsString(MemberListType type)
Definition: memberlist.cpp:907
SharedPtr< ClassContext > m_classContext
Definition: context.cpp:8380
DefinitionContext(Definition *d)
Definition: context.cpp:1360
TemplateVariant at(int index) const
Definition: context.cpp:181
TemplateVariant gotoGraphicalHierarchy() const
Definition: context.cpp:737
static PropertyMapper< ModuleTreeContext::Private > s_inst
Definition: context.cpp:7586
virtual QCString trCompoundMembers()=0
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:9397
MemberListType
Definition: types.h:104
Private(const NestingNodeContext *parent, const NestingNodeContext *thisNode, Definition *d, int index, int level, bool addCls, bool inherit, bool hideSuper)
Definition: context.cpp:6064
TemplateVariant ambiguityScope() const
Definition: context.cpp:8586
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:8339
bool isReimplementedBy(ClassDef *cd) const
Definition: memberdef.cpp:888
virtual QCString trRelatedFunctionDocumentation()=0
void addDerivedClasses(const BaseClassList *bcl, bool hideSuper)
Definition: context.cpp:6538
virtual QCString trThisIsTheListOfAllMembers()=0
const Argument * m_argument
Definition: context.cpp:9320
TemplateVariant isAnonymous() const
Definition: context.cpp:4327
SharedPtr< NestingContext > m_pageTree
Definition: context.cpp:7324
TemplateVariant noMatches() const
Definition: context.cpp:961
virtual QCString trCompoundListDescription()=0
SharedPtr< MemberListInfoContext > protectedSlots
Definition: context.cpp:5620
TemplateVariant handleDetailsVisibleFor(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:4997
virtual TemplateVariant at(int index) const
Definition: context.cpp:9919
bool isFunction() const
Definition: memberdef.cpp:4160
bool isEmpty() const
Definition: docparser.h:1409
void convertProtectionLevel(MemberListType inListType, Protection inProt, int *outListType1, int *outListType2)
Definition: util.cpp:8378
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:3691
TemplateVariant callerGraph() const
Definition: context.cpp:846
TemplateVariant isNoExcept() const
Definition: context.cpp:4231
TemplateVariant related() const
Definition: context.cpp:8225
void getTemplateParameterLists(QList< ArgumentList > &lists) const
Definition: classdef.cpp:3838
SharedPtr< MemberContext > anonymousMember
Definition: context.cpp:5070
virtual TemplateVariant at(int index) const
Definition: context.cpp:9234
SharedPtr< MemberListInfoContext > publicTypes
Definition: context.cpp:2562
ContextOutputFormat inbodyDocsOutputFormat
Definition: context.cpp:1631
TemplateVariant reimplementedBy() const
Definition: context.cpp:830
QCString escape(const QCString &s)
Definition: context.cpp:9935
void addMember(MemberDef *md)
Definition: context.cpp:8468
TemplateVariant constantgroups() const
Definition: context.cpp:874
void createSubDirs(QDir &d)
Definition: util.cpp:5458
TemplateVariant examplesDescription() const
Definition: context.cpp:997
friend class Iterator
Definition: sortdict.h:289
TemplateVariant packageStaticAttributes() const
Definition: context.cpp:2208
TemplateVariant examples() const
Definition: context.cpp:5280
TemplateVariant includedByGraph() const
Definition: context.cpp:3068
virtual QCString trTypeConstraints()=0
TemplateStructIntf * toStruct() const
Definition: template.h:264
SharedPtr< MemberListInfoContext > privateAttributes
Definition: context.cpp:2577
virtual int count() const
Definition: context.cpp:7022
TemplateVariant get(const char *n) const
Definition: context.cpp:4007
SharedPtr< MemberListInfoContext > properties
Definition: context.cpp:5623
TemplateVariant typedefs() const
Definition: context.cpp:8201
virtual QCString trProperties()=0
TemplateVariant sources() const
Definition: context.cpp:3113
LetterToIndexMap< SearchIndexList > symbolList
Definition: searchindex.h:158
virtual QCString trImplementedInList(int numEntries)=0
TemplateVariant highlight() const
Definition: context.cpp:5785
TemplateVariant isFinal() const
Definition: context.cpp:4155
virtual QCString trSubprogramDocumentation()=0
FileList * getFiles() const
Definition: dirdef.h:59
TemplateVariant fetchList(const QCString &name, const QStrList *list)
Definition: context.cpp:295
Helper class to support reference counting.
Definition: context.h:106
SharedPtr(T *p=0)
Definition: context.cpp:107
Private * p
Definition: context.h:342
TemplateVariant detailedEnums() const
Definition: context.cpp:5523
UsedFilesContext(ClassDef *cd)
Definition: context.cpp:7093
Private(const SearchDefinitionList *sdl)
Definition: context.cpp:9555
TemplateVariant namespaces() const
Definition: context.cpp:646
TemplateVariant detailedEvents() const
Definition: context.cpp:5558
TemplateVariant privateSlots() const
Definition: context.cpp:2172
TemplateVariant compoundType() const
Definition: context.cpp:2316
QCString writeGraph(FTextStream &t, GraphOutputFormat gf, EmbeddedOutputFormat ef, const char *path, const char *fileName, const char *relPath, bool writeImageMap=TRUE, int graphId=-1) const
Definition: dot.cpp:3503
TemplateVariant title() const
Definition: context.cpp:8920
bool isRelated() const
Definition: memberdef.cpp:4195
TemplateVariant handleNameWithContextFor(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:5013
ClassSDict * getClassSDict() const
Definition: namespacedef.h:98
TemplateVariant id() const
Definition: context.cpp:9043
TemplateVariant protectedTypes() const
Definition: context.cpp:2144
Private(DirDef *dd)
Definition: context.cpp:3371
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:8989
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:7696
TemplateVariant signals() const
Definition: context.cpp:5471
TemplateVariant isTypedef() const
Definition: context.cpp:4075
virtual QCString trSearching()=0
struct ContextGlobals g_globals
char portable_pathSeparator()
Definition: portable.cpp:355
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:6855
static ClassIndexContext * alloc()
Definition: context.h:411
Cachable(Definition *def)
Definition: context.cpp:1589
SharedPtr< MemberListInfoContext > detailedEnums
Definition: context.cpp:5628
Private * p
Definition: context.h:527
const char * argsString() const
Definition: memberdef.cpp:4040
TemplateVariant title() const
Definition: context.cpp:6745
bool isLinkableInProject() const
SharedPtr< MemberListInfoContext > detailedFunctions
Definition: context.cpp:3333
void addDirs(const DirSDict &dirDict)
Definition: context.cpp:6443
virtual QCString trModulesList()=0
SharedPtr< MemberListInfoContext > protectedStaticAttributes
Definition: context.cpp:2572
virtual TemplateVariant at(int index) const
Definition: context.cpp:8528
SymbolGroupContext(const SearchDefinitionList *sdl)
Definition: context.cpp:9648
SharedPtr< MemberListInfoContext > functions
Definition: context.cpp:3327
TemplateVariant modules() const
Definition: context.cpp:5258
TemplateVariant enums() const
Definition: context.cpp:3227
virtual QCString trStaticPublicAttribs()=0
TemplateVariant memberGroups() const
Definition: context.cpp:5499
TemplateVariant more() const
Definition: context.cpp:762
TemplateVariant isSignal() const
Definition: context.cpp:4067
virtual QCString trCallGraph()=0
TemplateVariant examples() const
Definition: context.cpp:4784
Abstract read-only interface for a context value of type list.
Definition: template.h:329
TemplateVariant detailedEnums() const
Definition: context.cpp:3267
uint count() const
Definition: qinternallist.h:56
const FileList & usedFiles() const
Definition: classdef.cpp:4723
static MemberContext * alloc(MemberDef *md)
Definition: context.h:351
TemplateVariant callerGraph() const
Definition: context.cpp:4953
TemplateVariant isUnretained() const
Definition: context.cpp:4203
static PropertyMapper< MemberListInfoContext::Private > s_inst
Definition: context.cpp:8971
SharedPtr< MemberListInfoContext > events
Definition: context.cpp:5622
bool isTypedef() const
Definition: memberdef.cpp:4155
virtual QCString trWriteList(int numEntries)=0
Definition: dot.h:42
TemplateVariant getMemberList(SharedPtr< MemberListInfoContext > &list, MemberListType type, const char *title, bool detailed=FALSE) const
Definition: context.cpp:3199
void linkifyText(const TextGeneratorIntf &out, Definition *scope, FileDef *fileScope, Definition *self, const char *text, bool autoBreak, bool external, bool keepSpaces, int indentLevel)
Definition: util.cpp:1916
TemplateVariant get(const char *n) const
Definition: context.cpp:7277
DotInclDepGraph * getIncludeGraph() const
Definition: context.cpp:3001
TemplateVariant isLeafNode() const
Definition: context.cpp:6115
const SearchIndexInfo * getSearchIndices()
bool classVisibleInIndex(ClassDef *cd)
Definition: util.cpp:8334
virtual QCString trInclByDepGraph()=0
QCString utf8() const
Definition: qstring.cpp:14507
TemplateVariant relPath() const
Definition: context.cpp:7917
static PropertyMapper< NamespaceContext::Private > s_inst
Definition: context.cpp:2895
TemplateVariant protection() const
Definition: context.cpp:8565
DotGroupCollaboration * getGroupGraph() const
Definition: context.cpp:5191
Default implementation of a context value of type struct.
Definition: template.h:426
virtual TemplateVariant at(int index) const
Definition: context.cpp:8689
TemplateVariant classHierarchy() const
Definition: context.cpp:630
virtual QCString trPublicAttribs()=0
SharedPtr< MemberListInfoContext > detailedTypedefs
Definition: context.cpp:3331
TemplateVariant get(const char *n) const
Definition: context.cpp:8298
virtual TemplateVariant at(int index) const
Definition: context.cpp:9587
Cachable & getCache() const
Definition: context.cpp:1640
bool isRaisable() const
Definition: memberdef.cpp:4265
TemplateVariant highlight() const
Definition: context.cpp:7748
QCString escape(const QCString &s)
Definition: context.cpp:10052
static PropertyMapper< GlobalsIndexContext::Private > s_inst
Definition: context.cpp:7946
Cachable & getCache() const
Definition: context.cpp:5642
const SearchDefinitionList * m_sdl
Definition: context.cpp:9636
TemplateVariant dirDependencyGraphFor() const
Definition: context.cpp:596
SharedPtr< MemberListInfoContext > detailedProperties
Definition: context.cpp:2600
virtual QCString trConstructorDocumentation()=0
static ClassSDict * classSDict
Definition: doxygen.h:99
int bool
Definition: qglobal.h:345
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:8277
virtual void parseCode(CodeOutputInterface &codeOutIntf, const char *scopeName, const QCString &input, SrcLangExt lang, bool isExampleBlock, const char *exampleName=0, FileDef *fileDef=0, int startLine=-1, int endLine=-1, bool inlineFragment=FALSE, MemberDef *memberDef=0, bool showLineNumbers=TRUE, Definition *searchCtx=0, bool collectXRefs=TRUE)=0
QCString externalLinkTarget()
Definition: util.cpp:7850
TemplateVariant enumValues() const
Definition: context.cpp:5455
static PropertyMapper< DirContext::Private > s_inst
Definition: context.cpp:3542
bool isLinkable() const
Definition: memberdef.cpp:1161
static ClassListContext * alloc()
Definition: context.h:390
virtual QCString trFileList()=0
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:8457
TemplateVariant namespaces() const
Definition: context.cpp:2726
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:8876
virtual ~Private()
Definition: context.cpp:3391
TemplateVariant title() const
Definition: context.cpp:5179
void writeBreak(int indent) const
Definition: context.cpp:3729
void writeString(const char *s, bool keepSpaces) const
Definition: context.cpp:3771
static NamespaceMembersIndexContext * alloc()
Definition: context.h:873
virtual QCString trNamespaceListDescription(bool extractAll)=0
static PageDef * mainPage
Definition: doxygen.h:103
TemplateVariant isProperty() const
Definition: context.cpp:4279
TemplateVariant docs() const
Definition: context.cpp:9291
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:9815
SharedPtr< TemplateList > eventAttrs
Definition: context.cpp:5085
void addClass(ClassDef *cd, const QCString &name)
Definition: context.cpp:8409
TemplateVariant isRaisable() const
Definition: context.cpp:4151
TemplateVariant isReadonly() const
Definition: context.cpp:4243
SharedPtr< MemberListInfoContext > publicSlots
Definition: context.cpp:2567
Definition: dot.h:43
T * m_ptr
Definition: context.cpp:78
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:7805
virtual QCString trVariableDocumentation()=0
SharedPtr< MemberListInfoContext > packageMethods
Definition: context.cpp:2581
static int computePreferredDepth(const TemplateListIntf *list, int maxDepth)
Definition: context.cpp:5880
MemberList * getMemberList(MemberListType lt)
Definition: classdef.cpp:4021
TemplateVariant constantgroups() const
Definition: context.cpp:3177
TemplateVariant groupTitle() const
Definition: context.cpp:8736
static FileTreeContext * alloc()
Definition: context.h:671
static QCString * s
Definition: config.cpp:1042
TemplateVariant relPath() const
Definition: context.cpp:5952
Interface used to remove redundant spaces inside a spaceless block.
Definition: template.h:469
TemplateVariant brief() const
Definition: context.cpp:1451
virtual TemplateVariant at(int index) const
Definition: context.cpp:9698
TemplateVariant fileName() const
Definition: context.cpp:5777
virtual QCString trIncludingInheritedMembers()=0
TemplateVariant isNew() const
Definition: context.cpp:4207
QCString localName() const
virtual QCString trRTFGeneralIndex()=0
void addMemberList(ClassDef *inheritedFrom, MemberList *ml, MemberList *combinedList)
Definition: context.cpp:9094
def parent(G, child, parent_type)
Definition: graph.py:67
const bool TRUE
Definition: qglobal.h:371
virtual int count() const
Definition: context.cpp:7483
Template List iterator support.
Definition: context.cpp:122
TemplateVariant getMembersFiltered(SharedPtr< TemplateList > &listRef, MemberFunc filter) const
Definition: context.cpp:8161
TemplateVariant protectedSlots() const
Definition: context.cpp:5479
ContextOutputFormat exampleOutputFormat
Definition: context.cpp:3665
Private(Definition *def, const QCString &relPath, const MemberList *ml, const QCString &title, const QCString &subtitle)
Definition: context.cpp:8889
SharedPtr< NestingContext > m_children
Definition: context.cpp:6343
TemplateVariant isEvent() const
Definition: context.cpp:4095
TemplateVariant search() const
Definition: context.cpp:600
TemplateVariant functions() const
Definition: context.cpp:5459
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:7397
SharedPtr< MemberListInfoContext > protectedMethods
Definition: context.cpp:2569
Private * p
Definition: context.h:561
TemplateVariant detailedDesc() const
Definition: context.cpp:766
SharedPtr< MemberListInfoContext > detailedFunctions
Definition: context.cpp:5630
TemplateVariant relPath() const
Definition: context.cpp:5781
SharedPtr< MemberListInfoContext > enums
Definition: context.cpp:5614
Portable versions of functions that are platform dependent.
TemplateVariant variables() const
Definition: context.cpp:2806
Private * p
Definition: context.h:180
QCString substitute(const QCString &s, const QCString &src, const QCString &dst)
substitute all occurrences of src in s by dst
Definition: util.cpp:5088
void addFiles(const FileNameList &)
Definition: context.cpp:6653
TemplateVariant title() const
Definition: context.cpp:5992
TemplateVariant bitfields() const
Definition: context.cpp:4047
SharedPtr< MemberListInfoContext > detailedFriends
Definition: context.cpp:5638
TemplateVariant isEnumValue() const
Definition: context.cpp:4283
MemberInfoContext(const MemberInfo *mi)
Definition: context.cpp:8614
DefType definitionType() const
Definition: groupdef.h:50
cet::coded_exception< error, detail::translate > exception
Definition: exception.h:33
virtual TemplateVariant get(const char *name) const
Definition: context.cpp:8807
TemplateVariant moduleIndex() const
Definition: context.cpp:642
TemplateVariant get(const char *n) const
Definition: context.cpp:3392
virtual int count() const
Definition: context.cpp:9914
static InheritedMemberInfoListContext * alloc()
Definition: context.h:1094
TemplateVariant trailingReturnType() const
Definition: context.cpp:4559
SharedPtr< TemplateList > sourceDef
Definition: context.cpp:1633
bool isProtectedSettable() const
Definition: memberdef.cpp:4250
ScopedPtr< DotCallGraph > callerGraph
Definition: context.cpp:5069
virtual QCString trReferenceManual()=0
bool isTooBig() const
Definition: dot.cpp:3641
TemplateVariant maxDepth() const
Definition: context.cpp:6762
QTextStream & endl(QTextStream &s)
SharedPtr< TemplateList > constantgroups
Definition: context.cpp:5609
TemplateVariant typedefs() const
Definition: context.cpp:8042
bool isEnumerate() const
Definition: memberdef.cpp:4145
TemplateVariant includeList() const
Definition: context.cpp:2984
TemplateVariant providedByCategory() const
Definition: context.cpp:989
TemplateVariant incInheritedMembers() const
Definition: context.cpp:802
SharedPtr< TemplateList > m_inheritedFrom
Definition: context.cpp:9065
virtual TemplateListIntf::ConstIterator * createIterator() const
Definition: context.cpp:7032
const NestingNodeContext * m_parent
Definition: context.cpp:6602
virtual QCString trDefineDocumentation()=0
TemplateVariant relPath() const
Definition: context.cpp:8074
void addClasses(const ClassSDict &classSDict)
Definition: context.cpp:5675
BaseClassList * baseClasses() const
Definition: classdef.cpp:4399
virtual QCString trFunctionDocumentation()=0
TemplateVariant get(const char *n) const
Definition: context.cpp:8561
GroupDef * getGroupDef() const
Definition: pagedef.cpp:52
static TemplateStruct * alloc()
Definition: template.cpp:294
TemplateVariant isWritable() const
Definition: context.cpp:4139
static PropertyMapper< MemberContext::Private > s_inst
Definition: context.cpp:5093
SearchIndexContext(const SearchIndexInfo *info)
Definition: context.cpp:9871
QCString externalRef(const QCString &relPath, const QCString &ref, bool href)
Definition: util.cpp:7856
virtual QCString trNamespaceList()=0
SharedPtr< TemplateList > exampleList
Definition: context.cpp:2610
static PropertyMapper< ClassHierarchyContext::Private > s_inst
Definition: context.cpp:6036
TemplateVariant externalReference() const
Definition: context.cpp:1581
static ClassContext * alloc(ClassDef *cd)
Definition: context.h:256
ScopedPtr< TemplateVariant > paramDocs
Definition: context.cpp:5062
virtual QCString trPrivateMembers()=0
void addPages(const PageSDict &pages, bool rootOnly)
Definition: context.cpp:6494
SharedPtr< TemplateList > typedefs
Definition: context.cpp:8097
TemplateVariant handleIncludeDependencyGraph(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:565
static TemplateFilterFactory::AutoRegister< FilterList > fList("list")
TemplateVariant implementedBy() const
Definition: context.cpp:4717
TemplateVariant inheritanceDiagram() const
Definition: context.cpp:1927
TemplateVariant files() const
Definition: context.cpp:3429
bool isProtectedGettable() const
Definition: memberdef.cpp:4235
TemplateVariant generatedFromFiles() const
Definition: context.cpp:1879
TemplateVariant isSealed() const
Definition: context.cpp:4211
TemplateVariant symbolGroups() const
Definition: context.cpp:9738
TemplateVariant compoundType() const
Definition: context.cpp:3453
bool operator==(ModuleKeyAndType const &a, ModuleKeyAndType const &b) noexcept
static PropertyMapper< SymbolGroupContext::Private > s_inst
Definition: context.cpp:9642
TemplateVariant isOptional() const
Definition: context.cpp:4171
type * toFirst()
Definition: qlist.h:135
virtual QCString trDefines()=0
TemplateVariant subHighlight() const
Definition: context.cpp:3635
DotClassGraph * getClassGraph() const
Definition: context.cpp:1892
TemplateVariant handleSourceRefs(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:541
TemplateVariant handleInheritedByList(const QValueList< TemplateVariant > &args) const
Definition: context.cpp:493
int count() const
Definition: context.cpp:177
void fillPath(Definition *def, TemplateList *list) const
Definition: context.cpp:1545
TemplateVariant isDelete() const
Definition: context.cpp:4227
TemplateVariant name() const
Definition: context.cpp:1423
TemplateVariant detailedMacros() const
Definition: context.cpp:3259
virtual void resetCodeParserState()=0
static PropertyMapper< ArgumentContext::Private > s_inst
Definition: context.cpp:9328
TemplateVariant panelSyncOff() const
Definition: context.cpp:985
TemplateVariant initializerAsCode() const
Definition: context.cpp:4303
TemplateVariant enums() const
Definition: context.cpp:8205
TemplateVariant modulesDescription() const
Definition: context.cpp:899
ScopedPtr< DotDirDeps > dirDepsGraph
Definition: context.cpp:3534