Classes | Functions
classdef.cpp File Reference
#include <stdio.h>
#include <qfile.h>
#include <qregexp.h>
#include "classdef.h"
#include "classlist.h"
#include "entry.h"
#include "doxygen.h"
#include "membername.h"
#include "message.h"
#include "config.h"
#include "util.h"
#include "diagram.h"
#include "language.h"
#include "htmlhelp.h"
#include "example.h"
#include "outputlist.h"
#include "dot.h"
#include "defargs.h"
#include "debug.h"
#include "docparser.h"
#include "searchindex.h"
#include "vhdldocgen.h"
#include "layout.h"
#include "arguments.h"
#include "memberlist.h"
#include "groupdef.h"
#include "filedef.h"
#include "namespacedef.h"
#include "membergroup.h"

Go to the source code of this file.

Classes

class  ClassDefImpl
 

Functions

static void writeInheritanceSpecifier (OutputList &ol, BaseClassDef *bcd)
 
static void searchTemplateSpecs (Definition *d, QList< ArgumentList > &result, QCString &name, SrcLangExt lang)
 
static void writeTemplateSpec (OutputList &ol, Definition *d, const QCString &type, SrcLangExt lang)
 
static bool isStandardFunc (MemberDef *md)
 

Function Documentation

static bool isStandardFunc ( MemberDef md)
static

Definition at line 2832 of file classdef.cpp.

2833 {
2834  return md->name()=="operator=" || // assignment operator
2835  md->isConstructor() || // constructor
2836  md->isDestructor(); // destructor
2837 }
const QCString & name() const
Definition: definition.h:114
bool isConstructor() const
Definition: memberdef.cpp:3702
bool isDestructor() const
Definition: memberdef.cpp:3743
static void searchTemplateSpecs ( Definition d,
QList< ArgumentList > &  result,
QCString name,
SrcLangExt  lang 
)
static

Definition at line 859 of file classdef.cpp.

863 {
865  {
866  if (d->getOuterScope())
867  {
869  }
870  ClassDef *cd=(ClassDef *)d;
871  if (!name.isEmpty()) name+="::";
872  QCString clName = d->localName();
873  if (/*clName.right(2)=="-g" ||*/ clName.right(2)=="-p")
874  {
875  clName = clName.left(clName.length()-2);
876  }
877  name+=clName;
878  bool isSpecialization = d->localName().find('<')!=-1;
879  if (cd->templateArguments())
880  {
881  result.append(cd->templateArguments());
882  if (!isSpecialization)
883  {
884  name+=tempArgListToString(cd->templateArguments(),lang);
885  }
886  }
887  }
888  else
889  {
890  name+=d->qualifiedName();
891  }
892 }
static QCString name
Definition: declinfo.cpp:673
static QCString result
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
void append(const type *d)
Definition: qlist.h:73
QCString left(uint len) const
Definition: qcstring.cpp:213
int find(char c, int index=0, bool cs=TRUE) const
Definition: qcstring.cpp:41
virtual DefType definitionType() const =0
QCString right(uint len) const
Definition: qcstring.cpp:231
virtual QCString qualifiedName() const
virtual Definition * getOuterScope() const
QCString tempArgListToString(ArgumentList *al, SrcLangExt lang)
Definition: util.cpp:2197
static void searchTemplateSpecs(Definition *d, QList< ArgumentList > &result, QCString &name, SrcLangExt lang)
Definition: classdef.cpp:859
static bool isSpecialization(const QList< ArgumentList > &srcTempArgLists, const QList< ArgumentList > &dstTempArgLists)
Definition: doxygen.cpp:5605
QCString localName() const
static void writeInheritanceSpecifier ( OutputList ol,
BaseClassDef bcd 
)
static

Definition at line 798 of file classdef.cpp.

799 {
800  if (bcd->prot!=Public || bcd->virt!=Normal)
801  {
802  ol.startTypewriter();
803  ol.docify(" [");
804  QStrList sl;
805  if (bcd->prot==Protected) sl.append("protected");
806  else if (bcd->prot==Private) sl.append("private");
807  if (bcd->virt==Virtual) sl.append("virtual");
808  const char *s=sl.first();
809  while (s)
810  {
811  ol.docify(s);
812  s=sl.next();
813  if (s) ol.docify(", ");
814  }
815  ol.docify("]");
816  ol.endTypewriter();
817  }
818 }
Definition: types.h:29
Definition: types.h:26
type * first()
Definition: qinternallist.h:87
Definition: types.h:26
Protection prot
Definition: classdef.h:530
Definition: types.h:29
void append(const type *d)
Definition: qinternallist.h:61
type * next()
Definition: qinternallist.h:89
Specifier virt
Definition: classdef.h:535
void startTypewriter()
Definition: outputlist.h:172
void docify(const char *s)
Definition: outputlist.h:145
static QCString * s
Definition: config.cpp:1042
void endTypewriter()
Definition: outputlist.h:174
static void writeTemplateSpec ( OutputList ol,
Definition d,
const QCString type,
SrcLangExt  lang 
)
static

Definition at line 894 of file classdef.cpp.

896 {
897  QList<ArgumentList> specs;
898  QCString name;
899  searchTemplateSpecs(d,specs,name,lang);
900  if (specs.count()>0) // class has template scope specifiers
901  {
902  ol.startSubsubsection();
903  QListIterator<ArgumentList> spi(specs);
904  ArgumentList *al;
905  for (spi.toFirst();(al=spi.current());++spi)
906  {
907  ol.docify("template<");
908  QListIterator<Argument> ali(*al);
909  Argument *a;
910  while ((a=ali.current()))
911  {
912  ol.docify(a->type);
913  if (!a->name.isEmpty())
914  {
915  ol.docify(" ");
916  ol.docify(a->name);
917  }
918  if (a->defval.length()!=0)
919  {
920  ol.docify(" = ");
921  ol.docify(a->defval);
922  }
923  ++ali;
924  a=ali.current();
925  if (a) ol.docify(", ");
926  }
927  ol.docify(">");
928  ol.lineBreak();
929  }
930  ol.docify(type.lower()+" "+name);
931  ol.endSubsubsection();
932  ol.writeString("\n");
933  }
934 }
static QCString name
Definition: declinfo.cpp:673
QCString type
Definition: arguments.h:67
This class represents an function or template argument list.
Definition: arguments.h:82
bool isEmpty() const
Definition: qcstring.h:189
uint length() const
Definition: qcstring.h:195
void writeString(const char *text)
Definition: outputlist.h:119
QCString defval
Definition: arguments.h:71
void lineBreak(const char *style=0)
Definition: outputlist.h:302
void startSubsubsection()
Definition: outputlist.h:290
This class contains the information about the argument of a function or template. ...
Definition: arguments.h:28
uint count() const
Definition: qlist.h:66
const double a
QCString name
Definition: arguments.h:69
static void searchTemplateSpecs(Definition *d, QList< ArgumentList > &result, QCString &name, SrcLangExt lang)
Definition: classdef.cpp:859
void endSubsubsection()
Definition: outputlist.h:292
QCString lower() const
Definition: qcstring.cpp:263
void docify(const char *s)
Definition: outputlist.h:145