My Project
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
GenericsSDict Class Reference

#include <classlist.h>

Public Member Functions

 GenericsSDict ()
 
 ~GenericsSDict ()
 
void insert (const QCString &key, ClassDef *cd)
 
ClassDeffind (const QCString &key)
 

Private Attributes

SDict< GenericsCollectionm_dict
 

Detailed Description

Definition at line 76 of file classlist.h.

Constructor & Destructor Documentation

GenericsSDict::GenericsSDict ( )
inline

Definition at line 79 of file classlist.h.

References m_dict, and SDict< T >::setAutoDelete().

: m_dict(17) { m_dict.setAutoDelete(TRUE); }
GenericsSDict::~GenericsSDict ( )
inline

Definition at line 80 of file classlist.h.

{}

Member Function Documentation

ClassDef * GenericsSDict::find ( const QCString &  key)

Definition at line 183 of file classlist.cpp.

References SDict< T >::find(), m_dict, and stringToArgumentList().

Referenced by findClassRelation(), and findClassWithinClassContext().

{
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;
}
void GenericsSDict::insert ( const QCString &  key,
ClassDef cd 
)

Definition at line 163 of file classlist.cpp.

References SDict< T >::append(), SDict< T >::find(), m_dict, and stringToArgumentList().

Referenced by addClassToContext().

{
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);
}
}

Member Data Documentation

SDict<GenericsCollection> GenericsSDict::m_dict
private

Definition at line 84 of file classlist.h.

Referenced by find(), GenericsSDict(), and insert().


The documentation for this class was generated from the following files: