diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 1999-12-15 19:29:47 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 1999-12-15 19:29:47 (GMT) |
commit | 6aa7383e23c850af36c25b87e5737a2e2f635083 (patch) | |
tree | 223d088e44a6b0956dd0437ed4851244b2e7f36c /src/memberdef.cpp | |
parent | e04496cb647291b94c0b27b8babb127a79803579 (diff) | |
download | Doxygen-6aa7383e23c850af36c25b87e5737a2e2f635083.zip Doxygen-6aa7383e23c850af36c25b87e5737a2e2f635083.tar.gz Doxygen-6aa7383e23c850af36c25b87e5737a2e2f635083.tar.bz2 |
mods for doxygen-0.49-990728
Diffstat (limited to 'src/memberdef.cpp')
-rw-r--r-- | src/memberdef.cpp | 51 |
1 files changed, 49 insertions, 2 deletions
diff --git a/src/memberdef.cpp b/src/memberdef.cpp index bd440c3..1321692 100644 --- a/src/memberdef.cpp +++ b/src/memberdef.cpp @@ -58,6 +58,7 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e, enumFields=0; enumScope=0; enumDeclList=0; + scopeTAL=0; type=substituteClassNames(t); args=substituteClassNames(a); if (type.isNull()) decl=name()+args; else decl=type+" "+name()+args; @@ -107,7 +108,6 @@ MemberDef::MemberDef(const char *t,const char *na,const char *a,const char *e, { argList=0; } - } MemberDef::~MemberDef() @@ -180,7 +180,7 @@ void MemberDef::writeExample(OutputList &ol) } #endif -QString MemberDef::getOutputFileBase() const +QCString MemberDef::getOutputFileBase() const { if (classDef) { @@ -202,3 +202,50 @@ QString MemberDef::getOutputFileBase() const " container!\n",name().data()); return "dummy"; } + +void MemberDef::setScopeTemplateArguments(ArgumentList *tal) +{ + // copy function arguments (if any) + if (tal) + { + scopeTAL = new ArgumentList; + scopeTAL->setAutoDelete(TRUE); + ArgumentListIterator tali(*tal); + Argument *a; + for (;(a=tali.current());++tali) + { + scopeTAL->append(new Argument(*a)); + } + scopeTAL->constSpecifier = tal->constSpecifier; + scopeTAL->volatileSpecifier = tal->volatileSpecifier; + scopeTAL->pureSpecifier = tal->pureSpecifier; + } +} + +QCString MemberDef::getScopeTemplateNameString() +{ + QCString result; + if (!scopeTAL || scopeTAL->count()==0) return result; + result="<"; + Argument *a=scopeTAL->first(); + while (a) + { + if (a->name.length()>0) // add template argument name + { + result+=a->name; + } + else // extract name from type + { + int i=a->type.length()-1; + while (i>=0 && isId(a->type.at(i))) i--; + if (i>0) + { + result+=a->type.right(a->type.length()-i-1); + } + } + a=scopeTAL->next(); + if (a) result+=", "; + } + result+=">"; + return result; +} |