diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2012-08-11 13:06:22 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2012-08-11 13:06:22 (GMT) |
commit | 34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634 (patch) | |
tree | ad481e345a35820f0142bb774556afc6de0d00fa /src/classlist.cpp | |
parent | 3583a7c0bea47665a06d14a64b62376eee21c528 (diff) | |
download | Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.zip Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.tar.gz Doxygen-34cc61be7d0f6dafcaaa5fcdaa98ce4d31014634.tar.bz2 |
Release-1.8.2
Diffstat (limited to 'src/classlist.cpp')
-rw-r--r-- | src/classlist.cpp | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/src/classlist.cpp b/src/classlist.cpp index 188664b..11f36b6 100644 --- a/src/classlist.cpp +++ b/src/classlist.cpp @@ -22,6 +22,8 @@ #include "language.h" #include "doxygen.h" #include "vhdldocgen.h" +#include "defargs.h" +#include "arguments.h" ClassList::ClassList() : QList<ClassDef>() { @@ -164,3 +166,54 @@ void ClassSDict::writeDocumentation(OutputList &ol,Definition * container) } } +//------------------------------------------- + +void GenericsSDict::insert(const QCString &key,ClassDef *cd) +{ + int i=key.find('<'); + if (i==-1) return; + ArgumentList argList; + stringToArgumentList(key.mid(i),&argList); + int c = argList.count(); + if (c==0) return; + GenericsCollection *collection = m_dict.find(key.left(i)); + if (collection==0) // new name + { + collection = new GenericsCollection; + m_dict.append(key.left(i),collection); + } + if (collection->find(c)==0) // should always be 0! + { + collection->insert(c,cd); + } +} + +ClassDef *GenericsSDict::find(const QCString &key) +{ + int i=key.find('<'); + if (i==-1) + { + GenericsCollection *collection = m_dict.find(key); + if (collection && collection->count()==1) + { + QIntDictIterator<ClassDef> it(*collection); + return it.current(); + } + } + else + { + GenericsCollection *collection = m_dict.find(key.left(i)); + if (collection) + { + ArgumentList argList; + stringToArgumentList(key.mid(i),&argList); + int c = argList.count(); + return collection->find(c); + } + } + return 0; +} + + + + |