Lines Matching refs:T

32 template<typename T>
34 typedef T ValueType;
36 return os << p.ref<T>(); in put()
57 template<typename T>
59 typedef typename _C2FieldValueHelper<T>::ValueType ValueType;
62 constexpr static T MIN_VALUE = std::numeric_limits<T>::min();
63 constexpr static T MAX_VALUE = std::numeric_limits<T>::max();
64 constexpr static T MIN_STEP = std::is_floating_point<T>::value ? 0 : 1;
73 inline static constexpr C2SupportedRange<T> None() {
80 inline static constexpr C2SupportedRange<T> Any() {
89 inline static constexpr C2SupportedRange<T> EqualTo(T value) {
98 inline static C2SupportedRange<T> GreaterThan(T value) {
100 std::is_floating_point<T>::value ?
110 inline static constexpr C2SupportedRange<T> GreaterThanOrEqualTo(T value) {
120 inline static constexpr C2SupportedRange<T> NotLessThan(T value) {
129 inline static constexpr C2SupportedRange<T> LessThanOrEqualTo(T value) {
139 inline static constexpr C2SupportedRange<T> NotGreaterThan(T value) {
148 inline static C2SupportedRange<T> LessThan(T value) {
150 std::is_floating_point<T>::value ?
164 C2SupportedRange<T> InRange(T min, T max, T step = MIN_STEP) {
179 C2SupportedRange<T> InSeries(T min, T max, T num, T denom) {
195 C2SupportedRange<T> InMacSeries(T min, T max, T step, T num, T denom) {
229 bool contains(T value) const;
237 C2SupportedRange<T> limitedTo(const C2SupportedRange<T> &limit) const;
249 inline C2_HIDE constexpr T min() const { return _mMin; }
254 inline C2_HIDE constexpr T max() const { return _mMax; }
259 inline C2_HIDE constexpr T step() const { return _mStep; }
264 inline C2_HIDE constexpr T num() const { return _mNum; }
269 inline C2_HIDE constexpr T denom() const { return _mDenom; }
312 …constexpr C2_HIDE C2SupportedRange(T min, T max, T step = T(std::is_floating_point<T>::value ? 0 :…
327 constexpr C2_HIDE C2SupportedRange(T min, T max, T step, T num, T den)
330 T _mMin; ///< lower bound and starting point
331 T _mMax; ///< upper bound
332 T _mStep; ///< step of an arithmetic series (0 if continuous floating point range)
333 T _mNum; ///< numerator of a geometric series
334 T _mDenom; ///< denominator of a geometric series
340 template<typename T>
342 typedef typename _C2FieldValueHelper<T>::ValueType ValueType;
351 static inline C2SupportedFlags<T> None() {
361 static inline C2SupportedFlags<T> Flags(const std::initializer_list<T> flags, T min = T(0)) {
371 static inline C2SupportedFlags<T> Flags(const std::vector<T> &flags, T min = T(0)) {
381 C2SupportedFlags<T>(const C2FieldSupportedValues &values) {
399 bool contains(T value) const;
406 C2SupportedFlags<T> limitedTo(const C2SupportedFlags<T> &limit) const;
418 const std::vector<T> flags() const;
423 T min() const;
447 C2SupportedFlags(T min, const std::vector<T> &flags) {
449 for (T elem : flags) {
459 C2SupportedFlags(T min, const std::initializer_list<T> flags) {
461 for (T elem : flags) {
472 template<typename T>
474 typedef typename _C2FieldValueHelper<T>::ValueType ValueType;
483 static inline C2SupportedValueSet<T> None() {
492 static inline C2SupportedValueSet<T> OneOf(const std::initializer_list<T> values) {
501 static inline C2SupportedValueSet<T> OneOf(const std::vector<T> &values) {
511 C2SupportedValueSet<T>(const C2FieldSupportedValues &values) {
529 bool contains(T value) const;
536 C2SupportedValueSet<T> limitedTo(const C2SupportedValueSet<T> &limit) const;
543 C2SupportedValueSet<T> limitedTo(const C2SupportedRange<T> &limit) const;
550 C2SupportedValueSet<T> limitedTo(const C2SupportedFlags<T> &limit) const;
562 const std::vector<T> values() const;
586 C2SupportedValueSet(const std::vector<T> &values) {
587 for (T elem : values) {
597 C2SupportedValueSet(const std::initializer_list<T> values) {
598 for (T elem : values) {
609 template<typename T>
613 template<typename T>
614 std::ostream& operator<<(std::ostream& os, const C2FieldSupportedValuesHelper<T> &i);
616 template<typename T>
631 bool supports(T value) const;
638 friend std::ostream& operator<< <T>(std::ostream& os, const C2FieldSupportedValuesHelper<T> &i);
649 template<typename T>
665 C2ParamFieldValuesBuilder<T> &any();
673 C2ParamFieldValuesBuilder<T> &none();
678 C2ParamFieldValuesBuilder<T> &equalTo(T value);
683 inline C2ParamFieldValuesBuilder<T> &greaterThan(T value) {
684 return limitTo(C2SupportedRange<T>::GreaterThan(value));
690 C2ParamFieldValuesBuilder<T> &greaterThanOrEqualTo(T value) {
691 return limitTo(C2SupportedRange<T>::GreaterThanOrEqualTo(value));
697 C2ParamFieldValuesBuilder<T> &notLessThan(T value) {
698 return limitTo(C2SupportedRange<T>::NotLessThan(value));
704 C2ParamFieldValuesBuilder<T> &lessThanOrEqualTo(T value) {
705 return limitTo(C2SupportedRange<T>::LessThanOrEqualTo(value));
711 C2ParamFieldValuesBuilder<T> &notGreaterThan(T value) {
712 return limitTo(C2SupportedRange<T>::NotGreaterThan(value));
718 C2ParamFieldValuesBuilder<T> &lessThan(T value) {
719 return limitTo(C2SupportedRange<T>::LessThan(value));
726 C2ParamFieldValuesBuilder<T> &inRange(
727 T min, T max, T step = std::is_floating_point<T>::value ? T(0) : T(1)) {
728 return limitTo(C2SupportedRange<T>::InRange(min, max, step));
735 C2ParamFieldValuesBuilder<T> &inSeries(T min, T max, T num, T denom) {
736 return limitTo(C2SupportedRange<T>::InSeries(min, max, num, denom));
743 C2ParamFieldValuesBuilder<T> &inMacSeries(T min, T max, T step, T num, T denom) {
744 return limitTo(C2SupportedRange<T>::InMacSeries(min, max, step, num, denom));
750 C2ParamFieldValuesBuilder<T> &oneOf(const std::initializer_list<T> values) {
751 return limitTo(C2SupportedValueSet<T>::OneOf(values));
757 C2ParamFieldValuesBuilder<T> &oneOf(const std::vector<T> &values) {
758 return limitTo(C2SupportedValueSet<T>::OneOf(values));
765 C2ParamFieldValuesBuilder<T> &flags(const std::vector<T> &flags, T min = T(0)) {
766 return limitTo(C2SupportedFlags<T>::Flags(flags, min));
773 C2ParamFieldValuesBuilder<T> &flags(const std::initializer_list<T> flags, T min = T(0)) {
774 return limitTo(C2SupportedFlags<T>::Flags(flags, min));
787 C2ParamFieldValuesBuilder<T> &limitTo(const C2SupportedValueSet<T> &limit);
792 C2ParamFieldValuesBuilder<T> &limitTo(const C2SupportedFlags<T> &limit);
797 C2ParamFieldValuesBuilder<T> &limitTo(const C2SupportedRange<T> &limit);