QtBase  v6.3.1
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Friends | List of all members
QArrayDataPointer< T > Struct Template Reference

#include <qarraydatapointer.h>

Inheritance diagram for QArrayDataPointer< T >:
Inheritance graph
[legend]
Collaboration diagram for QArrayDataPointer< T >:
Collaboration graph
[legend]

Public Types

enum  { pass_parameter_by_value }
 
typedef std::conditional< pass_parameter_by_value, T, const T & >::type parameter_type
 

Public Member Functions

constexpr QArrayDataPointer () noexcept
 
 QArrayDataPointer (const QArrayDataPointer &other) noexcept
 
constexpr QArrayDataPointer (Data *header, T *adata, qsizetype n=0) noexcept
 
 QArrayDataPointer (QPair< QTypedArrayData< T > *, T * > adata, qsizetype n=0) noexcept
 
QArrayDataPointeroperator= (const QArrayDataPointer &other) noexcept
 
 QArrayDataPointer (QArrayDataPointer &&other) noexcept
 
DataOpsoperator* () noexcept
 
DataOpsoperator-> () noexcept
 
const DataOpsoperator* () const noexcept
 
const DataOpsoperator-> () const noexcept
 
 ~QArrayDataPointer ()
 
bool isNull () const noexcept
 
Tdata () noexcept
 
const Tdata () const noexcept
 
Tbegin () noexcept
 
Tend () noexcept
 
const Tbegin () const noexcept
 
const Tend () const noexcept
 
const TconstBegin () const noexcept
 
const TconstEnd () const noexcept
 
void swap (QArrayDataPointer &other) noexcept
 
void clear () noexcept(std::is_nothrow_destructible< T >::value)
 
void detach (QArrayDataPointer *old=nullptr)
 
void detachAndGrow (QArrayData::GrowthPosition where, qsizetype n, const T **data, QArrayDataPointer *old)
 
Q_NEVER_INLINE void reallocateAndGrow (QArrayData::GrowthPosition where, qsizetype n, QArrayDataPointer *old=nullptr)
 
bool tryReadjustFreeSpace (QArrayData::GrowthPosition pos, qsizetype n, const T **data=nullptr)
 
void relocate (qsizetype offset, const T **data=nullptr)
 
qsizetype allocatedCapacity () noexcept
 
qsizetype constAllocatedCapacity () const noexcept
 
void ref () noexcept
 
bool deref () noexcept
 
bool isMutable () const noexcept
 
bool isShared () const noexcept
 
bool isSharedWith (const QArrayDataPointer &other) const noexcept
 
bool needsDetach () const noexcept
 
qsizetype detachCapacity (qsizetype newSize) const noexcept
 
const Data::ArrayOptions flags () const noexcept
 
void setFlag (typename Data::ArrayOptions f) noexcept
 
void clearFlag (typename Data::ArrayOptions f) noexcept
 
Datad_ptr () noexcept
 
void setBegin (T *begin) noexcept
 
qsizetype freeSpaceAtBegin () const noexcept
 
qsizetype freeSpaceAtEnd () const noexcept
 

Static Public Member Functions

static QArrayDataPointer fromRawData (const T *rawData, qsizetype length) noexcept
 
static QArrayDataPointer allocateGrow (const QArrayDataPointer &from, qsizetype n, QArrayData::GrowthPosition position)
 

Public Attributes

Datad
 
Tptr
 
qsizetype size
 

Friends

bool operator== (const QArrayDataPointer &lhs, const QArrayDataPointer &rhs) noexcept
 
bool operator!= (const QArrayDataPointer &lhs, const QArrayDataPointer &rhs) noexcept
 

Detailed Description

template<class T>
struct QArrayDataPointer< T >

Definition at line 49 of file qarraydatapointer.h.

Member Typedef Documentation

◆ parameter_type

template<class T >
typedef std::conditional<pass_parameter_by_value, T, const T &>::type QArrayDataPointer< T >::parameter_type

Definition at line 61 of file qarraydatapointer.h.

Member Enumeration Documentation

◆ anonymous enum

template<class T >
anonymous enum
Enumerator
pass_parameter_by_value 

Definition at line 56 of file qarraydatapointer.h.

Constructor & Destructor Documentation

◆ QArrayDataPointer() [1/5]

template<class T >
constexpr QArrayDataPointer< T >::QArrayDataPointer ( )
inlineconstexprnoexcept

Definition at line 63 of file qarraydatapointer.h.

◆ QArrayDataPointer() [2/5]

template<class T >
QArrayDataPointer< T >::QArrayDataPointer ( const QArrayDataPointer< T > &  other)
inlinenoexcept

Definition at line 68 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ QArrayDataPointer() [3/5]

