xtd 0.2.0
Loading...
Searching...
No Matches
xtd::diagnostics::trace_listener_collection Class Reference
Inheritance diagram for xtd::diagnostics::trace_listener_collection:
xtd::collections::generic::list< xtd::sptr< xtd::diagnostics::trace_listener > > xtd::iequatable< trace_listener_collection > xtd::object xtd::collections::generic::ilist< type_t > xtd::iequatable< type_t > xtd::interface xtd::extensions::equality_operators< type_t, equatable_t > xtd::collections::generic::icollection< type_t > xtd::interface xtd::extensions::equality_operators< type_t, iequatable< type_t > > xtd::collections::generic::ienumerable< type_t > xtd::collections::generic::extensions::collection_operators< type_t, icollection< type_t > > xtd::interface xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > > xtd::collections::generic::extensions::enumerable< ienumerable< type_t >, type_t >

Definition

Represents a collection of xtd::diagnostics::trace_listener.

class core_export_ trace_listener_collection : public xtd::collections::generic::list<xtd::sptr<xtd::diagnostics::trace_listener>>
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition list.hpp:80
Represents a collection of xtd::diagnostics::trace_listener.
Definition trace_listener_collection.hpp:29
#define core_export_
Define shared library export.
Definition core_export.hpp:13
Inheritance
xtd::collections::generic::list<xtd::sptr<xtd::diagnostics::trace_listener>> → xtd::diagnostics::trace_listener_collection
Header
#include <xtd/diagnostics/trace_listener_collection>
Namespace
xtd::diagnostics
Library
xtd.core

Public Aliases

using base = xtd::collections::generic::list< value_type >
 Represents the base type of the collection.
 

Public Constructors

 trace_listener_collection ()=default
 Creates a new object xtd::diagnostics::trace_listener_collection with specified allocator (optional).
 
 trace_listener_collection (const std::initializer_list< value_type > &il)
 Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list.
 
bool equals (const object &value) const noexcept override
 Determines whether the specified object is equal to the current object.
 
bool equals (const trace_listener_collection &value) const noexcept override
 

Operators

const_reference operator[] (const xtd::string &name) const
 Gets the first xtd::diagnostics::trace_listener in the list with the specified name.
 
reference operator[] (const xtd::string &name)
 Gets the first xtd::diagnostics::trace_listener in the list with the specified name.
 

Additional Inherited Members

- Public Types inherited from xtd::collections::generic::list< xtd::sptr< xtd::diagnostics::trace_listener > >
using value_type = xtd::sptr< xtd::diagnostics::trace_listener >
 Represents the list value type.
 
using allocator_type = typename xtd::collections::generic::helpers::allocator< typename std::conditional< std::is_same< bool, value_type >::value, xtd::byte, value_type >::type >
 Represents the list allocator type.
 
using base_type = std::vector< typename std::conditional< std::is_same< bool, value_type >::value, xtd::byte, value_type >::type, allocator_type >
 Represents the list base type.
 
using const_base_type = const base_type
 Represents the list base type.
 
using size_type = xtd::size
 Represents the list size type (usually xtd::size).
 
using difference_type = xtd::ptrdiff
 Represents the list difference type (usually xtd::ptrdiff).
 
using reference = value_type &
 Represents the reference of list value type.
 
using const_reference = const value_type &
 Represents the const reference of list value type.
 
using pointer = value_type *
 Represents the pointer of list value type.
 
using const_pointer = const value_type *
 Represents the const pointer of list value type.
 
using iterator = typename xtd::collections::generic::ienumerable< xtd::sptr< xtd::diagnostics::trace_listener > >::iterator
 Represents the iterator of list value type.
 
using const_iterator = typename xtd::collections::generic::ienumerable< xtd::sptr< xtd::diagnostics::trace_listener > >::const_iterator
 Represents the const iterator of list value type.
 
using reverse_iterator = typename base_type::reverse_iterator
 Represents the reverse iterator of list value type.
 
using const_reverse_iterator = typename base_type::const_reverse_iterator
 Represents the const reverse iterator of list value type.
 
using read_only_collection = xtd::collections::object_model::read_only_collection< value_type >
 Represents the read only collection of of list.
 
- Public Types inherited from xtd::collections::generic::ilist< type_t >
using iterator = typename icollection< type_t >::iterator
 Represents the iterator of xtd::collections::generic::ienumerable value type.
 
using const_iterator = typename icollection< type_t >::const_iterator
 Represents the const iterator of xtd::collections::generic::ienumerable value type.
 
- Public Types inherited from xtd::collections::generic::icollection< type_t >
using value_type = typename xtd::collections::generic::ienumerable< type_t >::value_type
 Represents the xtd::collections::generic::icollection value type.
 
