#include <sbVariantUtils.h>
Public Member Functions | |
sbNewVariant () | |
sbNewVariant (nsISupports *aValue) | |
sbNewVariant (REFNSIID aIID, nsISupports *aValue) | |
sbNewVariant (const nsAString &aValue) | |
sbNewVariant (const nsACString &aValue, PRUint16 aType=nsIDataType::VTYPE_CSTRING) | |
sbNewVariant (const char *aValue) | |
sbNewVariant (char aValue) | |
sbNewVariant (PRInt16 aValue) | |
sbNewVariant (PRInt32 aValue) | |
sbNewVariant (PRUint32 aValue, PRUint16 aType=nsIDataType::VTYPE_UINT32) | |
sbNewVariant (PRInt64 aValue) | |
sbNewVariant (PRUint64 aValue) | |
sbNewVariant (double aValue) | |
nsIVariant * | get () const |
operator nsIVariant * () const | |
This class constructs thread-safe nsIVariant objects from simpler data types. The constructors create a null variant on error.
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 = sbNewVariant("Value");
Definition at line 80 of file sbVariantUtils.h.
|
inline |
Definition at line 88 of file sbVariantUtils.h.
|
inline |
Definition at line 100 of file sbVariantUtils.h.
|
inline |
Definition at line 116 of file sbVariantUtils.h.
|
inline |
Definition at line 132 of file sbVariantUtils.h.
|
inline |
Definition at line 144 of file sbVariantUtils.h.
|
inline |
Definition at line 161 of file sbVariantUtils.h.
|
inline |
Definition at line 180 of file sbVariantUtils.h.
|
inline |
Definition at line 192 of file sbVariantUtils.h.
|
inline |
Definition at line 204 of file sbVariantUtils.h.
|
inline |
Definition at line 216 of file sbVariantUtils.h.
|
inline |
Definition at line 233 of file sbVariantUtils.h.
|
inline |
Definition at line 245 of file sbVariantUtils.h.
|
inline |
Definition at line 257 of file sbVariantUtils.h.
|
inline |
Return the constructed variant object.
Definition at line 274 of file sbVariantUtils.h.
|
inline |
Definition at line 276 of file sbVariantUtils.h.