Workspace 6.21.5
|
Traits class defining whether a class T can be sorted. This is important for some comparison operations. More...
#include <Workspace/DataExecution/DataObjects/datafactorytraits.h>
Public Types | |
enum | { Supported = Application::IsSortable<T>::value } |
Additional Inherited Members | |
Public Member Functions inherited from SortDataTypeImpl< T, Application::IsSortable< T >::value > | |
int | compare (const T &lhs, const T &rhs) |
By default, Supported will be specified as true or false based on whether the operator< is defined. To force no measurement supported, then in the same header that defines T, specialize this class template as follows:
If T supports measurement 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.