Home | History | Annotate | Download | only in base

Lines Matching defs:VARIANT

14 // Scoped VARIANT class for automatically freeing a COM VARIANT at the
16 // encapsulated VARIANT easier to use.
17 // Instead of inheriting from VARIANT, we take the containment approach
18 // in order to have more control over the usage of the variant and guard
22 // Declaration of a global variant variable that's always VT_EMPTY
23 static const VARIANT kEmptyVariant;
31 // Constructor to create a new VT_BSTR VARIANT.
36 // Creates a new VT_BSTR variant of a specified length.
39 // Creates a new integral type variant and assigns the value to
40 // VARIANT.lVal (32 bit sized field).
43 // Creates a new double-precision type variant. |vt| must be either VT_R8
56 // Copies the variant.
57 explicit ScopedVariant(const VARIANT& var);
65 // Give ScopedVariant ownership over an already allocated VARIANT.
66 void Reset(const VARIANT& var = kEmptyVariant);
68 // Releases ownership of the VARIANT to the caller.
69 VARIANT Release();
74 // Returns a copy of the variant.
75 VARIANT Copy() const;
79 int Compare(const VARIANT& var, bool ignore_case = false) const;
82 // Used to receive a VARIANT as an out argument (and take ownership).
85 VARIANT* Receive();
105 void Set(const VARIANT& var);
118 // Allows const access to the contained variant without DCHECKs etc.
122 const VARIANT* operator&() const {
128 ScopedVariant& operator=(const VARIANT& var);
130 // A hack to pass a pointer to the variant where the accepting
131 // function treats the variant as an input-only, read-only value
132 // but the function prototype requires a non const variant pointer.
134 VARIANT* AsInput() const {
137 return const_cast<VARIANT*>(&var_);
142 operator const VARIANT&() const {
150 VARIANT var_;