ElementProperty

功能

插件配置参数模板,用户可通过重写插件DefineProperties接口来定义插件配置参数。

结构定义

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
template<class T>
struct ElementProperty { 
    PropertyType type; 
    std::string name; 
    std::string nickName; 
    std::string desc; 
    T defaultValue; 
    T min; 
    T max; 
}

参数说明

参数名

说明

type

数据类型,参考PropertyType

1
2
3
4
5
6
7
8
9
typedef enum {
    STRING = 0,
    INT,
    UINT,
    FLOAT,
    DOUBLE,
    LONG,
    ULONG
} PropertyType;

name

配置选项名字。

nickname

配置选项昵称。

desc

配置选项描述。

defaultValue

默认值。

min

最小值。

max

最大值。