template<class T >
constexpr QArrayDataPointer< T >::QArrayDataPointer ( Data header,
T adata,
qsizetype  n = 0 
)
inlineconstexprnoexcept

Definition at line 74 of file qarraydatapointer.h.

◆ QArrayDataPointer() [4/5]

template<class T >
QArrayDataPointer< T >::QArrayDataPointer ( QPair< QTypedArrayData< T > *, T * >  adata,
qsizetype  n = 0 
)
inlineexplicitnoexcept

Definition at line 79 of file qarraydatapointer.h.

◆ QArrayDataPointer() [5/5]

template<class T >
QArrayDataPointer< T >::QArrayDataPointer ( QArrayDataPointer< T > &&  other)
inlinenoexcept

Definition at line 97 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ ~QArrayDataPointer()

template<class T >
QArrayDataPointer< T >::~QArrayDataPointer ( )
inline

Definition at line 127 of file qarraydatapointer.h.

Here is the call graph for this function:

Member Function Documentation

◆ allocatedCapacity()

template<class T >
qsizetype QArrayDataPointer< T >::allocatedCapacity ( )
inlinenoexcept

Definition at line 323 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ allocateGrow()

template<class T >
static QArrayDataPointer QArrayDataPointer< T >::allocateGrow ( const QArrayDataPointer< T > &  from,
qsizetype  n,
QArrayData::GrowthPosition  position 
)
inlinestatic

Definition at line 354 of file qarraydatapointer.h.

Here is the caller graph for this function:

◆ begin() [1/2]

template<class T >
const T* QArrayDataPointer< T >::begin ( ) const
inlinenoexcept

Definition at line 145 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ begin() [2/2]

template<class T >
T* QArrayDataPointer< T >::begin ( )
inlinenoexcept

Definition at line 143 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clear()

template<class T >
void QArrayDataPointer< T >::clear ( )
inlinenoexcept

Definition at line 157 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ clearFlag()

template<class T >
void QArrayDataPointer< T >::clearFlag ( typename Data::ArrayOptions  f)
inlinenoexcept

Definition at line 334 of file qarraydatapointer.h.

◆ constAllocatedCapacity()

template<class T >
qsizetype QArrayDataPointer< T >::constAllocatedCapacity ( ) const
inlinenoexcept

Definition at line 324 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ constBegin()

template<class T >
const T* QArrayDataPointer< T >::constBegin ( ) const
inlinenoexcept

Definition at line 147 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ constEnd()

template<class T >
const T* QArrayDataPointer< T >::constEnd ( ) const
inlinenoexcept

Definition at line 148 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ d_ptr()

template<class T >
Data* QArrayDataPointer< T >::d_ptr ( )
inlinenoexcept

Definition at line 336 of file qarraydatapointer.h.

◆ data() [1/2]

template<class T >
const T* QArrayDataPointer< T >::data ( ) const
inlinenoexcept

Definition at line 141 of file qarraydatapointer.h.

Here is the caller graph for this function:

◆ data() [2/2]

template<class T >
T* QArrayDataPointer< T >::data ( )
inlinenoexcept

Definition at line 140 of file qarraydatapointer.h.

Here is the caller graph for this function:

◆ deref()

template<class T >
bool QArrayDataPointer< T >::deref ( )
inlinenoexcept

Definition at line 326 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ detach()

template<class T >
void QArrayDataPointer< T >::detach ( QArrayDataPointer< T > *  old = nullptr)
inline

Definition at line 163 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ detachAndGrow()

template<class T >
void QArrayDataPointer< T >::detachAndGrow ( QArrayData::GrowthPosition  where,
qsizetype  n,
const T **  data,
QArrayDataPointer< T > *  old 
)
inline

Definition at line 192 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ detachCapacity()

template<class T >
qsizetype QArrayDataPointer< T >::detachCapacity ( qsizetype  newSize) const
inlinenoexcept

Definition at line 331 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ end() [1/2]

template<class T >
const T* QArrayDataPointer< T >::end ( ) const
inlinenoexcept

Definition at line 146 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ end() [2/2]

template<class T >
T* QArrayDataPointer< T >::end ( )
inlinenoexcept

Definition at line 144 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ flags()

template<class T >
const Data::ArrayOptions QArrayDataPointer< T >::flags ( ) const
inlinenoexcept

Definition at line 332 of file qarraydatapointer.h.

◆ freeSpaceAtBegin()

template<class T >
qsizetype QArrayDataPointer< T >::freeSpaceAtBegin ( ) const
inlinenoexcept

Definition at line 339 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ freeSpaceAtEnd()

