Commit b1dbef98 authored by Dimitri van Heesch's avatar Dimitri van Heesch

Release-1.4.7-20060910

parent 7b814d4a
DOXYGEN Version 1.4.7-20060810
DOXYGEN Version 1.4.7-20060910
Please read the installation section of the manual
(http://www.doxygen.org/install.html) for instructions.
--------
Dimitri van Heesch (10 August 2006)
Dimitri van Heesch (10 September 2006)
DOXYGEN Version 1.4.7_20060810
DOXYGEN Version 1.4.7_20060910
Please read INSTALL for compilation instructions.
......@@ -17,4 +17,4 @@ to subscribe to the lists or to visit the archives.
Enjoy,
Dimitri van Heesch (dimitri@stack.nl) (10 August 2006)
Dimitri van Heesch (dimitri@stack.nl) (10 September 2006)
......@@ -26,6 +26,7 @@
*/
#include </usr/include/unistd.h> // ugly hack to get the right unistd.h (doxygen has one too)
#include <stdlib.h>
#include "doxygen.h"
#include "outputgen.h"
#include "parserintf.h"
......@@ -274,7 +275,7 @@ int main(int argc,char **argv)
parseInput();
// iterate over the input files
FileNameListIterator fnli(Doxygen::inputNameList);
FileNameListIterator fnli(*Doxygen::inputNameList);
FileName *fn;
// foreach file with a certain name
for (fnli.toFirst();(fn=fnli.current());++fnli)
......@@ -289,6 +290,8 @@ int main(int argc,char **argv)
}
}
// remove temporary files
unlink("/tmp/doxygen/doxygen_objdb.tmp");
// clean up after us
rmdir("/tmp/doxygen");
......
......@@ -20,7 +20,7 @@ doxygen_version_minor=4
doxygen_version_revision=7
#NOTE: Setting version_mmn to "NO" will omit mmn info from the package.
doxygen_version_mmn=20060810
doxygen_version_mmn=20060910
bin_dirs=`echo $PATH | sed -e "s/:/ /g"`
......
......@@ -829,7 +829,7 @@ MAN_LINKS = NO
# generate an XML file that captures the structure of
# the code including all documentation.
GENERATE_XML = YES
GENERATE_XML = NO
# The XML_OUTPUT tag is used to specify where the XML pages will be put.
# If a relative path is entered the value of OUTPUT_DIRECTORY will be
......
This diff is collapsed.
......@@ -43,14 +43,14 @@
#include "qarray.h"
#endif // QT_H
#include <stdlib.h>
#include <string.h>
#if defined(_OS_SUN_) && defined(_CC_GNU_)
#include <strings.h>
#endif
//#undef SMALLSTRING
#define SMALLSTRING
class QGString;
/*****************************************************************************
Fixes and workarounds for some platforms
......@@ -143,7 +143,6 @@ Q_EXPORT int qstrnicmp( const char *, const char *, uint len );
#endif
// qChecksum: Internet checksum
Q_EXPORT Q_UINT16 qChecksum( const char *s, uint len );
......@@ -166,34 +165,35 @@ Q_EXPORT QDataStream &operator<<( QDataStream &, const QByteArray & );
Q_EXPORT QDataStream &operator>>( QDataStream &, QByteArray & );
#endif
#ifdef SMALLSTRING
#define SCString QCString
#include "scstring.h"
#else
/*****************************************************************************
QCString class
*****************************************************************************/
class QRegExp;
class Q_EXPORT QCString : public QByteArray // C string class
/** This is an alternative implementation of QCString. It provides basically
* the same functions but uses less memory for administration. This class
* is just a wrapper around a plain C string requiring only 4 bytes "overhead".
* QCString features sharing of data and stores the string length, but
* requires 4 + 12 bytes for this (even for the empty string). As doxygen
* uses a LOT of string during a run it saves a lot of memory to use a
* more memory efficient implementation at the cost of relatively low
* runtime overhead.
*/
class QCString
{
public:
QCString() {} // make null string
QCString( int size ); // allocate size incl. \0
QCString( const QCString &s ) : QByteArray( s ) {}
QCString( const char *str ); // deep copy
QCString( const char *str, uint maxlen ); // deep copy, max length
QCString &operator=( const QCString &s );// shallow copy
QCString() : m_data(0) {} // make null string
QCString( const QCString &s );
QCString( int size );
QCString( const char *str );
QCString( const char *str, uint maxlen );
~QCString();
QCString &operator=( const QCString &s );// deep copy
QCString &operator=( const char *str ); // deep copy
bool isNull() const;
bool isNull() const;
bool isEmpty() const;
uint length() const;
uint size() const { return m_data ? length()+1 : 0; }
char * data() const { return m_data; }
bool resize( uint newlen );
bool truncate( uint pos );
bool fill( char c, int len = -1 );
......@@ -211,24 +211,23 @@ public:
int contains( char c, bool cs=TRUE ) const;
int contains( const char *str, bool cs=TRUE ) const;
int contains( const QRegExp & ) const;
bool stripPrefix(const char *prefix);
QCString left( uint len ) const;
QCString right( uint len ) const;
QCString mid( uint index, uint len=0xffffffff) const;
QCString leftJustify( uint width, char fill=' ', bool trunc=FALSE)const;
QCString rightJustify( uint width, char fill=' ',bool trunc=FALSE)const;
QCString lower() const;
QCString upper() const;
QCString stripWhiteSpace() const;
QCString simplifyWhiteSpace() const;
QCString &assign( const char *str );
QCString &insert( uint index, const char * );
QCString &insert( uint index, char );
QCString &append( const char * );
QCString &prepend( const char * );
QCString &append( const char *s );
QCString &prepend( const char *s );
QCString &remove( uint index, uint len );
QCString &replace( uint index, uint len, const char * );
QCString &replace( const QRegExp &, const char * );
......@@ -239,10 +238,7 @@ public:
uint toUInt( bool *ok=0 ) const;
long toLong( bool *ok=0 ) const;
ulong toULong( bool *ok=0 ) const;
float toFloat( bool *ok=0 ) const;
double toDouble( bool *ok=0 ) const;
QCString &setStr( const char *s );
QCString &setNum( short );
QCString &setNum( ushort );
QCString &setNum( int );
......@@ -252,14 +248,56 @@ public:
QCString &setNum( float, char f='g', int prec=6 );
QCString &setNum( double, char f='g', int prec=6 );
bool setExpand( uint index, char c );
operator const char *() const;
QCString &operator+=( const char *str );
QCString &operator+=( char c );
char &at( uint index ) const;
char &operator[]( int i ) const { return at(i); }
private:
static void msg_index( uint );
void duplicate( const QCString &s );
void duplicate( const char *str);
QCString &duplicate( const char *str, int);
char * m_data;
};
#endif
inline char &QCString::at( uint index ) const
{
return m_data[index];
}
inline void QCString::duplicate( const QCString &s )
{
if (!s.isEmpty())
{
uint l = strlen(s.data());
m_data = (char *)malloc(l+1);
if (m_data) memcpy(m_data,s.data(),l+1);
}
else
m_data=0;
}
inline void QCString::duplicate( const char *str)
{
if (str && str[0]!='\0')
{
uint l = strlen(str);
m_data = (char *)malloc(l+1);
if (m_data) memcpy(m_data,str,l+1);
}
else
m_data=0;
}
inline QCString &QCString::duplicate( const char *str, int)
{
if (m_data) free(m_data);
duplicate(str);
return *this;
}
/*****************************************************************************
QCString stream functions
......@@ -370,21 +408,26 @@ Q_EXPORT inline bool operator>=( const char *s1, const QCString &s2 )
Q_EXPORT inline QCString operator+( const QCString &s1, const QCString &s2 )
{
QCString tmp( s1.data() );
QCString tmp(s1);
tmp += s2;
return tmp;
}
inline QCString operator+( const QCString &s1, const QGString &s2 );
inline QCString operator+( const QGString &s1, const QCString &s2 );
Q_EXPORT inline QCString operator+( const QCString &s1, const char *s2 )
{
QCString tmp( s1.data() );
QCString tmp(s1);
tmp += s2;
return tmp;
}
Q_EXPORT inline QCString operator+( const char *s1, const QCString &s2 )
{
QCString tmp( s1 );
QCString tmp(s1);
tmp += s2;
return tmp;
}
......@@ -404,4 +447,5 @@ Q_EXPORT inline QCString operator+( char c1, const QCString &s2 )
return tmp;
}
#endif // QCSTRING_H
......@@ -52,7 +52,7 @@ class Q_EXPORT QFile : public QIODevice // file I/O device class
public:
QFile();
QFile( const QString &name );
~QFile();
virtual ~QFile();
QString name() const;
void setName( const QString &name );
......@@ -95,6 +95,7 @@ public:
int handle() const;
int64 pos() const;
int64 toEnd();
bool seek(int64 pos);
protected:
......
......@@ -643,6 +643,19 @@ int64 QFile::pos() const
return -1;
}
int64 QFile::toEnd()
{
if (isOpen())
{
// TODO: support 64 bit size
if (fseek( fh, 0, SEEK_END )!=-1)
{
return ftell( fh );
}
}
return -1;
}
bool QFile::seek( int64 pos )
{
if (isOpen())
......
......@@ -602,6 +602,19 @@ int64 QFile::pos() const
return -1;
}
int64 QFile::toEnd()
{
if (isOpen())
{
// TODO: support 64 bit size
if (fseek( fh, 0, SEEK_END )!=-1)
{
return ftell( fh );
}
}
return -1;
}
bool QFile::seek( int64 pos )
{
if (isOpen())
......
/******************************************************************************
*
* Copyright (C) 1997-2004 by Dimitri van Heesch.
*
* Permission to use, copy, modify, and distribute this software and its
* documentation under the terms of the GNU General Public License is hereby
* granted. No representations are made about the suitability of this software
* for any purpose. It is provided "as is" without express or implied warranty.
* See the GNU General Public License for more details.
*
* Documents produced by Doxygen are derivative works derived from the
* input used in their production; they are not affected by this license.
*
*/
#include "qgstring.h"
#include <assert.h>
#define BLOCK_SIZE 64
#define ROUND_SIZE(x) ((x)+BLOCK_SIZE-1)&~(BLOCK_SIZE-1)
QGString::QGString() // make null string
: m_data(0), m_len(0), m_memSize(0)
{
}
QGString::QGString(uint size)
{
m_memSize = ROUND_SIZE(size);
if (m_memSize==0)
{
m_data=0;
m_len=0;
}
else
{
m_data = (char*)malloc(m_memSize);
m_data[0]='\0';
m_len=0;
}
}
QGString::QGString( const QGString &s )
{
if (s.m_memSize==0)
{
m_data = 0;
m_len = 0;
m_memSize = 0;
}
else
{
m_data = (char *)malloc(s.m_memSize);
m_len = s.m_len;
m_memSize = s.m_memSize;
qstrcpy(m_data,s.m_data);
}
}
QGString::QGString( const char *str )
{
if (str==0)
{
m_data=0;
m_len=0;
m_memSize=0;
}
else
{
m_len = qstrlen(str);
m_memSize = ROUND_SIZE(m_len+1);
assert(m_memSize>=m_len+1);
m_data = (char *)malloc(m_memSize);
qstrcpy(m_data,str);
}
}
QGString::~QGString()
{
free(m_data);
m_data=0;
}
bool QGString::resize( uint newlen )
{
m_len = 0;
if (newlen==0)
{
if (m_data) { free(m_data); m_data=0; }
m_memSize=0;
return TRUE;
}
m_memSize = ROUND_SIZE(newlen+1);
assert(m_memSize>=newlen+1);
if (m_data==0)
{
m_data = (char *)malloc(m_memSize);
}
else
{
m_data = (char *)realloc(m_data,m_memSize);
}
if (m_data==0) return FALSE;
m_data[newlen-1]='\0';
m_len = qstrlen(m_data);
return TRUE;
}
QGString &QGString::operator=( const QGString &s )
{
if (m_data) free(m_data);
if (s.m_memSize==0) // null string
{
m_data = 0;
m_len = 0;
m_memSize = 0;
}
else
{
m_len = s.m_len;
m_memSize = s.m_memSize;
m_data = (char*)malloc(m_memSize);
qstrcpy(m_data,s.m_data);
}
return *this;
}
QGString &QGString::operator=( const char *str )
{
if (m_data) free(m_data);
if (str==0) // null string
{
m_data = 0;
m_len = 0;
m_memSize = 0;
}
else
{
m_len = qstrlen(str);
m_memSize = ROUND_SIZE(m_len+1);
assert(m_memSize>=m_len+1);
m_data = (char*)malloc(m_memSize);
qstrcpy(m_data,str);
}
return *this;
}
QGString &QGString::operator+=( const QGString &s )
{
if (s.m_memSize==0) return *this;
uint len1 = length();
uint len2 = s.length();
uint memSize = ROUND_SIZE(len1 + len2 + 1);
assert(memSize>=len1+len2+1);
char *newData = memSize!=m_memSize ? (char*)realloc( m_data, memSize ) : m_data;
m_memSize = memSize;
if (m_data)
{
m_data = newData;
memcpy( m_data + len1, s, len2 + 1 );
}
return *this;
}
QGString &QGString::operator+=( const char *str )
{
if (!str) return *this;
uint len1 = length();
uint len2 = qstrlen(str);
uint memSize = ROUND_SIZE(len1 + len2 + 1);
assert(memSize>=len1+len2+1);
char *newData = memSize!=m_memSize ? (char *)realloc( m_data, memSize ) : m_data;
m_memSize = memSize;
if (newData)
{
m_data = newData;
memcpy( m_data + len1, str, len2 + 1 );
}
m_len+=len2;
return *this;
}
QGString &QGString::operator+=( char c )
{
uint len = m_len;
uint memSize = ROUND_SIZE(len+2);
assert(memSize>=len+2);
char *newData = memSize!=m_memSize ? (char *)realloc( m_data, memSize ) : m_data;
m_memSize = memSize;
if (newData)
{
m_data = newData;
m_data[len] = c;
m_data[len+1] = '\0';
}
m_len++;
return *this;
}
#ifndef QGSTRING_H
#define QGSTRING_H
#include <stdlib.h>
#include <string.h>
#if defined(_OS_SUN_) && defined(_CC_GNU_)
#include <strings.h>
#endif
#include "qcstring.h"
/*****************************************************************************
Fixes and workarounds for some platforms
*****************************************************************************/
/** This is an alternative implementation of QCString.
*/
class QGString
{
public:
QGString(); // make null string
QGString(uint size);
QGString( const QGString &s );
QGString( const char *str );
~QGString() ;
bool resize( uint newlen );
QGString &operator=( const QGString &s );
QGString &operator=( const char *str );
QGString &operator+=( const QGString &s );
QGString &operator+=( const char *str );
QGString &operator+=( char c );
bool isNull() const { return m_data==0; }
bool isEmpty() const { return m_len==0; }
uint length() const { return m_len; }
uint size() const { return m_memSize; }
char * data() const { return m_data; }
bool truncate( uint pos ) { return resize(pos+1); }
operator const char *() const { return (const char *)data(); }
char &at( uint index ) const { return m_data[index]; }
char &operator[]( int i ) const { return at(i); }
private:
char * m_data;
uint m_len;
uint m_memSize;
};
/*****************************************************************************
QGString non-member operators
*****************************************************************************/
Q_EXPORT inline bool operator==( const QGString &s1, const QGString &s2 )
{ return qstrcmp(s1.data(),s2.data()) == 0; }
Q_EXPORT inline bool operator==( const QGString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) == 0; }
Q_EXPORT inline bool operator==( const char *s1, const QGString &s2 )
{ return qstrcmp(s1,s2.data()) == 0; }
Q_EXPORT inline bool operator!=( const QGString &s1, const QGString &s2 )
{ return qstrcmp(s1.data(),s2.data()) != 0; }
Q_EXPORT inline bool operator!=( const QGString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) != 0; }
Q_EXPORT inline bool operator!=( const char *s1, const QGString &s2 )
{ return qstrcmp(s1,s2.data()) != 0; }
Q_EXPORT inline bool operator<( const QGString &s1, const QGString& s2 )
{ return qstrcmp(s1.data(),s2.data()) < 0; }
Q_EXPORT inline bool operator<( const QGString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) < 0; }
Q_EXPORT inline bool operator<( const char *s1, const QGString &s2 )
{ return qstrcmp(s1,s2.data()) < 0; }
Q_EXPORT inline bool operator<=( const QGString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) <= 0; }
Q_EXPORT inline bool operator<=( const char *s1, const QGString &s2 )
{ return qstrcmp(s1,s2.data()) <= 0; }
Q_EXPORT inline bool operator>( const QGString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) > 0; }
Q_EXPORT inline bool operator>( const char *s1, const QGString &s2 )
{ return qstrcmp(s1,s2.data()) > 0; }
Q_EXPORT inline bool operator>=( const QGString &s1, const char *s2 )
{ return qstrcmp(s1.data(),s2) >= 0; }
Q_EXPORT inline bool operator>=( const char *s1, const QGString &s2 )
{ return qstrcmp(s1,s2.data()) >= 0; }
Q_EXPORT inline QGString operator+( const QGString &s1, const QGString &s2 )
{
QGString tmp( s1.data() );
tmp += s2;
return tmp;
}
Q_EXPORT inline QGString operator+( const QGString &s1, const char *s2 )
{
QGString tmp( s1.data() );
tmp += s2;
return tmp;
}
Q_EXPORT inline QGString operator+( const char *s1, const QGString &s2 )
{
QGString tmp( s1 );
tmp += s2;
return tmp;
}
Q_EXPORT inline QGString operator+( const QGString &s1, char c2 )
{
QGString tmp( s1.data() );
tmp += c2;
return tmp;
}
Q_EXPORT inline QGString operator+( char c1, const QGString &s2 )
{
QGString tmp;
tmp += c1;
tmp += s2;
return tmp;
}
#endif // QGSTRING_H
......@@ -22,6 +22,7 @@ HEADERS = qarray.h \
qgeneric.h \
qglist.h \
qglobal.h \
qgstring.h \
qgvector.h \
qintdict.h \
qiodevice.h \
......@@ -57,6 +58,7 @@ SOURCES = qbuffer.cpp \
qgdict.cpp \
qglist.cpp \
qglobal.cpp \
qgstring.cpp \
qgvector.cpp \
qiodevice.cpp \
qregexp.cpp \
......
This diff is collapsed.
......@@ -45,6 +45,7 @@ class PackageDef;
class GroupDef;
class StringDict;
struct IncludeInfo;
class ClassDefImpl;
/*! \brief This class contains all information about a compound.
*
......@@ -108,15 +109,15 @@ class ClassDef : public Definition
bool isReference() const;
/*! Returns TRUE if this is a local class definition, see EXTRACT_LOCAL_CLASSES */
bool isLocal() const { return m_isLocal; }
bool isLocal() const;
/*! returns TRUE if this class was artificially introduced, for instance because
* it is used to show a template instantiation relation.
*/
bool isArtificial() const { return m_artificial; }
bool isArtificial() const;
/*! returns the classes nested into this class */
ClassSDict *getInnerClasses() { return m_innerClasses; }
ClassSDict *getInnerClasses();
/*! returns TRUE if this class has documentation */
bool hasDocumentation() const;
......@@ -125,7 +126,7 @@ class ClassDef : public Definition
QCString displayName() const;
/*! Returns the type of compound this is, i.e. class/struct/union/.. */
CompoundType compoundType() const { return m_compType; }
CompoundType compoundType() const;
/*! Returns the type of compound as a string */
QCString compoundTypeString() const;
......@@ -133,21 +134,21 @@ class ClassDef : public Definition
/*! Returns the list of base classes from which this class directly
* inherits.
*/
BaseClassList *baseClasses() { return m_inherits; }
BaseClassList *baseClasses() const;
/*! Returns the list of sub classes that directly derive from this class
*/
BaseClassList *subClasses() { return m_inheritedBy; }
BaseClassList *subClasses() const;
/*! Returns a dictionary of all members. This includes any inherited
* members. Members are sorted alphabetically.
*/
MemberNameInfoSDict *memberNameInfoSDict() { return m_allMemberNameInfoSDict; }
MemberNameInfoSDict *memberNameInfoSDict() const;
/*! Return the protection level (Public,Protected,Private) in which
* this compound was found.
*/
Protection protection() const { return m_prot; }
Protection protection() const;
/*! returns TRUE iff a link is possible to this item within this project.
*/
......@@ -164,23 +165,22 @@ class ClassDef : public Definition
/*! Returns the template arguments of this class
* Will return 0 if not applicable.
*/
ArgumentList *templateArguments() const { return m_tempArgs; }
ArgumentList *templateArguments() const;
/*! Returns the namespace this compound is in, or 0 if it has a global
* scope.
*/
NamespaceDef *getNamespaceDef() { return m_nspace; }
NamespaceDef *getNamespaceDef() const;
/*! Returns the file in which this compound's definition can be found.
* Should not return 0 (but it might be a good idea to check anyway).
*/
FileDef *getFileDef() const { return m_fileDef; }
FileDef *getFileDef() const;
/*! Returns the Java package this class is in or 0 if not applicable.
*/
//PackageDef *packageDef() const;
MemberDef *getMemberByName(const QCString &);
MemberDef *getMemberByName(const QCString &) const;
/*! Returns TRUE iff \a bcd is a direct or indirect base class of this
* class. This function will recusively traverse all branches of the
......@@ -191,37 +191,25 @@ class ClassDef : public Definition
/*! Returns a sorted dictionary with all template instances found for
* this template class. Returns 0 if not a template or no instances.
*/
QDict<ClassDef> *getTemplateInstances() const { return m_templateInstances; }
QDict<ClassDef> *getTemplateInstances() const;
/*! Returns the template master of which this class is an instance.
* Returns 0 if not applicable.
*/
ClassDef *templateMaster() const { return m_templateMaster; }
ClassDef *templateMaster() const;
/*! Returns TRUE if this class is a template */
bool isTemplate() const { return m_tempArgs!=0; }
bool isTemplate() const;
IncludeInfo *includeInfo() const { return m_incInfo; }
IncludeInfo *includeInfo() const;
UsesClassDict *usedImplementationClasses() const
{
return m_usesImplClassDict;
}
UsesClassDict *usedImplementationClasses() const;
UsesClassDict *usedByImplementationClasses() const
{
return m_usedByImplClassDict;
}
UsesClassDict *usedByImplementationClasses() const;
UsesClassDict *usedInterfaceClasses() const
{
return m_usesIntfClassDict;
}
UsesClassDict *usedInterfaceClasses() const;
bool isTemplateArgument() const
{
return m_isTemplArg;
}
bool isTemplateArgument() const;
/*! Returns the definition of a nested compound if
* available, or 0 otherwise.
......@@ -244,13 +232,13 @@ class ClassDef : public Definition
/*! Returns TRUE if there is at least one pure virtual member in this
* class.
*/
bool isAbstract() const { return m_isAbstract; }
bool isAbstract() const;
/*! Returns TRUE if this class is implemented in Objective-C */
bool isObjectiveC() const { return m_isObjC; }
bool isObjectiveC() const;
/*! Returns the class of which this is a category (Objective-C only) */
ClassDef *categoryOf() const { return m_categoryOf; }
ClassDef *categoryOf() const;
/*! Returns the name of the class including outer classes, but not
* including namespaces.
......@@ -261,12 +249,13 @@ class ClassDef : public Definition
MemberList *getMemberList(MemberList::ListType lt);
/*! Returns the list containing the list of members sorted per type */
const QList<MemberList> &getMemberLists() const { return m_memberLists; }
const QList<MemberList> &getMemberLists() const;
/*! Returns the member groups defined for this class */
MemberGroupSDict *getMemberGroupSDict() const { return memberGroupSDict; }
MemberGroupSDict *getMemberGroupSDict() const;
QDict<int> *getTemplateBaseClassNames() const;
ClassDef *getVariableInstance(const char *templSpec);
//-----------------------------------------------------------------------------------
......@@ -280,28 +269,27 @@ class ClassDef : public Definition
void insertUsedFile(const char *);
bool addExample(const char *anchor,const char *name, const char *file);
void mergeCategory(ClassDef *category);
void setNamespace(NamespaceDef *nd) { m_nspace = nd; }
void setFileDef(FileDef *fd) { m_fileDef=fd; }
void setSubGrouping(bool enabled) { m_subGrouping = enabled; }
void setProtection(Protection p) { m_prot=p; }
void setNamespace(NamespaceDef *nd);
void setFileDef(FileDef *fd);
void setSubGrouping(bool enabled);
void setProtection(Protection p);
void setGroupDefForAllMembers(GroupDef *g,Grouping::GroupPri_t pri,const QCString &fileName,int startLine,bool hasDocs);
void addInnerCompound(Definition *d);
ClassDef *insertTemplateInstance(const QCString &fileName,int startLine,
const QCString &templSpec,bool &freshInstance);
void addUsedClass(ClassDef *cd,const char *accessName);
void addUsedByClass(ClassDef *cd,const char *accessName);
void setClassIsArtificial() { m_artificial = TRUE; }
void setIsStatic(bool b) { m_isStatic=b; }
void setIsObjectiveC(bool b) { m_isObjC=b; }
void setCompoundType(CompoundType t) { m_compType = t; }
void setClassIsArtificial();
void setIsStatic(bool b);
void setIsObjectiveC(bool b);
void setCompoundType(CompoundType t);
void setTemplateArguments(ArgumentList *al);
void setTemplateBaseClassNames(QDict<int> *templateNames);
void setTemplateMaster(ClassDef *tm) { m_templateMaster=tm; }
void setTemplateMaster(ClassDef *tm);
void addMembersToTemplateInstance(ClassDef *cd,const char *templSpec);
/*! Marks this class as a template argument of some another class */
void makeTemplateArgument(bool b=TRUE) { m_isTemplArg = b; }
void makeTemplateArgument(bool b=TRUE);
void setCategoryOf(ClassDef *cd);
//-----------------------------------------------------------------------------------
// --- actions ----
......@@ -340,6 +328,9 @@ class ClassDef : public Definition
void writeMemberDocumentation(OutputList &ol,MemberList::ListType lt,const QCString &title);
void writePlainMemberDeclaration(OutputList &ol,MemberList::ListType lt,bool inGroup);
ClassDefImpl *m_impl;
#if 0
/*! file name that forms the base for the output file containing the
* class documentation. For compatibility with Qt (e.g. links via tag
* files) this name cannot be derived from the class name directly.
......@@ -394,7 +385,6 @@ class ClassDef : public Definition
*/
ClassSDict *m_innerClasses;
/* classes for the collaboration diagram */
UsesClassDict *m_usesImplClassDict;
UsesClassDict *m_usedByImplClassDict;
......@@ -458,6 +448,7 @@ class ClassDef : public Definition
* groups?
*/
bool m_subGrouping;
#endif
};
......
......@@ -51,7 +51,7 @@
static CodeOutputInterface * g_code;
static ClassSDict g_codeClassSDict(17);
static ClassSDict *g_codeClassSDict = 0;
static QCString g_curClassName;
static QStrList g_curClassBases;
......@@ -127,10 +127,12 @@ static ObjCCallCtx *g_currentCtx=0;
static int g_currentCtxId=0;
static int g_currentNameId=0;
static int g_currentObjId=0;
static int g_currentWordId=0;
static QStack<ObjCCallCtx> g_contextStack;
static QIntDict<ObjCCallCtx> g_contextDict;
static QIntDict<QCString> g_nameDict;
static QIntDict<QCString> g_objectDict;
static QIntDict<QCString> g_wordDict;
static int g_braceCount=0;
static void saveObjCContext();
......@@ -225,7 +227,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
ClassDef *varType;
int i=0;
if (
(varType=g_codeClassSDict[ltype]) || // look for class definitions inside the code block
(varType=g_codeClassSDict->find(ltype)) || // look for class definitions inside the code block
(varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,ltype)) // look for global class definitions
)
{
......@@ -240,7 +242,7 @@ void VariableContext::addVariable(const QCString &type,const QCString &name)
QCString templateArgs(ltype.right(ltype.length() - i));
if (
( // look for class definitions inside the code block
(varType=g_codeClassSDict[typeName]) ||
(varType=g_codeClassSDict->find(typeName)) ||
// otherwise look for global class definitions
(varType=getResolvedClass(g_currentDefinition,g_sourceFileDef,typeName))
) && // and it must be a template
......@@ -607,7 +609,7 @@ static void addUsingDirective(const char *name)
{
if (g_exampleBlock && g_sourceFileDef && name)
{
NamespaceDef *nd = Doxygen::namespaceSDict.find(name);
NamespaceDef *nd = Doxygen::namespaceSDict->find(name);
if (nd)
{
g_sourceFileDef->addUsingDirective(nd);
......@@ -618,7 +620,7 @@ static void addUsingDirective(const char *name)
static void setParameterList(MemberDef *md)
{
g_classScope = md->getClassDef() ? md->getClassDef()->name().data() : "";
ArgumentList *al = md->argumentList();
LockingPtr<ArgumentList> al = md->argumentList();
if (al==0) return;
Argument *a = al->first();
while (a)
......@@ -721,7 +723,7 @@ static MemberDef *setCallContextForVar(const QCString &name)
}
// look for a global member
if ((mn=Doxygen::functionNameSDict[name]))
if ((mn=Doxygen::functionNameSDict->find(name)))
{
//printf("global var `%s'\n",name.data());
if (mn->count()==1) // global defined only once
......@@ -1109,7 +1111,7 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
if (vcd && vcd->isLinkable())
{
//printf("Found class %s for variable `%s'\n",g_classScope.data(),varName.data());
MemberName *vmn=Doxygen::memberNameSDict[varName];
MemberName *vmn=Doxygen::memberNameSDict->find(varName);
if (vmn==0)
{
int vi;
......@@ -1119,7 +1121,7 @@ static void generateMemberLink(CodeOutputInterface &ol,const QCString &varName,
{
ClassDef *jcd = getClass(vn.left(vi));
vn=vn.right(vn.length()-vi-2);
vmn=Doxygen::memberNameSDict[vn];
vmn=Doxygen::memberNameSDict->find(vn);
//printf("Trying name `%s' scope=%s\n",vn.data(),scope.data());
if (vmn)
{
......@@ -1192,7 +1194,7 @@ static void generateFunctionLink(CodeOutputInterface &ol,char *funcName)
}
}
//printf("generateFunctionLink(%s) classScope=`%s'\n",locFunc.data(),locScope.data());
if (!locScope.isEmpty() && (ccd=g_codeClassSDict[locScope]))
if (!locScope.isEmpty() && (ccd=g_codeClassSDict->find(locScope)))
{
//printf("using classScope %s\n",g_classScope.data());
if (ccd->baseClasses())
......@@ -1505,7 +1507,7 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
if (QCString(ictx->method->typeString())=="id")
{
// see if the method name is unique, if so we link to it
MemberName *mn=Doxygen::memberNameSDict.find(ctx->methodName);
MemberName *mn=Doxygen::memberNameSDict->find(ctx->methodName);
//printf("mn->count=%d ictx->method=%s ctx->methodName=%s\n",
// mn==0?-1:(int)mn->count(),
// ictx->method->name().data(),
......@@ -1531,6 +1533,21 @@ static void writeObjCMethodCall(ObjCCallCtx *ctx)
//printf("Invalid context: id=%d\n",refId);
}
}
else if (nc=='w') // some word
{
nc=*p++;
QCString refIdStr;
while (nc!=0 && isdigit(nc)) { refIdStr+=nc; nc=*p++; }
p--;
int refId=refIdStr.toInt();
QCString *pWord = g_wordDict.find(refId);
if (pWord)
{
g_code->linkableSymbol(g_yyLineNr,pWord->data(),0,
g_currentMemberDef ? g_currentMemberDef : g_currentDefinition);
codifyLines(pWord->data());
}
}
else // illegal marker
{
ASSERT(!"invalid escape sequence");
......@@ -1571,6 +1588,15 @@ static QCString escapeObject(const char *s)
return result;
}
static QCString escapeWord(const char *s)
{
QCString result;
result.sprintf("$w%d",g_currentWordId);
g_wordDict.insert(g_currentWordId,new QCString(s));
g_currentWordId++;
return result;
}
/* -----------------------------------------------------------------
*/
#undef YY_INPUT
......@@ -1723,7 +1749,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_parmType=yytext;
}
<ObjCParamType>{ID} {
g_code->codify(yytext);
generateClassOrGlobalLink(*g_code,yytext);
g_parmType=yytext;
}
<ObjCParamType>")" {
......@@ -1731,6 +1757,8 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
BEGIN(ObjCParams);
}
<ObjCParams>{ID} {
g_code->linkableSymbol(g_yyLineNr,yytext,0,
g_currentMemberDef?g_currentMemberDef:g_currentDefinition);
g_code->codify(yytext);
g_parmName=yytext;
g_theVarContext.addVariable(g_parmType,g_parmName);
......@@ -1960,13 +1988,13 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
//printf("Adding new class %s\n",g_curClassName.data());
ClassDef *ncd=new ClassDef("<code>",1,
g_curClassName,ClassDef::Class,0,0,FALSE);
g_codeClassSDict.append(g_curClassName,ncd);
g_codeClassSDict->append(g_curClassName,ncd);
// insert base classes.
char *s=g_curClassBases.first();
while (s)
{
ClassDef *bcd;
bcd=g_codeClassSDict[s];
bcd=g_codeClassSDict->find(s);
if (bcd==0) bcd=getResolvedClass(g_currentDefinition,g_sourceFileDef,s);
if (bcd && bcd!=ncd)
{
......@@ -2321,9 +2349,11 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_contextDict.setAutoDelete(TRUE);
g_nameDict.setAutoDelete(TRUE);
g_objectDict.setAutoDelete(TRUE);
g_wordDict.setAutoDelete(TRUE);
g_contextDict.clear();
g_nameDict.clear();
g_objectDict.clear();
g_wordDict.clear();
g_currentCtxId = 0;
g_currentNameId = 0;
g_currentObjId = 0;
......@@ -2443,7 +2473,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
}
else
{
g_currentCtx->format+=yytext;
g_currentCtx->format+=escapeWord(yytext);
}
}
<ObjCMName>{ID}/{BN}*":" {
......@@ -2470,6 +2500,7 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
<ObjCSkipStr>"@"/"\"" { // needed to prevent matching the global rule (for C#)
g_currentCtx->format+=yytext;
}
<ObjCCall,ObjCMName,ObjCSkipStr>{ID} { g_currentCtx->format+=escapeWord(yytext); }
<ObjCCall,ObjCMName,ObjCSkipStr>. { g_currentCtx->format+=*yytext; }
<ObjCCall,ObjCMName,ObjCSkipStr>\n { g_currentCtx->format+=*yytext; }
......@@ -3028,11 +3059,11 @@ OPERATOR {ARITHOP}|{ASSIGNOP}|{LOGICOP}|{BITOP}
g_lastCContext = YY_START ;
BEGIN( SkipCxxComment ) ;
}
<*>"(" {
<*>"("|"[" {
g_code->codify(yytext);
g_theCallContext.pushScope();
}
<*>")" {
<*>")"|"]" {
g_code->codify(yytext);
g_theCallContext.popScope();
}
......@@ -3107,8 +3138,10 @@ void resetCCodeParserState()
{
//printf("***initParseCodeContext()\n");
g_theVarContext.clear();
g_codeClassSDict.setAutoDelete(TRUE);
g_codeClassSDict.clear();
delete g_codeClassSDict;
g_codeClassSDict = new ClassSDict(17);
g_codeClassSDict->setAutoDelete(TRUE);
g_codeClassSDict->clear();
g_curClassBases.clear();
g_anchorCount = 0;
}
......@@ -3120,6 +3153,10 @@ void parseCCode(CodeOutputInterface &od,const char *className,const QCString &s,
{
//printf("***parseCode() exBlock=%d exName=%s fd=%p\n",exBlock,exName,fd);
if (s.isEmpty()) return;
if (g_codeClassSDict==0)
{
resetCCodeParserState();
}
g_code = &od;
g_inputString = s;
g_inputPosition = 0;
......
......@@ -137,7 +137,7 @@ void generateDEFForMember(MemberDef *md,
if (isFunc) //function
{
ArgumentList *declAl = new ArgumentList;
ArgumentList *defAl = md->argumentList();
LockingPtr<ArgumentList> defAl = md->argumentList();
stringToArgumentList(md->argsString(),declAl);
QCString fcnPrefix = " " + memPrefix + "param-";
......@@ -213,9 +213,10 @@ void generateDEFForMember(MemberDef *md,
// TODO: exceptions, const volatile
if (md->memberType()==MemberDef::Enumeration) // enum
{
if (md->enumFieldList())
LockingPtr<MemberList> enumList = md->enumFieldList();
if (enumList!=0)
{
MemberListIterator emli(*md->enumFieldList());
MemberListIterator emli(*enumList);
MemberDef *emd;
for (emli.toFirst();(emd=emli.current());++emli)
{
......@@ -239,9 +240,11 @@ void generateDEFForMember(MemberDef *md,
<< md->documentation() << endl << "_EnD_oF_dEf_TeXt_;" << endl;
//printf("md->getReferencesMembers()=%p\n",md->getReferencesMembers());
if (md->getReferencesMembers())
LockingPtr<MemberSDict> mdict = md->getReferencesMembers();
if (!mdict.isNull())
{
MemberSDict::Iterator mdi(*md->getReferencesMembers());
MemberSDict::Iterator mdi(*mdict);
MemberDef *rmd;
QCString refPrefix = " " + memPrefix + "ref-";
......@@ -271,9 +274,10 @@ void generateDEFForMember(MemberDef *md,
}
} /* for (mdi.toFirst...) */
}
if (md->getReferencedByMembers())
mdict = md->getReferencedByMembers();
if (!mdict.isNull())
{
MemberSDict::Iterator mdi(*md->getReferencedByMembers());
MemberSDict::Iterator mdi(*mdict);
MemberDef *rmd;
QCString refPrefix = " " + memPrefix + "ref-";
......@@ -602,15 +606,15 @@ void generateDEF()
QTextStream t(&f);
t << "AutoGen Definitions dummy;" << endl;
if (Doxygen::classSDict.count()+Doxygen::inputNameList.count()>0)
if (Doxygen::classSDict->count()+Doxygen::inputNameList->count()>0)
{
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassSDict::Iterator cli(*Doxygen::classSDict);
ClassDef *cd;
for (cli.toFirst();(cd=cli.current());++cli)
{
generateDEFForClass(cd,t);
}
FileNameListIterator fnli(Doxygen::inputNameList);
FileNameListIterator fnli(*Doxygen::inputNameList);
FileName *fn;
for (;(fn=fnli.current());++fnli)
{
......
This diff is collapsed.
......@@ -21,6 +21,9 @@
#include "qtbc.h"
#include <qlist.h>
#include <qdict.h>
#include <sys/types.h>
#include "lockingptr.h"
class FileDef;
class OutputList;
......@@ -64,9 +67,15 @@ class DefinitionIntf
/*! Types of derived classes */
enum DefType
{
TypeClass, TypeMember, TypeFile, TypeGroup,
TypeNamespace, TypePackage, TypePage, TypeDir,
TypeSymbolList
TypeClass = 0,
TypeFile = 1,
TypeNamespace = 2,
TypeMember = 3,
TypeGroup = 4,
TypePackage = 5,
TypePage = 6,
TypeDir = 7,
TypeSymbolList = 8
};
/*! Use this for dynamic inspection of the type of the derived class */
virtual DefType definitionType() const = 0;
......@@ -76,7 +85,7 @@ class DefinitionIntf
* This can be a class or a member function, or a file, or a namespace, etc.
* Use definitionType() to find which type of definition this is.
*/
class Definition : public DefinitionIntf
class Definition : public DefinitionIntf, public LockableObj
{
public:
......@@ -94,7 +103,7 @@ class Definition : public DefinitionIntf
//-----------------------------------------------------------------------------------
/*! Returns the name of the definition */
const QCString& name() const;
const QCString& name() const { return m_name; }
/*! Returns the local name without any scope qualifiers. */
QCString localName() const;
......@@ -200,22 +209,22 @@ class Definition : public DefinitionIntf
*/
FileDef *getBodyDef();
GroupList *partOfGroups() const;
LockingPtr<GroupList> partOfGroups() const;
const QList<ListItemInfo> *xrefListItems() const;
LockingPtr< QList<ListItemInfo> > xrefListItems() const;
virtual Definition *findInnerCompound(const char *name);
virtual Definition *getOuterScope() const;
MemberSDict *getReferencesMembers() const;
MemberSDict *getReferencedByMembers() const;
LockingPtr<MemberSDict> getReferencesMembers() const;
LockingPtr<MemberSDict> getReferencedByMembers() const;
//-----------------------------------------------------------------------------------
// ---- setters -----
//-----------------------------------------------------------------------------------
/*! Sets a new \a name for the definition */
void setName(const char *name);
void setName(const char *name) { m_name = name; }
/*! Sets the documentation of this definition to \a d. */
void setDocumentation(const char *d,const char *docFile,int docLine,bool stripWhiteSpace=TRUE);
......@@ -228,10 +237,6 @@ class Definition : public DefinitionIntf
/*! Sets the tag file id via which this definition was imported. */
void setReference(const char *r);
/*! Sets the name of this definition as it should appear in the symbol map.
*/
void setSymbolName(const QCString &name);
/*! Add the list of anchors that mark the sections that are found in the
* documentation.
*/
......@@ -271,19 +276,35 @@ class Definition : public DefinitionIntf
protected:
void setLocalName(const QCString name);
int getXRefListId(const char *listName) const;
void writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool);
virtual void flushToDisk() {}
virtual void loadFromDisk() {}
virtual void makeResident() { if (m_impl==0) loadFromDisk(); }
virtual bool isResident() const { return m_impl!=0; }
virtual void flushToDisk() const;
virtual void loadFromDisk() const;
void makeResident() const;
bool isResident() const
{
return m_cacheHandle!=-1;
}
private:
void lock() const;
void unlock() const;
static void addToMap(const char *name,Definition *d);
static void removeFromMap(Definition *d);
void saveToDisk() const;
void _setSymbolName(const QCString &name);
int _getXRefListId(const char *listName) const;
void _writeSourceRefList(OutputList &ol,const char *scopeName,
const QCString &text,MemberSDict *members,bool);
DefinitionImpl *m_impl; // internal structure holding all private data
uint64 m_storagePos; // location where the item is stored in file (if impl==0)
off_t m_storagePos; // location where the item is stored in file (if impl==0)
int m_cacheHandle;
QCString m_name;
bool m_flushPending;
bool m_isSymbol;
QCString m_symbolName;
};
......
......@@ -928,7 +928,7 @@ void TreeDiagram::drawConnectors(QTextStream &t,Image *image,
void clearVisitFlags()
{
ClassSDict::Iterator cli(Doxygen::classSDict);
ClassSDict::Iterator cli(*Doxygen::classSDict);
ClassDef *cd;
for (;(cd=cli.current());++cli)
{
......
......@@ -507,13 +507,13 @@ FilePair *UsedDir::findFilePair(const char *name)
DirDef *DirDef::createNewDir(const char *path)
{
ASSERT(path!=0);
DirDef *dir = Doxygen::directories.find(path);
DirDef *dir = Doxygen::directories->find(path);
if (dir==0) // new dir
{
//printf("Adding new dir %s\n",path);
dir = new DirDef(path);
//printf("createNewDir %s short=%s\n",path,dir->shortName().data());
Doxygen::directories.inSort(path,dir);
Doxygen::directories->inSort(path,dir);
}
return dir;
}
......@@ -781,7 +781,7 @@ void DirRelation::writeDocumentation(OutputList &ol)
void buildDirectories()
{
// for each input file
FileNameListIterator fnli(Doxygen::inputNameList);
FileNameListIterator fnli(*Doxygen::inputNameList);
FileName *fn;
for (fnli.toFirst();(fn=fnli.current());++fnli)
{
......@@ -793,7 +793,7 @@ void buildDirectories()
if (fd->getReference().isEmpty() && !fd->isDocumentationFile())
{
DirDef *dir;
if ((dir=Doxygen::directories.find(fd->getPath()))==0) // new directory
if ((dir=Doxygen::directories->find(fd->getPath()))==0) // new directory
{
dir = DirDef::mergeDirectoryInTree(fd->getPath());
}
......@@ -809,7 +809,7 @@ void buildDirectories()
//DirDef *root = new DirDef("root:");
// compute relations between directories => introduce container dirs.
DirDef *dir;
DirSDict::Iterator sdi(Doxygen::directories);
DirSDict::Iterator sdi(*Doxygen::directories);
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
//printf("New dir %s\n",dir->displayName().data());
......@@ -817,7 +817,7 @@ void buildDirectories()
int i=name.findRev('/',name.length()-2);
if (i>0)
{
DirDef *parent = Doxygen::directories.find(name.left(i+1));
DirDef *parent = Doxygen::directories->find(name.left(i+1));
//if (parent==0) parent=root;
if (parent)
{
......@@ -832,7 +832,7 @@ void buildDirectories()
void computeDirDependencies()
{
DirDef *dir;
DirSDict::Iterator sdi(Doxygen::directories);
DirSDict::Iterator sdi(*Doxygen::directories);
// compute nesting level for each directory
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
......@@ -877,7 +877,7 @@ void writeDirDependencyGraph(const char *dirName)
{
QString path;
DirDef *dir;
DirSDict::Iterator sdi(Doxygen::directories);
DirSDict::Iterator sdi(*Doxygen::directories);
QFile htmlPage(QCString(dirName)+"/dirdeps.html");
if (htmlPage.open(IO_WriteOnly))
{
......@@ -921,7 +921,7 @@ void writeDirDependencyGraph(const char *dirName)
void generateDirDocs(OutputList &ol)
{
DirDef *dir;
DirSDict::Iterator sdi(Doxygen::directories);
DirSDict::Iterator sdi(*Doxygen::directories);
for (sdi.toFirst();(dir=sdi.current());++sdi)
{
dir->writeDocumentation(ol);
......
......@@ -255,7 +255,7 @@ static void checkArgumentName(const QString &name,bool isParam)
{
if (!Config_getBool("WARN_IF_DOC_ERROR")) return;
if (g_memberDef==0) return; // not a member
ArgumentList *al=g_memberDef->isDocsForDefinition() ?
LockingPtr<ArgumentList> al=g_memberDef->isDocsForDefinition() ?
g_memberDef->argumentList() :
g_memberDef->declArgumentList();
if (al==0) return; // no argument list
......@@ -304,7 +304,7 @@ static void checkArgumentName(const QString &name,bool isParam)
"Warning: argument `%s' of command @param "
"is not found in the argument list of %s%s%s%s",
aName.data(),scope.data(),g_memberDef->name().data(),
argListToString(al).data(),inheritedFrom.data());
argListToString(al.pointer()).data(),inheritedFrom.data());
}
p=i+l;
}
......@@ -319,10 +319,10 @@ static void checkUndocumentedParams()
{
if (g_memberDef && g_hasParamCommand && Config_getBool("WARN_IF_DOC_ERROR"))
{
ArgumentList *al=g_memberDef->isDocsForDefinition() ?
LockingPtr<ArgumentList> al=g_memberDef->isDocsForDefinition() ?
g_memberDef->argumentList() :
g_memberDef->declArgumentList();
if (al)
if (al!=0)
{
ArgumentListIterator ali(*al);
Argument *a;
......@@ -342,7 +342,7 @@ static void checkUndocumentedParams()
QString errMsg=
"Warning: The following parameters of "+
QString(g_memberDef->qualifiedName()) +
QString(argListToString(al)) +
QString(argListToString(al.pointer())) +
" are not documented:\n";
for (ali.toFirst();(a=ali.current());++ali)
{
......@@ -374,8 +374,8 @@ static void detectNoDocumentedParams()
{
if (g_memberDef && Config_getBool("WARN_NO_PARAMDOC"))
{
ArgumentList *al = g_memberDef->argumentList();
ArgumentList *declAl = g_memberDef->declArgumentList();
LockingPtr<ArgumentList> al = g_memberDef->argumentList();
LockingPtr<ArgumentList> declAl = g_memberDef->declArgumentList();
QString returnType = g_memberDef->typeString();
if (!g_memberDef->hasDocumentedParams() &&
......@@ -388,7 +388,7 @@ static void detectNoDocumentedParams()
{
bool allDoc=TRUE; // no paramater => all parameters are documented
if ( // member has parameters
al && // but the member has a parameter list
al!=0 && // but the member has a parameter list
al->count()>0 // with at least one parameter (that is not void)
)
{
......@@ -405,7 +405,7 @@ static void detectNoDocumentedParams()
//printf("a->type=%s a->name=%s doc=%s\n",
// a->type.data(),a->name.data(),a->docs.data());
}
if (!allDoc && declAl) // try declaration arguments as well
if (!allDoc && declAl!=0) // try declaration arguments as well
{
allDoc=TRUE;
ArgumentListIterator ali(*declAl);
......@@ -595,7 +595,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
//printf("Trying fullName=`%s'\n",fullName.data());
// try class, namespace, group, page, file reference
cd = Doxygen::classSDict[fullName];
cd = Doxygen::classSDict->find(fullName);
if (cd) // class
{
*pDoc=cd->documentation();
......@@ -603,7 +603,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
*pDef=cd;
return TRUE;
}
nd = Doxygen::namespaceSDict[fullName];
nd = Doxygen::namespaceSDict->find(fullName);
if (nd) // namespace
{
*pDoc=nd->documentation();
......@@ -611,7 +611,7 @@ static bool findDocsForMemberOrCompound(const char *commandName,
*pDef=nd;
return TRUE;
}
gd = Doxygen::groupSDict[cmdArg];
gd = Doxygen::groupSDict->find(cmdArg);
if (gd) // group
{
*pDoc=gd->documentation();
......@@ -2048,6 +2048,15 @@ void DocRef::parse()
}
}
if (m_children.isEmpty() && !m_text.isEmpty())
{
g_insideHtmlLink=TRUE;
docParserPushContext();
internalValidatingParseDoc(this,m_children,m_text);
docParserPopContext();
g_insideHtmlLink=FALSE;
}
handlePendingStyleCommands(this,m_children);
DBG(("DocRef::parse() end\n"));
DocNode *n=g_nodeStack.pop();
......
......@@ -1260,10 +1260,10 @@ DotGfxHierarchyTable::DotGfxHierarchyTable()
// build a graph with each class as a node and the inheritance relations
// as edges
initClassHierarchy(&Doxygen::classSDict);
initClassHierarchy(&Doxygen::hiddenClasses);
addClassList(&Doxygen::classSDict);
addClassList(&Doxygen::hiddenClasses);
initClassHierarchy(Doxygen::classSDict);
initClassHierarchy(Doxygen::hiddenClasses);
addClassList(Doxygen::classSDict);
addClassList(Doxygen::hiddenClasses);
// m_usedNodes now contains all nodes in the graph
// color the graph into a set of independent subgraphs
......@@ -2359,8 +2359,8 @@ QCString DotCallGraph::writeGraph(QTextStream &out, GraphOutputFormat format,
void DotCallGraph::buildGraph(DotNode *n,MemberDef *md,int distance)
{
MemberSDict *refs = m_inverse ? md->getReferencedByMembers() : md->getReferencesMembers();
if (refs)
LockingPtr<MemberSDict> refs = m_inverse ? md->getReferencedByMembers() : md->getReferencesMembers();
if (!refs.isNull())
{
MemberSDict::Iterator mri(*refs);
MemberDef *rmd;
......@@ -2733,9 +2733,10 @@ void DotGroupCollaboration::buildGraph(GroupDef* gd,int)
// hierarchy.
// Write parents
if ( gd->partOfGroups() )
LockingPtr<GroupList> groups = gd->partOfGroups();
if ( groups!=0 )
{
GroupListIterator gli(*gd->partOfGroups());
GroupListIterator gli(*groups);
GroupDef *d;
for (gli.toFirst();(d=gli.current());++gli)
{
......
This diff is collapsed.
......@@ -43,6 +43,8 @@ class PageDef;
class SearchIndex;
class DirDef;
class ParserManager;
class ObjCache;
class Store;
typedef QList<QCString> StringList;
typedef QDict<FileDef> FileDict;
......@@ -73,8 +75,8 @@ extern QCString spaces;
class Doxygen
{
public:
static ClassSDict classSDict;
static ClassSDict hiddenClasses;
static ClassSDict *classSDict;
static ClassSDict *hiddenClasses;
static PageSDict *exampleSDict;
static PageSDict *pageSDict;
static PageDef *mainPage;
......@@ -82,20 +84,17 @@ class Doxygen
static FileNameDict *includeNameDict;
static FileNameDict *exampleNameDict;
static FileNameDict *inputNameDict;
static FileNameList inputNameList;
static FileNameList *inputNameList;
static FileNameDict *imageNameDict;
static FileNameDict *dotFileNameDict;
static QStrList tagfileList;
static MemberNameSDict memberNameSDict;
static MemberNameSDict functionNameSDict;
static FileList fileList;
static FileDict fileDict;
static ClassDef unrelatedClass;
static MemberNameSDict *memberNameSDict;
static MemberNameSDict *functionNameSDict;
static QTextStream tagFile;
static SectionDict sectionDict;
static StringDict namespaceAliasDict;
static GroupSDict groupSDict;
static NamespaceSDict namespaceSDict;
static GroupSDict *groupSDict;
static NamespaceSDict *namespaceSDict;
static FormulaList formulaList;
static FormulaDict formulaDict;
static FormulaDict formulaNameDict;
......@@ -114,10 +113,12 @@ class Doxygen
static bool outputToWizard;
static QDict<int> *htmlDirMap;
static QCache<LookupInfo> lookupCache;
static DirSDict directories;
static DirSDict *directories;
static SDict<DirRelation> dirRelations;
static ParserManager *parserManager;
static bool suppressDocWarnings;
static ObjCache *symbolCache;
static Store *symbolStorage;
};
void initDoxygen();
......
This diff is collapsed.
......@@ -21,10 +21,13 @@
#include "qtbc.h"
#include <qlist.h>
#include <qgstring.h>
struct SectionInfo;
class QFile;
class EntryNav;
class FileDef;
class FileStorage;
enum Protection { Public, Protected, Private, Package } ;
enum Specifier { Normal, Virtual, Pure } ;
......@@ -262,7 +265,7 @@ class Entry
~Entry();
int getSize();
void addSpecialListItem(const char *listName,int index);
void createNavigationIndex(EntryNav *rootNav,QFile &storage,FileDef *fd);
void createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef *fd);
// while parsing a file these function can be used to navigate/build the tree
void setParent(Entry *parent) { m_parent = parent; }
......@@ -300,8 +303,8 @@ class Entry
QCString bitfields; //!< member's bit fields
ArgumentList *argList; //!< member arguments as a list
QList<ArgumentList> *tArgLists; //!< template argument declarations
QCString program; //!< the program text
QCString initializer; //!< initial value (for variables)
QGString program; //!< the program text
QGString initializer; //!< initial value (for variables)
QCString includeFile; //!< include file (2 arg of \\class, must be unique)
QCString includeName; //!< include name (3 arg of \\class)
QCString doc; //!< documentation block (partly parsed)
......@@ -361,7 +364,7 @@ class Entry
}
private:
void createSubtreeIndex(EntryNav *nav,QFile &storage,FileDef *fd);
void createSubtreeIndex(EntryNav *nav,FileStorage *storage,FileDef *fd);
Entry *m_parent; //!< parent node in the tree
QList<Entry> *m_sublist; //!< entries that are children of this one
Entry &operator=(const Entry &);
......@@ -373,8 +376,8 @@ class EntryNav
EntryNav(EntryNav *parent,Entry *e);
~EntryNav();
void addChild(EntryNav *);
bool loadEntry(QFile &storage);
bool saveEntry(Entry *e,QFile &storage);
bool loadEntry(FileStorage *storage);
bool saveEntry(Entry *e,FileStorage *storage);
void setEntry(Entry *e);
void releaseEntry();
void changeSection(int section) { m_section = section; }
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -72,7 +72,8 @@ class HtmlGenerator : public OutputGenerator
void endIndexValue(const char *,bool);
void startItemList() { t << "<ul>" << endl; }
void endItemList() { t << "</ul>" << endl; }
void writeIndexItem(const char *ref,const char *file,const char *name);
void startIndexItem(const char *ref,const char *file);
void endIndexItem(const char *ref,const char *file);
void docify(const char *text);
void codify(const char *text);
void writeObjectLink(const char *ref,const char *file,
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment