sbPropertyBagHelper Class Reference

#include <sbPropertyBagUtils.h>

Public Member Functions

 sbPropertyBagHelper (nsresult *aRV=nsnull)
 
 sbPropertyBagHelper (nsISupports *aPropertyBag, nsresult *aRV=nsnull)
 
nsIPropertyBag * GetBag ()
 
 operator nsIPropertyBag * () const
 
 operator nsIPropertyBag2 * () const
 
 operator nsIWritablePropertyBag * () const
 
 operator nsIWritablePropertyBag2 * () const
 
sbPropertyHelper Get (const char *aKey) const
 
sbPropertyHelper operator[] (const char *aKey) const
 
sbPropertyHelper operator[] (const nsACString &aKey) const
 
sbPropertyBagHelperoperator-> ()
 
sbPropertyBagHelperoperator* ()
 
template<class T >
nsresult Set (char *aKey, T aValue)
 
PRBool HasKey (const char *aKey)
 
nsresult rv ()
 

Detailed Description

Helper class for property bags.

TODO: Add getter_AddRefs equivalent

Definition at line 261 of file sbPropertyBagUtils.h.

Constructor & Destructor Documentation

sbPropertyBagHelper::sbPropertyBagHelper ( nsresult *  aRV = nsnull)
inline

Construct a property bag helper object with its own property bag. If aRV is specified, return all error results from all methods in aRV.

Parameters
aRVOptional. Return value to use for all methods.

Definition at line 284 of file sbPropertyBagUtils.h.

sbPropertyBagHelper::sbPropertyBagHelper ( nsISupports aPropertyBag,
nsresult *  aRV = nsnull 
)
inline

Construct a property bag helper object using the property bag specified by aPropertyBag. If aRV is specified, return all error results from all methods in aRV.

Parameters
aPropertyBagBase property bag.
aRVOptional. Return value to use for all methods.

Definition at line 310 of file sbPropertyBagUtils.h.

Member Function Documentation

sbPropertyHelper sbPropertyBagHelper::Get ( const char *  aKey) const
inline

Return the value of the property with the key specified by aKey.

Parameters
aKeyProperty key.
Returns
Property value.

Definition at line 364 of file sbPropertyBagUtils.h.

Here is the caller graph for this function:

nsIPropertyBag* sbPropertyBagHelper::GetBag ( )
inline

Return the base property bag.

Definition at line 331 of file sbPropertyBagUtils.h.

PRBool sbPropertyBagHelper::HasKey ( const char *  aKey)
inline

Return true if the property bag has the key specified by aKey.

Parameters
aKeyKey to check.
Returns
true Property bag has key.

Definition at line 435 of file sbPropertyBagUtils.h.

sbPropertyBagHelper::operator nsIPropertyBag * ( ) const
inline

Definition at line 336 of file sbPropertyBagUtils.h.

sbPropertyBagHelper::operator nsIPropertyBag2 * ( ) const
inline

Definition at line 341 of file sbPropertyBagUtils.h.

sbPropertyBagHelper::operator nsIWritablePropertyBag * ( ) const
inline

Definition at line 346 of file sbPropertyBagUtils.h.

sbPropertyBagHelper::operator nsIWritablePropertyBag2 * ( ) const
inline

Definition at line 351 of file sbPropertyBagUtils.h.

sbPropertyBagHelper& sbPropertyBagHelper::operator* ( )
inline

Definition at line 398 of file sbPropertyBagUtils.h.

sbPropertyBagHelper* sbPropertyBagHelper::operator-> ( )
inline

Allow sbPropertyBagHelper to be used as an nsIPropertyBag*, nsIPropertyBag2*, nsIWritablePropertyBag*, or nsIWritablePropertyBag2*.

sbPropertyBagHelper bag(aPropertyBag); bag->SetPropertyAsUint32(NS_LITERAL_STRING("answer"), 42);

Definition at line 393 of file sbPropertyBagUtils.h.

sbPropertyHelper sbPropertyBagHelper::operator[] ( const char *  aKey) const
inline

Return the value of the property with the key specified by aKey.

Parameters
aKeyProperty key.
Returns
Property value.

Definition at line 377 of file sbPropertyBagUtils.h.

Here is the call graph for this function:

sbPropertyHelper sbPropertyBagHelper::operator[] ( const nsACString &  aKey) const
inline

Definition at line 382 of file sbPropertyBagUtils.h.

Here is the call graph for this function:

nsresult sbPropertyBagHelper::rv ( )
inline

Return the result of the last method called.

Returns
Reult of last method called.

Definition at line 454 of file sbPropertyBagUtils.h.

Here is the caller graph for this function:

template<class T >
nsresult sbPropertyBagHelper::Set ( char *  aKey,
aValue 
)
inline

Set the value of the property specified by aKey to the value specified by aValue.

Parameters
aKeyProperty key.
aValueKey value.

Definition at line 412 of file sbPropertyBagUtils.h.


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