Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

Tree Class

 #include <Tree>

Public Types

enum FindFlag { SearchBaseClasses, SearchEnumValues, NonFunction }

Public Functions

Tree()
~Tree()
void addBaseClass(ClassNode * subclass, Node::Access access, const QStringList & basePath, const QString & dataTypeWithTemplateArgs, InnerNode * parent = 0)
void addExternalLink(const QString & url, const Node * relative)
void addPropertyFunction(PropertyNode * property, const QString & funcName, PropertyNode::FunctionRole funcRole)
void addToGroup(Node * node, const QString & group)
void addToPublicGroup(Node * node, const QString & group)
void addToQmlModule(Node * node)
NameCollisionNode * checkForCollision(const QString & name) const
ClassNode * findClassNode(const QStringList & path, Node * start = 0)
NameCollisionNode * findCollisionNode(const QString & name) const
EnumNode * findEnumNode(const QStringList & path, Node * start = 0)
const FakeNode * findFakeNodeByTitle(const QString & title, const Node * relative = 0) const
FunctionNode * findFunctionNode(const QStringList & path, Node * relative = 0, int findFlags = 0)
FunctionNode * findFunctionNode(const QStringList & parentPath, const FunctionNode * clone, Node * relative = 0, int findFlags = 0)
const FunctionNode * findFunctionNode(const QStringList & path, const Node * relative = 0, int findFlags = 0) const
const FunctionNode * findFunctionNode(const QStringList & parentPath, const FunctionNode * clone, const Node * relative = 0, int findFlags = 0) const
FakeNode * findGroupNode(const QStringList & path, Node * start = 0)
NamespaceNode * findNamespaceNode(const QStringList & path, Node * start = 0)
const Node * findNode(const QStringList & path, const Node * start = 0, int findFlags = 0, const Node * self = 0) const
Node * findNodeByNameAndType(const QStringList & path, Node::Type type, Node::SubType subtype, Node * start, bool acceptCollision = false)
Node * findNodeRecursive(const QStringList & path, int pathIndex, Node * start, Node::Type type, Node::SubType subtype, bool acceptCollision = false)
QmlClassNode * findQmlClassNode(const QStringList & path, Node * start = 0)
QmlClassNode * findQmlClassNode(const QString & module, const QString & name)
FakeNode * findQmlModuleNode(const QStringList & path, Node * start = 0)
Atom * findTarget(const QString & target, const Node * node) const
const Node * findUnambiguousTarget(const QString & target, Atom *& atom, const Node * relative) const
void fixInheritance(NamespaceNode * rootNode = 0)
QString fullDocumentLocation(const Node * node) const
void generateIndex(const QString & fileName, const QString & url, const QString & title, bool generateInternalNodes = false)
bool generateIndexSection(QXmlStreamWriter & writer, Node * node, bool generateInternalNodes = false)
void generateIndexSections(QXmlStreamWriter & writer, Node * node, bool generateInternalNodes = false)
void generateTagFile(const QString & fileName)
void generateTagFileCompounds(QXmlStreamWriter & writer, const InnerNode * inner)
void generateTagFileMembers(QXmlStreamWriter & writer, const InnerNode * inner)
NodeMultiMap groups() const
QMultiMap<QString, QString> publicGroups() const
void readIndexes(const QStringList & indexFiles)
void resolveCppToQmlLinks()
void resolveGroups()
void resolveInheritance(NamespaceNode * rootNode = 0)
void resolveProperties()
void resolveQmlInheritance()
void resolveTargets(InnerNode * root)
NamespaceNode * root()
const NamespaceNode * root() const
void setVersion(const QString & version)
QString version() const

Detailed Description

This class constructs and maintains a tree of instances of Node and its many subclasses.

Member Type Documentation

enum Tree::FindFlag

Member Function Documentation

Tree::Tree()

The default constructor is the only constructor.

Tree::~Tree()

The destructor deletes the internal, private tree.

void Tree::addBaseClass(ClassNode * subclass, Node::Access access, const QStringList & basePath, const QString & dataTypeWithTemplateArgs, InnerNode * parent = 0)

void Tree::addExternalLink(const QString & url, const Node * relative)

void Tree::addPropertyFunction(PropertyNode * property, const QString & funcName, PropertyNode::FunctionRole funcRole)

void Tree::addToGroup(Node * node, const QString & group)

This function adds the node to the group. The group can be listed anywhere using the annotated list command.

void Tree::addToPublicGroup(Node * node, const QString & group)

This function adds the group name to the list of groups for the node name. It also adds the node to the group.

void Tree::addToQmlModule(Node * node)

NameCollisionNode * Tree::checkForCollision(const QString & name) const

First, search for a node with the specified name. If a matching node is found, if it is a collision node, another collision with this name has been found, so return the collision node. If the matching node is not a collision node, the first collision for this name has been found, so create a NameCollisionNode with the matching node as its first child, and return a pointer to the new NameCollisionNode. Otherwise return 0.

ClassNode * Tree::findClassNode(const QStringList & path, Node * start = 0)

Find the C++ class node named path. Begin the search at the start node. If the start node is 0, begin the search at the root of the tree. Only a C++ class node named path is acceptible. If one is not found, 0 is returned.

NameCollisionNode * Tree::findCollisionNode(const QString & name) const

This function is like checkForCollision() in that it searches for a collision node with the specified name. But it doesn't create anything. If it finds a match, it returns the pointer. Otherwise it returns 0.

EnumNode * Tree::findEnumNode(const QStringList & path, Node * start = 0)

Find the Enum type node named path. Begin the search at the start node. If the start node is 0, begin the search at the root of the tree. Only an Enum type node named path is acceptible. If one is not found, 0 is returned.

const FakeNode * Tree::findFakeNodeByTitle(const QString & title, const Node * relative = 0) const

This function searches for a node with the specified title. If relative node is provided, it is used to disambiguate if it has a QML module identifier.

FunctionNode * Tree::findFunctionNode(const QStringList & path, Node * relative = 0, int findFlags = 0)

This function just calls the const version of the same function and returns the function node.

FunctionNode * Tree::findFunctionNode(const QStringList & parentPath, const FunctionNode * clone, Node * relative = 0, int findFlags = 0)

This function just calls the const version of itself and returns the result.

const FunctionNode * Tree::findFunctionNode(const QStringList & path, const Node * relative = 0, int findFlags = 0) const

This function begins searching the tree at relative for the function node identified by path. The findFlags are used to restrict the search. If a node that matches the path is found, it is returned. Otherwise, 0 is returned. If relative is 0, the root of the tree is used as the starting point.

const FunctionNode * Tree::findFunctionNode(const QStringList & parentPath, const FunctionNode * clone, const Node * relative = 0, int findFlags = 0) const

This function first ignores the clone node and searches for the node having the parentPath by calling the main findFunction(parentPath, relative, findFlags). If that search is successful, then it searches for the clone in the found parent node.

FakeNode * Tree::findGroupNode(const QStringList & path, Node * start = 0)

Find the Group node named path. Begin the search at the start node. If the start node is 0, begin the search at the root of the tree. Only a Group node named path is acceptible. If one is not found, 0 is returned.

NamespaceNode * Tree::findNamespaceNode(const QStringList & path, Node * start = 0)

Find the Namespace node named path. Begin the search at the start node. If the start node is 0, begin the search at the root of the tree. Only a Namespace node named path is acceptible. If one is not found, 0 is returned.

const Node * Tree::findNode(const QStringList & path, const Node * start = 0, int findFlags = 0, const Node * self = 0) const

Searches the tree for a node that matches the path. The search begins at start but can move up the parent chain recursively if no match is found.

Node * Tree::findNodeByNameAndType(const QStringList & path, Node::Type type, Node::SubType subtype, Node * start, bool acceptCollision = false)

Find the node with the specified path name that is of the specified type and subtype. Begin the search at the start node. If the start node is 0, begin the search at the tree root. subtype is not used unless type is Fake.

Node * Tree::findNodeRecursive(const QStringList & path, int pathIndex, Node * start, Node::Type type, Node::SubType subtype, bool acceptCollision = false)

Recursive search for a node identified by path. Each path element is a name. pathIndex specifies the index of the name in path to try to match. start is the node whose children shoulod be searched for one that has that name. Each time a match is found, increment the pathIndex and call this function recursively.

If the end of the path is reached (i.e. if a matching node is found for each name in the path), the type must match the type of the last matching node, and if the type is Fake, the subtype must match as well.

If the algorithm is successful, the pointer to the final node is returned. Otherwise 0 is returned.

QmlClassNode * Tree::findQmlClassNode(const QStringList & path, Node * start = 0)

Find the Qml class node named path. Begin the search at the start node. If the start node is 0, begin the search at the root of the tree. Only a Qml class node named path is acceptible. If one is not found, 0 is returned.

QmlClassNode * Tree::findQmlClassNode(const QString & module, const QString & name)

Find the QML class node for the specified module and name identifiers. The module identifier may be empty. If the module identifier is empty, then begin by finding the FakeNode that has the specified name. If that FakeNode is a QML class, return it. If it is a collision node, return its current child, if the current child is a QML class. If the collision node does not have a child that is a QML class node, return 0.

FakeNode * Tree::findQmlModuleNode(const QStringList & path, Node * start = 0)

Find the Qml module node named path. Begin the search at the start node. If the start node is 0, begin the search at the root of the tree. Only a Qml module node named path is acceptible. If one is not found, 0 is returned.

Atom * Tree::findTarget(const QString & target, const Node * node) const

This function searches for a node with a canonical title constructed from target and each of the possible suffixes. If the node it finds is node, it returns the Atom from that node. Otherwise it returns null.

const Node * Tree::findUnambiguousTarget(const QString & target, Atom *& atom, const Node * relative) const

This function searches for a target anchor node. If it finds one, it sets atom from the found node and returns the found node.

void Tree::fixInheritance(NamespaceNode * rootNode = 0)

QString Tree::fullDocumentLocation(const Node * node) const

void Tree::generateIndex(const QString & fileName, const QString & url, const QString & title, bool generateInternalNodes = false)

Outputs an index file.

bool Tree::generateIndexSection(QXmlStreamWriter & writer, Node * node, bool generateInternalNodes = false)

Generate the index section with the given writer for the node specified, returning true if an element was written; otherwise returns false.

void Tree::generateIndexSections(QXmlStreamWriter & writer, Node * node, bool generateInternalNodes = false)

Generate index sections for the child nodes of the given node using the writer specified. If generateInternalNodes is true, nodes marked as internal will be included in the index; otherwise, they will be omitted.

void Tree::generateTagFile(const QString & fileName)

Writes a tag file named fileName.

void Tree::generateTagFileCompounds(QXmlStreamWriter & writer, const InnerNode * inner)

Generate the tag file section with the given writer for the node specified, returning true if an element was written; otherwise returns false.

void Tree::generateTagFileMembers(QXmlStreamWriter & writer, const InnerNode * inner)

NodeMultiMap Tree::groups() const

Returns the group map.

QMultiMap<QString, QString> Tree::publicGroups() const

Returns the public group map.

void Tree::readIndexes(const QStringList & indexFiles)

void Tree::resolveCppToQmlLinks()

For each QML class node that points to a C++ class node, follow its C++ class node pointer and set the C++ class node's QML class node pointer back to the QML class node.

void Tree::resolveGroups()

For each node in the group map, add the node to the appropriate group node.

void Tree::resolveInheritance(NamespaceNode * rootNode = 0)

void Tree::resolveProperties()

void Tree::resolveQmlInheritance()

For each QML class node in the tree, determine whether it inherits a QML base class and, if so, which one, and store that pointer in the QML class node's state.

void Tree::resolveTargets(InnerNode * root)

NamespaceNode * Tree::root()

const NamespaceNode * Tree::root() const

void Tree::setVersion(const QString & version)

See also version().

QString Tree::version() const

See also setVersion().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web