NDEVR
API Documentation
Project.h
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: Design
28File: Project
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include <NDEVR/Scene.h>
34namespace NDEVR
35{
40 class NDEVR_DESIGN_API Project : public Scene
41 {
42 public:
45
49
52 Project(const Model& model);
53
55 void setup();
56
59 void setIsTemp(bool is_temp);
60
63 bool isTemp() const;
64
67
70
74
78
82
86
90
94
98
101 void setProjectName(const StringView& name);
102
105 bool hasBeenSaved() const;
106
110
114
118
121 static constexpr StringView TypeName() {return "project"; }
122 protected:
123
124 };
125
126}
127
128
129
Stores an angle in an optimized internal format with support for efficient trigonometric operations.
Definition Angle.h:83
Logic for reading or writing to a file as well as navigating filesystems or other common file operati...
Definition File.h:53
A core class that represents a node on model hierarchy.
Definition Model.h:292
Project(const TranslatedString &name)
Constructs a Project with the given display name.
static StringView TempIdentifier()
Returns the string identifier used to mark temporary projects.
File currentProjectFile()
Returns the current file path associated with this project.
void setIsTemp(bool is_temp)
Sets whether this project is a temporary (unsaved) project.
void setToDefaultPath()
Sets the project file path to the default persistent location.
void setProjectionID(UUID id)
Sets the coordinate projection UUID for this project.
bool isTemp() const
Returns whether this project is a temporary (unsaved) project.
static constexpr StringView TypeName()
Returns the type name string for Project objects.
Definition Project.h:121
bool hasBeenSaved() const
Returns whether this project has been saved to disk at least once.
Project(const Model &model)
Constructs a Project from an existing Model reference.
Project()
Constructs an invalid, default Project.
Angle< fltp08 > magneticDeclination() const
Returns the magnetic declination angle for the project location.
void setToTempDefaultPath()
Sets the project file path to the default temporary location.
static File DefaultTempFolder()
Returns the default folder used for temporary project storage.
void setup()
Initializes the project with default settings and structure.
File defaultTempFile()
Returns the default temporary file path for this project.
void setMagneticDeclination(const Angle< fltp08 > &angle)
Sets the magnetic declination angle for the project location.
void setProjectName(const StringView &name)
Sets the project name used for file naming and display.
static File DefaultFolder()
Returns the default folder used for persistent project storage.
UUID projectionID() const
Returns the coordinate projection UUID associated with this project.
File defaultFile()
Returns the default file path for saving this project.
Scene()
Constructs an invalid Scene object with no backing data.
The core String View class for the NDEVR API.
Definition StringView.h:58
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
A universally unique identifier (UUID) is a 128-bit number used to identify information in computer s...
Definition UUID.h:61
The primary namespace for the NDEVR SDK.