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