Asposecpplib
System::Comparison< T > Class Template Reference

Represents a pointer to the method that compares two objects of the same type. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type. More...

Inherits System::MulticastDelegate< int(T, T)>.

Public Member Functions

template<typename Y >
 Comparison (Y arg)
 Constructs an instance of Comparison delegate that represent the pointer to the specified invokable entitiy. More...
 
bool operator() (T a, T b)
 Invokes the invokable object pointed to by the current object. More...
 

Detailed Description

template<typename T>
class System::Comparison< T >

Represents a pointer to the method that compares two objects of the same type. This type should be allocated on stack and passed to functions by value or by reference. Never use System::SmartPtr class to manage objects of this type.

Template Parameters
TThe type of the objects the method compares

Constructor & Destructor Documentation

◆ Comparison()

template<typename T>
template<typename Y >
System::Comparison< T >::Comparison ( arg)
inline

Constructs an instance of Comparison delegate that represent the pointer to the specified invokable entitiy.

Template Parameters
YThe type of the invokable entity to be pointed to by the Comparison object being created
Parameters
argAn invokable entity to be pointed to by the Comparison object being created

Member Function Documentation

◆ operator()()

template<typename T>
bool System::Comparison< T >::operator() ( a,
b 
)
inline

Invokes the invokable object pointed to by the current object.

Parameters
aThe first comparand
bThe second comparand
Returns
True if a is less than b, otherwise - true