Home | History | Annotate | Download | only in util

Lines Matching defs:shared_ptr

119     size_t GetBaseOffset(const std::shared_ptr<C2ParamReflector> &reflector,
123 * The interface helper class uses references to std::shared_ptr<T> config parameters.
124 * Internally, these need to be generalized to std::shared_ptr<C2Param> refs, but the cast is
131 inline C2_HIDE ParamRef(std::shared_ptr<T> &param)
132 : _mRef(reinterpret_cast<std::shared_ptr<C2Param>*>(&param)) { }
135 operator std::shared_ptr<C2Param> *() const { return _mRef; }
140 std::shared_ptr<C2Param> get() const { return *_mRef; }
143 std::shared_ptr<C2Param> *_mRef;
206 * Factory is an interface to get the parameter helpers from a std::shared_ptr<T> &.
210 virtual std::shared_ptr<C2ParamReflector> getReflector() const = 0;
212 virtual std::shared_ptr<ParamHelper> getParamHelper(const ParamRef &param) const = 0;
218 Param<T> get(std::shared_ptr<T> &param, std::shared_ptr<T> altValue = nullptr) const {
237 Field(std::shared_ptr<FieldHelper> helper, C2Param::Index index);
269 std::shared_ptr<FieldHelper> _mHelper;
282 std::shared_ptr<FieldHelper> findField(size_t baseOffs, size_t baseSize) const;
289 std::shared_ptr<C2Param> value();
292 std::shared_ptr<const C2Param> value() const;
338 std::shared_ptr<const C2ParamDescriptor> getDescriptor() const;
347 c2_status_t validate(const std::shared_ptr<C2ParamReflector> &reflector);
354 void setDefaultValue(std::shared_ptr<C2Param> default_);
360 void setGetter(std::function<std::shared_ptr<C2Param>(bool)> getter);
369 std::shared_ptr<ParamHelper> build();
381 std::shared_ptr<ParamHelper> helper, std::shared_ptr<T> &param,
382 std::shared_ptr<C2ParamReflector> reflector)
411 std::shared_ptr<FieldHelper> helper = _mHelper->findField(baseOffs, baseSize);
435 std::shared_ptr<T> _mTypedParam;
436 std::shared_ptr<ParamHelper> _mHelper;
437 std::shared_ptr<C2ParamReflector> _mReflector;
450 ParamBuilder(std::shared_ptr<T> &param, C2StringLiteral name)
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;
488 setGetter([typedParam](bool) -> std::shared_ptr<C2Param> {
496 return withDefault(std::shared_ptr<T>(default_));
510 inline ParamBuilder &withConstValue(std::shared_ptr<T> default_) {
530 return withConstValue(std::shared_ptr<T>(default_));
542 std::shared_ptr<Deps>& ... deps) {
544 std::shared_ptr<T> *typedParam = mTypedParam;
554 std::shared_ptr<T> proposedValue =
555 std::shared_ptr<T>(T::From(C2Param::Copy(*value).release()));
584 C2R (*fn)(bool, C2P<T> &, const C2P<Deps> &...), std::shared_ptr<Deps>& ... deps) {
585 std::shared_ptr<T> *typedParam = mTypedParam;
595 std::shared_ptr<T> proposedValue =
596 std::shared_ptr<T>(T::From(C2Param::Copy(*value).release()));
624 C2R (*fn)(bool, C2P<T> &, const C2P<Deps> &...), std::shared_ptr<Deps>& ... deps) {
629 inline std::shared_ptr<ParamHelper> build() {
634 std::shared_ptr<T> *mTypedParam;
638 static ParamBuilder<T> DefineParam(std::shared_ptr<T> &param, C2StringLiteral name) {
665 std::vector<std::shared_ptr<C2Param>> *changes = nullptr);
668 std::vector<std::shared_ptr<C2ParamDescriptor>> *const params) const;
673 std::shared_ptr<C2ReflectorHelper> getReflector() {
685 std::shared_ptr<C2ReflectorHelper> mReflector;
687 std::shared_ptr<FactoryImpl> _mFactory;
689 C2InterfaceHelper(std::shared_ptr<C2ReflectorHelper> reflector);
697 void addParameter(std::shared_ptr<ParamHelper> param);