21EnumVariant::~EnumVariant() =
default;
28 return items_[index].AsInput();
33 ULONG* out_elements_received) {
38 ULONG available_count =
static_cast<ULONG>(items_.size()) - current_index_;
41 out_elements[
i] = items_[current_index_ +
i].Copy();
42 current_index_ +=
count;
46 if (out_elements_received)
47 *out_elements_received =
count;
49 return (
count == requested_count ? S_OK : S_FALSE);
54 if (current_index_ +
count >
static_cast<ULONG>(items_.size()))
55 count =
static_cast<ULONG>(items_.size()) - current_index_;
57 current_index_ +=
count;
58 return (
count == skip_count ? S_OK : S_FALSE);
67 if (!out_cloned_object)
70 size_t count = items_.size();
71 Microsoft::WRL::ComPtr<EnumVariant> other =
72 Microsoft::WRL::Make<EnumVariant>(
static_cast<ULONG>(
count));
74 other->items_[
i] =
static_cast<const VARIANT&
>(items_[
i]);
76 other->Skip(current_index_);
77 return other.CopyTo(IID_PPV_ARGS(out_cloned_object));
IFACEMETHODIMP Skip(ULONG skip_count) override
IFACEMETHODIMP Clone(IEnumVARIANT **out_cloned_object) override
VARIANT * ItemAt(ULONG index)
IFACEMETHODIMP Reset() override
IFACEMETHODIMP Next(ULONG requested_count, VARIANT *out_elements, ULONG *out_elements_received) override
static const VARIANT kEmptyVariant
static float min(float r, float g, float b)
#define BASE_DCHECK(condition)