Contains delegates definitions.
Classes | |
class | xtd::delegate< result_t(arguments_t...)> |
Represents a delegate, which is a data structure that refers to a static method or to a class instance && an instance method of that class. More... | |
Typedefs | |
template<class type_t > | |
using | xtd::comparison = xtd::delegate< int32(type_t x, type_t y)> |
Represents the method that compares two objects of the same type. | |
template<class output_t , class input_t > | |
using | xtd::converter = xtd::delegate< output_t(input_t input)> |
Represents a method that converts an object from one type to another type. | |
using | xtd::async_callback = xtd::delegate< void(async_result ar)> |
References a method to be called when a corresponding asynchronous operation completes. | |
template<class result_t , class ... arguments_t> | |
using | xtd::func = xtd::delegate< result_t(arguments_t... arguments)> |
Represents a delegate that has variables parameters and returns a value of the type specified by the result_t type. | |
using | xtd::threading::parameterized_thread_start = xtd::delegate< void(const xtd::any_object &obj)> |
Represents the method that executes on a xtd::threading::thread. | |
using | xtd::threading::thread_start = xtd::delegate< void()> |
Represents the method that executes on a xtd::threading::thread. | |
using | xtd::threading::wait_callback = xtd::delegate< void(const xtd::any_object &state)> |
Represents a callback method to be executed by a thread pool thread. | |
using | xtd::threading::wait_or_timer_callback = xtd::delegate< void(const xtd::any_object &state, bool timed_out)> |
Represents a method to be called when a xtd::threading::wait_handle is signaled or times out. | |
using | xtd::forms::message_loop_callback = xtd::delegate< bool()> |
Represents a method that will check whether the hosting environment is still sending messages. | |
using xtd::comparison = typedef xtd::delegate<int32(type_t x, type_t y)> |
#include <xtd.core/include/xtd/comparison.hpp>
Represents the method that compares two objects of the same type.
type_t | The type of the objects to compare. |
x | The first object to compare. |
y | The second object to compare. |
Value | Meaning |
---|---|
less than 0 | x is less than y. |
0 | x equals y. |
Greater than 0 | x is greater than y. |
using xtd::converter = typedef xtd::delegate<output_t(input_t input)> |
#include <xtd.core/include/xtd/converter.hpp>
Represents a method that converts an object from one type to another type.
input_t | The type of object that is to be converted. This type parameter is contravariant. That is, you can use either the type you specified or any type that is less derived. |
output_t | he type the input object is to be converted to. This type parameter is covariant. That is, you can use either the type you specified or any type that is more derived. |
input | The object to convert. |
output_t
that represents the converted input_t
. point_f_to_point
that converts a xtd::drawing::point_f structure to a xtd::drawing::point structure. The example then creates a xtd::collections::generic::list <type_t> of xtd::drawing::point_f structures, creates a xtd::converter <point_f, point> delegate to represent the point_f_to_point
method, and passes the delegate to the xtd::collections::generic::list::convert_all method. The xtd::collections::generic::list::convert_all method passes each element of the input list to the point_f_to_point
method and puts the converted elements into a new list of Point structures. Both lists are displayed. using xtd::async_callback = typedef xtd::delegate<void(async_result ar)> |
#include <xtd.core/include/xtd/delegate.hpp>
References a method to be called when a corresponding asynchronous operation completes.
ar | The result of the asynchronous operation. |
using xtd::func = typedef xtd::delegate<result_t(arguments_t... arguments)> |
#include <xtd.core/include/xtd/func.hpp>
Represents a delegate that has variables parameters and returns a value of the type specified by the result_t type.
result_t | The type of the return value of the method that this delegate encapsulates. |
...arguments_t | The type of parameter list of the method that this delegate encapsulates. |
arguments | The parameter list of the method that this delegate encapsulates. |
using xtd::threading::parameterized_thread_start = typedef xtd::delegate<void(const xtd::any_object& obj)> |
#include <xtd.core/include/xtd/threading/parameterized_thread_start.hpp>
Represents the method that executes on a xtd::threading::thread.
obj | An object that contains data for the thread procedure. delegate< void(arguments_t...)> action Represents a xtd::delegate that has variable parameters and does not return a value. Definition action.hpp:20 |
using xtd::threading::thread_start = typedef xtd::delegate<void()> |
#include <xtd.core/include/xtd/threading/thread_start.hpp>
Represents the method that executes on a xtd::threading::thread.
using xtd::threading::wait_callback = typedef xtd::delegate<void(const xtd::any_object& state)> |
#include <xtd.core/include/xtd/threading/wait_callback.hpp>
Represents a callback method to be executed by a thread pool thread.
state | An object containing information to be used by the callback method. |
using xtd::threading::wait_or_timer_callback = typedef xtd::delegate<void(const xtd::any_object& state, bool timed_out)> |
#include <xtd.core/include/xtd/threading/wait_or_timer_callback.hpp>
Represents a method to be called when a xtd::threading::wait_handle is signaled or times out.
state | An object containing information to be used by the callback method each time it executes. |
timed_out | true if the xtd::threading::wait_handle timed out; false if it was signaled. |
using xtd::forms::message_loop_callback = typedef xtd::delegate<bool()> |
#include <xtd.forms/include/xtd/forms/message_loop_callback.hpp>
Represents a method that will check whether the hosting environment is still sending messages.
true
if the hosting environment is still sending messages; otherwise, false
.