API Documentation
Loading...
Searching...
No Matches
NDVFactory.h
Go to the documentation of this file.
1/**--------------------------------------------------------------------------------------------
2Copyright (c) 2019, NDEVR LLC
3tyler.parke@ndevr.org
4 __ __ ____ _____ __ __ _______
5 | \ | | | __ \ | ___|\ \ / / | __ \
6 | \ | | | | \ \ | |___ \ \ / / | |__) |
7 | . \| | | |__/ / | |___ \ V / | _ /
8 | |\ |_|_____/__|_____|___\_/____| | \ \
9 |__| \__________________________________| \__\
10
11Subject to the terms of the Enterprise+ Agreement, NDEVR hereby grants
12Licensee a limited, non-exclusive, non-transferable, royalty-free license
13(without the right to sublicense) to use the API solely for the purpose of
14Licensee's internal development efforts to develop applications for which
15the API was provided.
16
17The above copyright notice and this permission notice shall be included in all
18copies or substantial portions of the Software.
19
20THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
21INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
22PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
23FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25DEALINGS IN THE SOFTWARE.
26
27Library: IOFactory
28File: NDVFactory
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/IOFactory.h>
34#include <NDEVR/Material.h>
35#include <NDEVR/Model.h>
36#include <NDEVR/File.h>
37namespace NDEVR
38{
39 class FactoryOptions;
40 class Model;
41 class Log;
42 class ImageFactory;
43 class FactoryFeatures;
45 {
46 protected:
47 NDVFactory();
48 public:
49 static NDVFactory& DefaultFactory();
50 static String ReadIcon(const File& file, ImageFactory& factory);
51 String getIcon(const File& file) override;
52 String getData(const File& file);
53 FactoryFeatures factoryFeatures(const FactoryParameters& file, bool is_import) const override;
54 FactoryOptions defaultReadOptions(const FactoryParameters& file) const override;
55 FactoryOptions defaultWriteOptions(const FactoryParameters& file) const override;
56 static void AddSetupCallback(const std::function<void(Model&)>& callback);
57 static FileFormat NDVFormat();
58 virtual void getSupportedFormats(Buffer<FileFormat>& formats, bool is_read) override;
59 virtual bool readFile(FactoryParameters& params) override;
60 virtual bool writeFile(FactoryParameters& params) override;
61 uint08 version(const File& file);
62 static uint08 CurrentVersion();
63 virtual bool determineExtension(const File& file, String& extension) override;
64 virtual bool canRead(const FactoryParameters& file) override;
65 virtual bool canWrite(const FactoryParameters& file) override;
66 virtual bool canWrite(const FileFormat& file) override;
67
68
69 protected:
70 void tidyUpScene(const FactoryParameters& file
71 , Scene& scene
72 , const Buffer<UUID>& objects_read
73 , uint08 version_number
74 , Buffer<Model>& read_models
75 , Buffer<Material>& read_materials
76 , bool ignore_project
77 , Time current_time);
78 static Buffer<std::function<void(Model&)>> s_setup_callbacks;
79 };
80 void ensureSaneModel(Model& model, Time& current_time);
81}
#define NDEVR_FACTORY_API
Definition DLLInfo.h:79
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:64
Definition FactoryFeatures.h:40
Definition FactoryOptions.h:46
Definition FileFormat.h:38
Definition File.h:47
Definition IOFactory.h:99
Definition ImageFactory.h:63
Definition Model.h:54
Definition NDVFactory.h:45
static Buffer< std::function< void(Model &)> > s_setup_callbacks
Definition NDVFactory.h:78
Definition Model.h:491
Definition String.h:40
Represents a timestamp with utilities for manipulation and conversion.
Definition Time.h:54
Definition ACIColor.h:37
void ensureSaneModel(Model &model, Time &current_time)
Definition NDVFactory.cpp:149
uint64_t uint08
-Defines an alias representing an 8 byte, unsigned integer -Can represent exact integer values 0 thro...
Definition BaseValues.hpp:132
Definition IOFactory.h:56