using iterator = typename xtd::collections::generic::ienumerable< type_t >::iterator
 Represents the iterator of xtd::collections::generic::ienumerable value type.
 
using const_iterator = typename xtd::collections::generic::ienumerable< type_t >::const_iterator
 Represents the const iterator of xtd::collections::generic::ienumerable value type.
 
- Public Types inherited from xtd::collections::generic::ienumerable< type_t >
using value_type = type_t
 Represents the xtd::collections::generic::ienumerable value type.
 
using iterator = typename xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >::iterator
 Represents the iterator of xtd::collections::generic::ienumerable value type.
 
using const_iterator = typename xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >::const_iterator
 Represents the const iterator of xtd::collections::generic::ienumerable value type.
 
- Public Types inherited from xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >
using iterator = enumerable_iterator
 Represents the iterator of enumarable value type.
 
using const_iterator = const enumerable_iterator
 Represents the const iterator of enumarable value type.
 
- Public Types inherited from xtd::collections::generic::extensions::enumerable< ienumerable< type_t >, type_t >
using enumerable_type = ienumerable< type_t >
 Represents the ienumerable enumerable type.
 
using source_type = type_t
 Represents the ienumerable source type.
 
using ienumerable = typename xtd::linq::enumerable::ienumerable< type_t >
 Represents the ienumerable value type.
 
using list = typename xtd::linq::enumerable::list< type_t >
 Represents the list value type.
 
- Static Public Attributes inherited from xtd::collections::generic::list< xtd::sptr< xtd::diagnostics::trace_listener > >
static constexpr size_type npos
 This is a special value equal to the maximum value representable by the type size_type.
 
- Static Public Attributes inherited from xtd::collections::generic::ilist< type_t >
static constexpr xtd::size npos
 This is a special value equal to the maximum value representable by the type xtd::size.
 
- Public Member Functions inherited from xtd::collections::generic::list< xtd::sptr< xtd::diagnostics::trace_listener > >
 list () noexcept=default
 Initializes a new instance of the xtd::collections::generic::list class that is empty.
 
 list (const allocator_type &alloc) noexcept
 Constructs an empty container with the given allocator.
 
 list (size_type count, const xtd::sptr< xtd::diagnostics::trace_listener > &value, const allocator_type &alloc=allocator_type())
 Constructs the container with specified count copies of elements with specified value.
 
 list (size_type count, const allocator_type &alloc=allocator_type())
 Constructs the container with specified count default-inserted instances of type_t. No copies are made.
 
 list (input_iterator_t first, input_iterator_t last, const allocator_type &alloc=allocator_type())
 Constructs the container with the contents of the range [first, last).
 
 list (const xtd::collections::generic::ienumerable< xtd::sptr< xtd::diagnostics::trace_listener > > &collection, const allocator_type &alloc=allocator_type())
 Initializes a new instance of the xtd::collections::generic::list <type_t> class that contains elements copied from the specified collection and has sufficient capacity to accommodate the number of elements copied.
 
 list (const list &list)
 Default copy constructor with specified list.
 
 list (const base_type &list)
 Copy constructor with specified base type list.
 
 list (const list &list, const allocator_type &alloc)
 Default copy constructor with specified list, and allocator.
 
 list (const base_type &list, const allocator_type &alloc)
 Default copy constructor with specified base type list, and allocator.
 
 list (std::initializer_list< xtd::sptr< xtd::diagnostics::trace_listener > > items, const allocator_type &alloc=allocator_type())
 Constructs the container with the contents of the specified initializer list, and allocator.
 
 list (list &&other)
 Move constructor with specified list.
 
 list (base_type &&other)
 Move constructor with specified base type list.
 
 list (list &&other, const allocator_type &alloc)
 Move constructor with specified list, and allocator.
 
 list (base_type &&other, const allocator_type &alloc)
 Move constructor with specified base tyoe list, and allocator.
 
virtual reference back ()
 Returns a reference to the last element in the container.
 
virtual const_reference back () const
 Returns a reference to the last element in the container.
 
const_iterator begin () const noexcept override
 Returns an iterator to the first element of the enumarable.
 
iterator begin () noexcept override
 Returns an iterator to the first element of the enumarable.
 
virtual size_type capacity () const noexcept
 Gets the total number of elements the internal data structure can hold without resizing.
 
virtual void capacity (size_type value)
 Sets the total number of elements the internal data structure can hold without resizing.
 
const_iterator cbegin () const noexcept override
 Returns an iterator to the first element of the enumarable.
 
const_iterator cend () const noexcept override
 Returns an iterator to the element following the last element of the enumarable.
 
size_type count () const noexcept override
 Gets the number of elements contained in the xtd::collections::generic::list <type_t>.
 
virtual const_reverse_iterator crbegin () const noexcept
 Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend().
 
virtual const_reverse_iterator crend () const noexcept
 Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
 
