diff options
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; +} + + + + |