NDEVR
API Documentation
FeatureOptions

Logic for checking or enabling software features. More...

Collaboration diagram for FeatureOptions:
[legend]

Public Member Functions

void addOptionalFeature (const OptionalFeature &feature)
 Registers an optional feature that can be enabled or disabled at runtime.
const Dictionary< String, OptionalFeature > & optionalFeatures () const
 Returns the dictionary of all registered optional features.
void performAudit ()
 Performs an audit of currently enabled features and activation state.

Static Public Member Functions

static String CredentialOwner ()
 Returns the name of the current credential owner.
static FeatureOptionsDefault ()
 Returns the singleton default FeatureOptions instance.
static void DisableOption (const StringView &resource)
 Disables a previously enabled feature resource.
static void EnableOption (const StringView &resource, const StringView &password)
 Enables a feature resource using the provided password for validation.
static bool IsFeatureEnabled (const OptionalFeature &feature)
 Checks whether an optional feature is currently enabled.
static bool IsFeatureEnabled (const StringView &resource)
 Checks whether a feature identified by a string resource is currently enabled.
static bool IsSoftwareActivated ()
 Checks whether the software has been activated with valid credentials.
static void SetCheckActivationOverride (std::function< void()> function)
 Overrides the default activation check with a custom function.
static void SetCredentialOwner (const StringView &owner, const StringView &password)
 Sets the credential owner name associated with the software activation.
static void ThrowIfNotEnabled (const StringView &resource)
 Throws an exception if the specified feature resource is not enabled.

Static Public Attributes

static String supports_3D_draw_commands
 Feature key for 3D drawing commands.
static String supports_add_mask_command
 Feature key for the add mask command.
static String supports_camera_edit_dialog
 Feature key for the camera edit dialog.
static String supports_color_theme
 Feature key for UI color theme switching.
static String supports_coordinate_modes
 Feature key for coordinate mode selection.
static String supports_create_layers
 Feature key for creating new layers.
static String supports_create_material
 Feature key for creating new materials.
static String supports_demo_activation
 Feature key for demo activation mode.
static String supports_deployment_edit_dialog
 Feature key for the deployment edit dialog.
static String supports_edit_selection_inclusion_exclusion
 Feature key for inclusion/exclusion selection mode.
static String supports_edit_selection_model_single
 Feature key for single-model selection mode.
static String supports_edit_selection_vertex_polygon
 Feature key for polygon vertex selection mode.
static String supports_edit_selection_vertex_rectangle
 Feature key for rectangle vertex selection mode.
static String supports_editing_features
 Feature key for general editing capabilities.
static String supports_erase_command
 Feature key for the erase command.
static String supports_explode_command
 Feature key for the explode command.
static String supports_exports
 Feature key for file export capabilities.
static String supports_fill_holes_command
 Feature key for the fill holes command.
static String supports_filter_command
 Feature key for the filter command.
static String supports_flip_command
 Feature key for the flip command.
static String supports_geo_reference
 Feature key for geo-referencing capabilities.
static String supports_geometry_edit_dialog
 Feature key for the geometry edit dialog.
static String supports_gps
 Feature key for GPS integration.
static String supports_grips
 Feature key for interactive grip handles on objects.
static String supports_group_command
 Feature key for the group command.
static String supports_imports
 Feature key for file import capabilities.
static String supports_invert_normals_command
 Feature key for the invert normals command.
static String supports_io_factory_read
 Feature key for IO factory read operations.
static String supports_io_factory_write
 Feature key for IO factory write operations.
static String supports_layer_edit_dialog
 Feature key for the layer edit dialog.
static String supports_layers
 Feature key for layer support.
static String supports_line_of_sight
 Feature key for line-of-sight analysis.
static String supports_lock_camera
 Feature key for locking the camera viewpoint.
static String supports_managed_wifi
 Feature key for managed Wi-Fi connectivity.
static String supports_material_edit_dialog
 Feature key for the material edit dialog.
static String supports_material_edit_widget
 Feature key for the material edit widget.
static String supports_material_mode_widget
 Feature key for the material mode widget.
static String supports_model_library
 Feature key for the model library browser.
static String supports_model_material_edit_dialog
 Feature key for the model material edit dialog.
static String supports_model_tile
 Feature key for model tiling functionality.
static String supports_moveable_tabs
 Feature key for moveable/dockable UI tabs.
static String supports_multipoint_transform_command
 Feature key for the multipoint transform command.
static String supports_network
 Feature key for network communication capabilities.
static String supports_no_activation
 Feature key for running without activation requirements.
static String supports_offset_command
 Feature key for the offset command.
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_print
 Feature key for print functionality.
