xtd 0.2.0
Loading...
Searching...
No Matches
xtd::collections::generic::enumerable_iterators< type_t, enumerable_t > Class Template Reference
Inheritance diagram for xtd::collections::generic::enumerable_iterators< type_t, enumerable_t >:
xtd::collections::generic::ienumerable< char_t > xtd::collections::generic::ienumerable< list_type_t > xtd::basic_string< char_t, traits_t, allocator_t >

Definition

template<typename type_t, typename enumerable_t>
class xtd::collections::generic::enumerable_iterators< type_t, enumerable_t >

Internal enumarable iterators definition.

Definition
template<typename type_t, typename enumerable_t>
Internal enumarable iterators definition.
Definition enumerable_iterators.h:44
Header
#include <xtd/collections/enumerable_iterators
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::enumerable_iterators <type_t> class is use to hide the complexity of c++ std::iterator.
The objective is for any collection inheriting from the xtd::collections::generic::ienumerable <type_t> interface to provide the iterator and const_iterator types and begin and end methods needed to be able to iterate the collection as for example :
auto parts = part_collection {};
Items.add(part {"item one", guid::new_guid()});
/*...*&zwj;/
Items.add(part {"item n", guid::new_guid()}});
for (auto part : parts)
console::write_line(part);
static guid new_guid() noexcept
Initializes a new instance of the xtd::guid structure.
Warning
Internal use only for xtd::collections::generic::ienumerable interfece.

Classes

class  iterator
 Represents the iterator of enumarable value type. More...
 

Public Aliases

using const_iterator = const iterator
 Represents the const iterator of enumarable value type.
 

Public Methods

virtual const_iterator begin () const
 Returns an iterator to the first element of the enumarable.
 
virtual iterator begin ()
 Returns an iterator to the first element of the enumarable.
 
virtual const_iterator cbegin () const
 Returns an iterator to the first element of the enumarable.
 
virtual const_iterator cend () const
 Returns an iterator to the element following the last element of the enumarable.
 
virtual const_iterator end () const
 Returns an iterator to the element following the last element of the enumarable.
 
virtual iterator end ()
 Returns an iterator to the element following the last element of the enumarable.
 

The documentation for this class was generated from the following file: