winrt::agile_ref struct template (C++/WinRT)
A type representing an agile reference to a C++/WinRT object or interface. For more info, and code examples, see Agile objects in C++/WinRT.
template <typename T>
struct agile_ref
typename T
The type of C++/WinRT object or interface an agile reference to which is represented by the agile_ref object. This is the type of the agile reference's target.
Minimum supported SDK: Windows SDK version 10.0.17134.0 (Windows 10, version 1803)
Namespace: winrt
Header: %WindowsSdkDir%Include<WindowsTargetPlatformVersion>\cppwinrt\winrt\base.h (included by default)
Constructor | Description |
---|---|
agile_ref::agile_ref constructor | Initializes a new instance of the agile_ref struct, optionally with a copy of the input data. |
Function | Description |
---|---|
agile_ref::get function | Retrieves a proxy to the target of the agile_ref object that may safely be used within any thread context in which get is called. |
Operator | Description |
---|---|
agile_ref::operator bool | Checks whether the agile_ref object is targeting a C++/WinRT object. |
Initializes a new instance of the agile_ref struct, optionally with a copy of the input data.
agile_ref(std::nullptr_t = nullptr) noexcept;
agile_ref(T const& object);
object
A C++/WinRT object or interface that initializes the agile_ref object.
Retrieves a proxy to the target of the agile_ref object, which may safely be used within any thread context in which get is called.
T get() const;
A proxy to the C++/WinRT object or interface referenced by the agile_ref object.
Checks whether the agile_ref object is targeting a valid C++/WinRT object or interface.
explicit operator bool() const noexcept;
true
if the agile_ref object has a valid target, otherwise false
.