API Documentation
Loading...
Searching...
No Matches
CRDFactory.h
Go to the documentation of this file.
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>
8class ScModel;
9class ScBasicModel;
10class ScTIN;
11namespace NDEVR
12{
13 class File;
14 class Model;
15 class FactoryFeatures;
16 class FactoryOptions;
17 class DesignObjectLookup;
18 /**--------------------------------------------------------------------------------------------------
19 \brief writes and reads to Carlson CRD (Coordinate) file using NDEVR native libraries.
20 **/
21 class NDEVR_FACTORY_API CRDFactory final : public IOFactory
22 {
23 public:
24 struct CRDPoint
25 {
26 Vertex<3, fltp08> location;
27 String name;
28 sint04 lld_number;
29 };
30 struct CRDInfo
31 {
32 Buffer<CRDPoint> points;
33 ConstPointer<Unit> unit;
34 String name;
35 Time survey_time;
36 BitFlag marker_flags;
37 };
38 CRDFactory();
39 Buffer<UUID> filterModelsToExport(Buffer<UUID> models_to_check, const DesignObjectLookup* lookup, const FileFormat&) const override;
40 virtual void getSupportedFormats(Buffer<FileFormat>& formats, bool is_read) override;
41 virtual String getIcon(const File& file) override;
42 virtual bool readFile(FactoryParameters& file) override;
43 virtual bool writeFile(FactoryParameters&) override;
44 FactoryOptions defaultReadOptions(const FactoryParameters& file) const override;
45 FactoryOptions defaultWriteOptions(const FactoryParameters& file) const override;
46 static bool ReadCRD(CRDInfo& info, File file, ProgressInfo* log = nullptr);
47 static bool WriteCRD(CRDInfo& info, File file, ProgressInfo* log = nullptr);
48 static bool CreateCRDModel(const CRDInfo& info, Model& model, ProgressInfo* log = nullptr);
49 FactoryFeatures factoryFeatures(const FactoryParameters& file, bool is_import) const override;
50 };
51}
52#endif
#define NDEVR_FACTORY_API
Definition DLLInfo.h:57
Definition ACIColor.h:37
int32_t sint04
-Defines an alias representing a 4 byte, signed integer. -Can represent exact integer values -2147483...
Definition BaseValues.hpp:64