ImagingTools Core SDK
Public Member Functions | List of all members
imtlic::IFeatureInfoabstract

Interface for accessing information about a feature within a product. More...

#include <IFeatureInfo.h>

Inherits iser::IObject.

Inherited by imtlic::CFeatureInfo [virtual].

Public Member Functions

virtual QByteArray GetFeatureId () const =0
 
virtual QString GetFeatureName () const =0
 
virtual QString GetFeatureDescription () const =0
 
virtual bool IsOptional () const =0
 
virtual bool IsPermission () const =0
 
virtual const IFeatureInfoGetParentFeature () const =0
 
virtual QByteArrayList GetSubFeatureIds (int maxDepth=-1) const =0
 
virtual FeatureInfoPtr GetSubFeature (const QByteArray &subfeatureId, int maxDepth=-1) const =0
 
virtual const FeatureInfoList & GetSubFeatures () const =0
 
virtual bool InsertSubFeature (FeatureInfoPtr subFeatureInfo)=0
 
virtual void DeleteSubFeature (const QByteArray &subFeatureId)=0
 
virtual QByteArrayList GetDependencies () const =0
 

Detailed Description

Interface for accessing information about a feature within a product.

A Feature represents an individual capability or functionality within a product. Features form the atomic units that define what a product can do. They can be organized hierarchically and can have dependencies on other features.

Features are "unlocked" through License Definitions - each license specifies which features it enables when activated.

Conceptual Model

Features as Capabilities:**

Feature Types

Optional vs. Mandatory:**

Feature Dependencies

Features can depend on other features:

Feature "Pivot Tables"
├─ Depends on: "Basic Spreadsheet Functions"
└─ Depends on: "Data Import"

When checking if a feature is available:

  1. Check if feature is unlocked by active license
  2. Check if all dependent features are also unlocked
  3. Recursively validate transitive dependencies
  4. Feature available only if all dependencies satisfied

Feature Hierarchies

Features support parent-child relationships:

Benefits of hierarchies:

Meta-Information

Features support meta-information for persistence:

Usage Examples

Creating a Feature:**

IFeatureInfoSharedPtr feature = ...; // From factory
feature->SetFeatureId("feature-advanced-analytics");
feature->SetFeatureName("Advanced Analytics");
feature->SetFeatureDescription("Data analysis and reporting tools");
feature->SetIsOptional(true); // Can be sold separately
feature->SetIsPermission(false); // This is a capability, not permission

Building Feature Hierarchy:**

IFeatureInfoSharedPtr parent = ...; // "Document Editing"
IFeatureInfoSharedPtr child1 = ...; // "Basic Formatting"
IFeatureInfoSharedPtr child2 = ...; // "Advanced Formatting"
parent->InsertSubFeature(child1);
parent->InsertSubFeature(child2);
// Navigate hierarchy
const FeatureInfoList& children = parent->GetSubFeatures();
const IFeatureInfo* parentRef = child1->GetParentFeature();
Interface for accessing information about a feature within a product.
virtual const IFeatureInfo * GetParentFeature() const =0

Setting Dependencies:**

IFeatureInfoSharedPtr pivotTables = ...;
IFeatureInfoSharedPtr basicSpreadsheet = ...;
FeatureIds dependencies;
dependencies.insert(basicSpreadsheet->GetFeatureId());
pivotTables->SetDependsOnFeatureIds(dependencies);
// Check dependencies
FeatureIds deps = pivotTables->GetDependsOnFeatureIds();
for (const QByteArray& depId : deps) {
// Validate dependency is available
}

Feature Licensing

Features are unlocked through licenses:

  1. License Definition specifies which features it includes
  2. Customer purchases and activates license
  3. License Instance created on Product Instance
  4. Features from all active licenses become available
  5. Application checks feature availability before use

    Example License Configuration:**

    Basic License: [Core Editing, Basic Formatting]
    Pro License: [Core Editing, Basic Formatting, Advanced Formatting, Spreadsheet]
    Enterprise: [All Features]

Related Interfaces

See also
IProductInfo, ILicenseDefinition, IFeatureInfoProvider, IFeatureDependenciesProvider

Definition at line 174 of file IFeatureInfo.h.

Member Function Documentation

◆ DeleteSubFeature()

virtual void imtlic::IFeatureInfo::DeleteSubFeature ( const QByteArray &  subFeatureId)
pure virtual

Remove a sub-feature from this feature's children.

Parameters
subFeatureIdID of the sub-feature to remove

◆ GetDependencies()

virtual QByteArrayList imtlic::IFeatureInfo::GetDependencies ( ) const
pure virtual

Get the list of features that this feature depends on. These dependencies must be satisfied for this feature to function properly.

Returns
List of feature IDs that this feature depends on

◆ GetFeatureDescription()

virtual QString imtlic::IFeatureInfo::GetFeatureDescription ( ) const
pure virtual

Get the detailed feature description.

Returns
Description explaining what this feature provides

◆ GetFeatureId()

virtual QByteArray imtlic::IFeatureInfo::GetFeatureId ( ) const
pure virtual

Get the unique feature identifier.

Returns
Unique ID of this feature

◆ GetFeatureName()

virtual QString imtlic::IFeatureInfo::GetFeatureName ( ) const
pure virtual

Get the human-readable feature name.

Returns
Display name of this feature

◆ GetParentFeature()

virtual const IFeatureInfo * imtlic::IFeatureInfo::GetParentFeature ( ) const
pure virtual

Get the parent feature in the feature hierarchy. Features can form tree structures with parent-child relationships.

Returns
Pointer to parent feature, or nullptr if this is a root feature

◆ GetSubFeature()

virtual FeatureInfoPtr imtlic::IFeatureInfo::GetSubFeature ( const QByteArray &  subfeatureId,
int  maxDepth = -1 
) const
pure virtual

Get a specific sub-feature by ID.

Parameters
subfeatureIdID of the sub-feature to find
maxDepthMaximum traversal depth for the search (-1 for unlimited)
Returns
Pointer to the sub-feature, or nullptr if not found

◆ GetSubFeatureIds()

virtual QByteArrayList imtlic::IFeatureInfo::GetSubFeatureIds ( int  maxDepth = -1) const
pure virtual

Get IDs of all sub-features (children) in the hierarchy.

Parameters
maxDepthMaximum traversal depth (-1 for unlimited depth)
Returns
List of sub-feature IDs

◆ GetSubFeatures()

virtual const FeatureInfoList & imtlic::IFeatureInfo::GetSubFeatures ( ) const
pure virtual

Get the direct child features of this feature.

Returns
List of immediate sub-features

◆ InsertSubFeature()

virtual bool imtlic::IFeatureInfo::InsertSubFeature ( FeatureInfoPtr  subFeatureInfo)
pure virtual

Add a sub-feature as a child of this feature.

Parameters
subFeatureInfoFeature to be added as a child
Returns
true if successfully added, false otherwise

◆ IsOptional()

virtual bool imtlic::IFeatureInfo::IsOptional ( ) const
pure virtual

Check if this feature is optional.

Important:** Optional features represent functionality that can be sold optionally. They are NOT mandatory for the core functionality of the product and can be purchased separately by customers based on their needs. This allows flexible product configurations where customers only pay for the features they require.

Returns
true if the feature is optional (can be sold separately), false if mandatory (part of core product)

◆ IsPermission()

virtual bool imtlic::IFeatureInfo::IsPermission ( ) const
pure virtual

Check if this feature represents a permission.

Important:** Permission features are NOT sellable features. They represent access control rights or operational permissions within the application, not product capabilities. Permissions control what users can do with the application itself.

Example:** A "Close" permission would control whether the application can be exited, which is an operational right, not a product feature that can be sold.

Returns
true if this is a permission feature (access control), false if it's a sellable feature