AuboStudio SDK  0.6.3
arcs::aubo_scope::ProgramNodeService类 参考abstract

\chinese 程序节点服务 定义了向 AuboScope 添加新类型程序节点所需的 API。 \endchinese \english ProgramNodeService Defines an API required for adding a new type of program node to AuboScope. 更多...

#include <program_node_service.h>

Public 成员函数

virtual ~ProgramNodeService ()=default
virtual std::string getId ()=0
 \chinese 获取此类程序节点的唯一标识符。该标识符将在存储使用此程序节点的程序时使用。
virtual std::string getTitle ()=0
 \chinese
virtual std::string getIcon ()=0
 \chinese
virtual void configureContribution (ProgramContributionConfigurationPtr configuration)=0
 \chinese 配置贡献,设置程序节点的属性和行为。
virtual ProgramNodeViewPtr createView (ViewApiProviderPtr api_provider)=0
 \chinese 创建一个新的视图实例,实现程序节点画面的 UI。在加载或创建新程序时调用一次。
virtual ProgramNodeContributionPtr createNode (ProgramApiProviderPtr api_provider, ProgramNodeViewPtr view, DataModelPtr model, ProgramCreationContextPtr context)=0
 \chinese

详细描述

\chinese 程序节点服务 定义了向 AuboScope 添加新类型程序节点所需的 API。 \endchinese \english ProgramNodeService Defines an API required for adding a new type of program node to AuboScope.

\endenglish

在文件 program_node_service.h25 行定义.

构造及析构函数说明

◆ ~ProgramNodeService()

virtual arcs::aubo_scope::ProgramNodeService::~ProgramNodeService ( )
virtualdefault

成员函数说明

◆ configureContribution()

virtual void arcs::aubo_scope::ProgramNodeService::configureContribution ( ProgramContributionConfigurationPtr configuration)
pure virtual

\chinese 配置贡献,设置程序节点的属性和行为。

参数
configuration贡献配置对象 \endchinese \english configureContribution
configuration\endenglish

◆ createNode()

virtual ProgramNodeContributionPtr arcs::aubo_scope::ProgramNodeService::createNode ( ProgramApiProviderPtr api_provider,
ProgramNodeViewPtr view,
DataModelPtr model,
ProgramCreationContextPtr context )
pure virtual

\chinese

创建一个新的程序节点贡献实例。

返回的节点必须使用提供的数据模型对象来检索和存储其中包含的数据。 加载或复制/粘贴现有程序节点时,将忽略程序节点构造函数对提供的数据模型 所做的所有修改。对模型对象的每次更改都将在程序树中注册为一个单独的 撤销/重做事件。

参数
api_provider提供对 AuboScope 中可用的域数据相关功能的访问
view程序节点视图
model新程序节点实例的所有配置数据存储和检索的数据模型对象
context创建上下文
返回
新构建的程序节点贡献实例 \endchinese \english

Creates a new program node contribution instance.

The returned node must use the supplied data model object to retrieve and store the data contained in it. All modifications to the supplied data model from the program node constructor are ignored when an existing program node is loaded or copy/pasted. Every change to the model object is registered as a separate undo/redo event in the program tree.

参数
api_providerthe AuboCap API object with access to domain data
viewthe View created by createView
modelobject where all configuration data of the new program node instance is to be stored in and retrieved from
contextthe creation context
返回
the newly constructed program node contribution instance \endenglish

◆ createView()

virtual ProgramNodeViewPtr arcs::aubo_scope::ProgramNodeService::createView ( ViewApiProviderPtr api_provider)
pure virtual

\chinese 创建一个新的视图实例,实现程序节点画面的 UI。在加载或创建新程序时调用一次。

参数
api_provider提供对 AuboScope 中与用户界面和终端用户交互相关的 功能和服务访问
返回
视图 \endchinese \english Creates a new View instance which implements the UI for your program node screen. Called once when a new program is loaded or created.
参数
api_providerProvides access to functionality and services available from within AuboScope related to user interface and end user interaction
返回
the view \endenglish

◆ getIcon()

virtual std::string arcs::aubo_scope::ProgramNodeService::getIcon ( )
pure virtual

\chinese

返回
通过此工厂创建的程序节点显示的图标 \endchinese \english
The icon displayed for program nodes created by this factory. \endenglish

◆ getId()

virtual std::string arcs::aubo_scope::ProgramNodeService::getId ( )
pure virtual

\chinese 获取此类程序节点的唯一标识符。该标识符将在存储使用此程序节点的程序时使用。

返回
唯一标识符 \endchinese \english Get the unique identifier for this kind of program node. The identifier will be used when storing programs that use the program node.
the unique identifier. \endenglish

◆ getTitle()

virtual std::string arcs::aubo_scope::ProgramNodeService::getTitle ( )
pure virtual

\chinese

返回
通过此工厂创建的程序节点在结构标签页中显示的文本 \endchinese \english
The text displayed in the Structure Tab for program nodes created by this factory. \endenglish

该类的文档由以下文件生成: