 |
Blender V5.0
|
Go to the documentation of this file.
20#define BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type) \
21 friend bool operator!=(const Type &a, const Type &b) \
26#define BLI_STRUCT_EQUALITY_OPERATORS_1(Type, m) \
27 friend bool operator==(const Type &a, const Type &b) \
31 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
33#define BLI_STRUCT_EQUALITY_OPERATORS_2(Type, m1, m2) \
34 friend bool operator==(const Type &a, const Type &b) \
36 return a.m1 == b.m1 && a.m2 == b.m2; \
38 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
40#define BLI_STRUCT_EQUALITY_OPERATORS_3(Type, m1, m2, m3) \
41 friend bool operator==(const Type &a, const Type &b) \
43 return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3; \
45 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
47#define BLI_STRUCT_EQUALITY_OPERATORS_4(Type, m1, m2, m3, m4) \
48 friend bool operator==(const Type &a, const Type &b) \
50 return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3 && a.m4 == b.m4; \
52 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
54#define BLI_STRUCT_EQUALITY_OPERATORS_5(Type, m1, m2, m3, m4, m5) \
55 friend bool operator==(const Type &a, const Type &b) \
57 return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3 && a.m4 == b.m4 && a.m5 == b.m5; \
59 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)
61#define BLI_STRUCT_EQUALITY_OPERATORS_6(Type, m1, m2, m3, m4, m5, m6) \
62 friend bool operator==(const Type &a, const Type &b) \
64 return a.m1 == b.m1 && a.m2 == b.m2 && a.m3 == b.m3 && a.m4 == b.m4 && a.m5 == b.m5 && \
67 BLI_STRUCT_DERIVED_UNEQUAL_OPERATOR(Type)