31 template<
class type_t,
class collection_t>
32 class collection_common {
39 virtual bool empty() const noexcept {
return static_cast<const collection_t&
>(
self_).count() == 0;}
43 virtual xtd::size size() const noexcept {
return static_cast<const collection_t&
>(
self_).count();}
53 auto& self =
static_cast<collection_t&
>(
self_);
62 auto& self =
static_cast<collection_t&
>(
self_);
63 self.add(std::move(item));
73 auto& self =
static_cast<collection_t&
>(
self_);
Internal collection common definition.
Definition collection_common.hpp:32
virtual xtd::size size() const noexcept
Gets the number of elements contained in the xtd::collections::generic::icollection <type_t>.
Definition collection_common.hpp:43
virtual collection_t & operator>>(const type_t &item)
The shift right operator removes the first occurrence of a specific object from the xtd::collections:...
Definition collection_common.hpp:72
virtual collection_t & operator<<(const type_t &item)
The shift left operator adds an item to the xtd::collections::generic::icollection <type_t>.
Definition collection_common.hpp:52
virtual bool empty() const noexcept
Checks whether the container is empty.
Definition collection_common.hpp:39
#define self_
The self_ expression is a reference value expression whose value is the reference of the implicit obj...
Definition self.hpp:20
size_t size
Represents a size of any object in bytes.
Definition size.hpp:23
The xtd::extensions namespace contains interface extensions.
Definition collection_common.hpp:14
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