PLCnext API Documentation 26.6.0.38
IDelegateFunctor.hpp
1
2//
3// Copyright Phoenix Contact GmbH & Co. KG
4//
6#pragma once
7namespace Arp::Base::Core
8{
9
11
12class IDelegateFunctor
13{
14public: // construction/destruction
15 IDelegateFunctor(void) = default;
16 IDelegateFunctor(const IDelegateFunctor& arg) = default;
17 IDelegateFunctor(IDelegateFunctor&& arg)noexcept = default;
18 IDelegateFunctor& operator=(const IDelegateFunctor& arg) = default;
19 IDelegateFunctor& operator=(IDelegateFunctor&& arg)noexcept = default;
20 virtual ~IDelegateFunctor(void)noexcept = default;
21
22public: // operators
23 bool operator==(const IDelegateFunctor& other);
24 bool operator!=(const IDelegateFunctor& other);
25
26protected: // abstract operations
27 virtual bool Equals(const IDelegateFunctor& other) = 0;
28};
29
31// inline methods of class IDelegateFunctor
32inline bool IDelegateFunctor::operator==(const IDelegateFunctor& other)
33{
34 return this->Equals(other); // call virtual euqals
35}
36
37inline bool IDelegateFunctor::operator!=(const IDelegateFunctor& other)
38{
39 return !(*this == other);
40}
41
43
44} // end of namespace Arp::Base::Core
@ Equals
Start recording if TriggerVariable1 is equal to TriggerVariable2.