virtual pointer data () noexcept
 Returns pointer to the underlying array serving as element storage.
 
virtual const_pointer data () const noexcept
 Returns pointer to the underlying array serving as element storage.
 
virtual bool empty () const noexcept
 Checks if the container has no elements, i.e. whether xtd::collections::generic::list::begin() == xtd::collections::generic::list::end().
 
const_iterator end () const noexcept override
 Returns an iterator to the element following the last element of the enumarable.
 
iterator end () noexcept override
 Returns an iterator to the element following the last element of the enumarable.
 
virtual reference front ()
 Returns a reference to the first element in the container.
 
virtual const_reference front () const
 Returns a reference to the first element in the container.
 
bool is_fixed_size () const noexcept override
 Gets a value indicating whether the xtd::collections::generic::list <type_t> has a fixed size.
 
bool is_read_only () const noexcept override
 Gets a value indicating whether the xtd::collections::generic::list <type_t> is read-only.
 
bool is_synchronized () const noexcept override
 Gets a value indicating whether access to the xtd::collections::generic::list <type_t> is synchronized (thread safe).
 
virtual const_base_typeitems () const noexcept
 Returns the underlying base type items.
 
virtual base_typeitems () noexcept
 Returns the underlying base type items.
 
virtual size_type max_size () const noexcept
 Returns the maximum number of elements the container is able to hold due to system or library implementation limitations, i.e. std::distance(xtd::collections::generic::list::begin(), xtd::collections::generic::list::end()) for the largest container.
 
virtual reverse_iterator rbegin () noexcept
 Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend().
 
virtual const_reverse_iterator rbegin () const noexcept
 Returns a reverse iterator to the first element of the reversed vector. It corresponds to the last element of the non-reversed vector. If the vector is empty, the returned iterator is equal to xtd::collections::generic::list::rend().
 
virtual reverse_iterator rend () noexcept
 Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
 
virtual const_reverse_iterator rend () const noexcept
 Returns a reverse iterator to the element following the last element of the reversed vector. It corresponds to the element preceding the first element of the non-reversed vector. This element acts as a placeholder, attempting to access it results in undefined behavior.
 
virtual size_type size () const noexcept
 Returns the number of elements in the container, i.e. std::distance(xtd::collections::generic::list::begin(), xtd::collections::generic::list::end()).
 
const xtd::objectsync_root () const noexcept override
 Gets an object that can be used to synchronize access to the the xtd::collections::generic::list <type_t>.
 
void add (const xtd::sptr< xtd::diagnostics::trace_listener > &item) override
 Adds an object to the end of the xtd::collections::generic::list <type_t>.
 
void add_range (const xtd::collections::generic::ienumerable< xtd::sptr< xtd::diagnostics::trace_listener > > &enumerable)
 Adds copy of elements from the specified collection to the end of the xtd::collections::generic::list <type_t>.
 
void add_range (std::initializer_list< xtd::sptr< xtd::diagnostics::trace_listener > > il)
 Adds copy of elements from the specified collection to the end of the xtd::collections::generic::list <type_t>.
 
read_only_collection as_read_only () const noexcept
 Returns a read-only xtd::collections::object_model::read_only_collection <type_t> wrapper for the current collection.
 
void assign (size_type count, const xtd::sptr< xtd::diagnostics::trace_listener > &value)
 Replaces the contents with count copies of value value.
 
void assign (input_iterator_t first, input_iterator_t last)
 Replaces the contents with copies of those in the range [first, last).
 
virtual void assign (std::initializer_list< xtd::sptr< xtd::diagnostics::trace_listener > > items)
 Replaces the contents with the elements from the initializer list items.
 
virtual reference at (size_type index)
 Returns a reference to the element at specified location pos, with bounds checking.
 
virtual const_reference at (size_type index) const
 Returns a reference to the element at specified location pos, with bounds checking.
 
xtd::size binary_search (const xtd::sptr< xtd::diagnostics::trace_listener > &item) const
 Searches the entire sorted xtd::collections::generic::list <type_t> for an element using the default comparer and returns the zero-based index of the element.
 
xtd::size binary_search (const xtd::sptr< xtd::diagnostics::trace_listener > &item, const xtd::collections::generic::icomparer< xtd::sptr< xtd::diagnostics::trace_listener > > &comparer) const
 Searches the entire sorted xtd::collections::generic::list <type_t> for an element using the specified comparer and returns the zero-based index of the element.
 
xtd::size binary_search (xtd::size index, xtd::size count, const xtd::sptr< xtd::diagnostics::trace_listener > &item, const xtd::collections::generic::icomparer< xtd::sptr< xtd::diagnostics::trace_listener > > &comparer) const
 Searches a range of elements in the sorted xtd::collections::generic::list <type_t> for an element using the specified comparer and returns the zero-based index of the element.
 
