xentara-utils v2.0.4
The Xentara Utility Library
|
A result set of a WMI query. More...
#include <xentara/utils/windows/wmi/ResultSet.hpp>
Public Types | |
using | value_type = Object |
The value type. | |
using | difference_type = std::ptrdiff_t |
Dummy type for non-existend difference type. | |
using | pointer = Object * |
A pointer to a value. | |
using | reference = Object & |
A reference to a value. | |
using | iterator_concept = std::input_iterator_tag |
The iterator concept. | |
using | iterator_category = iterator_concept |
The iterator category, for use in pre-C++20 code. | |
Public Member Functions | |
constexpr | ResultSet () noexcept=default |
Default constructor. | |
constexpr | ResultSet (std::default_sentinel_t) noexcept |
Constructor for a sentinel. | |
auto | singleObject () -> Object |
Returns the object contained in a result set containing exactly one object. | |
auto | operator== (const ResultSet &rhs) const noexcept |
Equality operator. | |
auto | operator== (std::default_sentinel_t) const noexcept |
Comparison with a sentinel. | |
auto | operator* () const noexcept -> const Object & |
Accesses the current object. | |
auto | operator* () noexcept -> Object & |
Accesses the current object. | |
auto | operator-> () const noexcept -> Object * |
Accesses the current object. | |
auto | operator++ () -> ResultSet & |
Fetches the next object in the result set. | |
Related Symbols | |
(Note that these are not member symbols.) | |
auto | begin (ResultSet resultSet) -> ResultSet |
Gets an end iterator for a result set. | |
auto | end (ResultSet) -> std::default_sentinel_t |
Gets an end iterator for a result set. | |
A result set of a WMI query.
This is an enumerator object that can be used to retreive all the objects in the result set one by one. Result sets are input iterators and can be used in algorithms that take an input iterator. Result sets also supply freestanding [begin()](xentara::utils::windows::wmi::begin(ResultSet)) and [end()](xentara::utils::windows::wmi::end(ResultSet)) functions, so they can be used in range-based for loops:
Dummy type for non-existend difference type.
The iterator category, for use in pre-C++20 code.
The iterator concept.
A pointer to a value.
A reference to a value.
The value type.
|
constexprdefaultnoexcept |
Default constructor.
This constructor constructs a result set that contains no objects.
Default constructed Result sets compare equal to exhaused result sets, so they can be used as sentinels in algorithms that require the iterator and sentinel to be of the same type.
|
constexprnoexcept |
Constructor for a sentinel.
This constructor constructs an object that compares equal to exhaused result sets, so it can be used as a sentinel in algorithms that require the iterator and sentinel to be of the same type.
This constructor is identical to the default constructor.
|
noexcept |
Accesses the current object.
|
noexcept |
Accesses the current object.
auto xentara::utils::windows::wmi::ResultSet::operator++ | ( | ) | -> ResultSet & |
Fetches the next object in the result set.
std::runtime_error | An error occurred trying to fetch the next object |
|
noexcept |
Accesses the current object.
|
noexcept |
Equality operator.
A result set only compares equal to itself, except exhaused result sets, that compare equal to all other exhaused result sets, including default constructed result sets. This allows using default constructed result sets as sentinels in algorithms that require the iterator and sentinel to be of the same type.
|
noexcept |
Comparison with a sentinel.
auto xentara::utils::windows::wmi::ResultSet::singleObject | ( | ) | -> Object |
Returns the object contained in a result set containing exactly one object.
std::runtime_error | The result set is empty, or contains more than one object. |
Gets an end iterator for a result set.
This function enables the use of ResultSet in range-based for loops
resultSet | The result set to iterate over |
|
related |
Gets an end iterator for a result set.
This function enables the use of ResultSet in range-based for loops