Scanframe Modular Application 0.1.0
Loading...
Searching...
No Matches
sf::dxf::Reader Class Referencefinal

The Reader class parses DXF files using 'dxflib' and stores entities by layer. More...

#include <Reader.h>

Inheritance diagram for sf::dxf::Reader:
Collaboration diagram for sf::dxf::Reader:

Public Member Functions

 Reader (QObject *parent=nullptr)
 Constructs a Reader object.
 
 ~Reader () override
 Destroys the Reader object.
 
bool read (const QString &filepath, const QStringList &layers={})
 Reads and parses a DXF file.
 
const LayerEntitiesgetEntitiesByLayer () const
 Gets the parsed entities organized by layer.
 
const EntitiesgetLayerEntities (const QString &layer) const
 Gets the entity list reference from the given layer name.
 
const LayersgetLayerInfo () const
 Gets the parsed layer information.
 

Detailed Description

The Reader class parses DXF files using 'dxflib' and stores entities by layer.

Constructor & Destructor Documentation

◆ Reader()

sf::dxf::Reader::Reader ( QObject *  parent = nullptr)
explicit

Constructs a Reader object.

Parameters
parentThe parent QObject.

◆ ~Reader()

sf::dxf::Reader::~Reader ( )
override

Destroys the Reader object.

Member Function Documentation

◆ getEntitiesByLayer()

const LayerEntities & sf::dxf::Reader::getEntitiesByLayer ( ) const

Gets the parsed entities organized by layer.

Returns
A constant reference to the map of entities by layer.

◆ getLayerEntities()

const Entities & sf::dxf::Reader::getLayerEntities ( const QString &  layer) const

Gets the entity list reference from the given layer name.

Parameters
layerName of the layer.
Returns
When the layer does not exist, the list is empty.

◆ getLayerInfo()

const Layers & sf::dxf::Reader::getLayerInfo ( ) const

Gets the parsed layer information.

Returns
A constant reference to the map of layer information.

◆ read()

bool sf::dxf::Reader::read ( const QString &  filepath,
const QStringList &  layers = {} 
)

Reads and parses a DXF file.

Parameters
filepathThe path to the DXF file.
layersThe layer names which are only read. When empty, all are read.
Returns
True if the file was successfully read, false otherwise.

The documentation for this class was generated from the following file: