NDEVR
API Documentation
FeatureOptions.h
1#pragma once
2#include "DLLInfo.h"
3#include <NDEVR/String.h>
4#include <NDEVR/UUID.h>
5#include <NDEVR/Dictionary.h>
6#include <NDEVR/Set.h>
7#include <NDEVR/TranslatedString.h>
8namespace NDEVR
9{
21
25 class NDEVR_BASE_API FeatureOptions
26 {
27 public:
33
38 static void ThrowIfNotEnabled(const StringView& resource);
39
45 static void EnableOption(const StringView& resource, const StringView& password);
46
51 static void DisableOption(const StringView& resource);
52
58 static void SetCredentialOwner(const StringView& owner, const StringView& password);
59
65
70 static bool IsSoftwareActivated();
71
77 static bool IsFeatureEnabled(const StringView& resource);
78
84 static bool IsFeatureEnabled(const OptionalFeature& feature);
151 public:
156 static void SetCheckActivationOverride(std::function<void()> function);
157 public:
162
168
174 protected:
175 static std::function<void()> s_check_activation_function;
177 #if NDEVR_SECURITY
179 #else
181 #endif
183 };
184}
A hash-based key-value store, useful for quick associative lookups.
Definition Dictionary.h:64
Logic for checking or enabling software features.
static String supports_material_edit_dialog
Feature key for the material edit dialog.
static String supports_thickness_command
Feature key for the thickness command.
Set< String > m_features
Set of enabled feature identifiers (non-secure mode).
static String supports_offset_command
Feature key for the offset command.
static String supports_smooth_command
Feature key for the smooth command.
static String supports_io_factory_write
Feature key for IO factory write operations.
static String supports_material_mode_widget
Feature key for the material mode widget.
static String supports_flip_command
Feature key for the flip command.
static String supports_registration_command
Feature key for the point cloud registration command.
Dictionary< String, OptionalFeature > m_optional_features
Registered optional features indexed by ID (secure mode.
static String supports_geometry_edit_dialog
Feature key for the geometry edit dialog.
static String supports_exports
Feature key for file export capabilities.
static String supports_layers
Feature key for layer support.
static String supports_create_material
Feature key for creating new materials.
static String supports_text_edit_dialog
Feature key for the text edit dialog.
static String supports_camera_edit_dialog
Feature key for the camera edit dialog.
static bool IsSoftwareActivated()
Checks whether the software has been activated with valid credentials.
static String supports_imports
Feature key for file import capabilities.
static String supports_rubber_stamp_command
Feature key for the rubber stamp command.
static String supports_moveable_tabs
Feature key for moveable/dockable UI tabs.
static String supports_layer_edit_dialog
Feature key for the layer edit dialog.
static void EnableOption(const StringView &resource, const StringView &password)
Enables a feature resource using the provided password for validation.
static String supports_explode_command
Feature key for the explode command.
static String supports_create_layers
Feature key for creating new layers.
static String supports_model_library
Feature key for the model library browser.
static String supports_material_edit_widget
Feature key for the material edit widget.
String m_owner
Name of the credential owner for this activation.
static String supports_invert_normals_command
Feature key for the invert normals command.
static FeatureOptions & Default()
Returns the singleton default FeatureOptions instance.
static String supports_multipoint_transform_command
Feature key for the multipoint transform command.
static String CredentialOwner()
Returns the name of the current credential owner.
static String supports_scanner
Feature key for scanner hardware support.
static String supports_io_factory_read
Feature key for IO factory read operations.
void performAudit()
Performs an audit of currently enabled features and activation state.
static String supports_scale_command
Feature key for the scale command.
static void SetCheckActivationOverride(std::function< void()> function)
Overrides the default activation check with a custom function.
static String supports_fill_holes_command
Feature key for the fill holes command.
static String supports_surface_command
Feature key for the surface reconstruction command.
static String supports_edit_selection_vertex_rectangle
Feature key for rectangle vertex selection mode.
static String supports_grips
Feature key for interactive grip handles on objects.
static String supports_reports
Feature key for report generation.
static String supports_vertex_table
Feature key for the vertex data table view.
static bool IsFeatureEnabled(const OptionalFeature &feature)
Checks whether an optional feature is currently enabled.
static String supports_coordinate_modes
Feature key for coordinate mode selection.
static String supports_print
Feature key for print functionality.
static String supports_3D_draw_commands
Feature key for 3D drawing commands.
static String supports_line_of_sight
Feature key for line-of-sight analysis.
static String supports_station_edit_dialog
Feature key for the station edit dialog.
static String supports_filter_command
Feature key for the filter command.
static String supports_group_command
Feature key for the group command.
static String supports_snaps
Feature key for geometric snap functionality.
static String supports_demo_activation
Feature key for demo activation mode.
static String supports_no_activation
Feature key for running without activation requirements.
static String supports_model_material_edit_dialog
Feature key for the model material edit dialog.
const Dictionary< String, OptionalFeature > & optionalFeatures() const
Returns the dictionary of all registered optional features.
static String supports_scan_calibration
Feature key for scan calibration tools.
static String supports_erase_command
Feature key for the erase command.
void addOptionalFeature(const OptionalFeature &feature)
Registers an optional feature that can be enabled or disabled at runtime.
static void SetCredentialOwner(const StringView &owner, const StringView &password)
Sets the credential owner name associated with the software activation.
static String supports_print_dialog
Feature key for the print dialog.
static String supports_project_save
Feature key for project save functionality.
static String supports_network
Feature key for network communication capabilities.
static String supports_managed_wifi
Feature key for managed Wi-Fi connectivity.
static String supports_deployment_edit_dialog
Feature key for the deployment edit dialog.
static void DisableOption(const StringView &resource)
Disables a previously enabled feature resource.
static String supports_edit_selection_inclusion_exclusion
Feature key for inclusion/exclusion selection mode.
static std::function< void()> s_check_activation_function
Override function for custom activation checks.
static String supports_paint_command
Feature key for the paint command.
static String supports_pattern_edit_dialog
Feature key for the pattern edit dialog.
static String supports_lock_camera
Feature key for locking the camera viewpoint.
static String supports_project_edit_dialog
Feature key for the project edit dialog.
static String supports_geo_reference
Feature key for geo-referencing capabilities.
static void ThrowIfNotEnabled(const StringView &resource)
Throws an exception if the specified feature resource is not enabled.
static String supports_gps
Feature key for GPS integration.
static String supports_color_theme
Feature key for UI color theme switching.
static String supports_touch_mode
Feature key for touch-optimized input mode.
static String supports_rotate_command
Feature key for the rotate command.
static String supports_editing_features
Feature key for general editing capabilities.
static String supports_model_tile
Feature key for model tiling functionality.
static String supports_edit_selection_model_single
Feature key for single-model selection mode.
static bool IsFeatureEnabled(const StringView &resource)
Checks whether a feature identified by a string resource is currently enabled.
static String supports_add_mask_command
Feature key for the add mask command.
static String supports_edit_selection_vertex_polygon
Feature key for polygon vertex selection mode.
Container that stores unique elements in no particular order, and which allow for fast retrieval or i...
Definition Set.h:59
The core String View class for the NDEVR API.
Definition StringView.h:58
The core String class for the NDEVR API.
Definition String.h:95
Any text displayed to the user should be defined as a TranslatedString which allows the program to lo...
The primary namespace for the NDEVR SDK.
Describes an optional software feature that can be enabled or disabled at runtime.
String id
Unique identifier for this optional feature.
TranslatedString name
User-facing localized display name for the feature.
TranslatedString description
User-facing localized description of the feature.
String icon
Icon name used to visually represent the feature in the UI.
String url
URL associated with the feature, such as a purchase or information page.