xtd 0.2.0
trace_listener_collection.h
Go to the documentation of this file.
1 #pragma once
5 #include <memory>
6 #include <vector>
7 #include "../iequatable.h"
8 #include "trace_listener.h"
9 
11 namespace xtd {
13  namespace diagnostics {
26  class core_export_ trace_listener_collection : public std::vector<std::shared_ptr<xtd::diagnostics::trace_listener>>, public xtd::iequatable<trace_listener_collection> {
27  public:
29 
32  using base = std::vector<value_type>;
34 
36 
41  explicit trace_listener_collection(const allocator_type& allocator = allocator_type());
44  trace_listener_collection(const std::initializer_list<value_type>& il); // Can't be explicit by design.
47  explicit trace_listener_collection(const base& collection);
49  trace_listener_collection& operator =(const trace_listener_collection& collection);
52 
54  bool equals(const trace_listener_collection& value) const noexcept override;
56 
58 
60  using base::operator [];
76  const_reference operator [](const xtd::ustring& name) const;
92  reference operator [](const xtd::ustring& name);
94 
96 
97  private:
98  inline static value_type empty_;
99  };
100  }
101 }
The xtd namespace contains all fundamental classes to access Hardware, Os, System, and more.
Definition: system_report.h:17
std::vector< value_type > base
Represents the base type of the collection.
Definition: trace_listener_collection.h:32
Represents text as a sequence of UTF-8 code units.
Definition: ustring.h:46
Defines a generalized method that a value type or class implements to create a type-specific method f...
Definition: iequatable.h:18
Represents a collection of xtd::diagnostics::trace_listener.
Definition: trace_listener_collection.h:26
Contains xtd::diagnostics::trace_listener listener.