Lines Matching refs:std
34 template<typename T, bool E=std::is_enum<T>::value>
41 typedef typename std::underlying_type<T>::type type;
52 virtual std::unique_ptr<C2StructDescriptor> describe(
62 std::vector<C2StructDescriptor> structs;
83 std::vector<C2StructDescriptor> &structs, _Tuple<> *);
95 std::vector<C2StructDescriptor> &structs, _Tuple<T, Params...> *) {
100 mutable std::mutex _mMutex;
101 std::map<C2Param::CoreIndex, const C2StructDescriptor> _mStructs; ///< descriptors
120 size_t GetBaseOffset(const std::shared_ptr<C2ParamReflector> &reflector,
131 typename std::enable_if<std::is_convertible<T, C2Param>::value>::type>
132 inline C2_HIDE ParamRef(std::shared_ptr<T> ¶m)
133 : _mRef(reinterpret_cast<std::shared_ptr<C2Param>*>(¶m)) { }
136 operator std::shared_ptr<C2Param> *() const { return _mRef; }
141 std::shared_ptr<C2Param> get() const { return *_mRef; }
144 std::shared_ptr<C2Param> *_mRef;
164 std::unique_ptr<C2FieldSupportedValues> &&values);
181 void setSupportedValues(std::unique_ptr<C2FieldSupportedValues> &&values);
198 std::unique_ptr<C2FieldSupportedValues> mPossible;
199 std::unique_ptr<C2FieldSupportedValues> mSupported; ///< if different from possible
211 virtual std::shared_ptr<C2ParamReflector> getReflector() const = 0;
213 virtual std::shared_ptr<ParamHelper> getParamHelper(const ParamRef ¶m) const = 0;
219 Param<T> get(std::shared_ptr<T> ¶m, std::shared_ptr<T> altValue = nullptr) const {
238 Field(std::shared_ptr<FieldHelper> helper, C2Param::Index index);
270 std::shared_ptr<FieldHelper> _mHelper;
283 std::shared_ptr<FieldHelper> findField(size_t baseOffs, size_t baseSize) const;
290 std::shared_ptr<C2Param> value();
293 std::shared_ptr<const C2Param> value() const;
318 std::vector<std::unique_ptr<C2SettingResult>>* const failures);
321 const std::vector<C2Param::Index> getDownDependencies() const;
327 const std::vector<ParamRef> getDependenciesAsRefs() const;
339 std::shared_ptr<const C2ParamDescriptor> getDescriptor() const;
348 c2_status_t validate(const std::shared_ptr<C2ParamReflector> &reflector);
355 void setDefaultValue(std::shared_ptr<C2Param> default_);
358 void setSetter(std::function<C2R(const C2Param *, bool, bool *, Factory &)> setter);
361 void setGetter(std::function<std::shared_ptr<C2Param>(bool)> getter);
364 void setDependencies(std::vector<C2Param::Index> indices, std::vector<ParamRef> refs);
367 void setFields(std::vector<C2ParamFieldValues> &&fields);
370 std::shared_ptr<ParamHelper> build();
373 std::unique_ptr<Impl> mImpl;
382 std::shared_ptr<ParamHelper> helper, std::shared_ptr<T> ¶m,
383 std::shared_ptr<C2ParamReflector> reflector)
392 typename std::remove_const<
393 typename std::remove_extent<S>::type>::type>::type>;
401 size_t baseSize = sizeof(typename std::remove_extent<S>::type);
412 std::shared_ptr<FieldHelper> helper = _mHelper->findField(baseOffs, baseSize);
436 std::shared_ptr<T> _mTypedParam;
437 std::shared_ptr<ParamHelper> _mHelper;
438 std::shared_ptr<C2ParamReflector> _mReflector;
451 ParamBuilder(std::shared_ptr<T> ¶m, C2StringLiteral name)
482 inline ParamBuilder &withDefault(std::shared_ptr<T> default_) {
486 *mTypedParam = std::shared_ptr<T>(T::From(C2Param::Copy(*default_).release()));
488 std::shared_ptr<T> *typedParam = mTypedParam;
489 setGetter([typedParam](bool) -> std::shared_ptr<C2Param> {
490 return std::static_pointer_cast<C2Param>(*typedParam);
497 return withDefault(std::shared_ptr<T>(default_));
501 inline ParamBuilder &withFields(std::vector<C2ParamFieldValues> &&fields_) {
502 setFields(std::move(fields_));
511 inline ParamBuilder &withConstValue(std::shared_ptr<T> default_) {
531 return withConstValue(std::shared_ptr<T>(default_));
543 std::shared_ptr<Deps>& ... deps) {
545 std::shared_ptr<T> *typedParam = mTypedParam;
555 std::shared_ptr<T> proposedValue =
556 std::shared_ptr<T>(T::From(C2Param::Copy(*value).release()));
572 setDependencies(std::vector<C2Param::Index>{ deps->index()... },
573 std::vector<ParamRef>{ ParamRef(deps)... });
585 C2R (*fn)(bool, C2P<T> &, const C2P<Deps> &...), std::shared_ptr<Deps>& ... deps) {
586 std::shared_ptr<T> *typedParam = mTypedParam;
596 std::shared_ptr<T> proposedValue =
597 std::shared_ptr<T>(T::From(C2Param::Copy(*value).release()));
612 setDependencies(std::vector<C2Param::Index>{ deps->index()... },
613 std::vector<ParamRef>{ ParamRef(deps)... });
625 C2R (*fn)(bool, C2P<T> &, const C2P<Deps> &...), std::shared_ptr<Deps>& ... deps) {
627 return withSetter(fn, std::forward<decltype(deps)>(deps)...);
630 inline std::shared_ptr<ParamHelper> build() {
635 std::shared_ptr<T> *mTypedParam;
639 static ParamBuilder<T> DefineParam(std::shared_ptr<T> ¶m, C2StringLiteral name) {
645 const std::vector<C2Param*> &stackParams,
646 const std::vector<C2Param::Index> &heapParamIndices,
648 std::vector<std::unique_ptr<C2Param>>* const heapParams) const;
666 const std::vector<C2Param*> ¶ms, c2_blocking_t mayBlock,
667 std::vector<std::unique_ptr<C2SettingResult>>* const failures,
669 std::vector<std::shared_ptr<C2Param>> *changes = nullptr);
672 std::vector<std::shared_ptr<C2ParamDescriptor>> *const params) const;
675 std::vector<C2FieldSupportedValuesQuery> &fields, c2_blocking_t mayBlock) const;
677 std::shared_ptr<C2ReflectorHelper> getReflector() {
681 typedef std::unique_lock<std::mutex> Lock;
697 mutable std::mutex mMutex;
698 std::shared_ptr<C2ReflectorHelper> mReflector;
700 std::shared_ptr<FactoryImpl> _mFactory;
702 C2InterfaceHelper(std::shared_ptr<C2ReflectorHelper> reflector);
710 void addParameter(std::shared_ptr<ParamHelper> param);
747 typename std::remove_reference< \
748 typename std::remove_extent< \