sbIPDVariant Class Reference

#include <sbIPDUtils.h>

Public Member Functions

 sbIPDVariant (nsISupports *aValue)
 
 sbIPDVariant (REFNSIID aIID, nsISupports *aValue)
 
 sbIPDVariant (const nsAString &aValue)
 
 sbIPDVariant (const nsACString &aValue, PRUint16 aType=nsIDataType::VTYPE_CSTRING)
 
 sbIPDVariant (const char *aValue)
 
 sbIPDVariant (char aValue)
 
 sbIPDVariant (PRInt16 aValue)
 
 sbIPDVariant (PRInt32 aValue)
 
 sbIPDVariant (PRUint32 aValue, PRUint16 aType=nsIDataType::VTYPE_UINT32)
 
 sbIPDVariant (PRInt64 aValue)
 
 sbIPDVariant (PRUint64 aValue)
 
 sbIPDVariant (double aValue)
 
nsIVariant * get ()
 

Static Public Member Functions

static nsresult GetValue (nsIVariant *aVariant, PRInt16 *aValue)
 

Detailed Description

This class constructs nsIVariant objects from simpler data types.

Most constructors create the proper nsIVariant object based upon the data type of the value argument. However, some nsIVariant types have the same C data types (e.g., boolean and UTF8 nsIVariants). For these cases, an extra nsIDataType argument must be provided to the constructor. The following nsIDataTypes must be explicitly specified in the constructor:

VTYPE_UTF8STRING VTYPE_BOOL

Example:

// Get an nsIVariant set with a C-string value. nsCOMPtr<nsIVariant> value = sbIPDVariant("Value").get();

Definition at line 111 of file sbIPDUtils.h.

Constructor & Destructor Documentation

sbIPDVariant::sbIPDVariant ( nsISupports aValue)
inline

Definition at line 115 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( REFNSIID  aIID,
nsISupports aValue 
)
inline

Definition at line 124 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( const nsAString &  aValue)
inline

Definition at line 133 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( const nsACString &  aValue,
PRUint16  aType = nsIDataType::VTYPE_CSTRING 
)
inline

Definition at line 142 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( const char *  aValue)
inline

Definition at line 155 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( char  aValue)
inline

Definition at line 164 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( PRInt16  aValue)
inline

Definition at line 173 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( PRInt32  aValue)
inline

Definition at line 182 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( PRUint32  aValue,
PRUint16  aType = nsIDataType::VTYPE_UINT32 
)
inline

Definition at line 191 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( PRInt64  aValue)
inline

Definition at line 204 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( PRUint64  aValue)
inline

Definition at line 213 of file sbIPDUtils.h.

sbIPDVariant::sbIPDVariant ( double  aValue)
inline

Definition at line 222 of file sbIPDUtils.h.

Member Function Documentation

nsIVariant* sbIPDVariant::get ( )
inline

Definition at line 231 of file sbIPDUtils.h.

static nsresult sbIPDVariant::GetValue ( nsIVariant *  aVariant,
PRInt16 *  aValue 
)
inlinestatic

Definition at line 233 of file sbIPDUtils.h.


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