|
Packit |
1c1d7e |
/******************************************************************************
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Copyright (C) 1997-2015 by Dimitri van Heesch.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Permission to use, copy, modify, and distribute this software and its
|
|
Packit |
1c1d7e |
* documentation under the terms of the GNU General Public License is hereby
|
|
Packit |
1c1d7e |
* granted. No representations are made about the suitability of this software
|
|
Packit |
1c1d7e |
* for any purpose. It is provided "as is" without express or implied warranty.
|
|
Packit |
1c1d7e |
* See the GNU General Public License for more details.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Documents produced by Doxygen are derivative works derived from the
|
|
Packit |
1c1d7e |
* input used in their production; they are not affected by this license.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#ifndef CLASSDEF_H
|
|
Packit |
1c1d7e |
#define CLASSDEF_H
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include <qlist.h>
|
|
Packit |
1c1d7e |
#include <qdict.h>
|
|
Packit |
1c1d7e |
#include <qptrdict.h>
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include "definition.h"
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
struct Argument;
|
|
Packit |
1c1d7e |
class MemberDef;
|
|
Packit |
1c1d7e |
class MemberList;
|
|
Packit |
1c1d7e |
class MemberDict;
|
|
Packit |
1c1d7e |
class ClassList;
|
|
Packit |
1c1d7e |
class ClassSDict;
|
|
Packit |
1c1d7e |
class OutputList;
|
|
Packit |
1c1d7e |
class FileDef;
|
|
Packit |
1c1d7e |
class FileList;
|
|
Packit |
1c1d7e |
class BaseClassList;
|
|
Packit |
1c1d7e |
class NamespaceDef;
|
|
Packit |
1c1d7e |
class MemberDef;
|
|
Packit |
1c1d7e |
class ExampleSDict;
|
|
Packit |
1c1d7e |
class MemberNameInfoSDict;
|
|
Packit |
1c1d7e |
class UsesClassDict;
|
|
Packit |
1c1d7e |
class ConstraintClassDict;
|
|
Packit |
1c1d7e |
class MemberGroupSDict;
|
|
Packit |
1c1d7e |
class QTextStream;
|
|
Packit |
1c1d7e |
class PackageDef;
|
|
Packit |
1c1d7e |
class GroupDef;
|
|
Packit |
1c1d7e |
class StringDict;
|
|
Packit |
1c1d7e |
struct IncludeInfo;
|
|
Packit |
1c1d7e |
class ClassDefImpl;
|
|
Packit |
1c1d7e |
class ArgumentList;
|
|
Packit |
1c1d7e |
class FTextStream;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** A class representing of a compound symbol.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* A compound can be a class, struct, union, interface, service, singleton,
|
|
Packit |
1c1d7e |
* or exception.
|
|
Packit |
1c1d7e |
* \note This class should be renamed to CompoundDef
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class ClassDef : public Definition
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
/** The various compound types */
|
|
Packit |
1c1d7e |
enum CompoundType { Class, //=Entry::CLASS_SEC,
|
|
Packit |
1c1d7e |
Struct, //=Entry::STRUCT_SEC,
|
|
Packit |
1c1d7e |
Union, //=Entry::UNION_SEC,
|
|
Packit |
1c1d7e |
Interface, //=Entry::INTERFACE_SEC,
|
|
Packit |
1c1d7e |
Protocol, //=Entry::PROTOCOL_SEC,
|
|
Packit |
1c1d7e |
Category, //=Entry::CATEGORY_SEC,
|
|
Packit |
1c1d7e |
Exception, //=Entry::EXCEPTION_SEC
|
|
Packit |
1c1d7e |
Service, //=Entry::CLASS_SEC
|
|
Packit |
1c1d7e |
Singleton, //=Entry::CLASS_SEC
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Creates a new compound definition.
|
|
Packit |
1c1d7e |
* \param fileName full path and file name in which this compound was
|
|
Packit |
1c1d7e |
* found.
|
|
Packit |
1c1d7e |
* \param startLine line number where the definition of this compound
|
|
Packit |
1c1d7e |
* starts.
|
|
Packit |
1c1d7e |
* \param startColumn column number where the definition of this compound
|
|
Packit |
1c1d7e |
* starts.
|
|
Packit |
1c1d7e |
* \param name the name of this compound (including scope)
|
|
Packit |
1c1d7e |
* \param ct the kind of Compound
|
|
Packit |
1c1d7e |
* \param ref the tag file from which this compound is extracted
|
|
Packit |
1c1d7e |
* or 0 if the compound doesn't come from a tag file
|
|
Packit |
1c1d7e |
* \param fName the file name as found in the tag file.
|
|
Packit |
1c1d7e |
* This overwrites the file that doxygen normally
|
|
Packit |
1c1d7e |
* generates based on the compound type & name.
|
|
Packit |
1c1d7e |
* \param isSymbol If TRUE this class name is added as a publicly
|
|
Packit |
1c1d7e |
* visible (and referencable) symbol.
|
|
Packit |
1c1d7e |
* \param isJavaEnum If TRUE this class is actually a Java enum.
|
|
Packit |
1c1d7e |
* I didn't add this to CompoundType to avoid having
|
|
Packit |
1c1d7e |
* to adapt all translators.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
ClassDef(const char *fileName,int startLine,int startColumn,
|
|
Packit |
1c1d7e |
const char *name,CompoundType ct,
|
|
Packit |
1c1d7e |
const char *ref=0,const char *fName=0,
|
|
Packit |
1c1d7e |
bool isSymbol=TRUE,bool isJavaEnum=FALSE);
|
|
Packit |
1c1d7e |
/** Destroys a compound definition. */
|
|
Packit |
1c1d7e |
~ClassDef();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//-----------------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
// --- getters
|
|
Packit |
1c1d7e |
//-----------------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Used for RTTI, this is a class */
|
|
Packit |
1c1d7e |
DefType definitionType() const { return TypeClass; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the unique base name (without extension) of the class's file on disk */
|
|
Packit |
1c1d7e |
QCString getOutputFileBase() const;
|
|
Packit |
1c1d7e |
QCString getInstanceOutputFileBase() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the base name for the source code file */
|
|
Packit |
1c1d7e |
QCString getSourceFileBase() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** If this class originated from a tagfile, this will return the tag file reference */
|
|
Packit |
1c1d7e |
QCString getReference() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class is imported via a tag file */
|
|
Packit |
1c1d7e |
bool isReference() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES */
|
|
Packit |
1c1d7e |
bool isLocal() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** returns the classes nested into this class */
|
|
Packit |
1c1d7e |
ClassSDict *getClassSDict() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** returns TRUE if this class has documentation */
|
|
Packit |
1c1d7e |
bool hasDocumentation() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** returns TRUE if this class has a non-empty detailed description */
|
|
Packit |
1c1d7e |
bool hasDetailedDescription() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** returns the file name to use for the collaboration graph */
|
|
Packit |
1c1d7e |
QCString collaborationGraphFileName() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** returns the file name to use for the inheritance graph */
|
|
Packit |
1c1d7e |
QCString inheritanceGraphFileName() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the name as it is appears in the documentation */
|
|
Packit |
1c1d7e |
QCString displayName(bool includeScope=TRUE) const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the type of compound this is, i.e. class/struct/union/.. */
|
|
Packit |
1c1d7e |
CompoundType compoundType() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the type of compound as a string */
|
|
Packit |
1c1d7e |
QCString compoundTypeString() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the list of base classes from which this class directly
|
|
Packit |
1c1d7e |
* inherits.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
BaseClassList *baseClasses() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the list of sub classes that directly derive from this class
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
BaseClassList *subClasses() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns a dictionary of all members. This includes any inherited
|
|
Packit |
1c1d7e |
* members. Members are sorted alphabetically.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
MemberNameInfoSDict *memberNameInfoSDict() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Return the protection level (Public,Protected,Private) in which
|
|
Packit |
1c1d7e |
* this compound was found.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
Protection protection() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** returns TRUE iff a link is possible to this item within this project.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
bool isLinkableInProject() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** return TRUE iff a link to this class is possible (either within
|
|
Packit |
1c1d7e |
* this project, or as a cross-reference to another project).
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
bool isLinkable() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** the class is visible in a class diagram, or class hierarchy */
|
|
Packit |
1c1d7e |
bool isVisibleInHierarchy();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** show this class in the declaration section of its parent? */
|
|
Packit |
1c1d7e |
bool visibleInParentsDeclList() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the template arguments of this class
|
|
Packit |
1c1d7e |
* Will return 0 if not applicable.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
ArgumentList *templateArguments() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the namespace this compound is in, or 0 if it has a global
|
|
Packit |
1c1d7e |
* scope.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
NamespaceDef *getNamespaceDef() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the file in which this compound's definition can be found.
|
|
Packit |
1c1d7e |
* Should not return 0 (but it might be a good idea to check anyway).
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
FileDef *getFileDef() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the Java package this class is in or 0 if not applicable.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
MemberDef *getMemberByName(const QCString &) const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE iff \a bcd is a direct or indirect base class of this
|
|
Packit |
1c1d7e |
* class. This function will recusively traverse all branches of the
|
|
Packit |
1c1d7e |
* inheritance tree.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
bool isBaseClass(ClassDef *bcd,bool followInstances,int level=0);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE iff \a bcd is a direct or indirect sub class of this
|
|
Packit |
1c1d7e |
* class.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
bool isSubClass(ClassDef *bcd,int level=0);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** returns TRUE iff \a md is a member of this class or of the
|
|
Packit |
1c1d7e |
* the public/protected members of a base class
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
bool isAccessibleMember(MemberDef *md);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns a sorted dictionary with all template instances found for
|
|
Packit |
1c1d7e |
* this template class. Returns 0 if not a template or no instances.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
QDict<ClassDef> *getTemplateInstances() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the template master of which this class is an instance.
|
|
Packit |
1c1d7e |
* Returns 0 if not applicable.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
ClassDef *templateMaster() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class is a template */
|
|
Packit |
1c1d7e |
bool isTemplate() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
IncludeInfo *includeInfo() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
UsesClassDict *usedImplementationClasses() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
UsesClassDict *usedByImplementationClasses() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
UsesClassDict *usedInterfaceClasses() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
ConstraintClassDict *templateTypeConstraints() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool isTemplateArgument() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the definition of a nested compound if
|
|
Packit |
1c1d7e |
* available, or 0 otherwise.
|
|
Packit |
1c1d7e |
* @param name The name of the nested compound
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
virtual Definition *findInnerCompound(const char *name) const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the template parameter lists that form the template
|
|
Packit |
1c1d7e |
* declaration of this class.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Example: template<class T> class TC {};
|
|
Packit |
1c1d7e |
* will return a list with one ArgumentList containing one argument
|
|
Packit |
1c1d7e |
* with type="class" and name="T".
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
void getTemplateParameterLists(QList<ArgumentList> &lists) const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
QCString qualifiedNameWithTemplateParameters(
|
|
Packit |
1c1d7e |
QList<ArgumentList> *actualParams=0,int *actualParamIndex=0) const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if there is at least one pure virtual member in this
|
|
Packit |
1c1d7e |
* class.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
bool isAbstract() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class is implemented in Objective-C */
|
|
Packit |
1c1d7e |
bool isObjectiveC() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class is implemented in C# */
|
|
Packit |
1c1d7e |
bool isCSharp() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class is marked as final */
|
|
Packit |
1c1d7e |
bool isFinal() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class is marked as sealed */
|
|
Packit |
1c1d7e |
bool isSealed() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class is marked as published */
|
|
Packit |
1c1d7e |
bool isPublished() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class represents an Objective-C 2.0 extension (nameless category) */
|
|
Packit |
1c1d7e |
bool isExtension() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns TRUE if this class represents a forward declaration of a template class */
|
|
Packit |
1c1d7e |
bool isForwardDeclared() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the class of which this is a category (Objective-C only) */
|
|
Packit |
1c1d7e |
ClassDef *categoryOf() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the name of the class including outer classes, but not
|
|
Packit |
1c1d7e |
* including namespaces.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
QCString className() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the members in the list identified by \a lt */
|
|
Packit |
1c1d7e |
MemberList *getMemberList(MemberListType lt);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the list containing the list of members sorted per type */
|
|
Packit |
1c1d7e |
const QList<MemberList> &getMemberLists() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Returns the member groups defined for this class */
|
|
Packit |
1c1d7e |
MemberGroupSDict *getMemberGroupSDict() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
QDict<int> *getTemplateBaseClassNames() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
ClassDef *getVariableInstance(const char *templSpec);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool isUsedOnly() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
QCString anchor() const;
|
|
Packit |
1c1d7e |
bool isEmbeddedInOuterScope() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool isSimple() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
const ClassList *taggedInnerClasses() const;
|
|
Packit |
1c1d7e |
ClassDef *tagLessReference() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
MemberDef *isSmartPointer() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool isJavaEnum() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool isGeneric() const;
|
|
Packit |
1c1d7e |
bool isAnonymous() const;
|
|
Packit |
1c1d7e |
const ClassSDict *innerClasses() const;
|
|
Packit |
1c1d7e |
QCString title() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
QCString generatedFromFiles() const;
|
|
Packit |
1c1d7e |
const FileList &usedFiles() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
const ArgumentList *typeConstraints() const;
|
|
Packit |
1c1d7e |
const ExampleSDict *exampleList() const;
|
|
Packit |
1c1d7e |
bool hasExamples() const;
|
|
Packit |
1c1d7e |
QCString getMemberListFileName() const;
|
|
Packit |
1c1d7e |
bool subGrouping() const;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//-----------------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
// --- setters ----
|
|
Packit |
1c1d7e |
//-----------------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void insertBaseClass(ClassDef *,const char *name,Protection p,Specifier s,const char *t=0);
|
|
Packit |
1c1d7e |
void insertSubClass(ClassDef *,Protection p,Specifier s,const char *t=0);
|
|
Packit |
1c1d7e |
void setIncludeFile(FileDef *fd,const char *incName,bool local,bool force);
|
|
Packit |
1c1d7e |
void insertMember(MemberDef *);
|
|
Packit |
1c1d7e |
void insertUsedFile(FileDef *);
|
|
Packit |
1c1d7e |
bool addExample(const char *anchor,const char *name, const char *file);
|
|
Packit |
1c1d7e |
void mergeCategory(ClassDef *category);
|
|
Packit |
1c1d7e |
void setNamespace(NamespaceDef *nd);
|
|
Packit |
1c1d7e |
void setFileDef(FileDef *fd);
|
|
Packit |
1c1d7e |
void setSubGrouping(bool enabled);
|
|
Packit |
1c1d7e |
void setProtection(Protection p);
|
|
Packit |
1c1d7e |
void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
|
|
Packit |
1c1d7e |
void addInnerCompound(Definition *d);
|
|
Packit |
1c1d7e |
ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,int startColumn,
|
|
Packit |
1c1d7e |
const QCString &templSpec,bool &freshInstance);
|
|
Packit |
1c1d7e |
void addUsedClass(ClassDef *cd,const char *accessName,Protection prot);
|
|
Packit |
1c1d7e |
void addUsedByClass(ClassDef *cd,const char *accessName,Protection prot);
|
|
Packit |
1c1d7e |
void setIsStatic(bool b);
|
|
Packit |
1c1d7e |
void setCompoundType(CompoundType t);
|
|
Packit |
1c1d7e |
void setClassName(const char *name);
|
|
Packit |
1c1d7e |
void setClassSpecifier(uint64 spec);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void setTemplateArguments(ArgumentList *al);
|
|
Packit |
1c1d7e |
void setTemplateBaseClassNames(QDict<int> *templateNames);
|
|
Packit |
1c1d7e |
void setTemplateMaster(ClassDef *tm);
|
|
Packit |
1c1d7e |
void setTypeConstraints(ArgumentList *al);
|
|
Packit |
1c1d7e |
void addMembersToTemplateInstance(ClassDef *cd,const char *templSpec);
|
|
Packit |
1c1d7e |
void makeTemplateArgument(bool b=TRUE);
|
|
Packit |
1c1d7e |
void setCategoryOf(ClassDef *cd);
|
|
Packit |
1c1d7e |
void setUsedOnly(bool b);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void addTaggedInnerClass(ClassDef *cd);
|
|
Packit |
1c1d7e |
void setTagLessReference(ClassDef *cd);
|
|
Packit |
1c1d7e |
void setName(const char *name);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//-----------------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
// --- actions ----
|
|
Packit |
1c1d7e |
//-----------------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void findSectionsInDocumentation();
|
|
Packit |
1c1d7e |
void addMembersToMemberGroup();
|
|
Packit |
1c1d7e |
void addListReferences();
|
|
Packit |
1c1d7e |
void addTypeConstraints();
|
|
Packit |
1c1d7e |
void computeAnchors();
|
|
Packit |
1c1d7e |
void mergeMembers();
|
|
Packit |
1c1d7e |
void sortMemberLists();
|
|
Packit |
1c1d7e |
void distributeMemberGroupDocumentation();
|
|
Packit |
1c1d7e |
void writeDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeDocumentationForInnerClasses(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeMemberPages(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeMemberList(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeDeclaration(OutputList &ol,MemberDef *md,bool inGroup,
|
|
Packit |
1c1d7e |
ClassDef *inheritedFrom,const char *inheritId);
|
|
Packit |
1c1d7e |
void writeQuickMemberLinks(OutputList &ol,MemberDef *md) const;
|
|
Packit |
1c1d7e |
void writeSummaryLinks(OutputList &ol);
|
|
Packit |
1c1d7e |
void reclassifyMember(MemberDef *md,MemberType t);
|
|
Packit |
1c1d7e |
void writeInlineDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeDeclarationLink(OutputList &ol,bool &found,
|
|
Packit |
1c1d7e |
const char *header,bool localNames);
|
|
Packit |
1c1d7e |
void removeMemberFromLists(MemberDef *md);
|
|
Packit |
1c1d7e |
void addGroupedInheritedMembers(OutputList &ol,MemberListType lt,
|
|
Packit |
1c1d7e |
ClassDef *inheritedFrom,const QCString &inheritId);
|
|
Packit |
1c1d7e |
int countMembersIncludingGrouped(MemberListType lt,ClassDef *inheritedFrom,bool additional);
|
|
Packit |
1c1d7e |
int countInheritanceNodes();
|
|
Packit |
1c1d7e |
void writeTagFile(FTextStream &);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool visited;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
protected:
|
|
Packit |
1c1d7e |
void addUsedInterfaceClasses(MemberDef *md,const char *typeStr);
|
|
Packit |
1c1d7e |
bool hasNonReferenceSuperClass();
|
|
Packit |
1c1d7e |
void showUsedFiles(OutputList &ol);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
void writeDocumentationContents(OutputList &ol,const QCString &pageTitle);
|
|
Packit |
1c1d7e |
void internalInsertMember(MemberDef *md,Protection prot,bool addToAllList);
|
|
Packit |
1c1d7e |
void addMemberToList(MemberListType lt,MemberDef *md,bool isBrief);
|
|
Packit |
1c1d7e |
MemberList *createMemberList(MemberListType lt);
|
|
Packit |
1c1d7e |
void writeInheritedMemberDeclarations(OutputList &ol,MemberListType lt,int lt2,const QCString &title,ClassDef *inheritedFrom,bool invert,bool showAlways,QPtrDict<void> *visitedClasses);
|
|
Packit |
1c1d7e |
void writeMemberDeclarations(OutputList &ol,MemberListType lt,const QCString &title,
|
|
Packit |
1c1d7e |
const char *subTitle=0,bool showInline=FALSE,ClassDef *inheritedFrom=0,int lt2=-1,bool invert=FALSE,bool showAlways=FALSE,QPtrDict<void> *visitedClasses=0);
|
|
Packit |
1c1d7e |
void writeMemberDocumentation(OutputList &ol,MemberListType lt,const QCString &title,bool showInline=FALSE);
|
|
Packit |
1c1d7e |
void writeSimpleMemberDocumentation(OutputList &ol,MemberListType lt);
|
|
Packit |
1c1d7e |
void writePlainMemberDeclaration(OutputList &ol,MemberListType lt,bool inGroup,ClassDef *inheritedFrom,const char *inheritId);
|
|
Packit |
1c1d7e |
void writeBriefDescription(OutputList &ol,bool exampleFlag);
|
|
Packit |
1c1d7e |
void writeDetailedDescription(OutputList &ol,const QCString &pageType,bool exampleFlag,
|
|
Packit |
1c1d7e |
const QCString &title,const QCString &anchor=QCString());
|
|
Packit |
1c1d7e |
void writeIncludeFiles(OutputList &ol);
|
|
Packit |
1c1d7e |
//void writeAllMembersLink(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeInheritanceGraph(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeCollaborationGraph(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeMemberGroups(OutputList &ol,bool showInline=FALSE);
|
|
Packit |
1c1d7e |
void writeNestedClasses(OutputList &ol,const QCString &title);
|
|
Packit |
1c1d7e |
void writeInlineClasses(OutputList &ol);
|
|
Packit |
1c1d7e |
void startMemberDeclarations(OutputList &ol);
|
|
Packit |
1c1d7e |
void endMemberDeclarations(OutputList &ol);
|
|
Packit |
1c1d7e |
void startMemberDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void endMemberDocumentation(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeAuthorSection(OutputList &ol);
|
|
Packit |
1c1d7e |
void writeMoreLink(OutputList &ol,const QCString &anchor);
|
|
Packit |
1c1d7e |
void writeDetailedDocumentationBody(OutputList &ol);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
int countAdditionalInheritedMembers();
|
|
Packit |
1c1d7e |
void writeAdditionalInheritedMembers(OutputList &ol);
|
|
Packit |
1c1d7e |
void addClassAttributes(OutputList &ol);
|
|
Packit |
1c1d7e |
int countMemberDeclarations(MemberListType lt,ClassDef *inheritedFrom,
|
|
Packit |
1c1d7e |
int lt2,bool invert,bool showAlways,QPtrDict<void> *visitedClasses);
|
|
Packit |
1c1d7e |
int countInheritedDecMembers(MemberListType lt,
|
|
Packit |
1c1d7e |
ClassDef *inheritedFrom,bool invert,bool showAlways,
|
|
Packit |
1c1d7e |
QPtrDict<void> *visitedClasses);
|
|
Packit |
1c1d7e |
void getTitleForMemberListType(MemberListType type,
|
|
Packit |
1c1d7e |
QCString &title,QCString &subtitle);
|
|
Packit |
1c1d7e |
QCString includeStatement() const;
|
|
Packit |
1c1d7e |
void addTypeConstraint(const QCString &typeConstraint,const QCString &type);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
ClassDefImpl *m_impl;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Class that contains information about a usage relation.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
struct UsesClassDef
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
UsesClassDef(ClassDef *cd) : classDef(cd)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
accessors = new QDict<void>(17);
|
|
Packit |
1c1d7e |
containment = TRUE;
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
~UsesClassDef()
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
delete accessors;
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
void addAccessor(const char *s)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
if (accessors->find(s)==0)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
accessors->insert(s,(void *)666);
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
/** Class definition that this relation uses. */
|
|
Packit |
1c1d7e |
ClassDef *classDef;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Dictionary of member variable names that form the edge labels of the
|
|
Packit |
1c1d7e |
* usage relation.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
QDict<void> *accessors;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Template arguments used for the base class */
|
|
Packit |
1c1d7e |
QCString templSpecifiers;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
bool containment;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Dictionary of usage relations.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class UsesClassDict : public QDict<UsesClassDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
UsesClassDict(int size) : QDict<UsesClassDef>(size) {}
|
|
Packit |
1c1d7e |
~UsesClassDict() {}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Iterator class to iterate over a dictionary of usage relations.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class UsesClassDictIterator : public QDictIterator<UsesClassDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
UsesClassDictIterator(const QDict<UsesClassDef> &d)
|
|
Packit |
1c1d7e |
: QDictIterator<UsesClassDef>(d) {}
|
|
Packit |
1c1d7e |
~UsesClassDictIterator() {}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Class that contains information about an inheritance relation.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
struct BaseClassDef
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
BaseClassDef(ClassDef *cd,const char *n,Protection p,
|
|
Packit |
1c1d7e |
Specifier v,const char *t) :
|
|
Packit |
1c1d7e |
classDef(cd), usedName(n), prot(p), virt(v), templSpecifiers(t) {}
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Class definition that this relation inherits from. */
|
|
Packit |
1c1d7e |
ClassDef *classDef;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** name used in the inheritance list
|
|
Packit |
1c1d7e |
* (may be a typedef name instead of the class name)
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
QCString usedName;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Protection level of the inheritance relation:
|
|
Packit |
1c1d7e |
* Public, Protected, or Private
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
Protection prot;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Virtualness of the inheritance relation:
|
|
Packit |
1c1d7e |
* Normal, or Virtual
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
Specifier virt;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Template arguments used for the base class */
|
|
Packit |
1c1d7e |
QCString templSpecifiers;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** List of base classes.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* The classes are alphabetically sorted on name if inSort() is used.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class BaseClassList : public QList<BaseClassDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
~BaseClassList() {}
|
|
Packit |
1c1d7e |
int compareValues(const BaseClassDef *item1,const BaseClassDef *item2) const
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
const ClassDef *c1=item1->classDef;
|
|
Packit |
1c1d7e |
const ClassDef *c2=item2->classDef;
|
|
Packit |
1c1d7e |
if (c1==0 || c2==0)
|
|
Packit |
1c1d7e |
return FALSE;
|
|
Packit |
1c1d7e |
else
|
|
Packit |
1c1d7e |
return qstricmp(c1->name(),c2->name());
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Iterator for a list of base classes.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class BaseClassListIterator : public QListIterator<BaseClassDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
BaseClassListIterator(const BaseClassList &bcl) :
|
|
Packit |
1c1d7e |
QListIterator<BaseClassDef>(bcl) {}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Class that contains information about a type constraint relations.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
struct ConstraintClassDef
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
ConstraintClassDef(ClassDef *cd) : classDef(cd)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
accessors = new QDict<void>(17);
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
~ConstraintClassDef()
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
delete accessors;
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
void addAccessor(const char *s)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
if (accessors->find(s)==0)
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
accessors->insert(s,(void *)666);
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
/** Class definition that this relation uses. */
|
|
Packit |
1c1d7e |
ClassDef *classDef;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Dictionary of member types names that form the edge labels of the
|
|
Packit |
1c1d7e |
* constraint relation.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
QDict<void> *accessors;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Dictionary of constraint relations.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class ConstraintClassDict : public QDict<ConstraintClassDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
ConstraintClassDict(int size) : QDict<ConstraintClassDef>(size) {}
|
|
Packit |
1c1d7e |
~ConstraintClassDict() {}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Iterator class to iterate over a dictionary of constraint relations.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class ConstraintClassDictIterator : public QDictIterator<ConstraintClassDef>
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
ConstraintClassDictIterator(const QDict<ConstraintClassDef> &d)
|
|
Packit |
1c1d7e |
: QDictIterator<ConstraintClassDef>(d) {}
|
|
Packit |
1c1d7e |
~ConstraintClassDictIterator() {}
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
//------------------------------------------------------------------------
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#endif
|