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

Definition

Contains generic collections definitions.

Modules

 extensions
 Contain generic collections and interfaces extensions.
 
 helpers
 Contains generic collections helpers definitions.
 

Classes

class  xtd::collections::generic::comparer< type_t >
 Provides a base class for implementations of the xtd::collections::generic::icomparer <type_t> generic interface. More...
 
class  xtd::collections::generic::dictionary< key_t, value_t, hasher_t, equator_t, allocator_t >
 Represents a collection of keys and values. More...
 
class  xtd::collections::generic::empty_comparer< type_t >
 Provides an empty comparer class. More...
 
struct  xtd::collections::generic::enumerator< type_t >
 Supports a simple iteration over a generic collection. More...
 
struct  xtd::collections::generic::enumerator<>
 Supports a simple iteration over a generic collection. More...
 
class  xtd::collections::generic::equality_comparer< type_t >
 Provides a base class for implementations of the xtd::collections::generic::iequality_comparer <type_t> generic interface. More...
 
class  xtd::collections::generic::icollection< type_t >
 Defines methods to manipulate generic collections. More...
 
class  xtd::collections::generic::icomparer< type_t >
 Exposes a method that compares two objects. More...
 
class  xtd::collections::generic::idictionary< key_t, value_t >
 Represents a generic collection of key/value pairs. More...
 
class  xtd::collections::generic::ienumerable< type_t >
 Exposes the enumerator, which supports a simple iteration over a collection of a specified type. More...
 
class  xtd::collections::generic::ienumerator< type_t >
 Supports a simple iteration over a generic collection. More...
 
class  xtd::collections::generic::iequality_comparer< type_t >
 Defines methods to support the comparison of objects for equality. More...
 
class  xtd::collections::generic::ilist< type_t >
 Represents a collection of objects that can be individually accessed by index. More...
 
class  xtd::collections::generic::iset< type_t >
 Provides the base interface for the abstraction of sets. More...
 
struct  xtd::collections::generic::key_value_pair< key_t, value_t >
 Defines a key/value pair that can be set or retrieved. More...
 
struct  xtd::collections::generic::key_value_pair<>
 Defines a key/value pair that can be set or retrieved. More...
 
class  xtd::collections::generic::list< type_t, allocator_t >
 Represents a strongly typed list of objects that can be accessed by index. Provides methods to search, sort, and manipulate lists. More...
 

Typedefs

template<class type_t , class hasher_t = xtd::collections::generic::helpers::hasher<type_t>, class equator_t = xtd::collections::generic::helpers::equator<type_t>, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using xtd::collections::generic::hash_set = std::unordered_set< type_t, hasher_t, equator_t, allocator_t >
 Represents a set of values.
 
template<class type_t , class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using xtd::collections::generic::linked_list = std::forward_list< type_t, allocator_t >
 Represents a doubly linked list.
 
template<class type_t , class container_t = std::deque<type_t>>
using xtd::collections::generic::queue = std::stack< type_t, container_t >
 Represents a collection of objects that is maintained in sorted order.
 
template<class key_t , class value_t , class lesser_t = helpers::lesser<key_t>, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::sorted_dictionary = dictionary< key_t, value_t, helpers::hasher< key_t >, helpers::equator< key_t >, allocator_t >
 Represents a collection of key/value pairs that are sorted on the key.
 
template<class key_t , class value_t , class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::sorted_list = sorted_dictionary< key_t, value_t, helpers::lesser< key_t >, allocator_t >
 Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.
 
template<class type_t , class lesser_t = xtd::collections::generic::helpers::lesser<type_t>, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using xtd::collections::generic::sorted_set = std::set< type_t, lesser_t, allocator_t >
 Represents a collection of objects that is maintained in sorted order.
 
template<class type_t , class container_t = std::deque<type_t>>
using xtd::collections::generic::stack = std::stack< type_t, container_t >
 Represents a variable size last-in-first-out (LIFO) collection of instances of the same specified type.
 
template<class type_t >
using xtd::collections::generic::type_to_list_t = typename std::conditional< std::is_same< bool, type_t >::value, char, type_t >::type
 Represents the type to list type.
 

Typedef Documentation

◆ hash_set

template<class type_t , class hasher_t = xtd::collections::generic::helpers::hasher<type_t>, class equator_t = xtd::collections::generic::helpers::equator<type_t>, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using xtd::collections::generic::hash_set = typedef std::unordered_set<type_t, hasher_t, equator_t, allocator_t>

#include <xtd.core/include/xtd/collections/generic/hash_set.hpp>

Represents a set of values.

Definition
template<class type_t, class hasher_t = xtd::collections::generic::helpers::hasher<type_t>, class equator_t = xtd::collections::generic::helpers::equator<type_t>, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using hash_set = std::unordered_set<type_t, hasher_t, equator_t, allocator_t>;
std::unordered_set< type_t, hasher_t, equator_t, allocator_t > hash_set
Represents a set of values.
Definition hash_set.hpp:34
std::allocator< type_t > allocator
Represent an allocator alias.
Definition allocator.hpp:38
Implements a function object for performing comparisons. Unless specialised, invokes operator== on ty...
Definition equator.hpp:38
Header
#include <xtd/collections/generic/hash_set>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::hash_set class is same as std::unordered_set.

◆ linked_list

template<class type_t , class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using xtd::collections::generic::linked_list = typedef std::forward_list<type_t, allocator_t>

#include <xtd.core/include/xtd/collections/generic/linked_list.hpp>

Represents a doubly linked list.

