Class PropertyCollection

用于从属性集合中检索或设置属性值的类。

成员

~PropertyCollection

语法:public inline ~PropertyCollection ( );

析构函数。

SetProperty

语法:public inline void SetProperty ( PropertyId propertyID , const std::string & value );

设置属性的值。

参数

  • propertyID 属性的 ID。 See PropertyId

  • 要设置的 value

SetProperty

语法:public inline void SetProperty ( const std::string & propertyName , const std::string & value );

设置属性的值。

参数

  • propertyName 属性的名称。

  • 要设置的 value

GetProperty

语法:public inline std::string GetProperty ( PropertyId propertyID , const std::string & defaultValue ) const;

返回属性的值。 如果未定义属性值,则返回指定的默认值。

参数

  • propertyID 属性的 ID。 See PropertyId

  • defaultValue 如果未为属性定义任何值(默认情况下为空字符串),则返回的默认值。

退货

属性的值。

GetProperty

语法:public inline std::string GetProperty ( const std::string & propertyName , const std::string & defaultValue ) const;

返回属性的值。 如果未定义属性值,则返回指定的默认值。

参数

  • propertyName 属性的名称。

  • defaultValue 如果未为属性定义任何值(默认情况下为空字符串),则返回的默认值。

退货

属性的值。