類別 PropertyCollection

要從屬性集合擷取或設定屬性值的類別。

成員

~PropertyCollection

語法:public inline ~PropertyCollection ( );

解構函式。

SetProperty

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

設定屬性的值。

參數

  • propertyID 屬性的標識碼。 請參閱 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 屬性的標識碼。 請參閱 PropertyId

  • defaultValue 如果未為 屬性定義任何值,則會傳回預設值(預設為空字串)。

退貨

屬性的值。

GetProperty

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

傳回屬性的值。 如果未定義 屬性值,則會傳回指定的預設值。

參數

  • propertyName 屬性的名稱。

  • defaultValue 如果未為 屬性定義任何值,則會傳回預設值(預設為空字串)。

退貨

屬性的值。