Definition
template<class type_t>
using linked_list = std::list<type_t, xtd::collections::generic::helpers::allocator<type_t>>;
std::forward_list< type_t, allocator_t > linked_list
Represents a doubly linked list.
Definition linked_list.hpp:32
Header
#include <xtd/collections/generic/linked_list>
Namespace
xtd::collections::generic
Library
xtd.core

◆ queue

template<class type_t , class container_t = std::deque<type_t>>
using xtd::collections::generic::queue = typedef std::stack<type_t, container_t>

#include <xtd.core/include/xtd/collections/generic/queue.hpp>

Represents a collection of objects that is maintained in sorted order.

Definition
template<class type_t, class container_t = std::deque<type_t>>
using queue = std::stack<type_t, container_t>;
std::stack< type_t, container_t > queue
Represents a collection of objects that is maintained in sorted order.
Definition queue.hpp:39
Header
#include <xtd/collections/generic/queue>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_set class is same as std::set.
A xtd::collections::generic::sorted_set object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are ! allowed. Changing the sort values of existing items is ! supported and may lead to unexpected behavior.
Examples
The following example demonstrates how to merge two disparate sets. This example creates two xtd::collections::generic::sorted_set objects, and populates them with even and odd numbers, respectively. A third xtd::collections::generic::sorted_set object is created from the set that contains the even numbers. The example then calls the UnionWith method, which adds the odd number set to the third set.

◆ sorted_dictionary

template<class key_t , class value_t , class lesser_t = helpers::lesser<key_t>, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::sorted_dictionary = typedef dictionary<key_t, value_t, helpers::hasher<key_t>, helpers::equator<key_t>, allocator_t>

#include <xtd.core/include/xtd/collections/generic/sorted_dictionary.hpp>

Represents a collection of key/value pairs that are sorted on the key.

Definition
template<class key_t, class value_t, class lesser_t = helpers::lesser<key_t>, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
Represents a collection of keys and values.
Definition dictionary.hpp:67
Represents a generic collection of key/value pairs.
Definition idictionary.hpp:44
Supports all classes in the xtd class hierarchy and provides low-level services to derived classes....
Definition object.hpp:43
Header
#include <xtd/collections/generic/sorted_dictionary>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_dictionary class is same as std::map.
A xtd::collections::generic::sorted_dictionary object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are ! allowed. Changing the sort values of existing items is ! supported and may lead to unexpected behavior.
Examples
The following shows how to use xtd::collections::generic::sorted_dictionary.

◆ sorted_list

template<class key_t , class value_t , class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
using xtd::collections::generic::sorted_list = typedef sorted_dictionary<key_t, value_t, helpers::lesser<key_t>, allocator_t>

#include <xtd.core/include/xtd/collections/generic/sorted_list.hpp>

Represents a collection of key/value pairs that are sorted by the keys and are accessible by key and by index.

Definition
template<class key_t, class value_t, class allocator_t = helpers::allocator<std::pair<const key_t, value_t>>>
class sorted_list : public xtd::object, public xtd::collections::generic::idictionary<key_t, value_t>;
Header
#include <xtd/collections/generic/sorted_list>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_list class is same as std::map.
A xtd::collections::generic::sorted_list object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are ! allowed. Changing the sort values of existing items is ! supported and may lead to unexpected behavior.
Examples
The following shows how to use xtd::collections::generic::sorted_list.

◆ sorted_set

template<class type_t , class lesser_t = xtd::collections::generic::helpers::lesser<type_t>, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using xtd::collections::generic::sorted_set = typedef std::set<type_t, lesser_t, allocator_t>

#include <xtd.core/include/xtd/collections/generic/sorted_set.hpp>

Represents a collection of objects that is maintained in sorted order.

Definition
template<class type_t, class lesser_t = xtd::collections::generic::helpers::lesser<type_t>, class allocator_t = xtd::collections::generic::helpers::allocator<type_t>>
using sorted_set = std::set<type_t, comparer_t, allocator_t>;
std::set< type_t, lesser_t, allocator_t > sorted_set
Represents a collection of objects that is maintained in sorted order.
Definition sorted_set.hpp:37
Header
#include <xtd/collections/generic/sorted_set>
Namespace
xtd::collections::generic
Library
xtd.core
Remarks
The xtd::collections::generic::sorted_set class is same as std::set.
A xtd::collections::generic::sorted_set object maintains a sorted order without affecting performance as elements are inserted and deleted. Duplicate elements are ! allowed. Changing the sort values of existing items is ! supported and may lead to unexpected behavior.
Examples
The following example demonstrates how to merge two disparate sets. This example creates two xtd::collections::generic::sorted_set objects, and populates them with even and odd numbers, respectively. A third xtd::collections::generic::sorted_set object is created from the set that contains the even numbers. The example then calls the UnionWith method, which adds the odd number set to the third set.

◆ stack

template<class type_t , class container_t = std::deque<type_t>>
using xtd::collections::generic::stack = typedef std::stack<type_t, container_t>

#include <xtd.core/include/xtd/collections/generic/stack.hpp>

Represents a variable size last-in-first-out (LIFO) collection of instances of the same specified type.

Definition
template<class type_t, class container_t = std::deque<type_t>>
using stack = std::stack<type_t, container_t>;
std::stack< type_t, container_t > stack
Represents a variable size last-in-first-out (LIFO) collection of instances of the same specified typ...
Definition stack.hpp:34
Header
#include <xtd/collections/generic/stack>
Namespace
xtd::collections::generic
Library
xtd.core

◆ type_to_list_t

template<class type_t >
using xtd::collections::generic::type_to_list_t = typedef typename std::conditional<std::is_same<bool, type_t>::value, char, type_t>::type

#include <xtd.core/include/xtd/internal/__list_definition.hpp>

Represents the type to list type.

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