xtd 0.2.0
Loading...
Searching...
No Matches
icollection.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "ienumerable.hpp"
6#define __XTD_CORE_INTERNAL__
7#include "../../internal/__array_definition.hpp"
8#undef __XTD_CORE_INTERNAL__
9#include "../../object.hpp"
10#include "../../size.hpp"
11
13namespace xtd {
15 namespace collections {
17 namespace generic {
43 template<class type_t>
45 public:
47
56
58
62 virtual xtd::size count() const noexcept = 0;
63
67 virtual bool is_read_only() const noexcept = 0;
68
83 virtual bool is_synchronized() const noexcept = 0;
84
106 virtual const xtd::object& sync_root() const noexcept = 0;
108
110
115 virtual void add(const type_t& item) = 0;
116
120 virtual void clear() = 0;
121
126 virtual bool contains(const type_t& item) const noexcept = 0;
127
132 virtual void copy_to(xtd::array<type_t>& array, xtd::size array_index) const = 0;
133
140 virtual bool remove(const type_t& item) = 0;
142 };
143 }
144 }
145}
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Definition array.hpp:59
Defines methods to manipulate generic collections.
Definition icollection.hpp:44
virtual bool is_synchronized() const noexcept=0
Gets a value indicating whether access to the xtd::collections::generic::icollection <type_t> is sync...
virtual const xtd::object & sync_root() const noexcept=0
Gets an object that can be used to synchronize access to the the xtd::collections::generic::icollecti...
virtual void copy_to(xtd::array< type_t > &array, xtd::size array_index) const =0
Copies the elements of the xtd::collections::generic::icollection <type_t> to an xtd::array,...
virtual bool contains(const type_t &item) const noexcept=0
Determines whether the xtd::collections::generic::icollection <type_t> contains a specific value.
typename xtd::collections::generic::ienumerable< type_t >::const_iterator const_iterator
Represents the const iterator of xtd::collections::generic::ienumerable value type.
Definition icollection.hpp:54
virtual bool is_read_only() const noexcept=0
Gets a value indicating whether the xtd::collections::generic::icollection <type_t> is read-only.
virtual bool remove(const type_t &item)=0
Removes the first occurrence of a specific object from the xtd::collections::generic::icollection <ty...
typename xtd::collections::generic::ienumerable< type_t >::value_type value_type
Represents the xtd::collections::generic::icollection value type.
Definition icollection.hpp:50
virtual xtd::size count() const noexcept=0
Gets the number of elements contained in the xtd::collections::generic::icollection <type_t>.
typename xtd::collections::generic::ienumerable< type_t >::iterator iterator
Represents the iterator of xtd::collections::generic::ienumerable value type.
Definition icollection.hpp:52
virtual void clear()=0
Removes all items from the xtd::collections::generic::icollection <type_t>.
Exposes the enumerator, which supports a simple iteration over a collection of a specified type.
Definition ienumerable.hpp:36
type_t value_type
Represents the xtd::collections::generic::ienumerable value type.
Definition ienumerable.hpp:42
typename xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >::iterator iterator
Represents the iterator of xtd::collections::generic::ienumerable value type.
Definition ienumerable.hpp:44
typename xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >::const_iterator const_iterator
Represents the const iterator of xtd::collections::generic::ienumerable value type.
Definition ienumerable.hpp:46
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ add
The Add key.
Contains xtd::collections::ienumerable alias.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10