void clear () override
 Removes all elements from the xtd::collections::generic::list <type_t>.
 
bool contains (const xtd::sptr< xtd::diagnostics::trace_listener > &value) const noexcept override
 Determines whether an element is in the xtd::colllections::generic::list <type_t>.
 
list< output_t > convert_all (xtd::converter< output_t, const xtd::sptr< xtd::diagnostics::trace_listener > & > converter) const
 Converts the elements in the current xtd::colllections::generic::list <type_t> to another type, and returns a list containing the converted elements.
 
virtual void copy_to (xtd::array< xtd::sptr< xtd::diagnostics::trace_listener > > &array) const
 Copies the entire xtd::collections::generic::list <type_t> to a compatible one-dimensional array.
 
void copy_to (xtd::array< xtd::sptr< xtd::diagnostics::trace_listener > > &array, size_type array_index) const override
 Copies the entire xtd::colllections::generic::list <type_t> to a compatible one-dimensional array, starting at the specified index of the target array.
 
virtual void copy_to (size_type index, xtd::array< xtd::sptr< xtd::diagnostics::trace_listener > > &array, size_type array_index, size_type count) const
 Copies the entire xtd::collections::generic::list <type_t> to a compatible one-dimensional array, starting at the specified index of the target array.
 
iterator emplace (const_iterator pos, args_t &&... args)
 Inserts a new element into the container directly before pos.
 
reference emplace_back (args_t &&... args)
 Appends a new element to the end of the container. The element is constructed through std::allocator_traits::construct, which typically uses placement-new to construct the element in-place at the location provided by the container. The arguments args... are forwarded to the constructor as std::forward<Args>(args)....
 
xtd::size ensure_capacity (xtd::size capacity)
 Ensures that the capacity of this list is at least the specified capacity. If the current capacity is less than capacity, it is increased to at least the specified capacity.
 
bool equals (const list &rhs) const noexcept override
 Indicates whether the current object is equal to another object of the same type.
 
virtual iterator erase (const_iterator pos)
 Erases the specified elements from the container.
 
virtual iterator erase (const_iterator first, const_iterator last)
 Erases the specified elements from the container.
 
