private:
public:
explicit people_enum(
const list<person>& people) : people {people} {}
bool move_next() override {
++position_;
return position < people.
count();
}
const person& current() const override {
try {
return people[position_];
} catch (const index_out_of_range_exception& e) {
throw invalid_operation_exception {
csf_};
}
}
};
Represents a boxed integer object.
Definition box_integer.h:52
Supports a simple iteration over a generic collection.
Definition ienumerator.h:58
size_type count() const noexcept override
Gets the number of elements contained in the xtd::collections::generic::list <type_t>.
Definition list.h:289
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.h:72
#define csf_
Provides information about the current stack frame.
Definition current_stack_frame.h:30
size_t size
Represents a size of any object in bytes.
Definition size.h:23