Lines Matching full:variant
18 // Scoped VARIANT class for automatically freeing a COM VARIANT at the
20 // encapsulated VARIANT easier to use.
21 // Instead of inheriting from VARIANT, we take the containment approach
22 // in order to have more control over the usage of the variant and guard
26 // Declaration of a global variant variable that's always VT_EMPTY
27 static const VARIANT kEmptyVariant;
35 // Constructor to create a new VT_BSTR VARIANT.
40 // Creates a new VT_BSTR variant of a specified length.
43 // Creates a new integral type variant and assigns the value to
44 // VARIANT.lVal (32 bit sized field).
47 // Creates a new double-precision type variant. |vt| must be either VT_R8
60 // Copies the variant.
61 explicit ScopedVariant(const VARIANT& var);
69 // Give ScopedVariant ownership over an already allocated VARIANT.
70 void Reset(const VARIANT& var = kEmptyVariant);
72 // Releases ownership of the VARIANT to the caller.
73 VARIANT Release();
78 // Returns a copy of the variant.
79 VARIANT Copy() const;
83 int Compare(const VARIANT& var, bool ignore_case = false) const;
86 // Used to receive a VARIANT as an out argument (and take ownership).
89 VARIANT* Receive();
109 void Set(const VARIANT& var);
122 // Allows const access to the contained variant without DCHECKs etc.
126 const VARIANT* operator&() const {
132 ScopedVariant& operator=(const VARIANT& var);
134 // A hack to pass a pointer to the variant where the accepting
135 // function treats the variant as an input-only, read-only value
136 // but the function prototype requires a non const variant pointer.
138 VARIANT* AsInput() const {
141 return const_cast<VARIANT*>(&var_);
146 operator const VARIANT&() const {
154 VARIANT var_;