template<class T >
qsizetype QArrayDataPointer< T >::freeSpaceAtEnd ( ) const
inlinenoexcept

Definition at line 346 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ fromRawData()

template<class T >
static QArrayDataPointer QArrayDataPointer< T >::fromRawData ( const T rawData,
qsizetype  length 
)
inlinestaticnoexcept

Definition at line 84 of file qarraydatapointer.h.

Here is the caller graph for this function:

◆ isMutable()

template<class T >
bool QArrayDataPointer< T >::isMutable ( ) const
inlinenoexcept

Definition at line 327 of file qarraydatapointer.h.

Here is the caller graph for this function:

◆ isNull()

template<class T >
bool QArrayDataPointer< T >::isNull ( ) const
inlinenoexcept

Definition at line 135 of file qarraydatapointer.h.

Here is the caller graph for this function:

◆ isShared()

template<class T >
bool QArrayDataPointer< T >::isShared ( ) const
inlinenoexcept

Definition at line 328 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isSharedWith()

template<class T >
bool QArrayDataPointer< T >::isSharedWith ( const QArrayDataPointer< T > &  other) const
inlinenoexcept

Definition at line 329 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ needsDetach()

template<class T >
bool QArrayDataPointer< T >::needsDetach ( ) const
inlinenoexcept

Definition at line 330 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator*() [1/2]

template<class T >
const DataOps& QArrayDataPointer< T >::operator* ( ) const
inlinenoexcept

Definition at line 117 of file qarraydatapointer.h.

◆ operator*() [2/2]

template<class T >
DataOps& QArrayDataPointer< T >::operator* ( )
inlinenoexcept

Definition at line 107 of file qarraydatapointer.h.

◆ operator->() [1/2]

template<class T >
const DataOps* QArrayDataPointer< T >::operator-> ( ) const
inlinenoexcept

Definition at line 122 of file qarraydatapointer.h.

◆ operator->() [2/2]

template<class T >
DataOps* QArrayDataPointer< T >::operator-> ( )
inlinenoexcept

Definition at line 112 of file qarraydatapointer.h.

◆ operator=()

template<class T >
QArrayDataPointer& QArrayDataPointer< T >::operator= ( const QArrayDataPointer< T > &  other)
inlinenoexcept

Definition at line 90 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ reallocateAndGrow()

template<class T >
Q_NEVER_INLINE void QArrayDataPointer< T >::reallocateAndGrow ( QArrayData::GrowthPosition  where,
qsizetype  n,
QArrayDataPointer< T > *  old = nullptr 
)
inline

Definition at line 217 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ref()

template<class T >
void QArrayDataPointer< T >::ref ( )
inlinenoexcept

Definition at line 325 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ relocate()

template<class T >
void QArrayDataPointer< T >::relocate ( qsizetype  offset,
const T **  data = nullptr 
)
inline

Definition at line 312 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ setBegin()

template<class T >
void QArrayDataPointer< T >::setBegin ( T begin)
inlinenoexcept

Definition at line 337 of file qarraydatapointer.h.

Here is the call graph for this function:

◆ setFlag()

template<class T >
void QArrayDataPointer< T >::setFlag ( typename Data::ArrayOptions  f)
inlinenoexcept

Definition at line 333 of file qarraydatapointer.h.

◆ swap()

template<class T >
void QArrayDataPointer< T >::swap ( QArrayDataPointer< T > &  other)
inlinenoexcept

Definition at line 150 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ tryReadjustFreeSpace()

template<class T >
bool QArrayDataPointer< T >::tryReadjustFreeSpace ( QArrayData::GrowthPosition  pos,
qsizetype  n,
const T **  data = nullptr 
)
inline

Definition at line 268 of file qarraydatapointer.h.

Here is the call graph for this function:
Here is the caller graph for this function:

Friends And Related Function Documentation

◆ operator!=

template<class T >
bool operator!= ( const QArrayDataPointer< T > &  lhs,
const QArrayDataPointer< T > &  rhs 
)
friend

Definition at line 385 of file qarraydatapointer.h.

◆ operator==

template<class T >
bool operator== ( const QArrayDataPointer< T > &  lhs,
const QArrayDataPointer< T > &  rhs 
)
friend

Definition at line 380 of file qarraydatapointer.h.

Member Data Documentation

◆ d

template<class T >
Data* QArrayDataPointer< T >::d

Definition at line 390 of file qarraydatapointer.h.

◆ ptr

template<class T >
T* QArrayDataPointer< T >::ptr

Definition at line 391 of file qarraydatapointer.h.

◆ size

template<class T >
qsizetype QArrayDataPointer< T >::size

Definition at line 392 of file qarraydatapointer.h.


The documentation for this struct was generated from the following files: