Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
QQmlJS::Dom::FileLocations Namespace Reference

Provides entities to maintain mappings between elements and their location in a file. More...

Namespaces

namespace  Info
 Contains region information about the item.

Classes

struct  Info
class  Node
 Represents a Node of FileLocations tree. More...

Typedefs

using Tree = std::shared_ptr<Node>

Functions

Tree createTree (const Path &basePath)
Tree ensure (const Tree &base, const Path &basePath)
Tree find (const Tree &self, const Path &p)
bool visitTree (const Tree &base, function_ref< bool(const Path &, const Tree &)> visitor, const Path &basePath=Path())
QString canonicalPathForTesting (const Tree &base)
Tree treeOf (const DomItem &)
void addRegion (const Tree &fLoc, FileLocationRegion region, SourceLocation loc)
QQmlJS::SourceLocation region (const Tree &fLoc, FileLocationRegion region)
static void updateFullLocation (const Tree &fLoc, SourceLocation loc)

Detailed Description

Provides entities to maintain mappings between elements and their location in a file.

The location information is associated with the element it refers to via Node There are free functions to simplify the handling of the FileLocations tree.

Typedef Documentation

◆ Tree

using QQmlJS::Dom::FileLocations::Tree = std::shared_ptr<Node>

Definition at line 39 of file qqmldomfilelocations_p.h.

Function Documentation

◆ addRegion()

void QQmlJS::Dom::FileLocations::addRegion ( const Tree & fLoc,
FileLocationRegion region,
SourceLocation loc )

Definition at line 151 of file qqmldomfilelocations.cpp.

◆ canonicalPathForTesting()

QString QQmlJS::Dom::FileLocations::canonicalPathForTesting ( const Tree & base)

Definition at line 94 of file qqmldomfilelocations.cpp.

◆ createTree()

Tree QQmlJS::Dom::FileLocations::createTree ( const Path & basePath)

Definition at line 50 of file qqmldomfilelocations.cpp.

References QQmlJS::Dom::FileLocations::Node::instantiate().

Here is the call graph for this function:

◆ ensure()

Tree QQmlJS::Dom::FileLocations::ensure ( const Tree & base,
const Path & basePath )

Definition at line 55 of file qqmldomfilelocations.cpp.

◆ find()

Tree QQmlJS::Dom::FileLocations::find ( const Tree & self,
const Path & p )

Definition at line 65 of file qqmldomfilelocations.cpp.

References QQmlJS::Dom::Path::dropFront(), and QQmlJS::Dom::Path::head().

Referenced by QQmlJS::Dom::QmlObject::orderOfAttributes().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ region()

SourceLocation QQmlJS::Dom::FileLocations::region ( const Tree & fLoc,
FileLocationRegion region )

Definition at line 158 of file qqmldomfilelocations.cpp.

◆ treeOf()

◆ updateFullLocation()

void QQmlJS::Dom::FileLocations::updateFullLocation ( const Tree & fLoc,
SourceLocation loc )
static

Definition at line 129 of file qqmldomfilelocations.cpp.

◆ visitTree()

bool QQmlJS::Dom::FileLocations::visitTree ( const Tree & base,
function_ref< bool(const Path &, const Tree &)> visitor,
const Path & basePath = Path() )

Definition at line 78 of file qqmldomfilelocations.cpp.