Start

load

#include "dxfio/load.hpp"

In DxfIO

Functions

auto Load(std::string_view bytes) -> std::expected<Loaded, Failure>

Reads a drawing from the bytes of a DXF file, ASCII or binary, of any release from R10 to R2018. Fails only when the bytes are not DXF at all; anything it can step over becomes an issue.

auto Load(std::istream &from) -> std::expected<Loaded, Failure>

Reads a drawing from a stream, to its end. A stream that has already failed, as a file that did not open, fails.

auto LoadFile(const std::filesystem::path &file) -> std::expected<Loaded, Failure>

Reads a drawing from a file.

struct Loaded

A drawing read from DXF, with what the reader had to note about it.

FieldTypeMeaning
DocumentDxfIO::DocumentThe drawing, every section and every group the file held.
Issuesstd::vector<Issue>What the reader kept, mended or left out, with the line it found it on.