qdoc: Changing InnerNode to Aggregate

An Aggregate node is a tree node that is not a leaf.

Change-Id: I4a3964865fb653a217ee75d0b21e563f7f990a1c
Task-number: QTBUG-45450
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
This commit is contained in:
Martin Smith 2015-04-13 11:45:03 +02:00
parent 16c32710bc
commit 1d91d155f2
25 changed files with 277 additions and 277 deletions

View File

@ -390,7 +390,7 @@ void CodeMarker::insert(FastSection &fastSection,
bool irrelevant = false; bool irrelevant = false;
bool inheritedMember = false; bool inheritedMember = false;
if (!node->relates()) { if (!node->relates()) {
InnerNode* p = node->parent(); Aggregate* p = node->parent();
if (p->isQmlPropertyGroup()) if (p->isQmlPropertyGroup())
p = p->parent(); p = p->parent();
if (p != fastSection.parent_) { if (p != fastSection.parent_) {
@ -440,7 +440,7 @@ void CodeMarker::insert(FastSection &fastSection,
if (node->parent()->isClass() || node->parent()->isNamespace()) { if (node->parent()->isClass() || node->parent()->isNamespace()) {
if (fastSection.inherited.isEmpty() if (fastSection.inherited.isEmpty()
|| fastSection.inherited.last().first != node->parent()) { || fastSection.inherited.last().first != node->parent()) {
QPair<InnerNode *, int> p(node->parent(), 0); QPair<Aggregate *, int> p(node->parent(), 0);
fastSection.inherited.append(p); fastSection.inherited.append(p);
} }
fastSection.inherited.last().second++; fastSection.inherited.last().second++;

View File

@ -64,7 +64,7 @@ struct Section
QStringList keys; QStringList keys;
NodeList members; NodeList members;
NodeList reimpMembers; NodeList reimpMembers;
QList<QPair<InnerNode *, int> > inherited; QList<QPair<Aggregate *, int> > inherited;
ClassKeysNodesList classKeysNodesList_; ClassKeysNodesList classKeysNodesList_;
Section() { } Section() { }
@ -83,7 +83,7 @@ struct Section
struct FastSection struct FastSection
{ {
const InnerNode *parent_; const Aggregate *parent_;
QString name; QString name;
QString divClass; QString divClass;
QString singularMember; QString singularMember;
@ -91,9 +91,9 @@ struct FastSection
QMultiMap<QString, Node *> memberMap; QMultiMap<QString, Node *> memberMap;
QMultiMap<QString, Node *> reimpMemberMap; QMultiMap<QString, Node *> reimpMemberMap;
ClassMapList classMapList_; ClassMapList classMapList_;
QList<QPair<InnerNode *, int> > inherited; QList<QPair<Aggregate *, int> > inherited;
FastSection(const InnerNode *parent, FastSection(const Aggregate *parent,
const QString& name0, const QString& name0,
const QString& divClass0, const QString& divClass0,
const QString& singularMember0, const QString& singularMember0,
@ -143,7 +143,7 @@ public:
virtual QString markedUpIncludes(const QStringList& includes) = 0; virtual QString markedUpIncludes(const QStringList& includes) = 0;
virtual QString functionBeginRegExp(const QString& funcName) = 0; virtual QString functionBeginRegExp(const QString& funcName) = 0;
virtual QString functionEndRegExp(const QString& funcName) = 0; virtual QString functionEndRegExp(const QString& funcName) = 0;
virtual QList<Section> sections(const InnerNode *inner, virtual QList<Section> sections(const Aggregate *inner,
SynopsisStyle style, SynopsisStyle style,
Status status) = 0; Status status) = 0;
virtual QList<Section> qmlSections(QmlTypeNode* qmlTypeNode, virtual QList<Section> qmlSections(QmlTypeNode* qmlTypeNode,

View File

@ -436,7 +436,7 @@ QString CppCodeMarker::functionEndRegExp(const QString& /* funcName */)
return "^\\}$"; return "^\\}$";
} }
QList<Section> CppCodeMarker::sections(const InnerNode *inner, QList<Section> CppCodeMarker::sections(const Aggregate *inner,
SynopsisStyle style, SynopsisStyle style,
Status status) Status status)
{ {
@ -522,10 +522,10 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
++r; ++r;
} }
QStack<const InnerNode *> stack; QStack<const Aggregate *> stack;
stack.push(inner); stack.push(inner);
while (!stack.isEmpty()) { while (!stack.isEmpty()) {
const InnerNode* ancestor = stack.pop(); const Aggregate* ancestor = stack.pop();
NodeList::ConstIterator c = ancestor->childNodes().constBegin(); NodeList::ConstIterator c = ancestor->childNodes().constBegin();
while (c != ancestor->childNodes().constEnd()) { while (c != ancestor->childNodes().constEnd()) {
@ -701,11 +701,11 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
else { else {
FastSection all(inner,QString(),QString(),"member","members"); FastSection all(inner,QString(),QString(),"member","members");
QStack<const InnerNode*> stack; QStack<const Aggregate*> stack;
stack.push(inner); stack.push(inner);
while (!stack.isEmpty()) { while (!stack.isEmpty()) {
const InnerNode* ancestor = stack.pop(); const Aggregate* ancestor = stack.pop();
NodeList::ConstIterator c = ancestor->childNodes().constBegin(); NodeList::ConstIterator c = ancestor->childNodes().constBegin();
while (c != ancestor->childNodes().constEnd()) { while (c != ancestor->childNodes().constEnd()) {
if ((*c)->access() != Node::Private && (*c)->type() != Node::Property) if ((*c)->access() != Node::Private && (*c)->type() != Node::Property)
@ -812,8 +812,8 @@ QList<Section> CppCodeMarker::sections(const InnerNode *inner,
if (!ns->orphans().isEmpty()) { if (!ns->orphans().isEmpty()) {
foreach (Node* n, ns->orphans()) { foreach (Node* n, ns->orphans()) {
// Use inner as a temporary parent when inserting orphans // Use inner as a temporary parent when inserting orphans
InnerNode* p = n->parent(); Aggregate* p = n->parent();
n->setParent(const_cast<InnerNode*>(inner)); n->setParent(const_cast<Aggregate*>(inner));
if (n->isClass()) if (n->isClass())
insert(classes, n, style, status); insert(classes, n, style, status);
else if (n->isNamespace()) else if (n->isNamespace())

View File

@ -67,7 +67,7 @@ public:
virtual QString markedUpIncludes(const QStringList& includes) Q_DECL_OVERRIDE; virtual QString markedUpIncludes(const QStringList& includes) Q_DECL_OVERRIDE;
virtual QString functionBeginRegExp(const QString& funcName) Q_DECL_OVERRIDE; virtual QString functionBeginRegExp(const QString& funcName) Q_DECL_OVERRIDE;
virtual QString functionEndRegExp(const QString& funcName) Q_DECL_OVERRIDE; virtual QString functionEndRegExp(const QString& funcName) Q_DECL_OVERRIDE;
virtual QList<Section> sections(const InnerNode *innerNode, virtual QList<Section> sections(const Aggregate *innerNode,
SynopsisStyle style, SynopsisStyle style,
Status status) Q_DECL_OVERRIDE; Status status) Q_DECL_OVERRIDE;
virtual QList<Section> qmlSections(QmlTypeNode* qmlTypeNode, virtual QList<Section> qmlSections(QmlTypeNode* qmlTypeNode,

View File

@ -422,7 +422,7 @@ Node* CppCodeParser::processTopicCommand(const Doc& doc,
lastPath_ = path; lastPath_ = path;
} }
else if (node->isInnerNode()) { else if (node->isAggregate()) {
if (type == Node::Namespace) { if (type == Node::Namespace) {
NamespaceNode* ns = static_cast<NamespaceNode*>(node); NamespaceNode* ns = static_cast<NamespaceNode*>(node);
ns->markSeen(); ns->markSeen();
@ -887,8 +887,8 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
{ {
QString arg = argLocPair.first; QString arg = argLocPair.first;
if (command == COMMAND_INHEADERFILE) { if (command == COMMAND_INHEADERFILE) {
if (node != 0 && node->isInnerNode()) { if (node != 0 && node->isAggregate()) {
((InnerNode *) node)->addInclude(arg); ((Aggregate *) node)->addInclude(arg);
} }
else { else {
doc.location().warning(tr("Ignored '\\%1'") doc.location().warning(tr("Ignored '\\%1'")
@ -943,7 +943,7 @@ void CppCodeParser::processOtherMetaCommand(const Doc& doc,
if (!n) if (!n)
doc.location().warning(tr("Cannot find '%1' in '\\%2'").arg(arg).arg(COMMAND_RELATES)); doc.location().warning(tr("Cannot find '%1' in '\\%2'").arg(arg).arg(COMMAND_RELATES));
else else
node->setRelates(static_cast<InnerNode*>(n)); node->setRelates(static_cast<Aggregate*>(n));
} }
else if (command == COMMAND_CONTENTSPAGE) { else if (command == COMMAND_CONTENTSPAGE) {
setLink(node, Node::ContentsLink, arg); setLink(node, Node::ContentsLink, arg);
@ -1348,7 +1348,7 @@ bool CppCodeParser::matchParameter(FunctionNode *func)
return true; return true;
} }
bool CppCodeParser::matchFunctionDecl(InnerNode *parent, bool CppCodeParser::matchFunctionDecl(Aggregate *parent,
QStringList *parentPathPtr, QStringList *parentPathPtr,
FunctionNode **funcPtr, FunctionNode **funcPtr,
const QString &templateStuff, const QString &templateStuff,
@ -1611,7 +1611,7 @@ bool CppCodeParser::matchBaseList(ClassNode *classe, bool isClass)
sufficient for Qt because there are no cases of class nesting more sufficient for Qt because there are no cases of class nesting more
than one level deep. than one level deep.
*/ */
bool CppCodeParser::matchClassDecl(InnerNode *parent, bool CppCodeParser::matchClassDecl(Aggregate *parent,
const QString &templateStuff) const QString &templateStuff)
{ {
bool isClass = (tok == Tok_class); bool isClass = (tok == Tok_class);
@ -1626,7 +1626,7 @@ bool CppCodeParser::matchClassDecl(InnerNode *parent,
if (tok == Tok_Gulbrandsen) { if (tok == Tok_Gulbrandsen) {
Node* n = parent->findChildNode(previousLexeme(),Node::Class); Node* n = parent->findChildNode(previousLexeme(),Node::Class);
if (n) { if (n) {
parent = static_cast<InnerNode*>(n); parent = static_cast<Aggregate*>(n);
if (parent) { if (parent) {
readToken(); readToken();
if (tok != Tok_Ident) if (tok != Tok_Ident)
@ -1668,7 +1668,7 @@ bool CppCodeParser::matchClassDecl(InnerNode *parent,
return matches; return matches;
} }
bool CppCodeParser::matchNamespaceDecl(InnerNode *parent) bool CppCodeParser::matchNamespaceDecl(Aggregate *parent)
{ {
readToken(); // skip 'namespace' readToken(); // skip 'namespace'
if (tok != Tok_Ident) if (tok != Tok_Ident)
@ -1707,7 +1707,7 @@ bool CppCodeParser::matchNamespaceDecl(InnerNode *parent)
member function is added to \a parent as an unresolved member function is added to \a parent as an unresolved
\c using clause. \c using clause.
*/ */
bool CppCodeParser::matchUsingDecl(InnerNode* parent) bool CppCodeParser::matchUsingDecl(Aggregate* parent)
{ {
bool usingNamespace = false; bool usingNamespace = false;
readToken(); // skip 'using' readToken(); // skip 'using'
@ -1769,7 +1769,7 @@ bool CppCodeParser::matchUsingDecl(InnerNode* parent)
return true; return true;
} }
bool CppCodeParser::matchEnumItem(InnerNode *parent, EnumNode *enume) bool CppCodeParser::matchEnumItem(Aggregate *parent, EnumNode *enume)
{ {
if (!match(Tok_Ident)) if (!match(Tok_Ident))
return false; return false;
@ -1820,7 +1820,7 @@ bool CppCodeParser::matchEnumItem(InnerNode *parent, EnumNode *enume)
return true; return true;
} }
bool CppCodeParser::matchEnumDecl(InnerNode *parent) bool CppCodeParser::matchEnumDecl(Aggregate *parent)
{ {
QString name; QString name;
@ -1851,7 +1851,7 @@ bool CppCodeParser::matchEnumDecl(InnerNode *parent)
return match(Tok_RightBrace) && match(Tok_Semicolon); return match(Tok_RightBrace) && match(Tok_Semicolon);
} }
bool CppCodeParser::matchTypedefDecl(InnerNode *parent) bool CppCodeParser::matchTypedefDecl(Aggregate *parent)
{ {
CodeChunk dataType; CodeChunk dataType;
QString name; QString name;
@ -1871,7 +1871,7 @@ bool CppCodeParser::matchTypedefDecl(InnerNode *parent)
return true; return true;
} }
bool CppCodeParser::matchProperty(InnerNode *parent) bool CppCodeParser::matchProperty(Aggregate *parent)
{ {
int expected_tok = Tok_LeftParen; int expected_tok = Tok_LeftParen;
if (match(Tok_Q_PRIVATE_PROPERTY)) { if (match(Tok_Q_PRIVATE_PROPERTY)) {
@ -1984,7 +1984,7 @@ bool CppCodeParser::matchProperty(InnerNode *parent)
/*! /*!
Parse a C++ declaration. Parse a C++ declaration.
*/ */
bool CppCodeParser::matchDeclList(InnerNode *parent) bool CppCodeParser::matchDeclList(Aggregate *parent)
{ {
ExtraFuncData extra; ExtraFuncData extra;
QString templateStuff; QString templateStuff;
@ -2251,15 +2251,15 @@ bool CppCodeParser::matchDocsAndStuff()
processOtherMetaCommands(*d, *n); processOtherMetaCommands(*d, *n);
(*n)->setDoc(*d); (*n)->setDoc(*d);
checkModuleInclusion(*n); checkModuleInclusion(*n);
if ((*n)->isInnerNode() && ((InnerNode *)*n)->includes().isEmpty()) { if ((*n)->isAggregate() && ((Aggregate *)*n)->includes().isEmpty()) {
InnerNode *m = static_cast<InnerNode *>(*n); Aggregate *m = static_cast<Aggregate *>(*n);
while (m->parent() && m->physicalModuleName().isEmpty()) { while (m->parent() && m->physicalModuleName().isEmpty()) {
m = m->parent(); m = m->parent();
} }
if (m == *n) if (m == *n)
((InnerNode *)*n)->addInclude((*n)->name()); ((Aggregate *)*n)->addInclude((*n)->name());
else else
((InnerNode *)*n)->setIncludes(m->includes()); ((Aggregate *)*n)->setIncludes(m->includes());
} }
++d; ++d;
++n; ++n;
@ -2341,7 +2341,7 @@ bool CppCodeParser::makeFunctionNode(const QString& signature,
*/ */
FunctionNode* CppCodeParser::makeFunctionNode(const Doc& doc, FunctionNode* CppCodeParser::makeFunctionNode(const Doc& doc,
const QString& sig, const QString& sig,
InnerNode* parent, Aggregate* parent,
Node::NodeType type, Node::NodeType type,
bool attached, bool attached,
QString qdoctag) QString qdoctag)

View File

@ -44,7 +44,7 @@ class ClassNode;
class CodeChunk; class CodeChunk;
class CppCodeParserPrivate; class CppCodeParserPrivate;
class FunctionNode; class FunctionNode;
class InnerNode; class Aggregate;
class Tokenizer; class Tokenizer;
class CppCodeParser : public CodeParser class CppCodeParser : public CodeParser
@ -52,12 +52,12 @@ class CppCodeParser : public CodeParser
Q_DECLARE_TR_FUNCTIONS(QDoc::CppCodeParser) Q_DECLARE_TR_FUNCTIONS(QDoc::CppCodeParser)
struct ExtraFuncData { struct ExtraFuncData {
InnerNode* root; // Used as the parent. Aggregate* root; // Used as the parent.
Node::NodeType type; // The node type: Function, etc. Node::NodeType type; // The node type: Function, etc.
bool isAttached; // If true, the method is attached. bool isAttached; // If true, the method is attached.
bool isMacro; // If true, we are parsing a macro signature. bool isMacro; // If true, we are parsing a macro signature.
ExtraFuncData() : root(0), type(Node::Function), isAttached(false), isMacro(false) { } ExtraFuncData() : root(0), type(Node::Function), isAttached(false), isMacro(false) { }
ExtraFuncData(InnerNode* r, Node::NodeType t, bool a) ExtraFuncData(Aggregate* r, Node::NodeType t, bool a)
: root(r), type(t), isAttached(a), isMacro(false) { } : root(r), type(t), isAttached(a), isMacro(false) { }
}; };
@ -117,22 +117,22 @@ protected:
bool matchTemplateHeader(); bool matchTemplateHeader();
bool matchDataType(CodeChunk *type, QString *var = 0); bool matchDataType(CodeChunk *type, QString *var = 0);
bool matchParameter(FunctionNode *func); bool matchParameter(FunctionNode *func);
bool matchFunctionDecl(InnerNode *parent, bool matchFunctionDecl(Aggregate *parent,
QStringList *parentPathPtr, QStringList *parentPathPtr,
FunctionNode **funcPtr, FunctionNode **funcPtr,
const QString &templateStuff, const QString &templateStuff,
ExtraFuncData& extra); ExtraFuncData& extra);
bool matchBaseSpecifier(ClassNode *classe, bool isClass); bool matchBaseSpecifier(ClassNode *classe, bool isClass);
bool matchBaseList(ClassNode *classe, bool isClass); bool matchBaseList(ClassNode *classe, bool isClass);
bool matchClassDecl(InnerNode *parent, bool matchClassDecl(Aggregate *parent,
const QString &templateStuff = QString()); const QString &templateStuff = QString());
bool matchNamespaceDecl(InnerNode *parent); bool matchNamespaceDecl(Aggregate *parent);
bool matchUsingDecl(InnerNode* parent); bool matchUsingDecl(Aggregate* parent);
bool matchEnumItem(InnerNode *parent, EnumNode *enume); bool matchEnumItem(Aggregate *parent, EnumNode *enume);
bool matchEnumDecl(InnerNode *parent); bool matchEnumDecl(Aggregate *parent);
bool matchTypedefDecl(InnerNode *parent); bool matchTypedefDecl(Aggregate *parent);
bool matchProperty(InnerNode *parent); bool matchProperty(Aggregate *parent);
bool matchDeclList(InnerNode *parent); bool matchDeclList(Aggregate *parent);
bool matchDocsAndStuff(); bool matchDocsAndStuff();
bool makeFunctionNode(const QString &synopsis, bool makeFunctionNode(const QString &synopsis,
QStringList *parentPathPtr, QStringList *parentPathPtr,
@ -140,7 +140,7 @@ protected:
ExtraFuncData& params); ExtraFuncData& params);
FunctionNode* makeFunctionNode(const Doc& doc, FunctionNode* makeFunctionNode(const Doc& doc,
const QString& sig, const QString& sig,
InnerNode* parent, Aggregate* parent,
Node::NodeType type, Node::NodeType type,
bool attached, bool attached,
QString qdoctag); QString qdoctag);

View File

@ -259,7 +259,7 @@ void Generator::writeOutFileNames()
Attaches a QTextStream to the created file, which is written Attaches a QTextStream to the created file, which is written
to all over the place using out(). to all over the place using out().
*/ */
void Generator::beginSubPage(const InnerNode* node, const QString& fileName) void Generator::beginSubPage(const Aggregate* node, const QString& fileName)
{ {
QString path = outputDir() + QLatin1Char('/'); QString path = outputDir() + QLatin1Char('/');
if (Generator::useOutputSubdirs() && !node->outputSubdirectory().isEmpty() && if (Generator::useOutputSubdirs() && !node->outputSubdirectory().isEmpty() &&
@ -281,7 +281,7 @@ void Generator::beginSubPage(const InnerNode* node, const QString& fileName)
out->setCodec(outputCodec); out->setCodec(outputCodec);
#endif #endif
outStreamStack.push(out); outStreamStack.push(out);
const_cast<InnerNode*>(node)->setOutputFileName(fileName); const_cast<Aggregate*>(node)->setOutputFileName(fileName);
} }
/*! /*!
@ -300,7 +300,7 @@ QString Generator::fileBase(const Node *node) const
{ {
if (node->relates()) if (node->relates())
node = node->relates(); node = node->relates();
else if (!node->isInnerNode()) else if (!node->isAggregate())
node = node->parent(); node = node->parent();
if (node->type() == Node::QmlPropertyGroup) { if (node->type() == Node::QmlPropertyGroup) {
node = node->parent(); node = node->parent();
@ -838,7 +838,7 @@ void Generator::generateBody(const Node *node, CodeMarker *marker)
} }
} }
void Generator::generateClassLikeNode(InnerNode* /* classe */, CodeMarker* /* marker */) void Generator::generateClassLikeNode(Aggregate* /* classe */, CodeMarker* /* marker */)
{ {
} }
@ -971,7 +971,7 @@ void Generator::generateInherits(const ClassNode *classe, CodeMarker *marker)
/*! /*!
Recursive writing of HTML files from the root \a node. Recursive writing of HTML files from the root \a node.
*/ */
void Generator::generateInnerNode(InnerNode* node) void Generator::generateAggregate(Aggregate* node)
{ {
if (!node->url().isNull()) if (!node->url().isNull())
return; return;
@ -1056,8 +1056,8 @@ void Generator::generateInnerNode(InnerNode* node)
int i = 0; int i = 0;
while (i < node->childNodes().count()) { while (i < node->childNodes().count()) {
Node *c = node->childNodes().at(i); Node *c = node->childNodes().at(i);
if (c->isInnerNode() && c->access() != Node::Private) { if (c->isAggregate() && c->access() != Node::Private) {
generateInnerNode((InnerNode*)c); generateAggregate((Aggregate*)c);
} }
++i; ++i;
} }
@ -1066,7 +1066,7 @@ void Generator::generateInnerNode(InnerNode* node)
/*! /*!
Generate a list of maintainers in the output Generate a list of maintainers in the output
*/ */
void Generator::generateMaintainerList(const InnerNode* node, CodeMarker* marker) void Generator::generateMaintainerList(const Aggregate* node, CodeMarker* marker)
{ {
QStringList sl = getMetadataElements(node,"maintainer"); QStringList sl = getMetadataElements(node,"maintainer");
@ -1205,19 +1205,19 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker)
break; break;
case Node::Deprecated: case Node::Deprecated:
text << Atom::ParaLeft; text << Atom::ParaLeft;
if (node->isInnerNode()) if (node->isAggregate())
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD); text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD);
text << "This " << typeString(node) << " is deprecated."; text << "This " << typeString(node) << " is deprecated.";
if (node->isInnerNode()) if (node->isAggregate())
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD); text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD);
text << Atom::ParaRight; text << Atom::ParaRight;
break; break;
case Node::Obsolete: case Node::Obsolete:
text << Atom::ParaLeft; text << Atom::ParaLeft;
if (node->isInnerNode()) if (node->isAggregate())
text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD); text << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD);
text << "This " << typeString(node) << " is obsolete."; text << "This " << typeString(node) << " is obsolete.";
if (node->isInnerNode()) if (node->isAggregate())
text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD); text << Atom(Atom::FormattingRight, ATOM_FORMATTING_BOLD);
text << " It is provided to keep old source code working. " text << " It is provided to keep old source code working. "
<< "We strongly advise against " << "We strongly advise against "
@ -1225,7 +1225,7 @@ void Generator::generateStatus(const Node *node, CodeMarker *marker)
break; break;
case Node::Compat: case Node::Compat:
// reimplemented in HtmlGenerator subclass // reimplemented in HtmlGenerator subclass
if (node->isInnerNode()) { if (node->isAggregate()) {
text << Atom::ParaLeft text << Atom::ParaLeft
<< Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD) << Atom(Atom::FormattingLeft, ATOM_FORMATTING_BOLD)
<< "This " << "This "
@ -1307,8 +1307,8 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker)
<< Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD) << Atom(Atom::FormattingRight,ATOM_FORMATTING_BOLD)
<< " "; << " ";
if (node->isInnerNode()) { if (node->isAggregate()) {
const InnerNode* innerNode = static_cast<const InnerNode*>(node); const Aggregate* innerNode = static_cast<const Aggregate*>(node);
text << "All functions in this " text << "All functions in this "
<< typeString(node) << typeString(node)
<< " are "; << " are ";
@ -1412,7 +1412,7 @@ void Generator::generateThreadSafeness(const Node *node, CodeMarker *marker)
*/ */
void Generator::generateDocs() void Generator::generateDocs()
{ {
generateInnerNode(qdb_->primaryTreeRoot()); generateAggregate(qdb_->primaryTreeRoot());
} }
Generator *Generator::generatorForFormat(const QString& format) Generator *Generator::generatorForFormat(const QString& format)
@ -1435,7 +1435,7 @@ Generator *Generator::generatorForFormat(const QString& format)
i.e. Once you call this function for a particular \a t, i.e. Once you call this function for a particular \a t,
you consume \a t. you consume \a t.
*/ */
QString Generator::getMetadataElement(const InnerNode* inner, const QString& t) QString Generator::getMetadataElement(const Aggregate* inner, const QString& t)
{ {
QString s; QString s;
QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap()); QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap());
@ -1456,7 +1456,7 @@ QString Generator::getMetadataElement(const InnerNode* inner, const QString& t)
having the key \a t are erased. i.e. Once you call this having the key \a t are erased. i.e. Once you call this
function for a particular \a t, you consume \a t. function for a particular \a t, you consume \a t.
*/ */
QStringList Generator::getMetadataElements(const InnerNode* inner, const QString& t) QStringList Generator::getMetadataElements(const Aggregate* inner, const QString& t)
{ {
QStringList s; QStringList s;
QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap()); QStringMultiMap& metaTagMap = const_cast<QStringMultiMap&>(inner->doc().metaTagMap());

View File

@ -105,7 +105,7 @@ public:
static QmlTypeNode* qmlTypeContext() { return qmlTypeContext_; } static QmlTypeNode* qmlTypeContext() { return qmlTypeContext_; }
protected: protected:
virtual void beginSubPage(const InnerNode* node, const QString& fileName); virtual void beginSubPage(const Aggregate* node, const QString& fileName);
virtual void endSubPage(); virtual void endSubPage();
virtual QString fileBase(const Node* node) const; virtual QString fileBase(const Node* node) const;
virtual QString fileExtension() const = 0; virtual QString fileExtension() const = 0;
@ -113,15 +113,15 @@ protected:
virtual void generateAlsoList(const Node *node, CodeMarker *marker); virtual void generateAlsoList(const Node *node, CodeMarker *marker);
virtual int generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker); virtual int generateAtom(const Atom *atom, const Node *relative, CodeMarker *marker);
virtual void generateBody(const Node *node, CodeMarker *marker); virtual void generateBody(const Node *node, CodeMarker *marker);
virtual void generateClassLikeNode(InnerNode* inner, CodeMarker* marker); virtual void generateClassLikeNode(Aggregate* inner, CodeMarker* marker);
virtual void generateQmlTypePage(QmlTypeNode* , CodeMarker* ) { } virtual void generateQmlTypePage(QmlTypeNode* , CodeMarker* ) { }
virtual void generateQmlBasicTypePage(QmlBasicTypeNode* , CodeMarker* ) { } virtual void generateQmlBasicTypePage(QmlBasicTypeNode* , CodeMarker* ) { }
virtual void generateDocumentNode(DocumentNode* dn, CodeMarker* marker); virtual void generateDocumentNode(DocumentNode* dn, CodeMarker* marker);
virtual void generateCollectionNode(CollectionNode* cn, CodeMarker* marker); virtual void generateCollectionNode(CollectionNode* cn, CodeMarker* marker);
virtual void generateInheritedBy(const ClassNode *classe, CodeMarker *marker); virtual void generateInheritedBy(const ClassNode *classe, CodeMarker *marker);
virtual void generateInherits(const ClassNode *classe, CodeMarker *marker); virtual void generateInherits(const ClassNode *classe, CodeMarker *marker);
virtual void generateInnerNode(InnerNode* node); virtual void generateAggregate(Aggregate* node);
virtual void generateMaintainerList(const InnerNode* node, CodeMarker* marker); virtual void generateMaintainerList(const Aggregate* node, CodeMarker* marker);
virtual void generateQmlInheritedBy(const QmlTypeNode* qcn, CodeMarker* marker); virtual void generateQmlInheritedBy(const QmlTypeNode* qcn, CodeMarker* marker);
virtual void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker); virtual void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker);
virtual bool generateQmlText(const Text& text, virtual bool generateQmlText(const Text& text,
@ -157,8 +157,8 @@ protected:
void generateSince(const Node *node, CodeMarker *marker); void generateSince(const Node *node, CodeMarker *marker);
void generateStatus(const Node *node, CodeMarker *marker); void generateStatus(const Node *node, CodeMarker *marker);
void generateThreadSafeness(const Node *node, CodeMarker *marker); void generateThreadSafeness(const Node *node, CodeMarker *marker);
QString getMetadataElement(const InnerNode* inner, const QString& t); QString getMetadataElement(const Aggregate* inner, const QString& t);
QStringList getMetadataElements(const InnerNode* inner, const QString& t); QStringList getMetadataElements(const Aggregate* inner, const QString& t);
QString indent(int level, const QString& markedCode); QString indent(int level, const QString& markedCode);
QTextStream& out(); QTextStream& out();
QString outFileName(); QString outFileName();

View File

@ -472,8 +472,8 @@ void HelpProjectWriter::generateSections(HelpProject &project,
if (!generateSection(project, writer, node)) if (!generateSection(project, writer, node))
return; return;
if (node->isInnerNode()) { if (node->isAggregate()) {
const InnerNode *inner = static_cast<const InnerNode *>(node); const Aggregate *inner = static_cast<const Aggregate *>(node);
// Ensure that we don't visit nodes more than once. // Ensure that we don't visit nodes more than once.
QMap<QString, const Node*> childMap; QMap<QString, const Node*> childMap;
@ -497,7 +497,7 @@ void HelpProjectWriter::generateSections(HelpProject &project,
because The Qml/Js Property Group is because The Qml/Js Property Group is
an actual documented thing. an actual documented thing.
*/ */
const InnerNode* inner = static_cast<const InnerNode*>(childNode); const Aggregate* inner = static_cast<const Aggregate*>(childNode);
foreach (const Node* n, inner->childNodes()) { foreach (const Node* n, inner->childNodes()) {
if (n->access() == Node::Private) if (n->access() == Node::Private)
continue; continue;

View File

@ -1336,7 +1336,7 @@ int HtmlGenerator::generateAtom(const Atom *atom, const Node *relative, CodeMark
/*! /*!
Generate a reference page for a C++ class or a C++ namespace. Generate a reference page for a C++ class or a C++ namespace.
*/ */
void HtmlGenerator::generateClassLikeNode(InnerNode* inner, CodeMarker* marker) void HtmlGenerator::generateClassLikeNode(Aggregate* inner, CodeMarker* marker)
{ {
QList<Section> sections; QList<Section> sections;
QList<Section>::ConstIterator s; QList<Section>::ConstIterator s;
@ -2086,7 +2086,7 @@ void HtmlGenerator::generateFooter(const Node *node)
Lists the required imports and includes in a table. Lists the required imports and includes in a table.
The number of rows is known, so this path is simpler than the generateSection() path. The number of rows is known, so this path is simpler than the generateSection() path.
*/ */
void HtmlGenerator::generateRequisites(InnerNode *inner, CodeMarker *marker) void HtmlGenerator::generateRequisites(Aggregate *inner, CodeMarker *marker)
{ {
QMap<QString, Text> requisites; QMap<QString, Text> requisites;
Text text; Text text;
@ -2358,7 +2358,7 @@ void HtmlGenerator::generateBrief(const Node *node, CodeMarker *marker,
} }
} }
void HtmlGenerator::generateIncludes(const InnerNode *inner, CodeMarker *marker) void HtmlGenerator::generateIncludes(const Aggregate *inner, CodeMarker *marker)
{ {
if (!inner->includes().isEmpty()) { if (!inner->includes().isEmpty()) {
out() << "<pre class=\"cpp\">" out() << "<pre class=\"cpp\">"
@ -2517,7 +2517,7 @@ void HtmlGenerator::generateSidebar() {
out() << "</div>\n"; out() << "</div>\n";
} }
QString HtmlGenerator::generateListOfAllMemberFile(const InnerNode *inner, QString HtmlGenerator::generateListOfAllMemberFile(const Aggregate *inner,
CodeMarker *marker) CodeMarker *marker)
{ {
QList<Section> sections; QList<Section> sections;
@ -2612,7 +2612,7 @@ QString HtmlGenerator::generateAllQmlMembersFile(QmlTypeNode* qml_cn, CodeMarker
return fileName; return fileName;
} }
QString HtmlGenerator::generateLowStatusMemberFile(InnerNode *inner, QString HtmlGenerator::generateLowStatusMemberFile(Aggregate *inner,
CodeMarker *marker, CodeMarker *marker,
CodeMarker::Status status) CodeMarker::Status status)
{ {
@ -3332,7 +3332,7 @@ void HtmlGenerator::generateSectionList(const Section& section,
void HtmlGenerator::generateSectionInheritedList(const Section& section, const Node *relative) void HtmlGenerator::generateSectionInheritedList(const Section& section, const Node *relative)
{ {
QList<QPair<InnerNode *, int> >::ConstIterator p = section.inherited.constBegin(); QList<QPair<Aggregate *, int> >::ConstIterator p = section.inherited.constBegin();
while (p != section.inherited.constEnd()) { while (p != section.inherited.constEnd()) {
out() << "<li class=\"fn\">"; out() << "<li class=\"fn\">";
out() << (*p).second << ' '; out() << (*p).second << ' ';
@ -3726,7 +3726,7 @@ QString HtmlGenerator::fileBase(const Node *node) const
result = Generator::fileBase(node); result = Generator::fileBase(node);
if (!node->isInnerNode()) { if (!node->isAggregate()) {
switch (node->status()) { switch (node->status()) {
case Node::Compat: case Node::Compat:
result += "-compat"; result += "-compat";
@ -3912,7 +3912,7 @@ QString HtmlGenerator::linkForNode(const Node *node, const Node *relative)
} }
QString link = fn; QString link = fn;
if (!node->isInnerNode() || node->isQmlPropertyGroup() || node->isJsPropertyGroup()) { if (!node->isAggregate() || node->isQmlPropertyGroup() || node->isJsPropertyGroup()) {
QString ref = refForNode(node); QString ref = refForNode(node);
if (relative && fn == fileName(relative) && ref == refForNode(relative)) if (relative && fn == fileName(relative) && ref == refForNode(relative))
return QString(); return QString();
@ -3963,7 +3963,7 @@ void HtmlGenerator::generateFullName(const Node *apparentNode, const Node *relat
} }
void HtmlGenerator::generateDetailedMember(const Node *node, void HtmlGenerator::generateDetailedMember(const Node *node,
const InnerNode *relative, const Aggregate *relative,
CodeMarker *marker) CodeMarker *marker)
{ {
const EnumNode *enume; const EnumNode *enume;
@ -4088,7 +4088,7 @@ void HtmlGenerator::generateStatus(const Node *node, CodeMarker *marker)
switch (node->status()) { switch (node->status()) {
case Node::Obsolete: case Node::Obsolete:
if (node->isInnerNode()) if (node->isAggregate())
Generator::generateStatus(node, marker); Generator::generateStatus(node, marker);
break; break;
case Node::Compat: case Node::Compat:
@ -4201,7 +4201,7 @@ void HtmlGenerator::generateQmlSummary(const Section& section,
on a QML element reference page. on a QML element reference page.
*/ */
void HtmlGenerator::generateDetailedQmlMember(Node *node, void HtmlGenerator::generateDetailedQmlMember(Node *node,
const InnerNode *relative, const Aggregate *relative,
CodeMarker *marker) CodeMarker *marker)
{ {
QmlPropertyNode* qpn = 0; QmlPropertyNode* qpn = 0;
@ -4702,7 +4702,7 @@ void HtmlGenerator::readManifestMetaContent(const Config &config)
subtype: QML class subtype: QML class
subtype: QML module subtype: QML module
*/ */
void HtmlGenerator::reportOrphans(const InnerNode* parent) void HtmlGenerator::reportOrphans(const Aggregate* parent)
{ {
const NodeList& children = parent->childNodes(); const NodeList& children = parent->childNodes();
if (children.size() == 0) if (children.size() == 0)
@ -4828,7 +4828,7 @@ QXmlStreamWriter& HtmlGenerator::xmlWriter()
It also ensures that a GUID map is created for the output file. It also ensures that a GUID map is created for the output file.
*/ */
void HtmlGenerator::beginDitamapPage(const InnerNode* node, const QString& fileName) void HtmlGenerator::beginDitamapPage(const Aggregate* node, const QString& fileName)
{ {
Generator::beginSubPage(node,fileName); Generator::beginSubPage(node,fileName);
QXmlStreamWriter* writer = new QXmlStreamWriter(out().device()); QXmlStreamWriter* writer = new QXmlStreamWriter(out().device());

View File

@ -95,7 +95,7 @@ protected:
virtual int generateAtom(const Atom *atom, virtual int generateAtom(const Atom *atom,
const Node *relative, const Node *relative,
CodeMarker *marker) Q_DECL_OVERRIDE; CodeMarker *marker) Q_DECL_OVERRIDE;
virtual void generateClassLikeNode(InnerNode* inner, CodeMarker* marker) Q_DECL_OVERRIDE; virtual void generateClassLikeNode(Aggregate* inner, CodeMarker* marker) Q_DECL_OVERRIDE;
virtual void generateQmlTypePage(QmlTypeNode* qcn, CodeMarker* marker) Q_DECL_OVERRIDE; virtual void generateQmlTypePage(QmlTypeNode* qcn, CodeMarker* marker) Q_DECL_OVERRIDE;
virtual void generateQmlBasicTypePage(QmlBasicTypeNode* qbtn, CodeMarker* marker) Q_DECL_OVERRIDE; virtual void generateQmlBasicTypePage(QmlBasicTypeNode* qbtn, CodeMarker* marker) Q_DECL_OVERRIDE;
virtual void generateDocumentNode(DocumentNode* dn, CodeMarker* marker) Q_DECL_OVERRIDE; virtual void generateDocumentNode(DocumentNode* dn, CodeMarker* marker) Q_DECL_OVERRIDE;
@ -137,22 +137,22 @@ private:
const Node *relative, const Node *relative,
CodeMarker *marker); CodeMarker *marker);
void generateFooter(const Node *node = 0); void generateFooter(const Node *node = 0);
void generateRequisites(InnerNode *inner, void generateRequisites(Aggregate *inner,
CodeMarker *marker); CodeMarker *marker);
void generateQmlRequisites(QmlTypeNode *qcn, void generateQmlRequisites(QmlTypeNode *qcn,
CodeMarker *marker); CodeMarker *marker);
void generateBrief(const Node *node, void generateBrief(const Node *node,
CodeMarker *marker, CodeMarker *marker,
const Node *relative = 0); const Node *relative = 0);
void generateIncludes(const InnerNode *inner, CodeMarker *marker); void generateIncludes(const Aggregate *inner, CodeMarker *marker);
void generateTableOfContents(const Node *node, void generateTableOfContents(const Node *node,
CodeMarker *marker, CodeMarker *marker,
QList<Section>* sections = 0); QList<Section>* sections = 0);
void generateSidebar(); void generateSidebar();
QString generateListOfAllMemberFile(const InnerNode *inner, QString generateListOfAllMemberFile(const Aggregate *inner,
CodeMarker *marker); CodeMarker *marker);
QString generateAllQmlMembersFile(QmlTypeNode* qml_cn, CodeMarker* marker); QString generateAllQmlMembersFile(QmlTypeNode* qml_cn, CodeMarker* marker);
QString generateLowStatusMemberFile(InnerNode *inner, QString generateLowStatusMemberFile(Aggregate *inner,
CodeMarker *marker, CodeMarker *marker,
CodeMarker::Status status); CodeMarker::Status status);
QString generateQmlMemberFile(QmlTypeNode* qcn, QString generateQmlMemberFile(QmlTypeNode* qcn,
@ -181,7 +181,7 @@ private:
CodeMarker *marker, CodeMarker *marker,
bool summary); bool summary);
void generateDetailedQmlMember(Node *node, void generateDetailedQmlMember(Node *node,
const InnerNode *relative, const Aggregate *relative,
CodeMarker *marker); CodeMarker *marker);
void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker) Q_DECL_OVERRIDE; void generateQmlInherits(QmlTypeNode* qcn, CodeMarker* marker) Q_DECL_OVERRIDE;
void generateQmlInstantiates(QmlTypeNode* qcn, CodeMarker* marker); void generateQmlInstantiates(QmlTypeNode* qcn, CodeMarker* marker);
@ -205,7 +205,7 @@ private:
void generateFullName(const Node *apparentNode, const Node *relative, const Node *actualNode = 0); void generateFullName(const Node *apparentNode, const Node *relative, const Node *actualNode = 0);
void generateDetailedMember(const Node *node, void generateDetailedMember(const Node *node,
const InnerNode *relative, const Aggregate *relative,
CodeMarker *marker); CodeMarker *marker);
void generateLink(const Atom *atom, CodeMarker *marker); void generateLink(const Atom *atom, CodeMarker *marker);
void generateStatus(const Node *node, CodeMarker *marker); void generateStatus(const Node *node, CodeMarker *marker);
@ -224,9 +224,9 @@ private:
void beginLink(const QString &link, const Node *node, const Node *relative); void beginLink(const QString &link, const Node *node, const Node *relative);
void endLink(); void endLink();
void generateExtractionMark(const Node *node, ExtractionMarkType markType); void generateExtractionMark(const Node *node, ExtractionMarkType markType);
void reportOrphans(const InnerNode* parent); void reportOrphans(const Aggregate* parent);
void beginDitamapPage(const InnerNode* node, const QString& fileName); void beginDitamapPage(const Aggregate* node, const QString& fileName);
void endDitamapPage(); void endDitamapPage();
void writeDitaMap(const DitaMapNode* node); void writeDitaMap(const DitaMapNode* node);
void writeDitaRefs(const DitaRefList& ditarefs); void writeDitaRefs(const DitaRefList& ditarefs);

View File

@ -200,7 +200,7 @@ void Node::setDoc(const Doc& doc, bool replace)
given \a parent and \a name. The new node is added to the given \a parent and \a name. The new node is added to the
parent's child list. parent's child list.
*/ */
Node::Node(NodeType type, InnerNode *parent, const QString& name) Node::Node(NodeType type, Aggregate *parent, const QString& name)
: nodeType_((unsigned char) type), : nodeType_((unsigned char) type),
access_((unsigned char) Public), access_((unsigned char) Public),
safeness_((unsigned char) UnspecifiedSafeness), safeness_((unsigned char) UnspecifiedSafeness),
@ -460,7 +460,7 @@ bool Node::fromFlagValue(FlagValue fv, bool defaultValue)
/*! /*!
Sets the pointer to the node that this node relates to. Sets the pointer to the node that this node relates to.
*/ */
void Node::setRelates(InnerNode *pseudoParent) void Node::setRelates(Aggregate *pseudoParent)
{ {
if (relatesTo_) { if (relatesTo_) {
relatesTo_->removeRelated(this); relatesTo_->removeRelated(this);
@ -683,14 +683,14 @@ const Node* Node::root() const
} }
/*! /*!
\class InnerNode \class Aggregate
*/ */
/*! /*!
The inner node destructor deletes the children and removes The inner node destructor deletes the children and removes
this node from its related nodes. this node from its related nodes.
*/ */
InnerNode::~InnerNode() Aggregate::~Aggregate()
{ {
deleteChildren(); deleteChildren();
removeFromRelated(); removeFromRelated();
@ -706,7 +706,7 @@ InnerNode::~InnerNode()
find all this node's children that have the given \a name, find all this node's children that have the given \a name,
and return the one that satisfies the \a genus requirement. and return the one that satisfies the \a genus requirement.
*/ */
Node *InnerNode::findChildNode(const QString& name, Node::Genus genus) const Node *Aggregate::findChildNode(const QString& name, Node::Genus genus) const
{ {
if (genus == Node::DontCare) { if (genus == Node::DontCare) {
Node *node = childMap.value(name); Node *node = childMap.value(name);
@ -716,7 +716,7 @@ Node *InnerNode::findChildNode(const QString& name, Node::Genus genus) const
for (int i=0; i<children_.size(); ++i) { for (int i=0; i<children_.size(); ++i) {
Node* n = children_.at(i); Node* n = children_.at(i);
if (n->isQmlPropertyGroup() || isJsPropertyGroup()) { if (n->isQmlPropertyGroup() || isJsPropertyGroup()) {
node = static_cast<InnerNode*>(n)->findChildNode(name, genus); node = static_cast<Aggregate*>(n)->findChildNode(name, genus);
if (node) if (node)
return node; return node;
} }
@ -740,7 +740,7 @@ Node *InnerNode::findChildNode(const QString& name, Node::Genus genus) const
Find all the child nodes of this node that are named Find all the child nodes of this node that are named
\a name and return them in \a nodes. \a name and return them in \a nodes.
*/ */
void InnerNode::findChildren(const QString& name, NodeList& nodes) const void Aggregate::findChildren(const QString& name, NodeList& nodes) const
{ {
nodes = childMap.values(name); nodes = childMap.values(name);
Node* n = primaryFunctionMap.value(name); Node* n = primaryFunctionMap.value(name);
@ -773,7 +773,7 @@ void InnerNode::findChildren(const QString& name, NodeList& nodes) const
with the specified \a name is found but it is not of the with the specified \a name is found but it is not of the
specified \a type, 0 is returned. specified \a type, 0 is returned.
*/ */
Node* InnerNode::findChildNode(const QString& name, NodeType type) Node* Aggregate::findChildNode(const QString& name, NodeType type)
{ {
if (type == Function) if (type == Function)
return primaryFunctionMap.value(name); return primaryFunctionMap.value(name);
@ -792,7 +792,7 @@ Node* InnerNode::findChildNode(const QString& name, NodeType type)
Find a function node that is a child of this nose, such Find a function node that is a child of this nose, such
that the function node has the specified \a name. that the function node has the specified \a name.
*/ */
FunctionNode *InnerNode::findFunctionNode(const QString& name) const FunctionNode *Aggregate::findFunctionNode(const QString& name) const
{ {
return static_cast<FunctionNode *>(primaryFunctionMap.value(name)); return static_cast<FunctionNode *>(primaryFunctionMap.value(name));
} }
@ -802,7 +802,7 @@ FunctionNode *InnerNode::findFunctionNode(const QString& name) const
that the function has the same name and signature as the that the function has the same name and signature as the
\a clone node. \a clone node.
*/ */
FunctionNode *InnerNode::findFunctionNode(const FunctionNode *clone) const FunctionNode *Aggregate::findFunctionNode(const FunctionNode *clone) const
{ {
QMap<QString,Node*>::ConstIterator c = primaryFunctionMap.constFind(clone->name()); QMap<QString,Node*>::ConstIterator c = primaryFunctionMap.constFind(clone->name());
if (c != primaryFunctionMap.constEnd()) { if (c != primaryFunctionMap.constEnd()) {
@ -825,7 +825,7 @@ FunctionNode *InnerNode::findFunctionNode(const FunctionNode *clone) const
/*! /*!
Returns the list of keys from the primary function map. Returns the list of keys from the primary function map.
*/ */
QStringList InnerNode::primaryKeys() QStringList Aggregate::primaryKeys()
{ {
QStringList t; QStringList t;
QMap<QString, Node*>::iterator i = primaryFunctionMap.begin(); QMap<QString, Node*>::iterator i = primaryFunctionMap.begin();
@ -839,7 +839,7 @@ QStringList InnerNode::primaryKeys()
/*! /*!
Returns the list of keys from the secondary function map. Returns the list of keys from the secondary function map.
*/ */
QStringList InnerNode::secondaryKeys() QStringList Aggregate::secondaryKeys()
{ {
QStringList t; QStringList t;
QMap<QString, NodeList>::iterator i = secondaryFunctionMap.begin(); QMap<QString, NodeList>::iterator i = secondaryFunctionMap.begin();
@ -852,7 +852,7 @@ QStringList InnerNode::secondaryKeys()
/*! /*!
*/ */
void InnerNode::setOverload(FunctionNode *func, bool b) void Aggregate::setOverload(FunctionNode *func, bool b)
{ {
Node *node = (Node *) func; Node *node = (Node *) func;
Node *&primary = primaryFunctionMap[func->name()]; Node *&primary = primaryFunctionMap[func->name()];
@ -887,7 +887,7 @@ void InnerNode::setOverload(FunctionNode *func, bool b)
Intermediate status, meaning that they should be ignored, Intermediate status, meaning that they should be ignored,
but not their children. but not their children.
*/ */
void InnerNode::makeUndocumentedChildrenInternal() void Aggregate::makeUndocumentedChildrenInternal()
{ {
foreach (Node *child, childNodes()) { foreach (Node *child, childNodes()) {
if (child->doc().isEmpty() && child->status() != Node::Intermediate) { if (child->doc().isEmpty() && child->status() != Node::Intermediate) {
@ -899,7 +899,7 @@ void InnerNode::makeUndocumentedChildrenInternal()
/*! /*!
*/ */
void InnerNode::normalizeOverloads() void Aggregate::normalizeOverloads()
{ {
QMap<QString, Node *>::Iterator p1 = primaryFunctionMap.begin(); QMap<QString, Node *>::Iterator p1 = primaryFunctionMap.begin();
while (p1 != primaryFunctionMap.end()) { while (p1 != primaryFunctionMap.end()) {
@ -949,15 +949,15 @@ void InnerNode::normalizeOverloads()
NodeList::ConstIterator c = childNodes().constBegin(); NodeList::ConstIterator c = childNodes().constBegin();
while (c != childNodes().constEnd()) { while (c != childNodes().constEnd()) {
if ((*c)->isInnerNode()) if ((*c)->isAggregate())
((InnerNode *) *c)->normalizeOverloads(); ((Aggregate *) *c)->normalizeOverloads();
++c; ++c;
} }
} }
/*! /*!
*/ */
void InnerNode::removeFromRelated() void Aggregate::removeFromRelated()
{ {
while (!related_.isEmpty()) { while (!related_.isEmpty()) {
Node *p = static_cast<Node *>(related_.takeFirst()); Node *p = static_cast<Node *>(related_.takeFirst());
@ -969,13 +969,13 @@ void InnerNode::removeFromRelated()
/*! /*!
Deletes all this node's children. Deletes all this node's children.
*/ */
void InnerNode::deleteChildren() void Aggregate::deleteChildren()
{ {
NodeList childrenCopy = children_; // `children_` will be changed in ~Node() NodeList childrenCopy = children_; // `children_` will be changed in ~Node()
qDeleteAll(childrenCopy); qDeleteAll(childrenCopy);
} }
/*! \fn bool InnerNode::isInnerNode() const /*! \fn bool Aggregate::isAggregate() const
Returns \c true because this is an inner node. Returns \c true because this is an inner node.
*/ */
@ -995,7 +995,7 @@ bool Node::isWrapper() const
no enum type node is found that has \a enumValue as one no enum type node is found that has \a enumValue as one
of its values. of its values.
*/ */
const EnumNode *InnerNode::findEnumNodeForValue(const QString &enumValue) const const EnumNode *Aggregate::findEnumNodeForValue(const QString &enumValue) const
{ {
foreach (const Node *node, enumChildren_) { foreach (const Node *node, enumChildren_) {
const EnumNode *en = static_cast<const EnumNode *>(node); const EnumNode *en = static_cast<const EnumNode *>(node);
@ -1010,7 +1010,7 @@ const EnumNode *InnerNode::findEnumNodeForValue(const QString &enumValue) const
in the list of overloaded functions for a class, such that in the list of overloaded functions for a class, such that
all the functions have the same name as the \a func. all the functions have the same name as the \a func.
*/ */
int InnerNode::overloadNumber(const FunctionNode *func) const int Aggregate::overloadNumber(const FunctionNode *func) const
{ {
Node *node = const_cast<FunctionNode *>(func); Node *node = const_cast<FunctionNode *>(func);
if (primaryFunctionMap[func->name()] == node) { if (primaryFunctionMap[func->name()] == node) {
@ -1025,7 +1025,7 @@ int InnerNode::overloadNumber(const FunctionNode *func) const
Returns a node list containing all the member functions of Returns a node list containing all the member functions of
some class such that the functions overload the name \a funcName. some class such that the functions overload the name \a funcName.
*/ */
NodeList InnerNode::overloads(const QString &funcName) const NodeList Aggregate::overloads(const QString &funcName) const
{ {
NodeList result; NodeList result;
Node *primary = primaryFunctionMap.value(funcName); Node *primary = primaryFunctionMap.value(funcName);
@ -1040,7 +1040,7 @@ NodeList InnerNode::overloads(const QString &funcName) const
Construct an inner node (i.e., not a leaf node) of the Construct an inner node (i.e., not a leaf node) of the
given \a type and having the given \a parent and \a name. given \a type and having the given \a parent and \a name.
*/ */
InnerNode::InnerNode(NodeType type, InnerNode *parent, const QString& name) Aggregate::Aggregate(NodeType type, Aggregate *parent, const QString& name)
: Node(type, parent, name) : Node(type, parent, name)
{ {
switch (type) { switch (type) {
@ -1057,7 +1057,7 @@ InnerNode::InnerNode(NodeType type, InnerNode *parent, const QString& name)
/*! /*!
Appends an \a include file to the list of include files. Appends an \a include file to the list of include files.
*/ */
void InnerNode::addInclude(const QString& include) void Aggregate::addInclude(const QString& include)
{ {
includes_.append(include); includes_.append(include);
} }
@ -1065,7 +1065,7 @@ void InnerNode::addInclude(const QString& include)
/*! /*!
Sets the list of include files to \a includes. Sets the list of include files to \a includes.
*/ */
void InnerNode::setIncludes(const QStringList& includes) void Aggregate::setIncludes(const QStringList& includes)
{ {
includes_ = includes; includes_ = includes;
} }
@ -1073,7 +1073,7 @@ void InnerNode::setIncludes(const QStringList& includes)
/*! /*!
f1 is always the clone f1 is always the clone
*/ */
bool InnerNode::isSameSignature(const FunctionNode *f1, const FunctionNode *f2) bool Aggregate::isSameSignature(const FunctionNode *f1, const FunctionNode *f2)
{ {
if (f1->parameters().count() != f2->parameters().count()) if (f1->parameters().count() != f2->parameters().count())
return false; return false;
@ -1111,7 +1111,7 @@ bool InnerNode::isSameSignature(const FunctionNode *f1, const FunctionNode *f2)
be necessary to update this node's internal collections and be necessary to update this node's internal collections and
the child's parent pointer and output subdirectory. the child's parent pointer and output subdirectory.
*/ */
void InnerNode::addChild(Node *child) void Aggregate::addChild(Node *child)
{ {
children_.append(child); children_.append(child);
if ((child->type() == Function) || (child->type() == QmlMethod)) { if ((child->type() == Function) || (child->type() == QmlMethod)) {
@ -1141,7 +1141,7 @@ void InnerNode::addChild(Node *child)
again, because it is presumed to already be there. We just again, because it is presumed to already be there. We just
want to be able to find the child by its \a title. want to be able to find the child by its \a title.
*/ */
void InnerNode::addChild(Node* child, const QString& title) void Aggregate::addChild(Node* child, const QString& title)
{ {
childMap.insertMulti(title, child); childMap.insertMulti(title, child);
} }
@ -1152,7 +1152,7 @@ void InnerNode::addChild(Node* child, const QString& title)
pointer is set to 0, but its output subdirectory is not pointer is set to 0, but its output subdirectory is not
changed. changed.
*/ */
void InnerNode::removeChild(Node *child) void Aggregate::removeChild(Node *child)
{ {
children_.removeAll(child); children_.removeAll(child);
enumChildren_.removeAll(child); enumChildren_.removeAll(child);
@ -1196,7 +1196,7 @@ void InnerNode::removeChild(Node *child)
/*! /*!
Recursively sets the output subdirectory for children Recursively sets the output subdirectory for children
*/ */
void InnerNode::setOutputSubdirectory(const QString &t) void Aggregate::setOutputSubdirectory(const QString &t)
{ {
Node::setOutputSubdirectory(t); Node::setOutputSubdirectory(t);
for (int i = 0; i < childNodes().size(); ++i) for (int i = 0; i < childNodes().size(); ++i)
@ -1259,7 +1259,7 @@ QString Node::physicalModuleName() const
/*! /*!
*/ */
void InnerNode::removeRelated(Node *pseudoChild) void Aggregate::removeRelated(Node *pseudoChild)
{ {
related_.removeAll(pseudoChild); related_.removeAll(pseudoChild);
} }
@ -1268,7 +1268,7 @@ void InnerNode::removeRelated(Node *pseudoChild)
If this node has a child that is a QML property named \a n, If this node has a child that is a QML property named \a n,
return the pointer to that child. return the pointer to that child.
*/ */
QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n) const QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n) const
{ {
foreach (Node* child, childNodes()) { foreach (Node* child, childNodes()) {
if (child->type() == Node::QmlProperty) { if (child->type() == Node::QmlProperty) {
@ -1289,7 +1289,7 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n) const
whose type (attached or normal property) matches \a attached, whose type (attached or normal property) matches \a attached,
return the pointer to that child. return the pointer to that child.
*/ */
QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) const QmlPropertyNode* Aggregate::hasQmlProperty(const QString& n, bool attached) const
{ {
foreach (Node* child, childNodes()) { foreach (Node* child, childNodes()) {
if (child->type() == Node::QmlProperty) { if (child->type() == Node::QmlProperty) {
@ -1309,7 +1309,7 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) cons
\class LeafNode \class LeafNode
*/ */
/*! \fn bool LeafNode::isInnerNode() const /*! \fn bool LeafNode::isAggregate() const
Returns \c false because this is a LeafNode. Returns \c false because this is a LeafNode.
*/ */
@ -1317,7 +1317,7 @@ QmlPropertyNode* InnerNode::hasQmlProperty(const QString& n, bool attached) cons
Constructs a leaf node named \a name of the specified Constructs a leaf node named \a name of the specified
\a type. The new leaf node becomes a child of \a parent. \a type. The new leaf node becomes a child of \a parent.
*/ */
LeafNode::LeafNode(NodeType type, InnerNode *parent, const QString& name) LeafNode::LeafNode(NodeType type, Aggregate *parent, const QString& name)
: Node(type, parent, name) : Node(type, parent, name)
{ {
switch (type) { switch (type) {
@ -1344,7 +1344,7 @@ LeafNode::LeafNode(NodeType type, InnerNode *parent, const QString& name)
documentation case where a \e{qmlproperty} command is used documentation case where a \e{qmlproperty} command is used
to override the QML definition of a QML property. to override the QML definition of a QML property.
*/ */
LeafNode::LeafNode(InnerNode* parent, NodeType type, const QString& name) LeafNode::LeafNode(Aggregate* parent, NodeType type, const QString& name)
: Node(type, 0, name) : Node(type, 0, name)
{ {
setParent(parent); setParent(parent);
@ -1372,8 +1372,8 @@ LeafNode::LeafNode(InnerNode* parent, NodeType type, const QString& name)
/*! /*!
Constructs a namespace node. Constructs a namespace node.
*/ */
NamespaceNode::NamespaceNode(InnerNode *parent, const QString& name) NamespaceNode::NamespaceNode(Aggregate *parent, const QString& name)
: InnerNode(Namespace, parent, name), seen_(false), tree_(0) : Aggregate(Namespace, parent, name), seen_(false), tree_(0)
{ {
setGenus(Node::CPP); setGenus(Node::CPP);
setPageType(ApiPage); setPageType(ApiPage);
@ -1387,8 +1387,8 @@ NamespaceNode::NamespaceNode(InnerNode *parent, const QString& name)
/*! /*!
Constructs a class node. A class node will generate an API page. Constructs a class node. A class node will generate an API page.
*/ */
ClassNode::ClassNode(InnerNode *parent, const QString& name) ClassNode::ClassNode(Aggregate *parent, const QString& name)
: InnerNode(Class, parent, name) : Aggregate(Class, parent, name)
{ {
abstract_ = false; abstract_ = false;
wrapper_ = false; wrapper_ = false;
@ -1582,8 +1582,8 @@ QmlTypeNode* ClassNode::findQmlBaseNode()
which specifies the type of DocumentNode. The page type for which specifies the type of DocumentNode. The page type for
the page index is set here. the page index is set here.
*/ */
DocumentNode::DocumentNode(InnerNode* parent, const QString& name, DocSubtype subtype, Node::PageType ptype) DocumentNode::DocumentNode(Aggregate* parent, const QString& name, DocSubtype subtype, Node::PageType ptype)
: InnerNode(Document, parent, name), nodeSubtype_(subtype) : Aggregate(Document, parent, name), nodeSubtype_(subtype)
{ {
setGenus(Node::DOC); setGenus(Node::DOC);
switch (subtype) { switch (subtype) {
@ -1667,7 +1667,7 @@ QString DocumentNode::subTitle() const
The constructor for the node representing an enum type The constructor for the node representing an enum type
has a \a parent class and an enum type \a name. has a \a parent class and an enum type \a name.
*/ */
EnumNode::EnumNode(InnerNode *parent, const QString& name) EnumNode::EnumNode(Aggregate *parent, const QString& name)
: LeafNode(Enum, parent, name), flagsType_(0) : LeafNode(Enum, parent, name), flagsType_(0)
{ {
setGenus(Node::CPP); setGenus(Node::CPP);
@ -1712,7 +1712,7 @@ QString EnumNode::itemValue(const QString &name) const
/*! /*!
*/ */
TypedefNode::TypedefNode(InnerNode *parent, const QString& name) TypedefNode::TypedefNode(Aggregate *parent, const QString& name)
: LeafNode(Typedef, parent, name), associatedEnum_(0) : LeafNode(Typedef, parent, name), associatedEnum_(0)
{ {
setGenus(Node::CPP); setGenus(Node::CPP);
@ -1793,7 +1793,7 @@ QString Parameter::reconstruct(bool value) const
Construct a function node for a C++ function. It's parent Construct a function node for a C++ function. It's parent
is \a parent, and it's name is \a name. is \a parent, and it's name is \a name.
*/ */
FunctionNode::FunctionNode(InnerNode *parent, const QString& name) FunctionNode::FunctionNode(Aggregate *parent, const QString& name)
: LeafNode(Function, parent, name), : LeafNode(Function, parent, name),
metaness_(Plain), metaness_(Plain),
virtualness_(NonVirtual), virtualness_(NonVirtual),
@ -1813,7 +1813,7 @@ FunctionNode::FunctionNode(InnerNode *parent, const QString& name)
by \a type. It's parent is \a parent, and it's name is \a name. by \a type. It's parent is \a parent, and it's name is \a name.
If \a attached is true, it is an attached method or signal. If \a attached is true, it is an attached method or signal.
*/ */
FunctionNode::FunctionNode(NodeType type, InnerNode *parent, const QString& name, bool attached) FunctionNode::FunctionNode(NodeType type, Aggregate *parent, const QString& name, bool attached)
: LeafNode(type, parent, name), : LeafNode(type, parent, name),
metaness_(Plain), metaness_(Plain),
virtualness_(NonVirtual), virtualness_(NonVirtual),
@ -2006,7 +2006,7 @@ void FunctionNode::debug() const
The constructor sets the \a parent and the \a name, but The constructor sets the \a parent and the \a name, but
everything else is set to default values. everything else is set to default values.
*/ */
PropertyNode::PropertyNode(InnerNode *parent, const QString& name) PropertyNode::PropertyNode(Aggregate *parent, const QString& name)
: LeafNode(Property, parent, name), : LeafNode(Property, parent, name),
stored_(FlagValueDefault), stored_(FlagValueDefault),
designable_(FlagValueDefault), designable_(FlagValueDefault),
@ -2079,8 +2079,8 @@ QMultiMap<QString,Node*> QmlTypeNode::inheritedBy;
Constructs a Qml class node. The new node has the given Constructs a Qml class node. The new node has the given
\a parent and \a name. \a parent and \a name.
*/ */
QmlTypeNode::QmlTypeNode(InnerNode *parent, const QString& name) QmlTypeNode::QmlTypeNode(Aggregate *parent, const QString& name)
: InnerNode(QmlType, parent, name), : Aggregate(QmlType, parent, name),
abstract_(false), abstract_(false),
cnodeRequired_(false), cnodeRequired_(false),
wrapper_(false), wrapper_(false),
@ -2194,9 +2194,9 @@ QString QmlTypeNode::logicalModuleIdentifier() const
Constructs a Qml basic type node. The new node has the given Constructs a Qml basic type node. The new node has the given
\a parent and \a name. \a parent and \a name.
*/ */
QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent, QmlBasicTypeNode::QmlBasicTypeNode(Aggregate *parent,
const QString& name) const QString& name)
: InnerNode(QmlBasicType, parent, name) : Aggregate(QmlBasicType, parent, name)
{ {
setTitle(name); setTitle(name);
setGenus(Node::QML); setGenus(Node::QML);
@ -2207,7 +2207,7 @@ QmlBasicTypeNode::QmlBasicTypeNode(InnerNode *parent,
always a QmlTypeNode. always a QmlTypeNode.
*/ */
QmlPropertyGroupNode::QmlPropertyGroupNode(QmlTypeNode* parent, const QString& name) QmlPropertyGroupNode::QmlPropertyGroupNode(QmlTypeNode* parent, const QString& name)
: InnerNode(QmlPropertyGroup, parent, name) : Aggregate(QmlPropertyGroup, parent, name)
{ {
idNumber_ = -1; idNumber_ = -1;
setGenus(Node::QML); setGenus(Node::QML);
@ -2230,7 +2230,7 @@ QString QmlPropertyGroupNode::idNumber()
/*! /*!
Constructor for the QML property node. Constructor for the QML property node.
*/ */
QmlPropertyNode::QmlPropertyNode(InnerNode* parent, QmlPropertyNode::QmlPropertyNode(Aggregate* parent,
const QString& name, const QString& name,
const QString& type, const QString& type,
bool attached) bool attached)
@ -2704,7 +2704,7 @@ QString Node::idForNode() const
Prints the inner node's list of children. Prints the inner node's list of children.
For debugging only. For debugging only.
*/ */
void InnerNode::printChildren(const QString& title) void Aggregate::printChildren(const QString& title)
{ {
qDebug() << title << name() << children_.size(); qDebug() << title << name() << children_.size();
if (children_.size() > 0) { if (children_.size() > 0) {

View File

@ -48,7 +48,7 @@ class Node;
class Tree; class Tree;
class EnumNode; class EnumNode;
class ClassNode; class ClassNode;
class InnerNode; class Aggregate;
class ExampleNode; class ExampleNode;
class TypedefNode; class TypedefNode;
class QmlTypeNode; class QmlTypeNode;
@ -176,14 +176,14 @@ public:
} }
void setThreadSafeness(ThreadSafeness t) { safeness_ = (unsigned char) t; } void setThreadSafeness(ThreadSafeness t) { safeness_ = (unsigned char) t; }
void setSince(const QString &since); void setSince(const QString &since);
void setRelates(InnerNode* pseudoParent); void setRelates(Aggregate* pseudoParent);
void setPhysicalModuleName(const QString &name) { physicalModuleName_ = name; } void setPhysicalModuleName(const QString &name) { physicalModuleName_ = name; }
void setUrl(const QString& url) { url_ = url; } void setUrl(const QString& url) { url_ = url; }
void setTemplateStuff(const QString &t) { templateStuff_ = t; } void setTemplateStuff(const QString &t) { templateStuff_ = t; }
void setReconstitutedBrief(const QString &t) { reconstitutedBrief_ = t; } void setReconstitutedBrief(const QString &t) { reconstitutedBrief_ = t; }
void setPageType(PageType t) { pageType_ = (unsigned char) t; } void setPageType(PageType t) { pageType_ = (unsigned char) t; }
void setPageType(const QString& t); void setPageType(const QString& t);
void setParent(InnerNode* n) { parent_ = n; } void setParent(Aggregate* n) { parent_ = n; }
void setIndexNodeFlag() { indexNodeFlag_ = true; } void setIndexNodeFlag() { indexNodeFlag_ = true; }
virtual void setOutputFileName(const QString& ) { } virtual void setOutputFileName(const QString& ) { }
@ -191,7 +191,7 @@ public:
bool isJsNode() const { return genus() == JS; } bool isJsNode() const { return genus() == JS; }
bool isCppNode() const { return genus() == CPP; } bool isCppNode() const { return genus() == CPP; }
virtual bool isInnerNode() const = 0; virtual bool isAggregate() const = 0;
virtual bool isCollectionNode() const { return false; } virtual bool isCollectionNode() const { return false; }
virtual bool isDocumentNode() const { return false; } virtual bool isDocumentNode() const { return false; }
virtual bool isGroup() const { return false; } virtual bool isGroup() const { return false; }
@ -257,9 +257,9 @@ public:
NodeType type() const { return (NodeType) nodeType_; } NodeType type() const { return (NodeType) nodeType_; }
virtual DocSubtype docSubtype() const { return NoSubtype; } virtual DocSubtype docSubtype() const { return NoSubtype; }
bool match(const NodeTypeList& types) const; bool match(const NodeTypeList& types) const;
InnerNode* parent() const { return parent_; } Aggregate* parent() const { return parent_; }
const Node* root() const; const Node* root() const;
InnerNode* relates() const { return relatesTo_; } Aggregate* relates() const { return relatesTo_; }
const QString& name() const { return name_; } const QString& name() const { return name_; }
QString physicalModuleName() const; QString physicalModuleName() const;
QString url() const { return url_; } QString url() const { return url_; }
@ -330,7 +330,7 @@ public:
static NodeType goal(const QString& t) { return goals_.value(t); } static NodeType goal(const QString& t) { return goals_.value(t); }
protected: protected:
Node(NodeType type, InnerNode* parent, const QString& name); Node(NodeType type, Aggregate* parent, const QString& name);
private: private:
@ -342,8 +342,8 @@ private:
unsigned char status_; unsigned char status_;
bool indexNodeFlag_; bool indexNodeFlag_;
InnerNode* parent_; Aggregate* parent_;
InnerNode* relatesTo_; Aggregate* relatesTo_;
QString name_; QString name_;
Location loc_; Location loc_;
Doc doc_; Doc doc_;
@ -361,10 +361,10 @@ private:
static QMap<QString,Node::NodeType> goals_; static QMap<QString,Node::NodeType> goals_;
}; };
class InnerNode : public Node class Aggregate : public Node
{ {
public: public:
virtual ~InnerNode(); virtual ~Aggregate();
Node* findChildNode(const QString& name, Node::Genus genus) const; Node* findChildNode(const QString& name, Node::Genus genus) const;
Node* findChildNode(const QString& name, NodeType type); Node* findChildNode(const QString& name, NodeType type);
@ -379,7 +379,7 @@ public:
void deleteChildren(); void deleteChildren();
void removeFromRelated(); void removeFromRelated();
virtual bool isInnerNode() const Q_DECL_OVERRIDE { return true; } virtual bool isAggregate() const Q_DECL_OVERRIDE { return true; }
virtual bool isLeaf() const Q_DECL_OVERRIDE { return false; } virtual bool isLeaf() const Q_DECL_OVERRIDE { return false; }
const EnumNode* findEnumNodeForValue(const QString &enumValue) const; const EnumNode* findEnumNodeForValue(const QString &enumValue) const;
const NodeList & childNodes() const { return children_; } const NodeList & childNodes() const { return children_; }
@ -407,7 +407,7 @@ public:
virtual void setOutputSubdirectory(const QString& t); virtual void setOutputSubdirectory(const QString& t);
protected: protected:
InnerNode(NodeType type, InnerNode* parent, const QString& name); Aggregate(NodeType type, Aggregate* parent, const QString& name);
private: private:
friend class Node; friend class Node;
@ -433,18 +433,18 @@ public:
LeafNode(); LeafNode();
virtual ~LeafNode() { } virtual ~LeafNode() { }
virtual bool isInnerNode() const Q_DECL_OVERRIDE { return false; } virtual bool isAggregate() const Q_DECL_OVERRIDE { return false; }
virtual bool isLeaf() const Q_DECL_OVERRIDE { return true; } virtual bool isLeaf() const Q_DECL_OVERRIDE { return true; }
protected: protected:
LeafNode(NodeType type, InnerNode* parent, const QString& name); LeafNode(NodeType type, Aggregate* parent, const QString& name);
LeafNode(InnerNode* parent, NodeType type, const QString& name); LeafNode(Aggregate* parent, NodeType type, const QString& name);
}; };
class NamespaceNode : public InnerNode class NamespaceNode : public Aggregate
{ {
public: public:
NamespaceNode(InnerNode* parent, const QString& name); NamespaceNode(Aggregate* parent, const QString& name);
virtual ~NamespaceNode() { } virtual ~NamespaceNode() { }
virtual bool isNamespace() const Q_DECL_OVERRIDE { return true; } virtual bool isNamespace() const Q_DECL_OVERRIDE { return true; }
virtual Tree* tree() const Q_DECL_OVERRIDE { return (parent() ? parent()->tree() : tree_); } virtual Tree* tree() const Q_DECL_OVERRIDE { return (parent() ? parent()->tree() : tree_); }
@ -492,10 +492,10 @@ struct UsingClause
QString signature_; QString signature_;
}; };
class ClassNode : public InnerNode class ClassNode : public Aggregate
{ {
public: public:
ClassNode(InnerNode* parent, const QString& name); ClassNode(Aggregate* parent, const QString& name);
virtual ~ClassNode() { } virtual ~ClassNode() { }
virtual bool isClass() const Q_DECL_OVERRIDE { return true; } virtual bool isClass() const Q_DECL_OVERRIDE { return true; }
virtual bool isWrapper() const Q_DECL_OVERRIDE { return wrapper_; } virtual bool isWrapper() const Q_DECL_OVERRIDE { return wrapper_; }
@ -538,11 +538,11 @@ private:
QmlTypeNode* qmlelement; QmlTypeNode* qmlelement;
}; };
class DocumentNode : public InnerNode class DocumentNode : public Aggregate
{ {
public: public:
DocumentNode(InnerNode* parent, DocumentNode(Aggregate* parent,
const QString& name, const QString& name,
DocSubtype docSubtype, DocSubtype docSubtype,
PageType ptype); PageType ptype);
@ -574,7 +574,7 @@ protected:
class ExampleNode : public DocumentNode class ExampleNode : public DocumentNode
{ {
public: public:
ExampleNode(InnerNode* parent, const QString& name) ExampleNode(Aggregate* parent, const QString& name)
: DocumentNode(parent, name, Node::Example, Node::ExamplePage) { } : DocumentNode(parent, name, Node::Example, Node::ExamplePage) { }
virtual ~ExampleNode() { } virtual ~ExampleNode() { }
virtual QString imageFileName() const Q_DECL_OVERRIDE { return imageFileName_; } virtual QString imageFileName() const Q_DECL_OVERRIDE { return imageFileName_; }
@ -604,10 +604,10 @@ struct ImportRec {
typedef QList<ImportRec> ImportList; typedef QList<ImportRec> ImportList;
class QmlTypeNode : public InnerNode class QmlTypeNode : public Aggregate
{ {
public: public:
QmlTypeNode(InnerNode* parent, const QString& name); QmlTypeNode(Aggregate* parent, const QString& name);
virtual ~QmlTypeNode(); virtual ~QmlTypeNode();
virtual bool isQmlType() const Q_DECL_OVERRIDE { return genus() == Node::QML; } virtual bool isQmlType() const Q_DECL_OVERRIDE { return genus() == Node::QML; }
virtual bool isJsType() const Q_DECL_OVERRIDE { return genus() == Node::JS; } virtual bool isJsType() const Q_DECL_OVERRIDE { return genus() == Node::JS; }
@ -659,17 +659,17 @@ private:
ImportList importList_; ImportList importList_;
}; };
class QmlBasicTypeNode : public InnerNode class QmlBasicTypeNode : public Aggregate
{ {
public: public:
QmlBasicTypeNode(InnerNode* parent, QmlBasicTypeNode(Aggregate* parent,
const QString& name); const QString& name);
virtual ~QmlBasicTypeNode() { } virtual ~QmlBasicTypeNode() { }
virtual bool isQmlBasicType() const Q_DECL_OVERRIDE { return (genus() == Node::QML); } virtual bool isQmlBasicType() const Q_DECL_OVERRIDE { return (genus() == Node::QML); }
virtual bool isJsBasicType() const Q_DECL_OVERRIDE { return (genus() == Node::JS); } virtual bool isJsBasicType() const Q_DECL_OVERRIDE { return (genus() == Node::JS); }
}; };
class QmlPropertyGroupNode : public InnerNode class QmlPropertyGroupNode : public Aggregate
{ {
public: public:
QmlPropertyGroupNode(QmlTypeNode* parent, const QString& name); QmlPropertyGroupNode(QmlTypeNode* parent, const QString& name);
@ -699,7 +699,7 @@ class QmlPropertyNode : public LeafNode
Q_DECLARE_TR_FUNCTIONS(QDoc::QmlPropertyNode) Q_DECLARE_TR_FUNCTIONS(QDoc::QmlPropertyNode)
public: public:
QmlPropertyNode(InnerNode *parent, QmlPropertyNode(Aggregate *parent,
const QString& name, const QString& name,
const QString& type, const QString& type,
bool attached); bool attached);
@ -767,7 +767,7 @@ private:
class EnumNode : public LeafNode class EnumNode : public LeafNode
{ {
public: public:
EnumNode(InnerNode* parent, const QString& name); EnumNode(Aggregate* parent, const QString& name);
virtual ~EnumNode() { } virtual ~EnumNode() { }
void addItem(const EnumItem& item); void addItem(const EnumItem& item);
@ -788,7 +788,7 @@ private:
class TypedefNode : public LeafNode class TypedefNode : public LeafNode
{ {
public: public:
TypedefNode(InnerNode* parent, const QString& name); TypedefNode(Aggregate* parent, const QString& name);
virtual ~TypedefNode() { } virtual ~TypedefNode() { }
const EnumNode* associatedEnum() const { return associatedEnum_; } const EnumNode* associatedEnum() const { return associatedEnum_; }
@ -851,8 +851,8 @@ public:
Native }; Native };
enum Virtualness { NonVirtual, NormalVirtual, PureVirtual }; enum Virtualness { NonVirtual, NormalVirtual, PureVirtual };
FunctionNode(InnerNode* parent, const QString &name); FunctionNode(Aggregate* parent, const QString &name);
FunctionNode(NodeType type, InnerNode* parent, const QString &name, bool attached); FunctionNode(NodeType type, Aggregate* parent, const QString &name, bool attached);
virtual ~FunctionNode() { } virtual ~FunctionNode() { }
void setReturnType(const QString& t) { returnType_ = t; } void setReturnType(const QString& t) { returnType_ = t; }
@ -928,7 +928,7 @@ public:
private: private:
void setAssociatedProperty(PropertyNode* property); void setAssociatedProperty(PropertyNode* property);
friend class InnerNode; friend class Aggregate;
friend class PropertyNode; friend class PropertyNode;
QString returnType_; QString returnType_;
@ -952,7 +952,7 @@ public:
enum FunctionRole { Getter, Setter, Resetter, Notifier }; enum FunctionRole { Getter, Setter, Resetter, Notifier };
enum { NumFunctionRoles = Notifier + 1 }; enum { NumFunctionRoles = Notifier + 1 };
PropertyNode(InnerNode* parent, const QString& name); PropertyNode(Aggregate* parent, const QString& name);
virtual ~PropertyNode() { } virtual ~PropertyNode() { }
virtual void setDataType(const QString& dataType) Q_DECL_OVERRIDE { type_ = dataType; } virtual void setDataType(const QString& dataType) Q_DECL_OVERRIDE { type_ = dataType; }
@ -1040,7 +1040,7 @@ inline NodeList PropertyNode::functions() const
class VariableNode : public LeafNode class VariableNode : public LeafNode
{ {
public: public:
VariableNode(InnerNode* parent, const QString &name); VariableNode(Aggregate* parent, const QString &name);
virtual ~VariableNode() { } virtual ~VariableNode() { }
void setLeftType(const QString &leftType) { lrftType_ = leftType; } void setLeftType(const QString &leftType) { lrftType_ = leftType; }
@ -1058,7 +1058,7 @@ private:
bool static_; bool static_;
}; };
inline VariableNode::VariableNode(InnerNode* parent, const QString &name) inline VariableNode::VariableNode(Aggregate* parent, const QString &name)
: LeafNode(Variable, parent, name), static_(false) : LeafNode(Variable, parent, name), static_(false)
{ {
setGenus(Node::CPP); setGenus(Node::CPP);
@ -1067,20 +1067,20 @@ inline VariableNode::VariableNode(InnerNode* parent, const QString &name)
class DitaMapNode : public DocumentNode class DitaMapNode : public DocumentNode
{ {
public: public:
DitaMapNode(InnerNode* parent, const QString& name) DitaMapNode(Aggregate* parent, const QString& name)
: DocumentNode(parent, name, Node::Page, Node::DitaMapPage) { } : DocumentNode(parent, name, Node::Page, Node::DitaMapPage) { }
virtual ~DitaMapNode() { } virtual ~DitaMapNode() { }
const DitaRefList& map() const { return doc().ditamap(); } const DitaRefList& map() const { return doc().ditamap(); }
}; };
class CollectionNode : public InnerNode class CollectionNode : public Aggregate
{ {
public: public:
CollectionNode(NodeType type, CollectionNode(NodeType type,
InnerNode* parent, Aggregate* parent,
const QString& name, const QString& name,
Genus genus) : InnerNode(type, parent, name), seen_(false) Genus genus) : Aggregate(type, parent, name), seen_(false)
{ {
setPageType(Node::OverviewPage); setPageType(Node::OverviewPage);
setGenus(genus); setGenus(genus);

View File

@ -109,7 +109,7 @@ QString PlainCodeMarker::functionEndRegExp( const QString& /* funcName */ )
return QString(); return QString();
} }
QList<Section> PlainCodeMarker::sections(const InnerNode * /* innerNode */, QList<Section> PlainCodeMarker::sections(const Aggregate * /* innerNode */,
SynopsisStyle /* style */, SynopsisStyle /* style */,
Status /* status */) Status /* status */)
{ {

View File

@ -61,7 +61,7 @@ public:
QString markedUpIncludes( const QStringList& includes ) Q_DECL_OVERRIDE; QString markedUpIncludes( const QStringList& includes ) Q_DECL_OVERRIDE;
QString functionBeginRegExp( const QString& funcName ) Q_DECL_OVERRIDE; QString functionBeginRegExp( const QString& funcName ) Q_DECL_OVERRIDE;
QString functionEndRegExp( const QString& funcName ) Q_DECL_OVERRIDE; QString functionEndRegExp( const QString& funcName ) Q_DECL_OVERRIDE;
QList<Section> sections(const InnerNode *innerNode, SynopsisStyle style, Status status) Q_DECL_OVERRIDE; QList<Section> sections(const Aggregate *innerNode, SynopsisStyle style, Status status) Q_DECL_OVERRIDE;
}; };
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -207,14 +207,14 @@ bool PureDocParser::processQdocComments()
processOtherMetaCommands(*d, *n); processOtherMetaCommands(*d, *n);
(*n)->setDoc(*d); (*n)->setDoc(*d);
checkModuleInclusion(*n); checkModuleInclusion(*n);
if ((*n)->isInnerNode() && ((InnerNode *)*n)->includes().isEmpty()) { if ((*n)->isAggregate() && ((Aggregate *)*n)->includes().isEmpty()) {
InnerNode *m = static_cast<InnerNode *>(*n); Aggregate *m = static_cast<Aggregate *>(*n);
while (m->parent() && m->parent() != treeRoot) while (m->parent() && m->parent() != treeRoot)
m = m->parent(); m = m->parent();
if (m == *n) if (m == *n)
((InnerNode *)*n)->addInclude((*n)->name()); ((Aggregate *)*n)->addInclude((*n)->name());
else else
((InnerNode *)*n)->setIncludes(m->includes()); ((Aggregate *)*n)->setIncludes(m->includes());
} }
++d; ++d;
++n; ++n;

View File

@ -815,7 +815,7 @@ void QDocDatabase::processForest()
mode, each tree is analyzed in turn, and its classes and mode, each tree is analyzed in turn, and its classes and
types are added to the appropriate node maps. types are added to the appropriate node maps.
*/ */
void QDocDatabase::processForest(void (QDocDatabase::*func) (InnerNode*)) void QDocDatabase::processForest(void (QDocDatabase::*func) (Aggregate*))
{ {
Tree* t = forest_.firstTree(); Tree* t = forest_.firstTree();
while (t) { while (t) {
@ -930,7 +930,7 @@ NodeMultiMap& QDocDatabase::getCppClasses()
Finds all the C++ class nodes and QML type nodes and Finds all the C++ class nodes and QML type nodes and
sorts them into maps. sorts them into maps.
*/ */
void QDocDatabase::findAllClasses(InnerNode* node) void QDocDatabase::findAllClasses(Aggregate* node)
{ {
NodeList::const_iterator c = node->childNodes().constBegin(); NodeList::const_iterator c = node->childNodes().constBegin();
while (c != node->childNodes().constEnd()) { while (c != node->childNodes().constEnd()) {
@ -957,8 +957,8 @@ void QDocDatabase::findAllClasses(InnerNode* node)
if ((*c)->isQmlBasicType() || (*c)->isJsType()) if ((*c)->isQmlBasicType() || (*c)->isJsType())
qmlBasicTypes_.insert(qmlTypeName,*c); qmlBasicTypes_.insert(qmlTypeName,*c);
} }
else if ((*c)->isInnerNode()) { else if ((*c)->isAggregate()) {
findAllClasses(static_cast<InnerNode*>(*c)); findAllClasses(static_cast<Aggregate*>(*c));
} }
} }
++c; ++c;
@ -978,13 +978,13 @@ NodeMapMap& QDocDatabase::getFunctionIndex()
/*! /*!
Finds all the function nodes Finds all the function nodes
*/ */
void QDocDatabase::findAllFunctions(InnerNode* node) void QDocDatabase::findAllFunctions(Aggregate* node)
{ {
NodeList::ConstIterator c = node->childNodes().constBegin(); NodeList::ConstIterator c = node->childNodes().constBegin();
while (c != node->childNodes().constEnd()) { while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) { if ((*c)->access() != Node::Private) {
if ((*c)->isInnerNode()) { if ((*c)->isAggregate()) {
findAllFunctions(static_cast<InnerNode*>(*c)); findAllFunctions(static_cast<Aggregate*>(*c));
} }
else if ((*c)->type() == Node::Function) { else if ((*c)->type() == Node::Function) {
const FunctionNode* func = static_cast<const FunctionNode*>(*c); const FunctionNode* func = static_cast<const FunctionNode*>(*c);
@ -1004,15 +1004,15 @@ void QDocDatabase::findAllFunctions(InnerNode* node)
Finds all the nodes containing legalese text and puts them Finds all the nodes containing legalese text and puts them
in a map. in a map.
*/ */
void QDocDatabase::findAllLegaleseTexts(InnerNode* node) void QDocDatabase::findAllLegaleseTexts(Aggregate* node)
{ {
NodeList::ConstIterator c = node->childNodes().constBegin(); NodeList::ConstIterator c = node->childNodes().constBegin();
while (c != node->childNodes().constEnd()) { while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private) { if ((*c)->access() != Node::Private) {
if (!(*c)->doc().legaleseText().isEmpty()) if (!(*c)->doc().legaleseText().isEmpty())
legaleseTexts_.insertMulti((*c)->doc().legaleseText(), *c); legaleseTexts_.insertMulti((*c)->doc().legaleseText(), *c);
if ((*c)->isInnerNode()) if ((*c)->isAggregate())
findAllLegaleseTexts(static_cast<InnerNode *>(*c)); findAllLegaleseTexts(static_cast<Aggregate *>(*c));
} }
++c; ++c;
} }
@ -1021,13 +1021,13 @@ void QDocDatabase::findAllLegaleseTexts(InnerNode* node)
/*! /*!
Finds all the namespace nodes and puts them in an index. Finds all the namespace nodes and puts them in an index.
*/ */
void QDocDatabase::findAllNamespaces(InnerNode* node) void QDocDatabase::findAllNamespaces(Aggregate* node)
{ {
NodeList::ConstIterator c = node->childNodes().constBegin(); NodeList::ConstIterator c = node->childNodes().constBegin();
while (c != node->childNodes().constEnd()) { while (c != node->childNodes().constEnd()) {
if ((*c)->access() != Node::Private || (*c)->isNamespace()) { if ((*c)->access() != Node::Private || (*c)->isNamespace()) {
if ((*c)->isInnerNode()) { if ((*c)->isAggregate()) {
findAllNamespaces(static_cast<InnerNode *>(*c)); findAllNamespaces(static_cast<Aggregate *>(*c));
if ((*c)->isNamespace()) { if ((*c)->isNamespace()) {
// Ensure that the namespace's name is not empty (the root // Ensure that the namespace's name is not empty (the root
// namespace has no name). // namespace has no name).
@ -1046,7 +1046,7 @@ void QDocDatabase::findAllNamespaces(InnerNode* node)
maps. They can be C++ classes, QML types, or they can be maps. They can be C++ classes, QML types, or they can be
functions, enum types, typedefs, methods, etc. functions, enum types, typedefs, methods, etc.
*/ */
void QDocDatabase::findAllObsoleteThings(InnerNode* node) void QDocDatabase::findAllObsoleteThings(Aggregate* node)
{ {
NodeList::const_iterator c = node->childNodes().constBegin(); NodeList::const_iterator c = node->childNodes().constBegin();
while (c != node->childNodes().constEnd()) { while (c != node->childNodes().constEnd()) {
@ -1067,7 +1067,7 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node)
} }
} }
else if ((*c)->type() == Node::Class) { else if ((*c)->type() == Node::Class) {
InnerNode* n = static_cast<InnerNode*>(*c); Aggregate* n = static_cast<Aggregate*>(*c);
bool inserted = false; bool inserted = false;
NodeList::const_iterator p = n->childNodes().constBegin(); NodeList::const_iterator p = n->childNodes().constBegin();
while (p != n->childNodes().constEnd()) { while (p != n->childNodes().constEnd()) {
@ -1096,7 +1096,7 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node)
} }
} }
else if ((*c)->isQmlType() || (*c)->isJsType()) { else if ((*c)->isQmlType() || (*c)->isJsType()) {
InnerNode* n = static_cast<InnerNode*>(*c); Aggregate* n = static_cast<Aggregate*>(*c);
bool inserted = false; bool inserted = false;
NodeList::const_iterator p = n->childNodes().constBegin(); NodeList::const_iterator p = n->childNodes().constBegin();
while (p != n->childNodes().constEnd()) { while (p != n->childNodes().constEnd()) {
@ -1127,8 +1127,8 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node)
++p; ++p;
} }
} }
else if ((*c)->isInnerNode()) { else if ((*c)->isAggregate()) {
findAllObsoleteThings(static_cast<InnerNode*>(*c)); findAllObsoleteThings(static_cast<Aggregate*>(*c));
} }
} }
++c; ++c;
@ -1143,7 +1143,7 @@ void QDocDatabase::findAllObsoleteThings(InnerNode* node)
This function is used for generating the "New Classes... in x.y" This function is used for generating the "New Classes... in x.y"
section on the \e{What's New in Qt x.y} page. section on the \e{What's New in Qt x.y} page.
*/ */
void QDocDatabase::findAllSince(InnerNode* node) void QDocDatabase::findAllSince(Aggregate* node)
{ {
NodeList::const_iterator child = node->childNodes().constBegin(); NodeList::const_iterator child = node->childNodes().constBegin();
while (child != node->childNodes().constEnd()) { while (child != node->childNodes().constEnd()) {
@ -1206,8 +1206,8 @@ void QDocDatabase::findAllSince(InnerNode* node)
} }
} }
// Recursively find child nodes with since commands. // Recursively find child nodes with since commands.
if ((*child)->isInnerNode()) if ((*child)->isAggregate())
findAllSince(static_cast<InnerNode *>(*child)); findAllSince(static_cast<Aggregate *>(*child));
++child; ++child;
} }
@ -1394,7 +1394,7 @@ const Node* QDocDatabase::findNodeForTarget(const QString& target, const Node* r
base type node. If the node is found in the tree, set the base type node. If the node is found in the tree, set the
node's QML base type node pointer. node's QML base type node pointer.
*/ */
void QDocDatabase::resolveQmlInheritance(InnerNode* root) void QDocDatabase::resolveQmlInheritance(Aggregate* root)
{ {
NodeMap previousSearches; NodeMap previousSearches;
// Do we need recursion? // Do we need recursion?

View File

@ -130,9 +130,9 @@ class QDocForest
return 0; return 0;
} }
InnerNode* findRelatesNode(const QStringList& path) { Aggregate* findRelatesNode(const QStringList& path) {
foreach (Tree* t, searchOrder()) { foreach (Tree* t, searchOrder()) {
InnerNode* n = t->findRelatesNode(path); Aggregate* n = t->findRelatesNode(path);
if (n) if (n)
return n; return n;
} }
@ -260,12 +260,12 @@ class QDocDatabase
QmlTypeNode* findQmlType(const ImportRec& import, const QString& name); QmlTypeNode* findQmlType(const ImportRec& import, const QString& name);
private: private:
void findAllClasses(InnerNode *node); void findAllClasses(Aggregate *node);
void findAllFunctions(InnerNode *node); void findAllFunctions(Aggregate *node);
void findAllLegaleseTexts(InnerNode *node); void findAllLegaleseTexts(Aggregate *node);
void findAllNamespaces(InnerNode *node); void findAllNamespaces(Aggregate *node);
void findAllObsoleteThings(InnerNode* node); void findAllObsoleteThings(Aggregate* node);
void findAllSince(InnerNode *node); void findAllSince(Aggregate *node);
public: public:
/******************************************************************* /*******************************************************************
@ -289,7 +289,7 @@ class QDocDatabase
Many of these will be either eliminated or replaced. Many of these will be either eliminated or replaced.
********************************************************************/ ********************************************************************/
void resolveInheritance() { primaryTree()->resolveInheritance(); } void resolveInheritance() { primaryTree()->resolveInheritance(); }
void resolveQmlInheritance(InnerNode* root); void resolveQmlInheritance(Aggregate* root);
void resolveIssues(); void resolveIssues();
void resolveStuff(); void resolveStuff();
void fixInheritance() { primaryTree()->fixInheritance(); } void fixInheritance() { primaryTree()->fixInheritance(); }
@ -327,7 +327,7 @@ class QDocDatabase
********************************************************************/ ********************************************************************/
ClassNode* findClassNode(const QStringList& path) { return forest_.findClassNode(path); } ClassNode* findClassNode(const QStringList& path) { return forest_.findClassNode(path); }
Node* findNodeForInclude(const QStringList& path) { return forest_.findNodeForInclude(path); } Node* findNodeForInclude(const QStringList& path) { return forest_.findNodeForInclude(path); }
InnerNode* findRelatesNode(const QStringList& path) { return forest_.findRelatesNode(path); } Aggregate* findRelatesNode(const QStringList& path) { return forest_.findRelatesNode(path); }
const Node* findFunctionNode(const QString& target, const Node* relative, Node::Genus genus) { const Node* findFunctionNode(const QString& target, const Node* relative, Node::Genus genus) {
return forest_.findFunctionNode(target, relative, genus); return forest_.findFunctionNode(target, relative, genus);
} }
@ -414,7 +414,7 @@ class QDocDatabase
Node::Genus genus) { Node::Genus genus) {
return forest_.findNode(path, relative, findFlags, genus); return forest_.findNode(path, relative, findFlags, genus);
} }
void processForest(void (QDocDatabase::*) (InnerNode*)); void processForest(void (QDocDatabase::*) (Aggregate*));
bool isLoaded(const QString& t) { return forest_.isLoaded(t); } bool isLoaded(const QString& t) { return forest_.isLoaded(t); }
static void initializeDB(); static void initializeDB();

View File

@ -172,9 +172,9 @@ void QDocIndexFiles::readIndexSection(const QDomElement& element,
QString href = element.attribute("href"); QString href = element.attribute("href");
Node* node; Node* node;
Location location; Location location;
InnerNode* parent = 0; Aggregate* parent = 0;
if (current->isInnerNode()) if (current->isAggregate())
parent = static_cast<InnerNode*>(current); parent = static_cast<Aggregate*>(current);
QString filePath; QString filePath;
int lineNo = 0; int lineNo = 0;
@ -937,7 +937,7 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
else else
href = node->name(); href = node->name();
if (node->isQmlNode() || node->isJsNode()) { if (node->isQmlNode() || node->isJsNode()) {
InnerNode* p = node->parent(); Aggregate* p = node->parent();
if (p) { if (p) {
if (p->isQmlPropertyGroup() || p->isJsPropertyGroup()) if (p->isQmlPropertyGroup() || p->isJsPropertyGroup())
p = p->parent(); p = p->parent();
@ -1349,8 +1349,8 @@ bool QDocIndexFiles::generateIndexSection(QXmlStreamWriter& writer,
// opening tag, create child elements, then add a closing tag for the // opening tag, create child elements, then add a closing tag for the
// element. Elements for all other nodes are closed in the opening tag. // element. Elements for all other nodes are closed in the opening tag.
if (node->isInnerNode()) { if (node->isAggregate()) {
const InnerNode* inner = static_cast<const InnerNode*>(node); const Aggregate* inner = static_cast<const Aggregate*>(node);
if (inner->doc().hasTableOfContents()) { if (inner->doc().hasTableOfContents()) {
for (int i = 0; i < inner->doc().tableOfContents().size(); ++i) { for (int i = 0; i < inner->doc().tableOfContents().size(); ++i) {
@ -1453,8 +1453,8 @@ void QDocIndexFiles::generateIndexSections(QXmlStreamWriter& writer,
return; return;
if (generateIndexSection(writer, node, generateInternalNodes)) { if (generateIndexSection(writer, node, generateInternalNodes)) {
if (node->isInnerNode()) { if (node->isAggregate()) {
const InnerNode* inner = static_cast<const InnerNode*>(node); const Aggregate* inner = static_cast<const Aggregate*>(node);
NodeList cnodes = inner->childNodes(); NodeList cnodes = inner->childNodes();
std::sort(cnodes.begin(), cnodes.end(), compareNodes); std::sort(cnodes.begin(), cnodes.end(), compareNodes);

View File

@ -100,7 +100,7 @@ void QDocTagFiles::destroyQDocTagFiles()
specified, returning true if an element was written; otherwise returns specified, returning true if an element was written; otherwise returns
false. false.
*/ */
void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const InnerNode* inner) void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const Aggregate* inner)
{ {
foreach (const Node* node, inner->childNodes()) { foreach (const Node* node, inner->childNodes()) {
if (!node->url().isEmpty()) if (!node->url().isEmpty())
@ -161,22 +161,22 @@ void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const Inne
} }
// Recurse to write all members. // Recurse to write all members.
generateTagFileMembers(writer, static_cast<const InnerNode*>(node)); generateTagFileMembers(writer, static_cast<const Aggregate*>(node));
writer.writeEndElement(); writer.writeEndElement();
// Recurse to write all compounds. // Recurse to write all compounds.
generateTagFileCompounds(writer, static_cast<const InnerNode*>(node)); generateTagFileCompounds(writer, static_cast<const Aggregate*>(node));
} }
else { else {
writer.writeTextElement("name", node->fullDocumentName()); writer.writeTextElement("name", node->fullDocumentName());
writer.writeTextElement("filename", gen_->fullDocumentLocation(node, false)); writer.writeTextElement("filename", gen_->fullDocumentLocation(node, false));
// Recurse to write all members. // Recurse to write all members.
generateTagFileMembers(writer, static_cast<const InnerNode*>(node)); generateTagFileMembers(writer, static_cast<const Aggregate*>(node));
writer.writeEndElement(); writer.writeEndElement();
// Recurse to write all compounds. // Recurse to write all compounds.
generateTagFileCompounds(writer, static_cast<const InnerNode*>(node)); generateTagFileCompounds(writer, static_cast<const Aggregate*>(node));
} }
} }
} }
@ -185,7 +185,7 @@ void QDocTagFiles::generateTagFileCompounds(QXmlStreamWriter& writer, const Inne
Writes all the members of the \a inner node with the \a writer. Writes all the members of the \a inner node with the \a writer.
The node represents a C++ class, namespace, etc. The node represents a C++ class, namespace, etc.
*/ */
void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inner) void QDocTagFiles::generateTagFileMembers(QXmlStreamWriter& writer, const Aggregate* inner)
{ {
foreach (const Node* node, inner->childNodes()) { foreach (const Node* node, inner->childNodes()) {
if (!node->url().isEmpty()) if (!node->url().isEmpty())

View File

@ -38,7 +38,7 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class InnerNode; class Aggregate;
class QDocDatabase; class QDocDatabase;
class Generator; class Generator;
@ -53,8 +53,8 @@ class QDocTagFiles
QDocTagFiles(); QDocTagFiles();
~QDocTagFiles(); ~QDocTagFiles();
void generateTagFileCompounds(QXmlStreamWriter& writer, const InnerNode* inner); void generateTagFileCompounds(QXmlStreamWriter& writer, const Aggregate* inner);
void generateTagFileMembers(QXmlStreamWriter& writer, const InnerNode* inner); void generateTagFileMembers(QXmlStreamWriter& writer, const Aggregate* inner);
void generateTagFile(const QString& fileName, Generator* g); void generateTagFile(const QString& fileName, Generator* g);
private: private:

View File

@ -196,7 +196,7 @@ bool QmlDocVisitor::applyDocumentation(QQmlJS::AST::SourceLocation location, Nod
const TopicList& topicsUsed = doc.topicsUsed(); const TopicList& topicsUsed = doc.topicsUsed();
NodeList nodes; NodeList nodes;
Node* nodePassedIn = node; Node* nodePassedIn = node;
InnerNode* parent = nodePassedIn->parent(); Aggregate* parent = nodePassedIn->parent();
node->setDoc(doc); node->setDoc(doc);
nodes.append(node); nodes.append(node);
if (topicsUsed.size() > 0) { if (topicsUsed.size() > 0) {

View File

@ -111,7 +111,7 @@ private:
QSet<QString> commands_; QSet<QString> commands_;
QSet<QString> topics_; QSet<QString> topics_;
QSet<quint32> usedComments; QSet<quint32> usedComments;
InnerNode *current; Aggregate *current;
}; };
QT_END_NAMESPACE QT_END_NAMESPACE

View File

@ -181,9 +181,9 @@ FunctionNode* Tree::findFunctionNode(const QStringList& parentPath, const Functi
parent = findClassNode(parentPath, 0); parent = findClassNode(parentPath, 0);
if (parent == 0) if (parent == 0)
parent = findNode(parentPath, 0, 0, Node::DontCare); parent = findNode(parentPath, 0, 0, Node::DontCare);
if (parent == 0 || !parent->isInnerNode()) if (parent == 0 || !parent->isAggregate())
return 0; return 0;
return ((const InnerNode*)parent)->findFunctionNode(clone); return ((const Aggregate*)parent)->findFunctionNode(clone);
} }
@ -249,22 +249,22 @@ const FunctionNode* Tree::findFunctionNode(const QStringList& path,
int i; int i;
for (i = 0; i < path.size(); ++i) { for (i = 0; i < path.size(); ++i) {
if (node == 0 || !node->isInnerNode()) if (node == 0 || !node->isAggregate())
break; break;
const Node* next; const Node* next;
if (i == path.size() - 1) if (i == path.size() - 1)
next = ((const InnerNode*) node)->findFunctionNode(path.at(i)); next = ((const Aggregate*) node)->findFunctionNode(path.at(i));
else else
next = ((const InnerNode*) node)->findChildNode(path.at(i), genus); next = ((const Aggregate*) node)->findChildNode(path.at(i), genus);
if (!next && node->isClass() && (findFlags & SearchBaseClasses)) { if (!next && node->isClass() && (findFlags & SearchBaseClasses)) {
NodeList baseClasses = allBaseClasses(static_cast<const ClassNode*>(node)); NodeList baseClasses = allBaseClasses(static_cast<const ClassNode*>(node));
foreach (const Node* baseClass, baseClasses) { foreach (const Node* baseClass, baseClasses) {
if (i == path.size() - 1) if (i == path.size() - 1)
next = static_cast<const InnerNode*>(baseClass)->findFunctionNode(path.at(i)); next = static_cast<const Aggregate*>(baseClass)->findFunctionNode(path.at(i));
else else
next = static_cast<const InnerNode*>(baseClass)->findChildNode(path.at(i), genus); next = static_cast<const Aggregate*>(baseClass)->findChildNode(path.at(i), genus);
if (next) if (next)
break; break;
@ -320,10 +320,10 @@ static const NodeTypeList& relatesTypes()
If a matching node is found, a pointer to it is returned. If a matching node is found, a pointer to it is returned.
Otherwise 0 is returned. Otherwise 0 is returned.
*/ */
InnerNode* Tree::findRelatesNode(const QStringList& path) Aggregate* Tree::findRelatesNode(const QStringList& path)
{ {
Node* n = findNodeRecursive(path, 0, root(), relatesTypes()); Node* n = findNodeRecursive(path, 0, root(), relatesTypes());
return ((n && n->isInnerNode()) ? static_cast<InnerNode*>(n) : 0); return ((n && n->isAggregate()) ? static_cast<Aggregate*>(n) : 0);
} }
/*! /*!
@ -344,7 +344,7 @@ void Tree::addPropertyFunction(PropertyNode* property,
This function does not resolve QML inheritance. This function does not resolve QML inheritance.
*/ */
void Tree::resolveInheritance(InnerNode* n) void Tree::resolveInheritance(Aggregate* n)
{ {
if (!n) if (!n)
n = root(); n = root();
@ -400,7 +400,7 @@ void Tree::resolveInheritanceHelper(int pass, ClassNode* cn)
node) using the unqualified base class name. node) using the unqualified base class name.
*/ */
if (!n) { if (!n) {
InnerNode* parent = cn->parent(); Aggregate* parent = cn->parent();
n = findClassNode((*b).path_, parent); n = findClassNode((*b).path_, parent);
} }
#endif #endif
@ -441,7 +441,7 @@ void Tree::resolveProperties()
propEntry = unresolvedPropertyMap.constBegin(); propEntry = unresolvedPropertyMap.constBegin();
while (propEntry != unresolvedPropertyMap.constEnd()) { while (propEntry != unresolvedPropertyMap.constEnd()) {
PropertyNode* property = propEntry.key(); PropertyNode* property = propEntry.key();
InnerNode* parent = property->parent(); Aggregate* parent = property->parent();
QString getterName = (*propEntry)[PropertyNode::Getter]; QString getterName = (*propEntry)[PropertyNode::Getter];
QString setterName = (*propEntry)[PropertyNode::Setter]; QString setterName = (*propEntry)[PropertyNode::Setter];
QString resetterName = (*propEntry)[PropertyNode::Resetter]; QString resetterName = (*propEntry)[PropertyNode::Resetter];
@ -621,7 +621,7 @@ Node* Tree::findNodeRecursive(const QStringList& path,
return 0; // premature leaf return 0; // premature leaf
} }
InnerNode* current = static_cast<InnerNode*>(node); Aggregate* current = static_cast<Aggregate*>(node);
const NodeList& children = current->childNodes(); const NodeList& children = current->childNodes();
const QString& name = path.at(pathIndex); const QString& name = path.at(pathIndex);
for (int i=0; i<children.size(); ++i) { for (int i=0; i<children.size(); ++i) {
@ -677,7 +677,7 @@ Node* Tree::findNodeRecursive(const QStringList& path,
if (pathIndex >= path.size()) if (pathIndex >= path.size())
return 0; return 0;
InnerNode* current = static_cast<InnerNode*>(start); Aggregate* current = static_cast<Aggregate*>(start);
const NodeList& children = current->childNodes(); const NodeList& children = current->childNodes();
for (int i=0; i<children.size(); ++i) { for (int i=0; i<children.size(); ++i) {
Node* n = children.at(i); Node* n = children.at(i);
@ -777,7 +777,7 @@ const Node* Tree::findNodeForTarget(const QStringList& path,
} }
while (current) { while (current) {
if (current->isInnerNode()) { if (current->isAggregate()) {
const Node* node = matchPathAndTarget(path, path_idx, target, current, flags, genus, ref); const Node* node = matchPathAndTarget(path, path_idx, target, current, flags, genus, ref);
if (node) if (node)
return node; return node;
@ -847,8 +847,8 @@ const Node* Tree::matchPathAndTarget(const QStringList& path,
return t; return t;
} }
if (target.isEmpty()) { if (target.isEmpty()) {
if ((idx) == (path.size()-1) && node->isInnerNode() && (flags & SearchEnumValues)) { if ((idx) == (path.size()-1) && node->isAggregate() && (flags & SearchEnumValues)) {
t = static_cast<const InnerNode*>(node)->findEnumNodeForValue(path.at(idx)); t = static_cast<const Aggregate*>(node)->findEnumNodeForValue(path.at(idx));
if (t) if (t)
return t; return t;
} }
@ -862,7 +862,7 @@ const Node* Tree::matchPathAndTarget(const QStringList& path,
return t; return t;
if (target.isEmpty()) { if (target.isEmpty()) {
if ((idx) == (path.size()-1) && (flags & SearchEnumValues)) { if ((idx) == (path.size()-1) && (flags & SearchEnumValues)) {
t = static_cast<const InnerNode*>(bc)->findEnumNodeForValue(path.at(idx)); t = static_cast<const Aggregate*>(bc)->findEnumNodeForValue(path.at(idx));
if (t) if (t)
return t; return t;
} }
@ -914,20 +914,20 @@ const Node* Tree::findNode(const QStringList& path,
} }
for (i = start_idx; i < path.size(); ++i) { for (i = start_idx; i < path.size(); ++i) {
if (node == 0 || !node->isInnerNode()) if (node == 0 || !node->isAggregate())
break; break;
const Node* next = static_cast<const InnerNode*>(node)->findChildNode(path.at(i), genus); const Node* next = static_cast<const Aggregate*>(node)->findChildNode(path.at(i), genus);
if (!next && (findFlags & SearchEnumValues) && i == path.size()-1) { if (!next && (findFlags & SearchEnumValues) && i == path.size()-1) {
next = static_cast<const InnerNode*>(node)->findEnumNodeForValue(path.at(i)); next = static_cast<const Aggregate*>(node)->findEnumNodeForValue(path.at(i));
} }
if (!next && ((genus == Node::CPP) || (genus == Node::DontCare)) && if (!next && ((genus == Node::CPP) || (genus == Node::DontCare)) &&
node->isClass() && (findFlags & SearchBaseClasses)) { node->isClass() && (findFlags & SearchBaseClasses)) {
NodeList baseClasses = allBaseClasses(static_cast<const ClassNode*>(node)); NodeList baseClasses = allBaseClasses(static_cast<const ClassNode*>(node));
foreach (const Node* baseClass, baseClasses) { foreach (const Node* baseClass, baseClasses) {
next = static_cast<const InnerNode*>(baseClass)->findChildNode(path.at(i), genus); next = static_cast<const Aggregate*>(baseClass)->findChildNode(path.at(i), genus);
if (!next && (findFlags & SearchEnumValues) && i == path.size() - 1) if (!next && (findFlags & SearchEnumValues) && i == path.size() - 1)
next = static_cast<const InnerNode*>(baseClass)->findEnumNodeForValue(path.at(i)); next = static_cast<const Aggregate*>(baseClass)->findEnumNodeForValue(path.at(i));
if (next) { if (next) {
break; break;
} }
@ -990,7 +990,7 @@ void Tree::insertTarget(const QString& name,
/*! /*!
*/ */
void Tree::resolveTargets(InnerNode* root) void Tree::resolveTargets(Aggregate* root)
{ {
// need recursion // need recursion
foreach (Node* child, root->childNodes()) { foreach (Node* child, root->childNodes()) {

View File

@ -135,21 +135,21 @@ class Tree
QmlTypeNode* findQmlTypeNode(const QStringList& path); QmlTypeNode* findQmlTypeNode(const QStringList& path);
Node* findNodeByNameAndType(const QStringList& path, Node::NodeType type) const; Node* findNodeByNameAndType(const QStringList& path, Node::NodeType type) const;
InnerNode* findRelatesNode(const QStringList& path); Aggregate* findRelatesNode(const QStringList& path);
QString getRef(const QString& target, const Node* node) const; QString getRef(const QString& target, const Node* node) const;
void insertTarget(const QString& name, void insertTarget(const QString& name,
const QString& title, const QString& title,
TargetRec::TargetType type, TargetRec::TargetType type,
Node* node, Node* node,
int priority); int priority);
void resolveTargets(InnerNode* root); void resolveTargets(Aggregate* root);
const Node* findUnambiguousTarget(const QString& target, QString& ref) const; const Node* findUnambiguousTarget(const QString& target, QString& ref) const;
const DocumentNode* findDocumentNodeByTitle(const QString& title) const; const DocumentNode* findDocumentNodeByTitle(const QString& title) const;
void addPropertyFunction(PropertyNode *property, void addPropertyFunction(PropertyNode *property,
const QString &funcName, const QString &funcName,
PropertyNode::FunctionRole funcRole); PropertyNode::FunctionRole funcRole);
void resolveInheritance(InnerNode* n = 0); void resolveInheritance(Aggregate* n = 0);
void resolveInheritanceHelper(int pass, ClassNode* cn); void resolveInheritanceHelper(int pass, ClassNode* cn);
void resolveProperties(); void resolveProperties();
void resolveCppToQmlLinks(); void resolveCppToQmlLinks();