Songbird Variant Utilities Source. More...
#include "sbVariantUtilsLib.h"#include <nsCOMPtr.h>#include <nsStringGlue.h>#include <iomanip>#include <sstream>Go to the source code of this file.
Functions | |
| static nsresult | sbNonStringVariantToInt (nsIVariant *aVariant, PRInt64 *aInt) |
| static nsresult | sbNonStringVariantToInt (nsIVariant *aVariant, PRUint64 *aInt) |
| template<class T > | |
| static nsresult | sbVariantToInt (nsIVariant *aVariant, T *aInt) |
| nsresult | sbVariantsEqual (nsIVariant *aVariant1, nsIVariant *aVariant2, PRBool *aEqual) |
Songbird Variant Utilities Source.
Definition in file sbVariantUtilsLib.cpp.
|
static |
Convert the non-string variant specified by aVariant to an integer and return the result in aInt.
| aVariant | Variant to convert. |
| aInt | Returned integer value. |
Definition at line 71 of file sbVariantUtilsLib.cpp.
|
static |
Definition at line 82 of file sbVariantUtilsLib.cpp.
| nsresult sbVariantsEqual | ( | nsIVariant * | aVariant1, |
| nsIVariant * | aVariant2, | ||
| PRBool * | aEqual | ||
| ) |
Return true in aEqual if the variant specified by aVariant2 is equal to the variant specified by aVariant1; otherwise, return false. For the comparison, aVariant2 is converted to match the data type of aVariant1. If aVariant1 is an integer, and aVariant2 is a string of the form "0xde10", aVariant2 will be converted as a hexadecimal.
| aVariant1 | Variants to compare. |
| aVariant2 | |
| aEqual | Returned true if variants are equal. |
Definition at line 160 of file sbVariantUtilsLib.cpp.
|
static |
Convert the variant specified by aVariant to an integer and return the result in aInt. If aVariant is a string and of the form "0xde10", it will be converted as a hexadecimal.
| aVariant | Variant to convert. |
| aInt | Returned integer value. |
Definition at line 104 of file sbVariantUtilsLib.cpp.