sbIMutablePropertyArray Interface Reference

An interface to carry around arrays of nsIProperty instances Note that implementations of the interface should also provide nsIMutableArray. QI to nsIMutableArray to access add/remove/clear methods. More...

import"sbIPropertyArray.idl";

Inheritance diagram for sbIMutablePropertyArray:
[legend]
Collaboration diagram for sbIMutablePropertyArray:
[legend]

Public Member Functions

void appendProperty (in AString aID, in AString aValue)
 
void appendProperties (in sbIPropertyArray aPropertyArray, in boolean aSkipDuplicates)
 
- Public Member Functions inherited from sbIPropertyArray
sbIProperty getPropertyAt (in unsigned long aIndex)
 
AString getPropertyValue (in AString aID)
 
AString toString ()
 

Public Attributes

attribute boolean strict
 
- Public Attributes inherited from sbIPropertyArray
readonly attribute boolean validated
 

Detailed Description

An interface to carry around arrays of nsIProperty instances Note that implementations of the interface should also provide nsIMutableArray. QI to nsIMutableArray to access add/remove/clear methods.

Definition at line 93 of file sbIPropertyArray.idl.

Member Function Documentation

void sbIMutablePropertyArray::appendProperties ( in sbIPropertyArray  aPropertyArray,
in boolean  aSkipDuplicates 
)

Adds the properties specified by aPropertyArray to the array. If aSkipDuplicates is true, don't add properties that are already present.

Parameters
aPropertyArrayArray of properties to add.
aSkipDuplicatesIf true, skip duplicate properties.
void sbIMutablePropertyArray::appendProperty ( in AString  aID,
in AString  aValue 
)

Adds a new property to the array

Parameters
aNameThe id of the property
aValueThe value of the property
Exceptions
NS_ERROR_ILLEGAL_VALUEif the 'strict' attribute is true and aValue fails the 'validate' method of the sbIPropertyInfo represented by aName fails.

Member Data Documentation

attribute boolean sbIMutablePropertyArray::strict

Determines whether or not the appendProperty method will throw on invalid input (i.e. setting a value on a property whose sbIPropertyInfo 'validate' method fails on that input). Defaults to true.

An example of improper usage is setting non-numeric text in a property whose parent sbIPropertyInfo is actually sbINumberPropertyInfo.

Note that this property can only be set if the implementing array is empty. Any attempt to set this property after 'appendProperty' has been called will throw NS_ERROR_FAILURE.

Definition at line 130 of file sbIPropertyArray.idl.


The documentation for this interface was generated from the following file: