xtd 0.2.0
Loading...
Searching...
No Matches
ilist.hpp
Go to the documentation of this file.
1
4#pragma once
5#include "icollection.hpp"
6#include "../../bpos.hpp"
7#include "../../epos.hpp"
8#include "../../npos.hpp"
9#include "../../size.hpp"
10
12namespace xtd {
14 namespace collections {
16 namespace generic {
42 template<class type_t>
43 class ilist : public icollection<type_t> {
44 public:
46
56 inline static constexpr xtd::size npos = xtd::npos;
57
66 static inline constexpr xtd::size bpos = 0;
67
84 static inline constexpr xtd::size epos = npos - 1;
86
88
93 virtual bool is_fixed_size() const noexcept = 0;
95
97
103 virtual xtd::size index_of(const type_t& item) const noexcept = 0;
104
112 virtual void insert(xtd::size index, const type_t& item) = 0;
113
119 virtual void remove_at(xtd::size index) = 0;
121
123
128 virtual const type_t& operator [](xtd::size index) const = 0;
132 virtual type_t& operator [](xtd::size index) = 0;
134 };
135 }
136 }
137}
Contains xtd::epos constant.
Contains xtd::epos constant.
Contains xtd::collections::generic::icollection <type_t> interface.
constexpr xtd::size npos
Represents a value that is not a valid position in a collection.
Definition npos.hpp:26
constexpr xtd::size epos
Represents the index of the last valid element in a collection.
Definition epos.hpp:33
constexpr xtd::size bpos
Represents the index of the firsy valid element in a collection.
Definition bpos.hpp:25
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
@ insert
The INS (INSERT) key.
Definition console_key.hpp:62
The xtd::collections::generic namespace contains interfaces and classes that define generic collectio...
Definition comparer.hpp:16
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
Contains xtd::npos constant.
Contains xtd::size type.