Lines Matching refs:T
33 template<typename T, bool E=std::is_enum<T>::value>
35 typedef T type;
38 template<typename T>
39 struct _c2_reduce_enum_to_underlying_type<T, true> {
40 typedef typename std::underlying_type<T>::type type;
92 template<typename T, typename... Params>
94 std::vector<C2StructDescriptor> &structs, _Tuple<T, Params...> *) {
95 structs.emplace_back((T*)nullptr);
129 template<typename T, typename enable=
130 typename std::enable_if<std::is_convertible<T, C2Param>::value>::type>
131 inline C2_HIDE ParamRef(std::shared_ptr<T> ¶m)
201 template<typename T>
217 template<typename T>
218 Param<T> get(std::shared_ptr<T> ¶m, std::shared_ptr<T> altValue = nullptr) const {
219 return Param<T>(getParamHelper(ParamRef(param)),
228 template<typename T>
239 bool supportsAtAll(T value) const {
240 return C2FieldSupportedValuesHelper<T>(*_mHelper->getPossibleValues()).supports(value);
243 bool supportsNow(T value) const {
244 return C2FieldSupportedValuesHelper<T>(*_mHelper->getSupportedValues()).supports(value);
250 C2ParamFieldValuesBuilder<T> shouldBe() const;
256 C2ParamFieldValuesBuilder<T> mustBe();
263 C2R validatePossible(const T &value __unused) const {
378 template<typename T>
381 std::shared_ptr<ParamHelper> helper, std::shared_ptr<T> ¶m,
402 _mReflector, T::CORE_INDEX, offs - sizeof(C2Param));
422 const T &get() const {
427 T &set() {
432 T const &v;
435 std::shared_ptr<T> _mTypedParam;
440 template<typename T>
441 using C2P = Param<T>;
446 template<typename T>
450 ParamBuilder(std::shared_ptr<T> ¶m, C2StringLiteral name)
451 : ParamHelper(param, name, C2StructDescriptor((T*)nullptr)),
481 inline ParamBuilder &withDefault(std::shared_ptr<T> default_) {
485 *mTypedParam = std::shared_ptr<T>(T::From(C2Param::Copy(*default_).release()));
487 std::shared_ptr<T> *typedParam = mTypedParam;
495 inline ParamBuilder &withDefault(T *default_) {
496 return withDefault(std::shared_ptr<T>(default_));
510 inline ParamBuilder &withConstValue(std::shared_ptr<T> default_) {
515 const T *typedValue = T::From(value);
529 inline ParamBuilder &withConstValue(T *default_) {
530 return withConstValue(std::shared_ptr<T>(default_));
541 C2R (*fn)(bool, const C2P<T> &, C2P<T> &, const C2P<Deps> &...),
544 std::shared_ptr<T> *typedParam = mTypedParam;
548 const T *typedValue = T::From(value);
554 std::shared_ptr<T> proposedValue =
555 std::shared_ptr<T>(T::From(C2Param::Copy(*value).release()));
559 C2P<T> oldValue = factory.get(*typedParam);
561 C2P<T> helper = factory.get(*typedParam, proposedValue);
584 C2R (*fn)(bool, C2P<T> &, const C2P<Deps> &...), std::shared_ptr<Deps>& ... deps) {
585 std::shared_ptr<T> *typedParam = mTypedParam;
589 const T *typedValue = T::From(value);
595 std::shared_ptr<T> proposedValue =
596 std::shared_ptr<T>(T::From(C2Param::Copy(*value).release()));
601 C2P<T> helper = factory.get(*typedParam, proposedValue);
624 C2R (*fn)(bool, C2P<T> &, const C2P<Deps> &...), std::shared_ptr<Deps>& ... deps) {
634 std::shared_ptr<T> *mTypedParam;
637 template<typename T>
638 static ParamBuilder<T> DefineParam(std::shared_ptr<T> ¶m, C2StringLiteral name) {
639 return ParamBuilder<T>(param, name);
717 template<typename T>
718 inline C2_HIDE void setDerivedInstance(T *instance) {