|
Packit |
1c1d7e |
/******************************************************************************
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Copyright (C) 1997-2015 by Dimitri van Heesch.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Permission to use, copy, modify, and distribute this software and its
|
|
Packit |
1c1d7e |
* documentation under the terms of the GNU General Public License is hereby
|
|
Packit |
1c1d7e |
* granted. No representations are made about the suitability of this software
|
|
Packit |
1c1d7e |
* for any purpose. It is provided "as is" without express or implied warranty.
|
|
Packit |
1c1d7e |
* See the GNU General Public License for more details.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Documents produced by Doxygen are derivative works derived from the
|
|
Packit |
1c1d7e |
* input used in their production; they are not affected by this license.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#ifndef ENTRY_H
|
|
Packit |
1c1d7e |
#define ENTRY_H
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include "types.h"
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#include <qlist.h>
|
|
Packit |
1c1d7e |
#include <qgstring.h>
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
struct SectionInfo;
|
|
Packit |
1c1d7e |
class QFile;
|
|
Packit |
1c1d7e |
class EntryNav;
|
|
Packit |
1c1d7e |
class FileDef;
|
|
Packit |
1c1d7e |
class FileStorage;
|
|
Packit |
1c1d7e |
class StorageIntf;
|
|
Packit |
1c1d7e |
class ArgumentList;
|
|
Packit |
1c1d7e |
struct ListItemInfo;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** This class stores information about an inheritance relation
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
struct BaseInfo
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
/*! Creates an object representing an inheritance relation */
|
|
Packit |
1c1d7e |
BaseInfo(const char *n,Protection p,Specifier v) :
|
|
Packit |
1c1d7e |
name(n),prot(p),virt(v) {}
|
|
Packit |
1c1d7e |
QCString name; //!< the name of the base class
|
|
Packit |
1c1d7e |
Protection prot; //!< inheritance type
|
|
Packit |
1c1d7e |
Specifier virt; //!< virtualness
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** This struct is used to capture the tag file information
|
|
Packit |
1c1d7e |
* for an Entry.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
struct TagInfo
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
QCString tagName;
|
|
Packit |
1c1d7e |
QCString fileName;
|
|
Packit |
1c1d7e |
QCString anchor;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Represents an unstructured piece of information, about an
|
|
Packit |
1c1d7e |
* entity found in the sources.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* parseMain() in scanner.l will generate a tree of these
|
|
Packit |
1c1d7e |
* entries.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class Entry
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Kind of entries that are supported */
|
|
Packit |
1c1d7e |
enum Sections {
|
|
Packit |
1c1d7e |
CLASS_SEC = 0x00000001,
|
|
Packit |
1c1d7e |
NAMESPACE_SEC = 0x00000010,
|
|
Packit |
1c1d7e |
COMPOUND_MASK = CLASS_SEC,
|
|
Packit |
1c1d7e |
SCOPE_MASK = COMPOUND_MASK | NAMESPACE_SEC,
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
CLASSDOC_SEC = 0x00000800,
|
|
Packit |
1c1d7e |
STRUCTDOC_SEC = 0x00001000,
|
|
Packit |
1c1d7e |
UNIONDOC_SEC = 0x00002000,
|
|
Packit |
1c1d7e |
EXCEPTIONDOC_SEC = 0x00004000,
|
|
Packit |
1c1d7e |
NAMESPACEDOC_SEC = 0x00008000,
|
|
Packit |
1c1d7e |
INTERFACEDOC_SEC = 0x00010000,
|
|
Packit |
1c1d7e |
PROTOCOLDOC_SEC = 0x00020000,
|
|
Packit |
1c1d7e |
CATEGORYDOC_SEC = 0x00040000,
|
|
Packit |
1c1d7e |
SERVICEDOC_SEC = 0x00080000,
|
|
Packit |
1c1d7e |
SINGLETONDOC_SEC = 0x00100000,
|
|
Packit |
1c1d7e |
COMPOUNDDOC_MASK = CLASSDOC_SEC | STRUCTDOC_SEC | UNIONDOC_SEC |
|
|
Packit |
1c1d7e |
INTERFACEDOC_SEC | EXCEPTIONDOC_SEC | PROTOCOLDOC_SEC |
|
|
Packit |
1c1d7e |
CATEGORYDOC_SEC | SERVICEDOC_SEC | SINGLETONDOC_SEC,
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
SOURCE_SEC = 0x00400000,
|
|
Packit |
1c1d7e |
HEADER_SEC = 0x00800000,
|
|
Packit |
1c1d7e |
FILE_MASK = SOURCE_SEC | HEADER_SEC,
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
ENUMDOC_SEC = 0x01000000,
|
|
Packit |
1c1d7e |
ENUM_SEC = 0x02000000,
|
|
Packit |
1c1d7e |
EMPTY_SEC = 0x03000000,
|
|
Packit |
1c1d7e |
PAGEDOC_SEC = 0x04000000,
|
|
Packit |
1c1d7e |
VARIABLE_SEC = 0x05000000,
|
|
Packit |
1c1d7e |
FUNCTION_SEC = 0x06000000,
|
|
Packit |
1c1d7e |
TYPEDEF_SEC = 0x07000000,
|
|
Packit |
1c1d7e |
MEMBERDOC_SEC = 0x08000000,
|
|
Packit |
1c1d7e |
OVERLOADDOC_SEC = 0x09000000,
|
|
Packit |
1c1d7e |
EXAMPLE_SEC = 0x0a000000,
|
|
Packit |
1c1d7e |
VARIABLEDOC_SEC = 0x0b000000,
|
|
Packit |
1c1d7e |
FILEDOC_SEC = 0x0c000000,
|
|
Packit |
1c1d7e |
DEFINEDOC_SEC = 0x0d000000,
|
|
Packit |
1c1d7e |
INCLUDE_SEC = 0x0e000000,
|
|
Packit |
1c1d7e |
DEFINE_SEC = 0x0f000000,
|
|
Packit |
1c1d7e |
GROUPDOC_SEC = 0x10000000,
|
|
Packit |
1c1d7e |
USINGDIR_SEC = 0x11000000,
|
|
Packit |
1c1d7e |
MAINPAGEDOC_SEC = 0x12000000,
|
|
Packit |
1c1d7e |
MEMBERGRP_SEC = 0x13000000,
|
|
Packit |
1c1d7e |
USINGDECL_SEC = 0x14000000,
|
|
Packit |
1c1d7e |
PACKAGE_SEC = 0x15000000,
|
|
Packit |
1c1d7e |
PACKAGEDOC_SEC = 0x16000000,
|
|
Packit |
1c1d7e |
OBJCIMPL_SEC = 0x17000000,
|
|
Packit |
1c1d7e |
DIRDOC_SEC = 0x18000000
|
|
Packit |
1c1d7e |
,EXPORTED_INTERFACE_SEC = 0x19000000
|
|
Packit |
1c1d7e |
,INCLUDED_SERVICE_SEC = 0x1A000000
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
// class specifiers (add new items to the end)
|
|
Packit |
1c1d7e |
static const uint64 Template = (1ULL<<0);
|
|
Packit |
1c1d7e |
static const uint64 Generic = (1ULL<<1);
|
|
Packit |
1c1d7e |
static const uint64 Ref = (1ULL<<2);
|
|
Packit |
1c1d7e |
static const uint64 Value = (1ULL<<3);
|
|
Packit |
1c1d7e |
static const uint64 Interface = (1ULL<<4);
|
|
Packit |
1c1d7e |
static const uint64 Struct = (1ULL<<5);
|
|
Packit |
1c1d7e |
static const uint64 Union = (1ULL<<6);
|
|
Packit |
1c1d7e |
static const uint64 Exception = (1ULL<<7);
|
|
Packit |
1c1d7e |
static const uint64 Protocol = (1ULL<<8);
|
|
Packit |
1c1d7e |
static const uint64 Category = (1ULL<<9);
|
|
Packit |
1c1d7e |
static const uint64 SealedClass = (1ULL<<10);
|
|
Packit |
1c1d7e |
static const uint64 AbstractClass = (1ULL<<11);
|
|
Packit |
1c1d7e |
static const uint64 Enum = (1ULL<<12); // for Java-style enums
|
|
Packit |
1c1d7e |
static const uint64 Service = (1ULL<<13); // UNO IDL
|
|
Packit |
1c1d7e |
static const uint64 Singleton = (1ULL<<14); // UNO IDL
|
|
Packit |
1c1d7e |
static const uint64 ForwardDecl = (1ULL<<15); // forward declarad template classes
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
// member specifiers (add new items to the beginning)
|
|
Packit |
1c1d7e |
static const uint64 PrivateGettable = (1ULL<<20); // C# private getter
|
|
Packit |
1c1d7e |
static const uint64 ProtectedGettable = (1ULL<<21); // C# protected getter
|
|
Packit |
1c1d7e |
static const uint64 PrivateSettable = (1ULL<<22); // C# private setter
|
|
Packit |
1c1d7e |
static const uint64 ProtectedSettable = (1ULL<<23); // C# protected setter
|
|
Packit |
1c1d7e |
static const uint64 Inline = (1ULL<<24);
|
|
Packit |
1c1d7e |
static const uint64 Explicit = (1ULL<<25);
|
|
Packit |
1c1d7e |
static const uint64 Mutable = (1ULL<<26);
|
|
Packit |
1c1d7e |
static const uint64 Settable = (1ULL<<27);
|
|
Packit |
1c1d7e |
static const uint64 Gettable = (1ULL<<28);
|
|
Packit |
1c1d7e |
static const uint64 Readable = (1ULL<<29);
|
|
Packit |
1c1d7e |
static const uint64 Writable = (1ULL<<30);
|
|
Packit |
1c1d7e |
static const uint64 Final = (1ULL<<31);
|
|
Packit |
1c1d7e |
static const uint64 Abstract = (1ULL<<32);
|
|
Packit |
1c1d7e |
static const uint64 Addable = (1ULL<<33);
|
|
Packit |
1c1d7e |
static const uint64 Removable = (1ULL<<34);
|
|
Packit |
1c1d7e |
static const uint64 Raisable = (1ULL<<35);
|
|
Packit |
1c1d7e |
static const uint64 Override = (1ULL<<36);
|
|
Packit |
1c1d7e |
static const uint64 New = (1ULL<<37);
|
|
Packit |
1c1d7e |
static const uint64 Sealed = (1ULL<<38);
|
|
Packit |
1c1d7e |
static const uint64 Initonly = (1ULL<<39);
|
|
Packit |
1c1d7e |
static const uint64 Optional = (1ULL<<40);
|
|
Packit |
1c1d7e |
static const uint64 Required = (1ULL<<41);
|
|
Packit |
1c1d7e |
static const uint64 NonAtomic = (1ULL<<42);
|
|
Packit |
1c1d7e |
static const uint64 Copy = (1ULL<<43);
|
|
Packit |
1c1d7e |
static const uint64 Retain = (1ULL<<44);
|
|
Packit |
1c1d7e |
static const uint64 Assign = (1ULL<<45);
|
|
Packit |
1c1d7e |
static const uint64 Strong = (1ULL<<46);
|
|
Packit |
1c1d7e |
static const uint64 Weak = (1ULL<<47);
|
|
Packit |
1c1d7e |
static const uint64 Unretained = (1ULL<<48);
|
|
Packit |
1c1d7e |
static const uint64 Alias = (1ULL<<49);
|
|
Packit |
1c1d7e |
static const uint64 ConstExp = (1ULL<<50);
|
|
Packit |
1c1d7e |
static const uint64 Default = (1ULL<<51);
|
|
Packit |
1c1d7e |
static const uint64 Delete = (1ULL<<52);
|
|
Packit |
1c1d7e |
static const uint64 NoExcept = (1ULL<<53);
|
|
Packit |
1c1d7e |
static const uint64 Attribute = (1ULL<<54); // UNO IDL attribute
|
|
Packit |
1c1d7e |
static const uint64 Property = (1ULL<<55); // UNO IDL property
|
|
Packit |
1c1d7e |
static const uint64 Readonly = (1ULL<<56); // on UNO IDL attribute or property
|
|
Packit |
1c1d7e |
static const uint64 Bound = (1ULL<<57); // on UNO IDL attribute or property
|
|
Packit |
1c1d7e |
static const uint64 Constrained = (1ULL<<58); // on UNO IDL property
|
|
Packit |
1c1d7e |
static const uint64 Transient = (1ULL<<59); // on UNO IDL property
|
|
Packit |
1c1d7e |
static const uint64 MaybeVoid = (1ULL<<60); // on UNO IDL property
|
|
Packit |
1c1d7e |
static const uint64 MaybeDefault = (1ULL<<61); // on UNO IDL property
|
|
Packit |
1c1d7e |
static const uint64 MaybeAmbiguous = (1ULL<<62); // on UNO IDL property
|
|
Packit |
1c1d7e |
static const uint64 Published = (1ULL<<63); // UNO IDL keyword
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
enum GroupDocType
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
GROUPDOC_NORMAL, //!< defgroup
|
|
Packit |
1c1d7e |
GROUPDOC_ADD, //!< addgroup
|
|
Packit |
1c1d7e |
GROUPDOC_WEAK //!< weakgroup
|
|
Packit |
1c1d7e |
}; //!< kind of group
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
Entry();
|
|
Packit |
1c1d7e |
Entry(const Entry &);
|
|
Packit |
1c1d7e |
~Entry();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Returns the static size of the Entry (so excluding any dynamic memory) */
|
|
Packit |
1c1d7e |
int getSize();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
void addSpecialListItem(const char *listName,int index);
|
|
Packit |
1c1d7e |
void createNavigationIndex(EntryNav *rootNav,FileStorage *storage,FileDef *fd);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
// while parsing a file these function can be used to navigate/build the tree
|
|
Packit |
1c1d7e |
void setParent(Entry *parent) { m_parent = parent; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Returns the parent for this Entry or 0 if this entry has no parent. */
|
|
Packit |
1c1d7e |
Entry *parent() const { return m_parent; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Returns the list of children for this Entry
|
|
Packit |
1c1d7e |
* @see addSubEntry() and removeSubEntry()
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
const QList<Entry> *children() const { return m_sublist; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Adds entry \a e as a child to this entry */
|
|
Packit |
1c1d7e |
void addSubEntry (Entry* e) ;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Removes entry \a e from the list of children.
|
|
Packit |
1c1d7e |
* Returns a pointer to the entry or 0 if the entry was not a child.
|
|
Packit |
1c1d7e |
* Note the entry will not be deleted.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
Entry *removeSubEntry(Entry *e);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Restore the state of this Entry to the default value it has
|
|
Packit |
1c1d7e |
* at construction time.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
void reset();
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Serialize this entry to a persistent storage stream. */
|
|
Packit |
1c1d7e |
void marshall(StorageIntf *);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/*! Reinitialize this entry from a persistent storage stream. */
|
|
Packit |
1c1d7e |
void unmarshall(StorageIntf *);
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
// identification
|
|
Packit |
1c1d7e |
int section; //!< entry type (see Sections);
|
|
Packit |
1c1d7e |
QCString type; //!< member type
|
|
Packit |
1c1d7e |
QCString name; //!< member name
|
|
Packit |
1c1d7e |
TagInfo *tagInfo; //!< tag file info
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
// content
|
|
Packit |
1c1d7e |
Protection protection; //!< class protection
|
|
Packit |
1c1d7e |
MethodTypes mtype; //!< signal, slot, (dcop) method, or property?
|
|
Packit |
1c1d7e |
uint64 spec; //!< class/member specifiers
|
|
Packit |
1c1d7e |
int initLines; //!< define/variable initializer lines to show
|
|
Packit |
1c1d7e |
bool stat; //!< static ?
|
|
Packit |
1c1d7e |
bool explicitExternal; //!< explicitly defined as external?
|
|
Packit |
1c1d7e |
bool proto; //!< prototype ?
|
|
Packit |
1c1d7e |
bool subGrouping; //!< automatically group class members?
|
|
Packit |
1c1d7e |
bool callGraph; //!< do we need to draw the call graph?
|
|
Packit |
1c1d7e |
bool callerGraph; //!< do we need to draw the caller graph?
|
|
Packit |
1c1d7e |
Specifier virt; //!< virtualness of the entry
|
|
Packit |
1c1d7e |
QCString args; //!< member argument string
|
|
Packit |
1c1d7e |
QCString bitfields; //!< member's bit fields
|
|
Packit |
1c1d7e |
ArgumentList *argList; //!< member arguments as a list
|
|
Packit |
1c1d7e |
QList<ArgumentList> *tArgLists; //!< template argument declarations
|
|
Packit |
1c1d7e |
QGString program; //!< the program text
|
|
Packit |
1c1d7e |
QGString initializer; //!< initial value (for variables)
|
|
Packit |
1c1d7e |
QCString includeFile; //!< include file (2 arg of \\class, must be unique)
|
|
Packit |
1c1d7e |
QCString includeName; //!< include name (3 arg of \\class)
|
|
Packit |
1c1d7e |
QCString doc; //!< documentation block (partly parsed)
|
|
Packit |
1c1d7e |
int docLine; //!< line number at which the documentation was found
|
|
Packit |
1c1d7e |
QCString docFile; //!< file in which the documentation was found
|
|
Packit |
1c1d7e |
QCString brief; //!< brief description (doc block)
|
|
Packit |
1c1d7e |
int briefLine; //!< line number at which the brief desc. was found
|
|
Packit |
1c1d7e |
QCString briefFile; //!< file in which the brief desc. was found
|
|
Packit |
1c1d7e |
QCString inbodyDocs; //!< documentation inside the body of a function
|
|
Packit |
1c1d7e |
int inbodyLine; //!< line number at which the body doc was found
|
|
Packit |
1c1d7e |
QCString inbodyFile; //!< file in which the body doc was found
|
|
Packit |
1c1d7e |
QCString relates; //!< related class (doc block)
|
|
Packit |
1c1d7e |
RelatesType relatesType; //!< how relates is handled
|
|
Packit |
1c1d7e |
QCString read; //!< property read accessor
|
|
Packit |
1c1d7e |
QCString write; //!< property write accessor
|
|
Packit |
1c1d7e |
QCString inside; //!< name of the class in which documents are found
|
|
Packit |
1c1d7e |
QCString exception; //!< throw specification
|
|
Packit |
1c1d7e |
ArgumentList *typeConstr; //!< where clause (C#) for type constraints
|
|
Packit |
1c1d7e |
int bodyLine; //!< line number of the definition in the source
|
|
Packit |
1c1d7e |
int endBodyLine; //!< line number where the definition ends
|
|
Packit |
1c1d7e |
int mGrpId; //!< member group id
|
|
Packit |
1c1d7e |
QList<BaseInfo> *extends; //!< list of base classes
|
|
Packit |
1c1d7e |
QList<Grouping> *groups; //!< list of groups this entry belongs to
|
|
Packit |
1c1d7e |
QList<SectionInfo> *anchors; //!< list of anchors defined in this entry
|
|
Packit |
1c1d7e |
QCString fileName; //!< file this entry was extracted from
|
|
Packit |
1c1d7e |
int startLine; //!< start line of entry in the source
|
|
Packit |
1c1d7e |
int startColumn; //!< start column of entry in the source
|
|
Packit |
1c1d7e |
QList<ListItemInfo> *sli; //!< special lists (test/todo/bug/deprecated/..) this entry is in
|
|
Packit |
1c1d7e |
SrcLangExt lang; //!< programming language in which this entry was found
|
|
Packit |
1c1d7e |
bool hidden; //!< does this represent an entity that is hidden from the output
|
|
Packit |
1c1d7e |
bool artificial; //!< Artificially introduced item
|
|
Packit |
1c1d7e |
GroupDocType groupDocType;
|
|
Packit |
1c1d7e |
QCString id; //!< libclang id
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
static int num; //!< counts the total number of entries
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/// return the command name used to define GROUPDOC_SEC
|
|
Packit |
1c1d7e |
const char *groupDocCmd() const
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
switch( groupDocType )
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
case GROUPDOC_NORMAL: return "\\defgroup";
|
|
Packit |
1c1d7e |
case GROUPDOC_ADD: return "\\addgroup";
|
|
Packit |
1c1d7e |
case GROUPDOC_WEAK: return "\\weakgroup";
|
|
Packit |
1c1d7e |
default: return "unknown group command";
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
Grouping::GroupPri_t groupingPri() const
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
if( section != GROUPDOC_SEC )
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
return Grouping::GROUPING_LOWEST;
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
switch( groupDocType )
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
case GROUPDOC_NORMAL: return Grouping::GROUPING_AUTO_DEF;
|
|
Packit |
1c1d7e |
case GROUPDOC_ADD: return Grouping::GROUPING_AUTO_ADD;
|
|
Packit |
1c1d7e |
case GROUPDOC_WEAK: return Grouping::GROUPING_AUTO_WEAK;
|
|
Packit |
1c1d7e |
default: return Grouping::GROUPING_LOWEST;
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
}
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
void createSubtreeIndex(EntryNav *nav,FileStorage *storage,FileDef *fd);
|
|
Packit |
1c1d7e |
Entry *m_parent; //!< parent node in the tree
|
|
Packit |
1c1d7e |
QList<Entry> *m_sublist; //!< entries that are children of this one
|
|
Packit |
1c1d7e |
Entry &operator=(const Entry &);
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
/** Wrapper for a node in the Entry tree.
|
|
Packit |
1c1d7e |
*
|
|
Packit |
1c1d7e |
* Allows navigating through the Entry tree and load and storing Entry
|
|
Packit |
1c1d7e |
* objects persistently to disk.
|
|
Packit |
1c1d7e |
*/
|
|
Packit |
1c1d7e |
class EntryNav
|
|
Packit |
1c1d7e |
{
|
|
Packit |
1c1d7e |
public:
|
|
Packit |
1c1d7e |
EntryNav(EntryNav *parent,Entry *e);
|
|
Packit |
1c1d7e |
~EntryNav();
|
|
Packit |
1c1d7e |
void addChild(EntryNav *);
|
|
Packit |
1c1d7e |
bool loadEntry(FileStorage *storage);
|
|
Packit |
1c1d7e |
bool saveEntry(Entry *e,FileStorage *storage);
|
|
Packit |
1c1d7e |
void setEntry(Entry *e);
|
|
Packit |
1c1d7e |
void releaseEntry();
|
|
Packit |
1c1d7e |
void changeSection(int section) { m_section = section; }
|
|
Packit |
1c1d7e |
void setFileDef(FileDef *fd) { m_fileDef = fd; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
Entry *entry() const { return m_info; }
|
|
Packit |
1c1d7e |
int section() const { return m_section; }
|
|
Packit |
1c1d7e |
SrcLangExt lang() const { return m_lang; }
|
|
Packit |
1c1d7e |
const QCString &type() const { return m_type; }
|
|
Packit |
1c1d7e |
const QCString &name() const { return m_name; }
|
|
Packit |
1c1d7e |
TagInfo *tagInfo() const { return m_tagInfo; }
|
|
Packit |
1c1d7e |
const QList<EntryNav> *children() const { return m_subList; }
|
|
Packit |
1c1d7e |
EntryNav *parent() const { return m_parent; }
|
|
Packit |
1c1d7e |
FileDef *fileDef() const { return m_fileDef; }
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
private:
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
// navigation
|
|
Packit |
1c1d7e |
EntryNav *m_parent; //!< parent node in the tree
|
|
Packit |
1c1d7e |
QList<EntryNav> *m_subList; //!< entries that are children of this one
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
// identification
|
|
Packit |
1c1d7e |
int m_section; //!< entry type (see Sections);
|
|
Packit |
1c1d7e |
QCString m_type; //!< member type
|
|
Packit |
1c1d7e |
QCString m_name; //!< member name
|
|
Packit |
1c1d7e |
TagInfo *m_tagInfo; //!< tag file info
|
|
Packit |
1c1d7e |
FileDef *m_fileDef;
|
|
Packit |
1c1d7e |
SrcLangExt m_lang; //!< programming language in which this entry was found
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
Entry *m_info;
|
|
Packit |
1c1d7e |
int64 m_offset;
|
|
Packit |
1c1d7e |
bool m_noLoad;
|
|
Packit |
1c1d7e |
};
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
typedef QList<Entry> EntryList;
|
|
Packit |
1c1d7e |
typedef QListIterator<Entry> EntryListIterator;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
typedef QList<EntryNav> EntryNavList;
|
|
Packit |
1c1d7e |
typedef QListIterator<EntryNav> EntryNavListIterator;
|
|
Packit |
1c1d7e |
|
|
Packit |
1c1d7e |
#endif
|