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

#include <classlist.h>

Inheritance diagram for ClassSDict:
SDict< ClassDef >

Public Member Functions

 ClassSDict (int size=17)
 
 ~ClassSDict ()
 
void writeDeclaration (OutputList &ol, const ClassDef::CompoundType *filter=0, const char *header=0, bool localNames=FALSE)
 
void writeDocumentation (OutputList &ol, Definition *container=0)
 
bool declVisible (const ClassDef::CompoundType *filter=0) const
 
- Public Member Functions inherited from SDict< ClassDef >
 SDict (int size=17, bool caseSensitive=TRUE)
 
virtual ~SDict ()
 
void append (const char *key, const ClassDef *d)
 
void prepend (const char *key, const ClassDef *d)
 
bool remove (const char *key)
 
ClassDeftake (const char *key)
 
void sort ()
 
void inSort (const char *key, const ClassDef *d)
 
void insertAt (int i, const char *key, const ClassDef *d)
 
void setAutoDelete (bool val)
 
ClassDeffind (const char *key)
 
ClassDeffind (const QCString &key)
 
ClassDeffind (const QString &key)
 
int findAt (const QCString &key)
 
ClassDefoperator[] (const char *key) const
 
ClassDefat (uint i)
 
void clear ()
 
int count () const
 

Private Member Functions

int compareValues (const ClassDef *item1, const ClassDef *item2) const
 

Detailed Description

A sorted dictionary of ClassDef objects.

Definition at line 56 of file classlist.h.

Constructor & Destructor Documentation

ClassSDict::ClassSDict ( int  size = 17)
inline

Definition at line 59 of file classlist.h.

: SDict<ClassDef>(size) {}
ClassSDict::~ClassSDict ( )
inline

Definition at line 60 of file classlist.h.

{}

Member Function Documentation

int ClassSDict::compareValues ( const ClassDef item1,
const ClassDef item2 
) const
privatevirtual

Function that is used to compare two items when sorting. Overload this to properly sort items.

See Also
inSort()

Reimplemented from SDict< ClassDef >.

Definition at line 55 of file classlist.cpp.

References compItems().

{
return compItems(item1,item2);
}
bool ClassSDict::declVisible ( const ClassDef::CompoundType filter = 0) const

Definition at line 65 of file classlist.cpp.

References ClassDef::compoundType(), Config_getBool, SDict< ClassDef >::count(), ClassDef::isLinkable(), ClassDef::isLocal(), SDict< ClassDef >::Iterator, and Definition::name().

Referenced by NamespaceDef::writeSummaryLinks(), GroupDef::writeSummaryLinks(), FileDef::writeSummaryLinks(), and ClassDef::writeSummaryLinks().

{
static bool hideUndocClasses = Config_getBool(HIDE_UNDOC_CLASSES);
static bool extractLocalClasses = Config_getBool(EXTRACT_LOCAL_CLASSES);
if (count()>0)
{
ClassDef *cd=0;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
if (cd->name().find('@')==-1 &&
(filter==0 || *filter==cd->compoundType())
)
{
bool isLink = cd->isLinkable();
if (isLink ||
(!hideUndocClasses &&
(!cd->isLocal() || extractLocalClasses)
)
)
{
return TRUE;
}
}
}
}
return FALSE;
}
void ClassSDict::writeDeclaration ( OutputList ol,
const ClassDef::CompoundType filter = 0,
const char *  header = 0,
bool  localNames = FALSE 
)

Definition at line 94 of file classlist.cpp.

References ClassDef::compoundType(), Config_getBool, SDict< ClassDef >::count(), OutputList::endMemberList(), ClassDef::isExtension(), SDict< ClassDef >::Iterator, Definition::name(), Private, ClassDef::protection(), and ClassDef::writeDeclarationLink().

Referenced by NamespaceDef::writeClassDeclarations(), FileDef::writeClassDeclarations(), GroupDef::writeClasses(), and ClassDef::writeNestedClasses().

{
static bool extractPrivate = Config_getBool(EXTRACT_PRIVATE);
if (count()>0)
{
ClassDef *cd=0;
bool found=FALSE;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
//printf(" ClassSDict::writeDeclaration for %s\n",cd->name().data());
if (cd->name().find('@')==-1 &&
!cd->isExtension() &&
(cd->protection()!=Private || extractPrivate) &&
(filter==0 || *filter==cd->compoundType())
)
{
cd->writeDeclarationLink(ol,found,header,localNames);
}
}
if (found) ol.endMemberList();
}
}
void ClassSDict::writeDocumentation ( OutputList ol,
Definition container = 0 
)

Definition at line 119 of file classlist.cpp.

References Config_getBool, SDict< ClassDef >::count(), OutputList::endGroupHeader(), ClassDef::isEmbeddedInOuterScope(), ClassDef::isLinkableInProject(), SDict< ClassDef >::Iterator, Definition::name(), OutputList::parseText(), Definition::partOfGroups(), OutputList::startGroupHeader(), theTranslator, Translator::trClassDocumentation(), Translator::trTypeDocumentation(), ClassDef::writeInlineDocumentation(), and OutputList::writeRuler().

Referenced by NamespaceDef::writeInlineClasses(), GroupDef::writeInlineClasses(), FileDef::writeInlineClasses(), and ClassDef::writeInlineClasses().

{
static bool fortranOpt = Config_getBool(OPTIMIZE_FOR_FORTRAN);
static bool inlineGroupedClasses = Config_getBool(INLINE_GROUPED_CLASSES);
static bool inlineSimpleClasses = Config_getBool(INLINE_SIMPLE_STRUCTS);
if (!inlineGroupedClasses && !inlineSimpleClasses) return;
if (count()>0)
{
bool found=FALSE;
ClassDef *cd=0;
for (sdi.toFirst();(cd=sdi.current());++sdi)
{
//printf("%s:writeDocumentation() %p linkable=%d embedded=%d container=%p partOfGroups=%d\n",
// cd->name().data(),cd->getOuterScope(),cd->isLinkableInProject(),cd->isEmbeddedInOuterScope(),
// container,cd->partOfGroups() ? cd->partOfGroups()->count() : 0);
if (cd->name().find('@')==-1 &&
(container==0 || cd->partOfGroups()==0) // if container==0 -> show as part of the group docs, otherwise only show if not part of a group
)
{
//printf(" showing class %s\n",cd->name().data());
if (!found)
{
ol.writeRuler();
found=TRUE;
}
}
}
}
}

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