xtd 0.2.0
Loading...
Searching...
No Matches

Definition

Contains generic collections helpers definitions.

Classes

struct  xtd::collections::generic::helpers::comparer< type_t >
 Implements a function object for compare data. More...
 
struct  xtd::collections::generic::helpers::equator< key_t >
 Implements a function object for performing comparisons. Unless specialised, invokes operator== on type type_t. xtd::equator with the key and the value strongly typed to be std::any. More...
 
struct  xtd::collections::generic::helpers::hasher< key_t >
 Implements a function object for hashing data. More...
 
struct  xtd::collections::generic::helpers::lesser< type_t >
 Implements a function object for compare data. More...
 
class  xtd::collections::generic::helpers::wrap_pointer_iterator< value_t, iterator_tag_t >
 Represents a wrap pointer iterator. More...
 

Typedefs

template<class value_t , class iterator_tag_t = std::random_access_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_reverse_iterator = std::reverse_iterator< wrap_pointer_iterator< value_t, iterator_tag_t > >
 Represents a wrap pointer reverse iterator.
 

Aliases

template<class type_t >
using xtd::collections::generic::helpers::allocator = std::allocator< type_t >
 Represent an allocator alias.
 
template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_value_t = typename std::iterator_traits< input_iterator_t >::value_type
 Represents the value iterator type.
 
template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_key_t = std::remove_const_t< std::tuple_element_t< 0, iterator_value_t< input_iterator_t > > >
 Represents the key iterator type.
 
template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_mapped_t = std::tuple_element_t< 1, iterator_value_t< input_iterator_t > >
 Represents the mapped iterator type.
 
template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_to_allocator_t = std::pair< std::add_const_t< iterator_key_t< input_iterator_t > >, iterator_mapped_t< input_iterator_t > >
 Represents the iterator to allocator type.
 

Typedef Documentation

◆ allocator

template<class type_t >
using xtd::collections::generic::helpers::allocator = typedef std::allocator<type_t>

#include <xtd.core/include/xtd/collections/generic/helpers/allocator.hpp>

Represent an allocator alias.

Header
#include <xtd/collections/generic/helpers/allocator>
Namespace
xtd::collections::generic::helpers
Library
xtd.core
Remarks
The xtd::collections::generic::helpers::allocator is the default allocator used by all xtd library containers if no user-specified allocator is provided.
The xtd::collections::generic::helpers::allocator is alias on std::allocator.
A simple alias for the moment, which leaves open the possibility of implementing a specific allocator for xtd if necessary in the future.
Examples
The following example show how to use xtd::collections::generic::helpers::allocator with xtd::collection::generic::list.
auto values = xtd::collection::generic::list<date_time, xtd::collections::generic::helpers::allocator<date_time>> {};
values.emplace_back(1971, 1, 5);

◆ iterator_value_t

template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_value_t = typedef typename std::iterator_traits<input_iterator_t>::value_type

#include <xtd.core/include/xtd/collections/generic/helpers/iterator.hpp>

Represents the value iterator type.

Header
#include <xtd/collections/generic/helpers/iterator>
Namespace
xtd::collections::generic::helpers
Library
xtd.core

◆ iterator_key_t

template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_key_t = typedef std::remove_const_t<std::tuple_element_t<0, iterator_value_t<input_iterator_t> >>

#include <xtd.core/include/xtd/collections/generic/helpers/iterator.hpp>

Represents the key iterator type.

Header
#include <xtd/collections/generic/helpers/iterator>
Namespace
xtd::collections::generic::helpers
Library
xtd.core

◆ iterator_mapped_t

template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_mapped_t = typedef std::tuple_element_t<1, iterator_value_t<input_iterator_t> >

#include <xtd.core/include/xtd/collections/generic/helpers/iterator.hpp>

Represents the mapped iterator type.

Header
#include <xtd/collections/generic/helpers/iterator>
Namespace
xtd::collections::generic::helpers
Library
xtd.core

◆ iterator_to_allocator_t

template<class input_iterator_t >
using xtd::collections::generic::helpers::iterator_to_allocator_t = typedef std::pair<std::add_const_t<iterator_key_t<input_iterator_t> >, iterator_mapped_t<input_iterator_t> >

#include <xtd.core/include/xtd/collections/generic/helpers/iterator.hpp>

Represents the iterator to allocator type.

Header
#include <xtd/collections/generic/helpers/iterator>
Namespace
xtd::collections::generic::helpers
Library
xtd.core

◆ wrap_pointer_reverse_iterator

template<class value_t , class iterator_tag_t = std::random_access_iterator_tag>
using xtd::collections::generic::helpers::wrap_pointer_reverse_iterator = typedef std::reverse_iterator<wrap_pointer_iterator<value_t, iterator_tag_t> >

#include <xtd.core/include/xtd/collections/generic/helpers/wrap_pointer_reverse_iterator.hpp>

Represents a wrap pointer reverse iterator.

Definition
template<class value_t, class iterator_tag_t = std::random_access_iterator_tag>
using wrap_pointer_reverse_iterator = std::reverse_iterator<wrap_pointer_iterator<value_t, iterator_tag_t>>;
std::reverse_iterator< wrap_pointer_iterator< value_t, iterator_tag_t > > wrap_pointer_reverse_iterator
Represents a wrap pointer reverse iterator.
Definition wrap_pointer_reverse_iterator.hpp:31
Header
#include <xtd/collections/genric/helpers/wrap_pointer_reverse_iterator>
Namespace
xtd::collections::generic::helpers
Library
xtd.core