Lines Matching refs:other
399 RefBase(RefBase &&other) noexcept;
405 * object of the argument `other`, which will unbind the
408 RefBase &operator=(RefBase &&other) noexcept;
646 * @note A null sptr will be created if `other` is `nullptr`.
647 * @param other Object to be managed by sptr.
649 sptr(T *other);
654 * @param other Input sptr object.
656 sptr(const sptr<T> &other);
661 * @note `other` will be set to a null sptr.
662 * @param other Input sptr object.
664 sptr(sptr<T> &&other);
669 * @param other Input sptr object.
673 sptr<T> &operator=(sptr<T> &&other);
678 * @tparam O Another specific class type managed by `other`.
679 * @param other Input sptr object.
682 sptr(const sptr<O> &other);
689 * @param force Used to distinguish from other constructors.
706 * @param other Another pointer object to be managed by sptr.
710 inline void ForceSetRefPtr(T *other);
771 * @param other Another object to be managed by this sptr.
773 sptr<T> &operator=(T *other);
781 * @param other Another sptr object with the same managed class type (T).
783 sptr<T> &operator=(const sptr<T> &other);
792 * @param other Another wptr object with the same managed class type (T).
794 sptr<T> &operator=(const wptr<T> &other);
803 * @param other Another sptr object with a different managed class type (O).
806 sptr<T> &operator=(const sptr<O> &other);
811 * @param other Input raw pointer.
815 bool operator==(const T *other) const;
820 * @param other Input raw pointer.
824 inline bool operator!=(const T *other) const
826 return !operator==(other);
832 * @param other Input wptr.
836 bool operator==(const wptr<T> &other) const;
841 * @param other Input wptr.
845 inline bool operator!=(const wptr<T> &other) const
847 return !operator==(other);
853 * @param other Input sptr.
857 bool operator==(const sptr<T> &other) const;
862 * @param other Input sptr.
866 inline bool operator!=(const sptr<T> &other) const
868 return !operator==(other);
887 inline void sptr<T>::ForceSetRefPtr(T *other)
889 refs_ = other;
899 inline sptr<T>::sptr(T *other)
901 refs_ = other;
908 inline sptr<T>::sptr(const sptr<T> &other)
910 refs_ = other.GetRefPtr();
917 sptr<T>::sptr(sptr<T> &&other)
919 refs_ = other.GetRefPtr();
920 other.ForceSetRefPtr(nullptr);
924 sptr<T> &sptr<T>::operator=(sptr<T> &&other)
929 refs_ = other.GetRefPtr();
930 other.ForceSetRefPtr(nullptr);
936 sptr<T>::sptr(const sptr<O> &other) : refs_(other.GetRefPtr())
944 inline sptr<T> &sptr<T>::operator=(T *other)
946 if (other != nullptr) {
947 other->IncStrongRef(this);
954 refs_ = other;
959 inline sptr<T> &sptr<T>::operator=(const sptr<T> &other)
961 T *otherRef(other.GetRefPtr());
975 inline sptr<T> &sptr<T>::operator=(const wptr<T> &other)
980 if ((other != nullptr) && other.AttemptIncStrongRef(this)) {
981 refs_ = other.GetRefPtr();
991 sptr<T> &sptr<T>::operator=(const sptr<O> &other)
993 T *otherRef(other.GetRefPtr());
1007 inline bool sptr<T>::operator==(const T *other) const
1009 return other == refs_;
1013 inline bool sptr<T>::operator==(const wptr<T> &other) const
1015 return refs_ == other.GetRefPtr();
1019 inline bool sptr<T>::operator==(const sptr<T> &other) const
1021 return refs_ == other.GetRefPtr();
1073 * This function will create WeakRefCounter object for `other`
1076 * @note A WeakRefCounter object will not be created if `other`
1079 * @param other Object to be managed by wptr.
1081 wptr(T *other);
1086 * This function will share the WeakRefCounter object of `other` with this
1089 * @param other Another wptr with the same managed class type (T).
1091 wptr(const wptr<T> &other);
1097 * object of `other`, and set the count of weak references properly.
1099 * @param other Another sptr with the same managed class type (T).
1100 * @tparam T Specific class type managed by `other`.
1102 wptr(const sptr<T> &other);
1107 * This function is the same as wptr<T>::wptr(const wptr<T> &other).
1109 * @tparam O Class type managed by `other`.
1110 * @param other Another wptr with a different managed class type (O).
1111 * @tparam T Specific class type managed by `other`.
1114 wptr(const wptr<O> &other);
1119 * This function is the same as wptr<T>::wptr(const sptr<T> &other).
1121 * @param other Another sptr with the same managed class type (O).
1122 * @tparam T Specific class type managed by `other`.
1125 wptr(const sptr<O> &other);
1133 * @param other Another object to be managed by this wptr.
1135 wptr<T> &operator=(T *other);
1140 * @note Same with wptr<T> &operator=(T *other), but a pointer type casting
1141 * which will not affect the type of `*other` is processed.
1142 * @tparam O Specific class type managed by `other`.
1143 * @param other Another object to be managed by this wptr.
1147 wptr<T> &operator=(O *other);
1154 * share the WeakRefCounter object with `other`, and then set the count of
1156 * @param other Another wptr object. Objects managed by it will also be
1159 wptr<T> &operator=(const wptr<T> &other);
1168 * @param other A sptr object. Objects managed by it will also be
1171 wptr<T> &operator=(const sptr<T> &other);
1179 * @param other An wptr object. Objects managed by it will also be
1181 * @tparam O Specific class type managed by `other`.
1184 wptr<T> &operator=(const wptr<O> &other);
1193 * @param other An sptr object. Objects managed by it will also be
1195 * @tparam O Specific class type managed by `other`.
1198 wptr<T> &operator=(const sptr<O> &other);
1226 * @param other Input raw pointer.
1229 bool operator==(const T *other) const;
1234 * @param other Input raw pointer.
1237 inline bool operator!=(const T *other) const
1239 return !operator==(other);
1245 * @param other Input reference to a wptr object.
1248 bool operator==(const wptr<T> &other) const;
1253 * @param other Input reference to a wptr object.
1256 inline bool operator!=(const wptr<T> &other) const
1258 return !operator==(other);
1264 * @param other Input reference to an sptr object.
1267 bool operator==(const sptr<T> &other) const;
1272 * @param other Input reference to an sptr object.
1275 inline bool operator!=(const sptr<T> &other) const
1277 return !operator==(other);
1344 wptr<T>::wptr(T *other)
1346 if (other != nullptr) {
1347 refs_ = other->CreateWeakRef(other);
1357 wptr<T>::wptr(const wptr<T> &other)
1359 refs_ = other.refs_;
1366 wptr<T>::wptr(const sptr<T> &other)
1368 if (other.GetRefPtr() != nullptr) {
1369 refs_ = other->CreateWeakRef(other.GetRefPtr());
1378 wptr<T>::wptr(const wptr<O> &other)
1380 refs_ = other.refs_;
1388 wptr<T>::wptr(const sptr<O> &other)
1390 if (other.GetRefPtr() != nullptr) {
1391 refs_ = other->CreateWeakRef(other.GetRefPtr());
1399 wptr<T> &wptr<T>::operator=(T *other)
1402 if (other != nullptr) {
1403 newWeakRef = other->CreateWeakRef(other);
1419 wptr<T> &wptr<T>::operator=(O *other)
1421 T *object = reinterpret_cast<T *>(other);
1439 inline wptr<T> &wptr<T>::operator=(const wptr<T> &other)
1441 if (other.refs_ != nullptr) {
1442 other.refs_->IncWeakRefCount(this);
1449 refs_ = other.refs_;
1454 inline wptr<T> &wptr<T>::operator=(const sptr<T> &other)
1457 if (other.GetRefPtr() != nullptr) {
1458 newWeakRef = other->CreateWeakRef(other.GetRefPtr());
1474 wptr<T> &wptr<T>::operator=(const wptr<O> &other)
1476 if (other.refs_ != nullptr) {
1477 other.refs_->IncWeakRefCount(this);
1484 refs_ = other.refs_;
1490 wptr<T> &wptr<T>::operator=(const sptr<O> &other)
1493 if (other.GetRefPtr() != nullptr) {
1494 newWeakRef = other->CreateWeakRef(other.GetRefPtr());
1509 inline bool wptr<T>::operator==(const T *other) const
1511 return GetRefPtr() == other;
1515 inline bool wptr<T>::operator==(const wptr<T> &other) const
1517 return GetRefPtr() == other.GetRefPtr();
1521 inline bool wptr<T>::operator==(const sptr<T> &other) const
1523 return GetRefPtr() == other.GetRefPtr();