108 template<
typename T,
typename =
void>
113 struct IsDataModelType<T, Void<
decltype(acceptNodeType(std::decay<T>::type::nodeType))>> : std::true_type
122 typename std::enable_if<
126 static constexpr std::true_type isLeafHelper(
int);
127 template<
typename C,
typename... Args>
128 static constexpr std::false_type isLeafHelper(Args &&...);
131 using Type =
decltype(isLeafHelper<T>(0));
134 template<
typename T,
typename =
void>
135 struct IsOptional : std::false_type
139 struct IsOptional<T, Void<decltype(std::declval<T>().hasValue())>> : std::true_type
142 template<
typename T,
typename =
void>
143 struct HasValidRange : std::false_type
147 struct HasValidRange<T, Void<decltype(std::declval<typename std::decay<T>::type>().
validRange())>>
151 template<
typename T,
typename =
void>
152 struct HasValidValues : std::false_type
156 struct HasValidValues<T, Void<decltype(std::declval<typename std::decay<T>::type>().
validValues())>>
160 template<
typename T,
typename =
void>
161 struct HasValidSize : std::false_type
165 struct HasValidSize<T, Void<decltype(std::declval<typename std::decay<T>::type>().validSize())>>
193 "The template parameter to IsOptional must be a data model leaf type");
207 "The template parameter to HasValidRange must be a data model leaf type");
221 "The template parameter to HasValidValues must be a data model leaf type");
235 "The template parameter to HasValidSize must be a data model leaf type");
NodeType
Definition: NodeType.h:100
typename Detail::IsDataModelLeaf< T >::Type IsDataModelLeaf
Check if T is a data model leaf type
Definition: Traits.h:186
typename Detail::IsDataModelType< T >::type IsDataModelType
Check if T is a data model type
Definition: Traits.h:177
Ret validRange(const CameraInfo &cameraInfo)
Definition: SettingsInfo.h:225
std::set< typename T::ValueType > validValues(const CameraInfo &cameraInfo)
Definition: SettingsInfo.h:219
The main Zivid namespace. All Zivid code is found here
Definition: Application.h:99
Check if T has a ValidRange constraint
Definition: Traits.h:204
Check if T has a ValidSize constraint
Definition: Traits.h:232
Check if data model type T has a ValidValues constraint
Definition: Traits.h:218