NDEVR
API Documentation
CRDFactory.h
1#pragma once
2#include "DLLInfo.h"
3#if NDEVR_MEASURE_MODELS
4#include <NDEVR/IOFactory.h>
5#include <NDEVR/FileFormat.h>
6#include <NDEVR/Buffer.h>
7#include <NDEVR/Pointer.h>
8#include <NDEVR/StringEnum.h>
9class ScModel;
10class ScBasicModel;
11class ScTIN;
12namespace NDEVR
13{
14 class File;
15 class Model;
16 class FactoryFeatures;
17 class FactoryOptions;
18 class ProgressInfo;
20
29 class NDEVR_FACTORY_API CRDFactory final : public IOFactory
30 {
31 public:
35 struct CRDPoint
36 {
37 Vertex<3, fltp08> location;
38 String name;
39 String lld_number;
40 };
41
45 struct CRDInfo
46 {
47 NDEVRFilePointMode mode = NDEVRFilePointMode::e_point;
48 Buffer<CRDPoint> points;
49 ConstPointer<Unit> unit;
50 String name;
51 Time survey_time;
52 BitFlag marker_flags;
53 bool record_angle = false;
54 };
55
59 CRDFactory();
60
68 Buffer<UUID> filterModelsToExport(Buffer<UUID> models_to_check, const DesignObjectLookup* lookup, const FileFormat& format) const override;
69
75 virtual void getSupportedFormats(Buffer<FileFormat>& formats, bool is_read) override;
76
82 virtual String getIcon(const File& file) override;
83
89 virtual bool readFile(FactoryParameters& file) override;
90
96 virtual bool writeFile(FactoryParameters& file) override;
97
102 static CRDFactory& DefaultFactory();
103
109 FactoryOptions defaultReadOptions(const FactoryParameters& file) const override;
110
116 FactoryOptions defaultWriteOptions(const FactoryParameters& file) const override;
117
125 static bool ReadCRD(CRDInfo& info, File file, ProgressInfo& progress);
126
134 static bool WriteCRD(CRDInfo& info, File file, ProgressInfo& progress);
135
144 static bool CreateCRDModel(uint04 index, const CRDInfo& info, Model& model, ProgressInfo& progress);
145
152 FactoryFeatures factoryFeatures(const FactoryParameters& file, bool is_import) const override;
153 };
154}
155#endif
Provides cross-platform DLL export/import macros for the IOFactory module.
#define NDEVR_FACTORY_API
GCC/Clang symbol visibility — marks symbols as visible in the shared library.
Definition DLLInfo.h:92
A core class where all Design Objects including models, materials, and geometries are stored.
Allows IOFactories to report what features they support to make the import/export dialogs easier to s...
User-defined options that define preferences for importing and exporting using IOFactory objects.
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
A service that provides Import/Export functionality for a model hierarchy.
Definition IOFactory.h:248
A core class that represents a node on model hierarchy.
Definition Model.h:292
Used with InfoPipe to signal that the system will be using progress.
The primary namespace for the NDEVR SDK.
@ BitFlag
Per-vertex bit flags (selected, hidden, etc.).
@ name
The display name of the object.