Archicad 29 C++ API
Loading...
Searching...
No Matches
ACAPI::ModelCheckMethodCallback Class Referenceabstract

ModelCheckMethodCallback is responsible for registering and handling Model Quality Check methods through API. You can make your own implementation to extend the list of Model Check Methods with your own check logic. More...

#include <ModelCheckMethodCallback.hpp>

Inheritance diagram for ACAPI::ModelCheckMethodCallback:
ACAPI::AddonServiceInterface

Public Member Functions

 ModelCheckMethodCallback (const API_Guid &modelCheckTypeId, const GS::UniString &nonLocalizedModelCheckMethodName)
 Constructs a new Model Check Method callback.
 
virtual GS::UniString GetLocalizedCheckMethodName () const =0
 Callback function. The AddOn should return the localized name of the new Model Check Method.
 
virtual GS::UniString GetLocalizedCheckMethodResultName () const =0
 Callback function. The AddOn should return the localized name of the new Model Check Method.
 
virtual std::optional< GS::UniString > GetLocalizedCheckMethodInfoText () const =0
 Callback function. The AddOn can return a localized text that will pop up when the user hovers on the info icon.
 
virtual std::optional< RS::Icon > GetIcon () const =0
 Callback function. The AddOn can return an icon that will showed on the Model Check dialog.
 
virtual std::optional< API_GuidGetGroupId () const =0
 Callback function. The AddOn can return a Model Check GroupId where the Model Check Method will be enrolled.
 
virtual bool GetDefaultSelectionStatus () const =0
 Callback function. The AddOn should return the default state of the new Model Check Method.
 
virtual ModelCheckSettingType GetCheckSettingType () const =0
 Callback function. Controls the type of the editbox displayed on the Model Check dialog.
 
virtual std::vector< double > GetDefaultValues () const
 Callback function. Provide the default value for the editbox displayed on the Model Check Dialog.
 
virtual std::vector< ModelCheckResultCheckProcess (GS::ProcessControl &processControl, const std::vector< double > &values)=0
 Callback function. The check logic should be placed here. It is called when the new Model Check Method is executed.
 
- Public Member Functions inherited from ACAPI::AddonServiceInterface
 AddonServiceInterface (const API_Guid &serviceIdentifier)
 Creates and registers the AddonServiceInterface.
 
Result< void > GetStatus (const API_Token &token) const
 Get the status of the service registration.
 
virtual GSErrCode Initialize ()
 The callback function for the initialization phase.
 

Protected Member Functions

virtual GSErrCode RegisterInterface () override
 The callback function for the interface registration phase.
 

Additional Inherited Members

- Protected Attributes inherited from ACAPI::AddonServiceInterface
ACAPI::Error status
 The error status of the registration.
 
const API_Guid serviceIdentifier
 Identifier given by constructor.
 

Detailed Description

ModelCheckMethodCallback is responsible for registering and handling Model Quality Check methods through API. You can make your own implementation to extend the list of Model Check Methods with your own check logic.

Since
Archicad 29

Constructor & Destructor Documentation

◆ ModelCheckMethodCallback()

ACAPI::ModelCheckMethodCallback::ModelCheckMethodCallback ( const API_Guid & modelCheckTypeId,
const GS::UniString & nonLocalizedModelCheckMethodName )

Constructs a new Model Check Method callback.

Parameters
modelCheckTypeIdThe identifier of the parent Model Check Type where the new method will be registered.
nonLocalizedModelCheckMethodNameNon-localized name of the new Model Check Method. It should be unique, it's used for identification.

Member Function Documentation

◆ CheckProcess()

virtual std::vector< ModelCheckResult > ACAPI::ModelCheckMethodCallback::CheckProcess ( GS::ProcessControl & processControl,
const std::vector< double > & values )
pure virtual

Callback function. The check logic should be placed here. It is called when the new Model Check Method is executed.

Parameters
processControlProcess Control
valuesValues representing the settings
Returns
Returns a vector of ModelCheckResult representing the elements that are filtered out by the check.

◆ GetCheckSettingType()

virtual ModelCheckSettingType ACAPI::ModelCheckMethodCallback::GetCheckSettingType ( ) const
pure virtual

Callback function. Controls the type of the editbox displayed on the Model Check dialog.

Returns
Returns the value of ModelCheckSettingType enum.

◆ GetDefaultSelectionStatus()

virtual bool ACAPI::ModelCheckMethodCallback::GetDefaultSelectionStatus ( ) const
pure virtual

Callback function. The AddOn should return the default state of the new Model Check Method.

Returns
Returns the default state of the methods checkbox.

◆ GetDefaultValues()

virtual std::vector< double > ACAPI::ModelCheckMethodCallback::GetDefaultValues ( ) const
virtual

Callback function. Provide the default value for the editbox displayed on the Model Check Dialog.

Returns
Returns a vector of double values. The number of elements in the vector depends on the selected ModelCheckSettingType.

◆ GetGroupId()

virtual std::optional< API_Guid > ACAPI::ModelCheckMethodCallback::GetGroupId ( ) const
pure virtual

Callback function. The AddOn can return a Model Check GroupId where the Model Check Method will be enrolled.

New group can be registered with the ACAPI::ModelCheckManager::RegisterGroup () function.

Returns
Returns the groupId or std::nullopt.

◆ GetIcon()

virtual std::optional< RS::Icon > ACAPI::ModelCheckMethodCallback::GetIcon ( ) const
pure virtual

Callback function. The AddOn can return an icon that will showed on the Model Check dialog.

Returns
The icon or std::nullopt.

◆ GetLocalizedCheckMethodInfoText()

virtual std::optional< GS::UniString > ACAPI::ModelCheckMethodCallback::GetLocalizedCheckMethodInfoText ( ) const
pure virtual

Callback function. The AddOn can return a localized text that will pop up when the user hovers on the info icon.

Returns
Returns the localized info text or std::nullopt.

◆ GetLocalizedCheckMethodName()

virtual GS::UniString ACAPI::ModelCheckMethodCallback::GetLocalizedCheckMethodName ( ) const
pure virtual

Callback function. The AddOn should return the localized name of the new Model Check Method.

Returns
Returns the localized name that will be presented on the Model Check UI.

◆ GetLocalizedCheckMethodResultName()

virtual GS::UniString ACAPI::ModelCheckMethodCallback::GetLocalizedCheckMethodResultName ( ) const
pure virtual

Callback function. The AddOn should return the localized name of the new Model Check Method.

Returns
Returns the localized name that will be presented on the Model Check Result palette.

◆ RegisterInterface()

virtual GSErrCode ACAPI::ModelCheckMethodCallback::RegisterInterface ( )
overrideprotectedvirtual

The callback function for the interface registration phase.

Returns
Returns NoError if everything went well, otherwise the error code.

Reimplemented from ACAPI::AddonServiceInterface.