Flutter Engine
The Flutter Engine
Public Types | Public Member Functions | Friends | List of all members
base::win::ScopedSafearray::LockScope< ElementVartype > Class Template Referencefinal

#include <scoped_safearray.h>

Public Types

using iterator_category = std::random_access_iterator_tag
 
using value_type = typename internal::VariantUtil< ElementVartype >::Type
 
using difference_type = ptrdiff_t
 
using reference = value_type &
 
using const_reference = const value_type &
 
using pointer = value_type *
 
using const_pointer = const value_type *
 

Public Member Functions

 LockScope ()
 
 LockScope (LockScope< ElementVartype > &&other)
 
LockScope< ElementVartype > & operator= (LockScope< ElementVartype > &&other)
 
 ~LockScope ()
 
VARTYPE Type () const
 
size_t size () const
 
pointer begin ()
 
pointer end ()
 
const_pointer begin () const
 
const_pointer end () const
 
pointer data ()
 
const_pointer data () const
 
reference operator[] (int index)
 
const_reference operator[] (int index) const
 
reference at (size_t index)
 
const_reference at (size_t index) const
 

Friends

class ScopedSafearray
 

Detailed Description

template<VARTYPE ElementVartype>
class base::win::ScopedSafearray::LockScope< ElementVartype >

Definition at line 32 of file scoped_safearray.h.

Member Typedef Documentation

◆ const_pointer

template<VARTYPE ElementVartype>
using base::win::ScopedSafearray::LockScope< ElementVartype >::const_pointer = const value_type*

Definition at line 41 of file scoped_safearray.h.

◆ const_reference

template<VARTYPE ElementVartype>
using base::win::ScopedSafearray::LockScope< ElementVartype >::const_reference = const value_type&

Definition at line 39 of file scoped_safearray.h.

◆ difference_type

template<VARTYPE ElementVartype>
using base::win::ScopedSafearray::LockScope< ElementVartype >::difference_type = ptrdiff_t

Definition at line 37 of file scoped_safearray.h.

◆ iterator_category

template<VARTYPE ElementVartype>
using base::win::ScopedSafearray::LockScope< ElementVartype >::iterator_category = std::random_access_iterator_tag

Definition at line 35 of file scoped_safearray.h.

◆ pointer

template<VARTYPE ElementVartype>
using base::win::ScopedSafearray::LockScope< ElementVartype >::pointer = value_type*

Definition at line 40 of file scoped_safearray.h.

◆ reference

template<VARTYPE ElementVartype>
using base::win::ScopedSafearray::LockScope< ElementVartype >::reference = value_type&

Definition at line 38 of file scoped_safearray.h.

◆ value_type

template<VARTYPE ElementVartype>
using base::win::ScopedSafearray::LockScope< ElementVartype >::value_type = typename internal::VariantUtil<ElementVartype>::Type

Definition at line 36 of file scoped_safearray.h.

Constructor & Destructor Documentation

◆ LockScope() [1/2]

template<VARTYPE ElementVartype>
base::win::ScopedSafearray::LockScope< ElementVartype >::LockScope ( )
inline

Definition at line 43 of file scoped_safearray.h.

44 : safearray_(nullptr),
45 vartype_(VT_EMPTY),
46 array_(nullptr),
47 array_size_(0U) {}

◆ LockScope() [2/2]

template<VARTYPE ElementVartype>
base::win::ScopedSafearray::LockScope< ElementVartype >::LockScope ( LockScope< ElementVartype > &&  other)
inline

Definition at line 49 of file scoped_safearray.h.

50 : safearray_(std::exchange(other.safearray_, nullptr)),
51 vartype_(std::exchange(other.vartype_, VT_EMPTY)),
52 array_(std::exchange(other.array_, nullptr)),
53 array_size_(std::exchange(other.array_size_, 0U)) {}

◆ ~LockScope()

template<VARTYPE ElementVartype>
base::win::ScopedSafearray::LockScope< ElementVartype >::~LockScope ( )
inline

Definition at line 65 of file scoped_safearray.h.

65{ Reset(); }

Member Function Documentation

◆ at() [1/2]

