xtd
1.0.0
Toggle main menu visibility
Loading...
Searching...
No Matches
xtd.forms
include
xtd
forms
form_collection.hpp
Go to the documentation of this file.
1
4
#pragma once
5
#include "
form.hpp
"
6
#include <xtd/ref>
7
#include <xtd/collections/generic/list>
8
10
namespace
xtd
{
12
namespace
forms
{
24
class
form_collection
:
public
xtd::collections::generic::list
<xtd::ref<xtd::forms::form>> {
25
public
:
27
30
using
base_type
=
xtd::collections::generic::list<xtd::ref<xtd::forms::form>
>;
32
34
38
explicit
form_collection
() =
default
;
40
42
44
using
base_type::operator [];
45
using
base_type::operator ();
50
[[nodiscard]]
auto
operator []
(
const
xtd::string
& name)
const
->
value_type
{
51
for
(
auto
item :
self_
)
52
if
(item.get().name() == name)
return
item;
53
return
{};
54
}
55
59
[[nodiscard]]
auto
operator []
(
const
xtd::string
& name) ->
value_type
{
60
for
(
auto
item :
self_
)
61
if
(item.get().name() == name)
return
item;
62
return
{};
63
}
64
69
[[nodiscard]]
auto
operator ()
(
const
xtd::string
& name)
const
->
value_type
{
70
return
operator []
(name);
71
}
72
76
[[nodiscard]]
auto
operator ()
(
const
xtd::string
& name) ->
value_type
{
77
return
operator []
(name);
78
}
79
80
};
81
}
82
}
xtd::collections::generic::list
Represents a strongly typed list of objects that can be accessed by index. Provides methods to search...
Definition
list.hpp:84
xtd::collections::generic::list< xtd::ref< xtd::forms::form > >::value_type
typename ilist< xtd::ref< xtd::forms::form > >::value_type value_type
Definition
list.hpp:90
xtd::forms::form_collection::base_type
xtd::collections::generic::list< xtd::ref< xtd::forms::form > > base_type
Represents the base type of the collection.
Definition
form_collection.hpp:30
xtd::forms::form_collection::operator[]
auto operator[](const xtd::string &name) const -> value_type
Gets the first xtd::forms::form_collection in the list with the specified name.
Definition
form_collection.hpp:50
xtd::forms::form_collection::form_collection
form_collection()=default
Creates a new object xtd::forms::form_collection with specified allocator (optional).
xtd::forms::form_collection::operator()
auto operator()(const xtd::string &name) const -> value_type
Gets the first xtd::forms::form_collection in the list with the specified name.
Definition
form_collection.hpp:69
form.hpp
Contains xtd::forms::form container.
self_
#define self_
The self_ expression is a reference value expression whose value is the reference of the implicit obj...
Definition
self.hpp:20
xtd::string
xtd::basic_string< char > string
Represents text as a sequence of UTF-8 code units.
Definition
__string_definitions.hpp:43
xtd::forms
The xtd::forms namespace contains classes for creating Windows-based applications that take full adva...
Definition
texts.hpp:219
xtd
The xtd namespace contains all fundamental classes to access Hardware, Os, System,...
Definition
abstract_object.hpp:8
Generated on
for xtd by
Gammasoft
. All rights reserved.