63 template<
typename T,
typename =
void>
68 struct IsDataModelType<T, Void<
decltype(acceptNodeType(std::decay<T>::type::nodeType))>> : std::true_type
77 typename std::enable_if<
81 static constexpr std::true_type isLeafHelper(
int);
82 template<
typename C,
typename... Args>
83 static constexpr std::false_type isLeafHelper(Args &&...);
86 using Type =
decltype(isLeafHelper<T>(0));
89 template<
typename T,
typename =
void>
90 struct IsOptional : std::false_type
94 struct IsOptional<T, Void<decltype(std::declval<T>().hasValue())>> : std::true_type
97 template<
typename T,
typename =
void>
98 struct HasValidRange : std::false_type
102 struct HasValidRange<T, Void<decltype(std::declval<typename std::decay<T>::type>().
validRange())>>
106 template<
typename T,
typename =
void>
107 struct HasValidValues : std::false_type
111 struct HasValidValues<T, Void<decltype(std::declval<typename std::decay<T>::type>().
validValues())>>
115 template<
typename T,
typename =
void>
116 struct HasValidSize : std::false_type
120 struct HasValidSize<T, Void<decltype(std::declval<typename std::decay<T>::type>().validSize())>>
148 "The template parameter to IsOptional must be a data model leaf type");
162 "The template parameter to HasValidRange must be a data model leaf type");
176 "The template parameter to HasValidValues must be a data model leaf type");
190 "The template parameter to HasValidSize must be a data model leaf type");
typename Detail::IsDataModelLeaf< T >::Type IsDataModelLeaf
Check if T is a data model leaf type.
Definition Traits.h:141
NodeType
Definition NodeType.h:55
typename Detail::IsDataModelType< T >::type IsDataModelType
Check if T is a data model type.
Definition Traits.h:132
Ret validRange(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:185
std::set< typename T::ValueType > validValues(const CameraInfo &cameraInfo)
Definition SettingsInfo.h:179
The main Zivid namespace. All Zivid code is found here.
Definition Application.h:56
Check if T has a ValidRange constraint.
Definition Traits.h:159
Check if T has a ValidSize constraint.
Definition Traits.h:187
Check if data model type T has a ValidValues constraint.
Definition Traits.h:173