xtd 0.2.0
Loading...
Searching...
No Matches
ilist.h
Go to the documentation of this file.
1
4#pragma once
5#include "icollection.h"
6#include "../../size.h"
7#include <limits>
8
10namespace xtd {
12 namespace collections {
14 namespace generic {
40 template<typename type_t>
41 class ilist : public icollection<type_t> {
42 public:
44
51
53
56 inline static constexpr xtd::size npos = std::numeric_limits<xtd::size>::max();
58
60
65 virtual bool is_fixed_size() const noexcept = 0;
67
69
75 virtual xtd::size index_of(const type_t& item) const noexcept = 0;
76
84 virtual void insert(xtd::size index, const type_t& item) = 0;
85
91 virtual void remove_at(xtd::size index) = 0;
93
95
100 virtual const type_t& operator [](xtd::size index) const = 0;
104 virtual type_t& operator [](xtd::size index) = 0;
106 };
107 }
108 }
109}
Defines methods to manipulate generic collections.
Definition icollection.h:44
typename ienumerable< type_t >::const_iterator const_iterator
Represents the const iterator of xtd::collections::generic::ienumerable value type.
Definition icollection.h:52
typename ienumerable< type_t >::iterator iterator
Represents the iterator of xtd::collections::generic::ienumerable value type.
Definition icollection.h:50
Represents a collection of objects that can be individually accessed by index.
Definition ilist.h:41
static constexpr xtd::size npos
This is a special value equal to the maximum value representable by the type xtd::size.
Definition ilist.h:56
typename icollection< type_t >::iterator iterator
Represents the iterator of xtd::collections::generic::ienumerable value type.
Definition ilist.h:47
virtual void remove_at(xtd::size index)=0
Removes the xtd::collections::generic::ilist <type_t> item at the specified index.
virtual bool is_fixed_size() const noexcept=0
Gets a value indicating whether the xtd::collections::generic::ilist <type_t> has a fixed size.
typename icollection< type_t >::const_iterator const_iterator
Represents the const iterator of xtd::collections::generic::ienumerable value type.
Definition ilist.h:49
virtual xtd::size index_of(const type_t &item) const noexcept=0
Determines the index of a specific item in the xtd::collections::generic::ilist <type_t>.
size_t size
Represents a size of any object in bytes.
Definition size.h:23
@ insert
The INS (INSERT) key.
Contains xtd::collections::ienumerator alias.
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.h:10