16#ifndef QGSVECTORLAYERDIRECTOR_H
17#define QGSVECTORLAYERDIRECTOR_H
20#include "qgis_analysis.h"
67 QString
name()
const override;
100 const std::vector< VertexSourceInfo > &
sourcesForVertex( std::size_t vertexIndex )
const {
return mVertexSources[vertexIndex]; }
105 int mDirectionFieldId = -1;
106 QString mDirectDirectionValue;
107 QString mReverseDirectionValue;
108 QString mBothDirectionValue;
109 Direction mDefaultDirection = DirectionBoth;
111 mutable std::vector<std::vector<VertexSourceInfo>> mVertexSources;
An interface for objects which provide features via a getFeatures method.
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
Base class for feedback objects to be used for cancellation of something running in a worker thread.
Interface for creating a graph.
Determine making the graph.
virtual void makeGraph(QgsGraphBuilderInterface *builder, const QVector< QgsPointXY > &additionalPoints, QVector< QgsPointXY > &snappedPoints, QgsFeedback *feedback=nullptr) const
Make a graph using QgsGraphBuilder.
virtual QString name() const =0
Returns director name.
Determines creating a graph from a vector line layer.
const std::vector< VertexSourceInfo > & sourcesForVertex(std::size_t vertexIndex) const
Returns the sources for the graph node vertex with specified index.
Direction
Edge direction Edge can be one-way with direct flow (one can move only from the start point to the en...
@ DirectionForward
One-way direct.
@ DirectionBackward
One-way reversed.
QgsVectorLayerDirector(QgsFeatureSource *source, int directionFieldId, const QString &directDirectionValue, const QString &reverseDirectionValue, const QString &bothDirectionValue, Direction defaultDirection)
Default constructor.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
QList< int > QgsAttributeList
bool operator==(const VertexSourceInfo &other) const =default
int partId
Source part number.
VertexSourceInfo(QgsFeatureId fid, int partId)
Constructor for VertexSourceInfo.
QgsFeatureId fid
Source feature ID.