template<VARTYPE ElementVartype>
reference base::win::ScopedSafearray::LockScope< ElementVartype >::at ( size_t  index)
inline

Definition at line 82 of file scoped_safearray.h.

82 {
83 BASE_DCHECK(array_ != nullptr);
84 BASE_DCHECK(index < array_size_);
85 return array_[index];
86 }
#define BASE_DCHECK(condition)
Definition: logging.h:63

◆ at() [2/2]

template<VARTYPE ElementVartype>
const_reference base::win::ScopedSafearray::LockScope< ElementVartype >::at ( size_t  index) const
inline

Definition at line 87 of file scoped_safearray.h.

87 {
88 return const_cast<LockScope<ElementVartype>*>(this)->at(index);
89 }

◆ begin() [1/2]

template<VARTYPE ElementVartype>
pointer base::win::ScopedSafearray::LockScope< ElementVartype >::begin ( )
inline

Definition at line 71 of file scoped_safearray.h.

71{ return array_; }

◆ begin() [2/2]

template<VARTYPE ElementVartype>
const_pointer base::win::ScopedSafearray::LockScope< ElementVartype >::begin ( ) const
inline

Definition at line 73 of file scoped_safearray.h.

73{ return array_; }

◆ data() [1/2]

template<VARTYPE ElementVartype>
pointer base::win::ScopedSafearray::LockScope< ElementVartype >::data ( )
inline

Definition at line 76 of file scoped_safearray.h.

76{ return array_; }

◆ data() [2/2]

template<VARTYPE ElementVartype>
const_pointer base::win::ScopedSafearray::LockScope< ElementVartype >::data ( ) const
inline

Definition at line 77 of file scoped_safearray.h.

77{ return array_; }

◆ end() [1/2]

template<VARTYPE ElementVartype>
pointer base::win::ScopedSafearray::LockScope< ElementVartype >::end ( )
inline

Definition at line 72 of file scoped_safearray.h.

72{ return array_ + array_size_; }

◆ end() [2/2]

template<VARTYPE ElementVartype>
const_pointer base::win::ScopedSafearray::LockScope< ElementVartype >::end ( ) const
inline

Definition at line 74 of file scoped_safearray.h.

74{ return array_ + array_size_; }

◆ operator=()

template<VARTYPE ElementVartype>
LockScope< ElementVartype > & base::win::ScopedSafearray::LockScope< ElementVartype >::operator= ( LockScope< ElementVartype > &&  other)
inline

Definition at line 55 of file scoped_safearray.h.

55 {
56 BASE_DCHECK(this != &other);
57 Reset();
58 safearray_ = std::exchange(other.safearray_, nullptr);
59 vartype_ = std::exchange(other.vartype_, VT_EMPTY);
60 array_ = std::exchange(other.array_, nullptr);
61 array_size_ = std::exchange(other.array_size_, 0U);
62 return *this;
63 }

◆ operator[]() [1/2]

template<VARTYPE ElementVartype>
reference base::win::ScopedSafearray::LockScope< ElementVartype >::operator[] ( int  index)
inline

Definition at line 79 of file scoped_safearray.h.

79{ return at(index); }

◆ operator[]() [2/2]

template<VARTYPE ElementVartype>
const_reference base::win::ScopedSafearray::LockScope< ElementVartype >::operator[] ( int  index) const
inline

Definition at line 80 of file scoped_safearray.h.

80{ return at(index); }

◆ size()

template<VARTYPE ElementVartype>
size_t base::win::ScopedSafearray::LockScope< ElementVartype >::size ( ) const
inline

Definition at line 69 of file scoped_safearray.h.

69{ return array_size_; }

◆ Type()

template<VARTYPE ElementVartype>
VARTYPE base::win::ScopedSafearray::LockScope< ElementVartype >::Type ( ) const
inline

Definition at line 67 of file scoped_safearray.h.

67{ return vartype_; }

Friends And Related Function Documentation

◆ ScopedSafearray

template<VARTYPE ElementVartype>
friend class ScopedSafearray
friend

Definition at line 115 of file scoped_safearray.h.


The documentation for this class was generated from the following file: