Lines Matching refs:T

46 template<typename T, bool FP=std::is_floating_point<T>::value>
51 typedef typename std::make_unsigned<T>::type DiffType;
56 static DiffType mod(T low, T high, T step) { in mod()
61 template<typename T>
62 struct _C2TypedSupportedRangeHelper<T, true> {
63 typedef T DiffType;
65 static DiffType mod(T low, T high, T step) { in mod()
70 template<typename T>
71 C2SupportedRange<T>::C2SupportedRange(const C2FieldSupportedValues &values) { in C2SupportedRange()
87 template<typename T>
88 bool C2SupportedRange<T>::contains(T value) const { in contains()
103 return _C2TypedSupportedRangeHelper<T>::mod(_mMin, value, _mStep) == 0; in contains()
113 return value == T(_mMin * pow(_mNum / _mDenom, power) + MIN_STEP / 2); in contains()
121 if (T(lastValue + MIN_STEP / 2) == value) { in contains()
135 template<typename T>
136 C2SupportedRange<T> C2SupportedRange<T>::limitedTo(const C2SupportedRange<T> &limit) const { in limitedTo()
179 template<typename T>
180 bool C2SupportedFlags<T>::contains(T value) const { in contains()
182 T minMask = min(); in contains()
199 template<typename T>
200 const std::vector<T> C2SupportedFlags<T>::flags() const { in flags()
201 std::vector<T> vals(c2_max(_mValues.size(), 1u) - 1); in flags()
204 [](const C2Value::Primitive &p)->T { in flags()
211 template<typename T>
212 C2SupportedFlags<T> C2SupportedFlags<T>::limitedTo(const C2SupportedFlags<T> &limit) const { in limitedTo()
214 T minMask = min() | limit.min(); in limitedTo()
220 T value = v.ref<ValueType>() | minMask; in limitedTo()
224 T value = v.ref<ValueType>() | minMask; in limitedTo()
233 template<typename T>
234 T C2SupportedFlags<T>::min() const { in min()
238 return T(0); in min()
256 template<typename T>
257 bool C2SupportedValueSet<T>::contains(T value) const { in contains()
264 template<typename T>
265 C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedValueSet<T> &limit) const… in limitedTo()
272 template<typename T>
273 C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedRange<T> &limit) const { in limitedTo()
280 template<typename T>
281 C2SupportedValueSet<T> C2SupportedValueSet<T>::limitedTo(const C2SupportedFlags<T> &limit) const { in limitedTo()
288 template<typename T>
289 const std::vector<T> C2SupportedValueSet<T>::values() const { in values()
290 std::vector<T> vals(_mValues.size()); in values()
291 …:transform(_mValues.cbegin(), _mValues.cend(), vals.begin(), [](const C2Value::Primitive &p) -> T { in values()
309 template<typename T>
310 struct C2FieldSupportedValuesHelper<T>::Impl {
317 bool supports(T value) const;
320 typedef typename _C2FieldValueHelper<T>::ValueType ValueType;
331 template<typename T>
332 bool C2FieldSupportedValuesHelper<T>::Impl::supports(T value) const { in supports()
341 template<typename T>
342 C2FieldSupportedValuesHelper<T>::C2FieldSupportedValuesHelper(const C2FieldSupportedValues &values) in C2FieldSupportedValuesHelper()
343 : _mImpl(std::make_unique<C2FieldSupportedValuesHelper<T>::Impl>(values)) { } in C2FieldSupportedValuesHelper()
345 template<typename T>
346 C2FieldSupportedValuesHelper<T>::~C2FieldSupportedValuesHelper() = default;
348 template<typename T>
349 bool C2FieldSupportedValuesHelper<T>::supports(T value) const { in supports()
365 template<typename T>
366 struct C2ParamFieldValuesBuilder<T>::Impl {
371 _mRange(C2SupportedRange<T>::Any()), in Impl()
372 _mValues(C2SupportedValueSet<T>::None()), in Impl()
373 _mFlags(C2SupportedFlags<T>::None()) { } in Impl()
410 void equalTo(T value) { in equalTo()
411 return limitTo(C2SupportedValueSet<T>::OneOf({value})); in equalTo()
415 void limitTo(const C2SupportedValueSet<T> &limit) { in limitTo()
417 C2_LOG(VERBOSE) << "NA.limitTo(" << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
427 C2_LOG(VERBOSE) << "(" << C2FieldSupportedValuesHelper<T>(_mValues) << ").limitTo(" in limitTo()
428 << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
434 C2_LOG(VERBOSE) << "(" << C2FieldSupportedValuesHelper<T>(_mRange) << ").limitTo(" in limitTo()
435 << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
441 C2_LOG(VERBOSE) << "(" << C2FieldSupportedValuesHelper<T>(_mRange) << ").limitTo(" in limitTo()
442 << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
452 C2_LOG(VERBOSE) << " = " << _mType << ":" << C2FieldSupportedValuesHelper<T>(_mValues); in limitTo()
456 void limitTo(const C2SupportedFlags<T> &limit) { in limitTo()
458 C2_LOG(VERBOSE) << "NA.limitTo(" << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
468 C2_LOG(VERBOSE) << "(" << C2FieldSupportedValuesHelper<T>(_mValues) << ").limitTo(" in limitTo()
469 << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
473 … C2_LOG(VERBOSE) << " = " << _mType << ":" << C2FieldSupportedValuesHelper<T>(_mValues); in limitTo()
476 C2_LOG(VERBOSE) << "(" << C2FieldSupportedValuesHelper<T>(_mFlags) << ").limitTo(" in limitTo()
477 << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
481 … C2_LOG(VERBOSE) << " = " << _mType << ":" << C2FieldSupportedValuesHelper<T>(_mFlags); in limitTo()
493 void limitTo(const C2SupportedRange<T> &limit) { in limitTo()
495 C2_LOG(VERBOSE) << "NA.limitTo(" << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
501 C2_LOG(VERBOSE) << " = " << _mType << ":" << C2FieldSupportedValuesHelper<T>(_mRange); in limitTo()
506 C2_LOG(VERBOSE) << "(" << C2FieldSupportedValuesHelper<T>(_mValues) << ").limitTo(" in limitTo()
507 << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
510 … C2_LOG(VERBOSE) << " = " << _mType << ":" << C2FieldSupportedValuesHelper<T>(_mValues); in limitTo()
517 C2_LOG(VERBOSE) << "(" << C2FieldSupportedValuesHelper<T>(_mRange) << ").limitTo(" in limitTo()
518 << C2FieldSupportedValuesHelper<T>(limit) << ")"; in limitTo()
522 … C2_LOG(VERBOSE) << " = " << _mType << ":" << C2FieldSupportedValuesHelper<T>(_mRange); in limitTo()
544 C2SupportedRange<T> _mRange;
545 C2SupportedValueSet<T> _mValues;
546 C2SupportedFlags<T> _mFlags;
550 template<typename T>
551 C2ParamFieldValuesBuilder<T>::operator C2ParamFieldValues() const { in operator C2ParamFieldValues()
555 template<typename T>
556 C2ParamFieldValuesBuilder<T>::C2ParamFieldValuesBuilder(const C2ParamField &field) in C2ParamFieldValuesBuilder()
557 : _mImpl(std::make_unique<C2ParamFieldValuesBuilder<T>::Impl>(field)) { } in C2ParamFieldValuesBuilder()
559 template<typename T>
560 C2ParamFieldValuesBuilder<T> &C2ParamFieldValuesBuilder<T>::any() { in any()
565 template<typename T>
566 C2ParamFieldValuesBuilder<T> &C2ParamFieldValuesBuilder<T>::none() { in none()
571 template<typename T>
572 C2ParamFieldValuesBuilder<T> &C2ParamFieldValuesBuilder<T>::equalTo(T value) { in equalTo()
577 template<typename T>
578 C2ParamFieldValuesBuilder<T> &C2ParamFieldValuesBuilder<T>::limitTo(const C2SupportedValueSet<T> &l… in limitTo()
583 template<typename T>
584 C2ParamFieldValuesBuilder<T> &C2ParamFieldValuesBuilder<T>::limitTo(const C2SupportedFlags<T> &limi… in limitTo()
589 template<typename T>
590 C2ParamFieldValuesBuilder<T> &C2ParamFieldValuesBuilder<T>::limitTo(const C2SupportedRange<T> &limi… in limitTo()
595 template<typename T>
596 C2ParamFieldValuesBuilder<T>::C2ParamFieldValuesBuilder(const C2ParamFieldValuesBuilder<T> &other) in C2ParamFieldValuesBuilder()
597 : _mImpl(std::make_unique<C2ParamFieldValuesBuilder<T>::Impl>(*other._mImpl.get())) { } in C2ParamFieldValuesBuilder()
599 template<typename T>
600 C2ParamFieldValuesBuilder<T> &C2ParamFieldValuesBuilder<T>::operator=( in operator =()
601 const C2ParamFieldValuesBuilder<T> &other) { in operator =()
602 _mImpl = std::make_unique<C2ParamFieldValuesBuilder<T>::Impl>(*other._mImpl.get()); in operator =()
606 template<typename T>
607 C2ParamFieldValuesBuilder<T>::~C2ParamFieldValuesBuilder() = default;