7#ifndef FLUTTER_FML_MEMORY_REF_PTR_H_
8#define FLUTTER_FML_MEMORY_REF_PTR_H_
14#include "flutter/fml/logging.h"
15#include "flutter/fml/macros.h"
16#include "flutter/fml/memory/ref_ptr_internal.h"
103 template <
typename U>
116 T*
get()
const {
return ptr_; }
131 if (r.ptr_ == ptr_) {
145 template <
typename U>
147 if (
reinterpret_cast<T*
>(r.ptr_) == ptr_) {
169 template <
typename U>
186 explicit operator bool()
const {
return !!ptr_; }
188 template <
typename U>
190 return ptr_ == rhs.ptr_;
193 template <
typename U>
198 template <
typename U>
200 return ptr_ < rhs.ptr_;
204 template <
typename U>
209 enum AdoptTag { kAdopt };
247template <
typename T,
typename... Args>
250 std::forward<Args>(
args)...);
263 return std::hash<T*>()(ptr.
get());
static uint32_t hash(const SkShaderBase::GradientInfo &v)
bool operator!=(const RefPtr< U > &rhs) const
RefPtr< T > & operator=(RefPtr< T > &&r)
RefPtr< T > & operator=(const RefPtr< T > &r)
bool operator<(const RefPtr< U > &rhs) const
RefPtr(const RefPtr< U > &r)
RefPtr(const RefPtr< T > &r)
void swap(RefPtr< T > &r)
bool operator==(const RefPtr< U > &rhs) const
RefPtr< T > & operator=(RefPtr< U > &&r)
RefPtr< T > & operator=(const RefPtr< U > &r)
RefPtr< T > Clone() const
static RefPtr< T > MakeRefCounted(Args &&... args)
G_BEGIN_DECLS G_MODULE_EXPORT FlValue * args
#define FML_DCHECK(condition)
RefPtr< T > MakeRefCounted(Args &&... args)
RefPtr< T > AdoptRef(T *ptr)
result_type operator()(const argument_type &ptr) const