Krita Source Code Documentation
Loading...
Searching...
No Matches
KisChunkData Class Reference

#include <kis_chunk_allocator.h>

Public Member Functions

 KisChunkData (quint64 begin, quint64 size)
 
bool operator== (const KisChunkData &other) const
 
void setChunk (quint64 begin, quint64 size)
 
quint64 size () const
 

Public Attributes

quint64 m_begin
 
quint64 m_end
 

Detailed Description

Definition at line 49 of file kis_chunk_allocator.h.

Constructor & Destructor Documentation

◆ KisChunkData()

KisChunkData::KisChunkData ( quint64 begin,
quint64 size )
inline

Definition at line 52 of file kis_chunk_allocator.h.

53 {
54 setChunk(begin, size);
55 }
void setChunk(quint64 begin, quint64 size)
quint64 size() const

Member Function Documentation

◆ operator==()

bool KisChunkData::operator== ( const KisChunkData & other) const
inline

Chunks cannot overlap, so it is enough to check the beginning of the interval only

Definition at line 66 of file kis_chunk_allocator.h.

67 {
68 Q_ASSERT(m_begin!=other.m_begin || m_end==other.m_end);
69
74 return m_begin == other.m_begin;
75 }

References m_begin, and m_end.

◆ setChunk()

void KisChunkData::setChunk ( quint64 begin,
quint64 size )
inline

Definition at line 57 of file kis_chunk_allocator.h.

57 {
58 m_begin = begin;
59 m_end = begin + size - 1;
60 }

◆ size()

quint64 KisChunkData::size ( ) const
inline

Definition at line 62 of file kis_chunk_allocator.h.

62 {
63 return m_end - m_begin +1;
64 }

Member Data Documentation

◆ m_begin

quint64 KisChunkData::m_begin

Definition at line 77 of file kis_chunk_allocator.h.

◆ m_end

quint64 KisChunkData::m_end

Definition at line 78 of file kis_chunk_allocator.h.


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