API Documentation
Loading...
Searching...
No Matches
DesignSettings.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: Design
28File: DesignSettings
29Included in API: True
30Author(s): Tyler Parke
31 *-----------------------------------------------------------------------------------------**/
32#pragma once
33#include "DLLInfo.h"
34#include <NDEVR/SnapLocation.h>
35#include <NDEVR/INIInterface.h>
36#include <NDEVR/Resource.h>
37#include <NDEVR/RGBColor.h>
38#include <NDEVR/TranslatedString.h>
39#include <NDEVR/Model.h>
40#include <functional>
41
42namespace NDEVR
43{
44 class Model;
45 class INIFactory;
46 /**--------------------------------------------------------------------------------------------------
47 \brief Stores generic settings that impact the behavior of the NDEVR API
48 **/
50 {
51 public:
54
56
57 Resource<String> activation_email;//place to email to get the activation code
58 Resource<String> company_name;//software company
60
63
66
68
71
72 public:
73 NDEVR_DESIGN_API void getINI(INIFactory& factory) override;
74 NDEVR_DESIGN_API void setModelGetter(const std::function<bool(const String&, Model& root)>& resource_getter);
75 NDEVR_DESIGN_API void setModelSetter(const std::function<bool(const String&, const Model& model)>& resource_setter);
76 NDEVR_DESIGN_API bool getModel(const String& resource, Model& root) const;
77 NDEVR_DESIGN_API bool setModel(const String& resource, const Model& model) const;
81 protected:
82 std::function<bool(const String&, Model& root)> m_model_getter;
83 std::function<bool(const String&, const Model& model)> m_model_setter;
84 };
85}
86
87
88
89
#define NDEVR_DESIGN_API
Definition DLLInfo.h:55
The equivelent of std::vector but with a bit more control. The basic array unit of the library.
Definition Buffer.hpp:56
Stores generic settings that impact the behavior of the NDEVR API.
Definition DesignSettings.h:50
std::function< bool(const String &, Model &root)> m_model_getter
Definition DesignSettings.h:82
Buffer< SnapLocation > default_camera_locations
Definition DesignSettings.h:67
void getINI(INIFactory &factory) override
void setStationSettingsToDefaults()
void setUserSettingsToDefaults()
void setModelSetter(const std::function< bool(const String &, const Model &model)> &resource_setter)
Resource< TranslatedString > calibration_back_point_label
Definition DesignSettings.h:62
void setGraphicsSettingsToDefaults()
Resource< TranslatedString > calibration_front_point_label
Definition DesignSettings.h:61
Resource< String > activation_email
Definition DesignSettings.h:57
void setModelGetter(const std::function< bool(const String &, Model &root)> &resource_getter)
Resource< String > company_name
Definition DesignSettings.h:58
std::function< bool(const String &, const Model &model)> m_model_setter
Definition DesignSettings.h:83
static DesignSettings & defaultSettings()
bool setModel(const String &resource, const Model &model) const
bool getModel(const String &resource, Model &root) const
Resource< bool > debug_mode
Definition DesignSettings.h:69
Resource< TranslatedString > pattern_hole_name_format
Definition DesignSettings.h:65
Resource< TranslatedString > row_auto_name_format
Definition DesignSettings.h:64
Resource< String > ndevr_website
Definition DesignSettings.h:59
Resource< TranslatedString > user_title
Definition DesignSettings.h:55
Resource< bool > maintenance_mode
Definition DesignSettings.h:70
Contains methods for easily reading and writing to an INI file including efficient casting,...
Definition INIReader.h:68
Contains methods for easily reading and writing to an INI file including.
Definition INIInterface.h:45
A core class that represents a node on model heirarchy. This node may contain a Geometry or one or mo...
Definition Model.h:58
A core part of the engine, stores variables that can be listened to with ResourceListener which will ...
Definition Toggle.h:41
The core String class for the NDEVR API.
Definition String.h:69
Definition ACIColor.h:37