Flutter Engine
The Flutter Engine
third_party
accessibility
base
win
enum_variant.h
Go to the documentation of this file.
1
// Copyright (c) 2011 The Chromium Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style license that can be
3
// found in the LICENSE file.
4
5
#ifndef BASE_WIN_ENUM_VARIANT_H_
6
#define BASE_WIN_ENUM_VARIANT_H_
7
8
#include <wrl/implements.h>
9
10
#include <memory>
11
#include <vector>
12
13
#include "
base/win/scoped_variant.h
"
14
15
namespace
base
{
16
namespace
win {
17
18
// A simple implementation of IEnumVARIANT.
19
class
BASE_EXPORT
EnumVariant
20
:
public
Microsoft::WRL::RuntimeClass<
21
Microsoft::WRL::RuntimeClassFlags<Microsoft::WRL::ClassicCom>,
22
IEnumVARIANT> {
23
public
:
24
// The constructor allocates a vector of empty ScopedVariants of size |count|.
25
// Use ItemAt to set the value of each item in the array.
26
explicit
EnumVariant
(
ULONG
count
);
27
28
// IEnumVARIANT:
29
IFACEMETHODIMP Next(
ULONG
requested_count,
30
VARIANT
* out_elements,
31
ULONG
* out_elements_received)
override
;
32
IFACEMETHODIMP Skip(
ULONG
skip_count)
override
;
33
IFACEMETHODIMP
Reset
()
override
;
34
IFACEMETHODIMP Clone(IEnumVARIANT** out_cloned_object)
override
;
35
36
// Returns a mutable pointer to the item at position |index|.
37
VARIANT
* ItemAt(
ULONG
index);
38
39
private
:
40
~EnumVariant
()
override
;
41
42
std::vector<ScopedVariant> items_;
43
ULONG
current_index_;
44
};
45
46
}
// namespace win
47
}
// namespace base
48
49
#endif
// BASE_WIN_ENUM_VARIANT_H_
count
int count
Definition:
FontMgrTest.cpp:50
BASE_EXPORT
#define BASE_EXPORT
Definition:
base_export.h:26
base::win::EnumVariant
Definition:
enum_variant.h:22
base
Definition:
ax_tree_id_registry.h:17
flutter::Reset
void Reset(SkPath *path)
Definition:
path_ops.cc:40
run_tests.VARIANT
VARIANT
Definition:
run_tests.py:42
scoped_variant.h
ULONG
DWORD ULONG
Definition:
windows_types.h:40
Generated on Sun Jun 23 2024 21:55:21 for Flutter Engine by
1.9.4