bool exists (xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Determines whether the xtd::collections::generic::list <type_t> contains elements that match the conditions defined by the specified predicate.
 
xtd::sptr< xtd::diagnostics::trace_listenerfind (xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the first occurrence within the entire xtd::collections::generic::list <type_t>.
 
list< xtd::sptr< xtd::diagnostics::trace_listener > > find_all (xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Retrieves all the elements that match the conditions defined by the specified predicate.
 
xtd::size find_index (xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the entire xtd::collections::generic::list <type_t>.
 
xtd::size find_index (xtd::size start_index, xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the xtd::collections::generic::list <type_t> that extends from the specified index to the last element.
 
xtd::size find_index (xtd::size start_index, xtd::size count, xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the first occurrence within the range of elements in the xtd::collections::generic::list <type_t> that starts at the specified index and contains the specified number of elements.
 
xtd::sptr< xtd::diagnostics::trace_listenerfind_last (xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the last occurrence within the entire xtd::collections::generic::list <type_t>.
 
xtd::size find_last_index (xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the entire xtd::collections::generic::list <type_t>.
 
xtd::size find_last_index (xtd::size start_index, xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the xtd::collections::generic::list <type_t> that extends from the first element to the specified index.
 
xtd::size find_last_index (xtd::size start_index, xtd::size count, xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Searches for an element that matches the conditions defined by the specified predicate, and returns the zero-based index of the last occurrence within the range of elements in the xtd::collections::generic::list <type_t> that contains the specified number of elements and ends at the specified index.
 
void for_each (xtd::action< const xtd::sptr< xtd::diagnostics::trace_listener > & > action)
 Performs the specified action on each element of the xtd::collections::generic::list <type_t>.
 
virtual allocator_type get_allocator () const
 Returns the allocator associated with the container.
 
virtual base_typeget_base_type () noexcept
 Returns the underlying base type.
 
virtual const base_typeget_base_type () const noexcept
 Returns the underlying base type.
 
enumerator< value_typeget_enumerator () const noexcept override
 Returns an enumerator that iterates through the xtd::collections::generic::list <type_t>.
 
list get_range (size_type index, size_type count)
 Creates a shallow copy of a range of elements in the source xtd::collections::generic::list <type_t>.
 
size_type index_of (const xtd::sptr< xtd::diagnostics::trace_listener > &value) const noexcept override
 Determines the index of a specific item in the xtd::collections::generic::list <type_t>.
 
virtual size_type index_of (const xtd::sptr< xtd::diagnostics::trace_listener > &value, size_type index) const
 Determines the index of a specific item in the xtd::collections::generic::list <type_t>.
 
virtual size_type index_of (const xtd::sptr< xtd::diagnostics::trace_listener > &value, size_type index, size_type count) const
 Determines the index of a specific item in the xtd::collections::generic::list <type_t>.
 
virtual iterator insert (const_iterator pos, const xtd::sptr< xtd::diagnostics::trace_listener > &value)
 Inserts elements at the specified location in the container.
 
virtual iterator insert (const_iterator pos, const xtd::sptr< xtd::diagnostics::trace_listener > &&value)
 Inserts elements at the specified location in the container.
 
virtual iterator insert (const_iterator pos, size_type count, const xtd::sptr< xtd::diagnostics::trace_listener > &value)
 Inserts elements at the specified location in the container.
 
iterator insert (const_iterator pos, input_iterator_t first, input_iterator_t last)
 Inserts elements at the specified location in the container.
 
virtual iterator insert (const_iterator pos, const std::initializer_list< xtd::sptr< xtd::diagnostics::trace_listener > > &items)
 Inserts elements at the specified location in the container.
 
void insert (size_type index, const xtd::sptr< xtd::diagnostics::trace_listener > &value) override
 Inserts an element into the xtd::collections::generic::list <type_t> at the specified index.
 
virtual void insert_range (size_type index, const xtd::collections::generic::ienumerable< xtd::sptr< xtd::diagnostics::trace_listener > > &enumerable)
 Inserts copy of elements from a collection into the xtd::collections::generic::list <type_t> at the specified index.
 
virtual void insert_range (size_type index, const std::initializer_list< xtd::sptr< xtd::diagnostics::trace_listener > > &items)
 Inserts copy of elements from a collection into the xtd::collections::generic::list <type_t> at the specified index.
 
size_type last_index_of (const xtd::sptr< xtd::diagnostics::trace_listener > &value) const
 Determines the last index of a specific item in the xtd::collections::generic::list <type_t>.
 
size_type last_index_of (const xtd::sptr< xtd::diagnostics::trace_listener > &value, size_type index) const
 Determines the last index of a specific item in the xtd::collections::generic::list <type_t>.
 
size_type last_index_of (const xtd::sptr< xtd::diagnostics::trace_listener > &value, size_type index, size_type count) const
 Determines the last index of a specific item in the xtd::collections::generic::list <type_t>.
 
virtual void pop_back ()
 Removes the last element of the container.
 
virtual void push_back (const xtd::sptr< xtd::diagnostics::trace_listener > &value)
 Appends the given element value to the end of the container.
 
virtual void push_back (xtd::sptr< xtd::diagnostics::trace_listener > &&value)
 Appends the given element value to the end of the container.
 
bool remove (const xtd::sptr< xtd::diagnostics::trace_listener > &item) override
 Removes the first occurrence of a specific object from the xtd::collections::generic::list <type_t>.
 
xtd::size remove_all (const xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > &match)
 Removes all the elements that match the conditions defined by the specified predicate.
 
void remove_at (size_type index) override
 Removes the element at the specified index of the xtd::collections::generic::list <type_t>.
 
virtual void remove_range (size_type index, size_type count)
 Removes a range of elements from the xtd::collections::generic::list <type_t>.
 
virtual void reserve (size_type new_cap)
 Increase the capacity of the vector (the total number of elements that the vector can hold without requiring reallocation) to a value that's greater or equal to new_cap. If new_cap is greater than the current capacity(), new storage is allocated, otherwise the function does nothing.
 
virtual void resize (size_type count)
 Resizes the container to contain count elements, does nothing if count == size(). @param count The new size of the container. @remarks If the current size is greater thancount, the container is reduced to its firstcountelements. @remarks If the current size is less thancount`, additional default-inserted elements are appended.
 
virtual void resize (size_type count, const value_type &value)
 Resizes the container to contain count elements, does nothing if count == size(). @param count The new size of the container. @param value The value to initialize the new elements with. @remarks If the current size is greater thancount, the container is reduced to its firstcountelements. @remarks If the current size is less thancount, additional copies ofvalue` are appended.
 
void reverse ()
 Reverses the order of the elements in the entire xtd::collections::generic::list <type_t>.
 
void reverse (size_type index, size_type count)
 Reverses the order of the elements in the specified range.
 
virtual void shrink_to_fit ()
 Requests the removal of unused capacity.
 
list< xtd::sptr< xtd::diagnostics::trace_listener > > slice (size_type start, size_type length) const
 Creates a shallow copy of a range of elements in the source xtd::collections::generic::list <type_t>.
 
void sort ()
 Sorts the elements in the entire xtd::collections::generic::list <type_t> using the default comparer.
 
void sort (xtd::comparison< const xtd::sptr< xtd::diagnostics::trace_listener > & > comparison)
 Sorts the elements in the entire xtd::collections::generic::list <type_t> using the specified xtd::comparison <type_t>.
 
void sort (const xtd::collections::generic::icomparer< xtd::sptr< xtd::diagnostics::trace_listener > > &comparer)
 Sorts the elements in the entire xtd::collections::generic::list <type_t> using the specified comparer.
 
void sort (xtd::size index, xtd::size count, const xtd::collections::generic::icomparer< xtd::sptr< xtd::diagnostics::trace_listener > > &comparer)
 Sorts the elements in a range of elements in xtd::collections::generic::list <type_t> using the specified comparer.
 
virtual void swap (list &other) noexcept
 Exchanges the contents and capacity of the container with those of other. Does not invoke any move, copy, or swap operations on individual elements.
 
virtual xtd::array< value_typeto_array () const noexcept
 Copies the elements of the xtd::collections::generic::list <type_t> to a new array.
 
string to_string () const noexcept override
 Returns a xtd::string that represents the current object.
 
virtual void trim_excess ()
 Sets the capacity to the actual number of elements in the xtd::collections::generic::list <type_t>, if that number is less than a threshold value.
 
bool true_for_all (xtd::predicate< const xtd::sptr< xtd::diagnostics::trace_listener > & > match) const
 Determines whether every element in the xtd::collections::generic::list <type_t> matches the conditions defined by the specified predicate.
 
listoperator= (const list &other)=default
 Copy assignment operator. Replaces the contents with a copy of the contents of other.
 
listoperator= (list &&other) noexcept
 Move assignment operator. Replaces the contents with those of other using move semantics (i.e. the data in other is moved from other into this container). other is in a valid but unspecified state afterwards.
 
listoperator= (std::initializer_list< xtd::sptr< xtd::diagnostics::trace_listener > > &items)
 Replaces the contents with those identified by initializer list ilist.
 
const_reference operator[] (size_type index) const override
 Returns a reference to the element at specified location index.
 
reference operator[] (size_type index) override
 Returns a reference to the element at specified location index.
 
 operator const base_type & () const noexcept
 Returns a reference to the underlying base type.
 
 operator base_type & () noexcept
 Returns a reference to the underlying base type.
 
- Public Member Functions inherited from xtd::object
 object ()=default
 Create a new instance of the ultimate base class object.
 
virtual xtd::size get_hash_code () const noexcept
 Serves as a hash function for a particular type.
 
virtual type_object get_type () const noexcept
 Gets the type of the current instance.
 
template<class object_t >
xtd::uptr< object_t > memberwise_clone () const
 Creates a shallow copy of the current object.
 
- Public Member Functions inherited from xtd::collections::generic::ilist< type_t >
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>.
 
virtual void insert (xtd::size index, const type_t &item)=0
 Inserts an item to the xtd::collections::generic::ilist <type_t> at the specified index.
 
- Public Member Functions inherited from xtd::collections::generic::icollection< type_t >
virtual void add (const type_t &item)=0
 Adds an item to the xtd::collections::generic::icollection <type_t>.
 
virtual bool contains (const type_t &item) const noexcept=0
 Determines whether the xtd::collections::generic::icollection <type_t> contains a specific value.
 
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, starting at a particular xtd::array index.
 
virtual bool remove (const type_t &item)=0
 Removes the first occurrence of a specific object from the xtd::collections::generic::icollection <type_t>.
 
- Public Member Functions inherited from xtd::collections::generic::ienumerable< type_t >
- Public Member Functions inherited from xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >
- Public Member Functions inherited from xtd::collections::generic::extensions::enumerable< ienumerable< type_t >, type_t >
type_t aggregate (const std::function< type_t(const type_t &, const type_t &)> &func) const
 Applies an accumulator function over a sequence.
 
type_t aggregate (const type_t &seed, const std::function< type_t(const type_t &, const type_t &)> &func) const
 Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
 
accumulate_t aggregate (const accumulate_t &seed, const std::function< accumulate_t(const type_t &, const accumulate_t &)> &func) const
 Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value.
 
type_t aggregate (const type_t &seed, const std::function< type_t(const type_t &, const type_t &)> &func, const std::function< type_t(const type_t &)> &result_selector) const
 Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.
 
result_t aggregate (const accumulate_t &seed, const std::function< accumulate_t(const type_t &, const accumulate_t &)> &func, const std::function< result_t(const accumulate_t &)> &result_selector) const
 Applies an accumulator function over a sequence. The specified seed value is used as the initial accumulator value, and the specified function is used to select the result value.
 
bool all (const std::function< bool(const type_t &)> &predicate) const
 Determines whether all elements of a sequence satisfy a condition.
 
bool any () const noexcept
 Determines whether a sequence contains any elements.
 
bool any (const std::function< bool(const type_t &)> &predicate) const
 Determines whether any element of a sequence satisfies a condition.
 
const ienumerable< type_t > & append (const type_t &element) const noexcept
 Appends a value to the end of the sequence.
 
const ienumerable< type_t > & as_enumerable () const noexcept
 Returns the input typed as xtd::collections::generic::ienumerable <type_t>.
 
auto average () const noexcept
 Computes the average of a sequence of source_t values.
 
const ienumerable< result_t > & cast () const noexcept
 Casts the elements of an xtd::collections::generic::ienumerable to the specified type.
 
const ienumerable< xtd::array< type_t > > & chunk (size_t size) const
 Splits the elements of a sequence into chunks of size at most size.
 
const ienumerable< type_t > & concat (const ienumerable< type_t > &second) const noexcept
 Concatenates two sequences.
 
bool contains (const type_t &value) const noexcept
 Determines whether a sequence contains a specified element by using the default equality comparer.
 
bool contains (const type_t &value, const xtd::collections::generic::iequality_comparer< type_t > &comparer) const noexcept
 Determines whether a sequence contains a specified element by using a specified equality comparer.
 
size_t count () const noexcept
 Returns the number of elements in current sequence.
 
size_t count (const std::function< bool(const type_t &)> &predicate) const noexcept
 Returns a number that represents how many elements in the specified sequence satisfy a condition.
 
xtd::size count (const type_t &value) const noexcept
 Returns the number of elements with the specified value.
 
const ienumerable< key_value_pair< key_t, xtd::size > > & count_by (const std::function< key_t(const type_t &)> &key_selector) const noexcept
 Returns the count of elements in the current sequence grouped by key.
 
const ienumerable< key_value_pair< key_t, xtd::size > > & count_by (const std::function< key_t(const type_t &)> &key_selector, const iequality_comparer< key_t > &key_comparer) const noexcept
 Returns the count of elements in the current sequence grouped by key.
 
const ienumerable< type_t > & default_if_empty () const noexcept
 Returns the elements of the specified sequence or the type parameter's default value in a singleton collection if the current sequence is empty.
 
const ienumerable< type_t > & default_if_empty (const type_t &default_value) const noexcept
 Returns the elements of the specified sequence or the specified value in a singleton collection if the current sequence is empty.
 
type_t first_or_default (const std::function< bool(const type_t &)> &predicate, const type_t &default_value) const noexcept
 Returns the first element of the sequence that satisfies a condition, or a specified default value if no such element is found.
 
type_t first_or_default (const std::function< bool(const type_t &)> &predicate) const noexcept
 Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
 
type_t first_or_default (const type_t default_value) const noexcept
 Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
 
type_t first_or_default () const noexcept
 Returns the first element of the sequence that satisfies a condition or a default value if no such element is found.
 
const ienumerable< result_t > & select (const std::function< result_t(const type_t &)> &selector) const
 Projects each element of a sequence into a new form.
 
const ienumerable< type_t > & select (const std::function< type_t(const type_t &)> &selector) const
 Projects each element of a sequence into a new form.
 
const ienumerable< result_t > & select (const std::function< result_t(const type_t &, size_t index)> &selector) const
 Projects each element of a sequence into a new form by incorporating the element's index.
 
const ienumerable< type_t > & select (const std::function< type_t(const type_t &, size_t index)> &selector) const
 Projects each element of a sequence into a new form by incorporating the element's index.
 
const list< type_t > & to_list () const noexcept
 Creates a xtd::collections::generic::list <type_t> from an xtd::collections::generic::ienumerable <type_t>.
 
const ienumerable< type_t > & where (const std::function< bool(const type_t &)> &predicate) const
 Filters a sequence of values based on a predicate.
 
const ienumerable< type_t > & where (const std::function< bool(const type_t &, size_t)> &predicate) const
 Filters a sequence of values based on a predicate. Each element's index is used in the logic of the predicate function.
 
- Public Member Functions inherited from xtd::collections::generic::extensions::collection_operators< type_t, icollection< type_t > >
virtual icollection< type_t > & operator<< (const type_t &item)
 The shift left operator adds an item to the xtd::collections::generic::icollection <type_t>.
 
virtual icollection< type_t > & operator>> (const type_t &item)
 The shift right operator removes tthe first occurrence of a specific object from the xtd::collections::generic::icollection <type_t>.
 
- Public Member Functions inherited from xtd::iequatable< type_t >
virtual bool equals (const type_t &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 
- Public Member Functions inherited from xtd::iequatable< trace_listener_collection >
virtual bool equals (const trace_listener_collection &) const noexcept=0
 Indicates whether the current object is equal to another object of the same type.
 
- Static Public Member Functions inherited from xtd::object
template<class object_a_t , class object_b_t >
static bool equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are considered equal.
 
template<class object_a_t , class object_b_t >
static bool reference_equals (const object_a_t &object_a, const object_b_t &object_b) noexcept
 Determines whether the specified object instances are the same instance.
 
- Static Public Member Functions inherited from xtd::collections::generic::extensions::enumerable_iterators< type_t, xtd::collections::generic::ienumerable< type_t > >
static target_collection_t::const_iterator to_iterator (typename source_collection_t::const_iterator &value, const source_collection_t &source_collection, const target_collection_t &target_collection) noexcept
 Converts source iterator to target iterator.
 
static target_collection_t::iterator to_iterator (typename source_collection_t::iterator &value, const source_collection_t &source_collection, const target_collection_t &target_collection) noexcept
 Converts source iterator to target iterator.
 
static target_collection_t::const_iterator to_iterator (typename source_collection_t::const_iterator &value, source_collection_t &source_collection, target_collection_t &target_collection) noexcept
 Converts source iterator to target iterator.
 
static target_collection_t::iterator to_iterator (typename source_collection_t::iterator &value, source_collection_t &source_collection, target_collection_t &target_collection) noexcept
 Converts source iterator to target iterator.
 

Member Typedef Documentation

◆ base

Constructor & Destructor Documentation

◆ trace_listener_collection() [1/2]

xtd::diagnostics::trace_listener_collection::trace_listener_collection ( )
explicitdefault

Creates a new object xtd::diagnostics::trace_listener_collection with specified allocator (optional).

◆ trace_listener_collection() [2/2]

xtd::diagnostics::trace_listener_collection::trace_listener_collection ( const std::initializer_list< value_type > &  il)

Creates a new object xtd::diagnostics::trace_listener_collection with specified initializer list.

Parameters
ilThe initializer list that contains xtd::diagnostics::trace_listener items to fill the collection.

Member Function Documentation

◆ equals()

bool xtd::diagnostics::trace_listener_collection::equals ( const object obj) const
overridevirtualnoexcept

Determines whether the specified object is equal to the current object.

Parameters
objThe object to compare with the current object.
Returns
true if the specified object is equal to the current object. otherwise, false.
Examples
The following code example compares the current instance with another object.
#include <xtd/console>
using namespace xtd;
auto main() -> int {
auto object1 = new_ptr<object>();
auto object2 = new_ptr<object>();
auto object3 = object2;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
object3 = object1;
console::write_line(object1->equals(*object3));
console::write_line(*object1 == *object3);
}
// This code produces the following output :
//
// false
// false
// true
// true
static void write_line()
Writes the current line terminator to the standard output stream using the specified format informati...
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition xtd_about_box.hpp:10

Reimplemented from xtd::collections::generic::list< xtd::sptr< xtd::diagnostics::trace_listener > >.

◆ operator[]() [1/2]

const_reference xtd::diagnostics::trace_listener_collection::operator[] ( const xtd::string name) const

Gets the first xtd::diagnostics::trace_listener in the list with the specified name.

Parameters
nameThe name of the xtd::diagnostics::trace_listener to get from the list.
Returns
The first xtd::diagnostics::trace_listener in the list with the given Name. This item returns empty if no xtd::diagnostics::trace_listener with the given name can be found.
Remarks
The operator [] property is case-sensitive when searching for names. That is, if two listeners exist with the names "Lname" and "lname", operator [] property will find only the xtd::diagnostics::trace_listener with the xtd::diagnostics::trace_listener::name() that you specify, not both.
Examples
This example shows how to write "User message" text on the default trace listener of debug with name operator:
#include <xtd/xtd>
auto main() -> int {
debug::listeners()["default"]->write_line("User message");
}
static listener_collection & listeners() noexcept
Gets the collection of listeners that is monitoring the trace output.
The xtd::diagnostics namespace provides classes that allow you to interact with system processes,...
Definition assert_dialog_result.hpp:10

◆ operator[]() [2/2]

reference xtd::diagnostics::trace_listener_collection::operator[] ( const xtd::string name)

Gets the first xtd::diagnostics::trace_listener in the list with the specified name.

Parameters
nameThe name of the xtd::diagnostics::trace_listener to get from the list.
Returns
The first xtd::diagnostics::trace_listener in the list with the given Name. This item returns empty if no xtd::diagnostics::trace_listener with the given name can be found.
Remarks
The operator [] property is case-sensitive when searching for names. That is, if two listeners exist with the names "Lname" and "lname", operator [] property will find only the xtd::diagnostics::trace_listener with the xtd::diagnostics::trace_listener::name() that you specify, not both.
Examples
This example shows how to write "User message" text on the default trace listener of debug with name operator:
#include <xtd/xtd>
auto main() -> int {
debug::listeners()["default"]->write_line("User message");
}

The documentation for this class was generated from the following file: