Send feedback
Class google::cloud::StreamRange (2.10.1)
Stay organized with collections
Save and categorize content based on your preferences.
Version 2.10.1 keyboard_arrow_down
Callers can iterate the range using its begin()
and end()
members to access iterators that will work with any normal C++ constructs and algorithms that accept Input Iterators .
Callers should only consume/iterate this range.
Example: Iterating a range of 10 integers
// Some function that returns a StreamRange<int>
StreamRange<int> MakeRangeFromOneTo(int n);
StreamRange<int> sr = MakeRangeFromOneTo(10);
for (StatusOr<int> const& x : sr) {
if (!x) {
std::cerr << "Fail: " << x.status() << "\n";
} else {
std::cout << *x << "\n";
}
}
Note:
To construct a StreamRange
<T>
for testing (e.g. to mock a Connection::ListFoo
call), see google::cloud::mocks::MakeStreamRange
.
Constructors
StreamRange
Parameter
Name
Description
StreamRange const &
StreamRange
Parameter
Name
Description
StreamRange &&
StreamRange
Default-constructs an empty range.
~StreamRange
Operators
operator=
Parameter
Name
Description
StreamRange const &
Returns
Type
Description
StreamRange &
operator=
Parameter
Name
Description
StreamRange &&
Returns
Type
Description
StreamRange &
Functions
begin
Returns
Type
Description
iterator
end
Returns
Type
Description
iterator
Send feedback
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License , and code samples are licensed under the Apache 2.0 License . For details, see the Google Developers Site Policies . Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-06-04 UTC.
[{
"type": "thumb-down",
"id": "hardToUnderstand",
"label":"Hard to understand"
},{
"type": "thumb-down",
"id": "incorrectInformationOrSampleCode",
"label":"Incorrect information or sample code"
},{
"type": "thumb-down",
"id": "missingTheInformationSamplesINeed",
"label":"Missing the information/samples I need"
},{
"type": "thumb-down",
"id": "otherDown",
"label":"Other"
}]
[{
"type": "thumb-up",
"id": "easyToUnderstand",
"label":"Easy to understand"
},{
"type": "thumb-up",
"id": "solvedMyProblem",
"label":"Solved my problem"
},{
"type": "thumb-up",
"id": "otherUp",
"label":"Other"
}]
Need to tell us more?