static String supports_print_dialog
 Feature key for the print dialog.
static String supports_project_edit_dialog
 Feature key for the project edit dialog.
static String supports_project_save
 Feature key for project save functionality.
static String supports_registration_command
 Feature key for the point cloud registration command.
static String supports_reports
 Feature key for report generation.
static String supports_rotate_command
 Feature key for the rotate command.
static String supports_rubber_stamp_command
 Feature key for the rubber stamp command.
static String supports_scale_command
 Feature key for the scale command.
static String supports_scan_calibration
 Feature key for scan calibration tools.
static String supports_scanner
 Feature key for scanner hardware support.
static String supports_smooth_command
 Feature key for the smooth command.
static String supports_snaps
 Feature key for geometric snap functionality.
static String supports_station_edit_dialog
 Feature key for the station edit dialog.
static String supports_surface_command
 Feature key for the surface reconstruction command.
static String supports_text_edit_dialog
 Feature key for the text edit dialog.
static String supports_thickness_command
 Feature key for the thickness command.
static String supports_touch_mode
 Feature key for touch-optimized input mode.
static String supports_vertex_table
 Feature key for the vertex data table view.

Protected Attributes

Set< Stringm_features
 Set of enabled feature identifiers (non-secure mode).
Dictionary< String, OptionalFeaturem_optional_features
 Registered optional features indexed by ID (secure mode.
String m_owner
 Name of the credential owner for this activation.

Static Protected Attributes

static std::function< void()> s_check_activation_function
 Override function for custom activation checks.

Detailed Description

Logic for checking or enabling software features.


Certain capabilities will be locked by default without a user activation or without NDEVR issued IDs

Definition at line 25 of file FeatureOptions.h.

Member Function Documentation

◆ addOptionalFeature()

void FeatureOptions::addOptionalFeature ( const OptionalFeature & feature)

Registers an optional feature that can be enabled or disabled at runtime.

Parameters
[in]featureThe OptionalFeature descriptor to add.

◆ CredentialOwner()

String FeatureOptions::CredentialOwner ( )
static

Returns the name of the current credential owner.

Returns
The credential owner name string.

◆ Default()

FeatureOptions & FeatureOptions::Default ( )
static

Returns the singleton default FeatureOptions instance.

Returns
Reference to the global FeatureOptions instance.

◆ DisableOption()

void FeatureOptions::DisableOption ( const StringView & resource)
static

Disables a previously enabled feature resource.

Parameters
[in]resourceThe feature identifier to disable.

◆ EnableOption()

void FeatureOptions::EnableOption ( const StringView & resource,
const StringView & password )
static

Enables a feature resource using the provided password for validation.

Parameters
[in]resourceThe feature identifier to enable.
[in]passwordThe activation password required to enable the feature.

◆ IsFeatureEnabled() [1/2]

bool FeatureOptions::IsFeatureEnabled ( const OptionalFeature & feature)
static

Checks whether an optional feature is currently enabled.

Parameters
[in]featureThe OptionalFeature to check.
Returns
True if the feature is enabled, false otherwise.

◆ IsFeatureEnabled() [2/2]

bool FeatureOptions::IsFeatureEnabled ( const StringView & resource)
static

Checks whether a feature identified by a string resource is currently enabled.

Parameters
[in]resourceThe feature identifier to check.
Returns
True if the feature is enabled, false otherwise.

Referenced by DesignObjectOrientation::DesignObjectOrientation().

◆ IsSoftwareActivated()

bool FeatureOptions::IsSoftwareActivated ( )
static

Checks whether the software has been activated with valid credentials.

Returns
True if the software is activated, false otherwise.

◆ optionalFeatures()

const Dictionary< String, OptionalFeature > & FeatureOptions::optionalFeatures ( ) const

Returns the dictionary of all registered optional features.

Returns
Const reference to the dictionary mapping feature IDs to OptionalFeature descriptors.

◆ SetCheckActivationOverride()

void FeatureOptions::SetCheckActivationOverride ( std::function< void()> function)
static

Overrides the default activation check with a custom function.

Parameters
[in]functionThe function to call when checking activation status.

◆ SetCredentialOwner()

void FeatureOptions::SetCredentialOwner ( const StringView & owner,
const StringView & password )
static

Sets the credential owner name associated with the software activation.

Parameters
[in]ownerThe name of the credential owner.
[in]passwordThe activation password for validation.

◆ ThrowIfNotEnabled()

void FeatureOptions::ThrowIfNotEnabled ( const StringView & resource)
static

Throws an exception if the specified feature resource is not enabled.

Parameters
[in]resourceThe feature identifier to check.

The documentation for this class was generated from the following file: