xtd 0.2.0
icollection.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "ienumerable.hpp"
7#define __XTD_CORE_INTERNAL__
9#undef __XTD_CORE_INTERNAL__
10#include "../../object.hpp"
11#include "../../size.hpp"
12
14namespace xtd {
16 namespace collections {
18 namespace generic {
44 template<class type_t>
45 class icollection : public xtd::collections::generic::ienumerable<type_t>, public xtd::collections::generic::extensions::collection_operators<type_t, icollection<type_t>> {
46 public:
48
57
59
63 virtual xtd::size count() const noexcept = 0;
64
68 virtual bool is_read_only() const noexcept = 0;
69
84 virtual bool is_synchronized() const noexcept = 0;
85
107 virtual const xtd::object& sync_root() const noexcept = 0;
109
111
116 virtual void add(const type_t& item) = 0;
117
121 virtual void clear() = 0;
122
127 virtual bool contains(const type_t& item) const noexcept = 0;
128
133 virtual void copy_to(xtd::array<type_t>& array, xtd::size array_index) const = 0;
134
141 virtual bool remove(const type_t& item) = 0;
143 };
144 }
145 }
146}
Contains xtd::array definitions.
xtd::any_object value_type
Definition ienumerable.hpp:42
typename xtd::collections::generic::extensions::enumerable_iterators< xtd::any_object, xtd::collections::generic::ienumerable< xtd::any_object > >::const_iterator const_iterator
Definition ienumerable.hpp:46
typename xtd::collections::generic::extensions::enumerable_iterators< xtd::any_object, xtd::collections::generic::ienumerable< xtd::any_object > >::iterator iterator
Definition ienumerable.hpp:44
Contains xtd::collections::generic::extensions::collection_operators class.
Contains xtd::collections::generic::ienumerable <type_t> interface.
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ clear
The CLEAR key.
Definition console_key.hpp:26
@ add
The Add key.
Definition console_key.hpp:170
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
virtual bool remove(const type_t &item)=0
The xtd::collections namespace contains interfaces and classes that define various collections of obj...
Definition any_pair.hpp:10
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition abstract_object.hpp:8
void copy_to(span< type_t, length > &destination) const
Copies the contents of this xtd::read_only_span <type_t> into a destination xtd:span <type_t>.
Definition read_only_span.hpp:264
Contains xtd::object class.
Contains xtd::size type.