![]() |
Workspace 6.21.5
|
Traits class defining whether a class T supports comparison. More...
#include <Workspace/DataExecution/DataObjects/datafactorytraits.h>
Public Types | |
enum | { Supported = Application::HasOperatorEqual<T>::value } |
Additional Inherited Members | |
![]() | |
bool | compare (const T &lhs, const T &rhs) |
By default, Supported will be specified as true (1) or false (0) based on whether the operator== is defined. To force no comparison supported, then in the same header that defines T, specialize this class template as follows:
If T supports comparison but it does not use the default comparison operator, then specialize this class template in the header containing the DECLARE_WORKSPACE_DATA_FACTORY for T to explicitly perform a comparison.
By doing this, the compareDataObjects() function in TypedDataFactory will also automatically be given an appropriate function body without any further changes.