103 #if NEBULA_BOUNDSCHECKS
106 if ((w > 0) && (h > 0))
126 for (y = 0; y < this->
height; y++)
129 for (x = 0; x < this->
width; x++)
131 int flatIndex = y * this->width + x;
146 for (y = 0; y < this->
height; y++)
149 for (x = 0; x < this->
width; x++)
151 int flatIndex = y * this->width + x;
203 rhs.elements =
nullptr;
239 this->
height = rhs.height;
240 this->
width = rhs.width;
241 rhs.elements =
nullptr;
258 for (y = 0; y < this->
height; y++)
261 for (x = 0; x < this->
width; x++)
263 int flatIndex = y * this->width + x;
286 return !(*
this == rhs);
327 #if NEBULA_BOUNDSCHECKS
332 int flatIndex = y * this->width + x;
343 #if NEBULA_BOUNDSCHECKS
348 int flatIndex = y * this->width + x;
bool operator==(const FixedTable< TYPE > &rhs) const
equality operator
Definition fixedtable.h:252
FixedTable(SizeT w, SizeT h)
constructor with size
Definition fixedtable.h:161
void Set(IndexT x, IndexT y, const TYPE &val)
set value at [x,y] position
Definition fixedtable.h:325
SizeT width
Definition fixedtable.h:63
bool operator!=(const FixedTable< TYPE > &rhs) const
inequality operator
Definition fixedtable.h:284
FixedTable(SizeT w, SizeT h, const TYPE &val)
constructor with size and initialized contents
Definition fixedtable.h:173
FixedTable()
default constructor
Definition fixedtable.h:72
FixedTable(const FixedTable< TYPE > &rhs)
copy constructor
Definition fixedtable.h:186
void Copy(const FixedTable< TYPE > &src)
copy content
Definition fixedtable.h:120
SizeT Height() const
get height
Definition fixedtable.h:315
TYPE & At(IndexT x, IndexT y) const
access value at [x,y] position
Definition fixedtable.h:341
void SetSize(SizeT w, SizeT h)
set width and height (clears existing content)
Definition fixedtable.h:294
SizeT Width() const
get width
Definition fixedtable.h:305
TYPE * elements
Definition fixedtable.h:65
void Delete()
delete content
Definition fixedtable.h:85
FixedTable(FixedTable< TYPE > &&rhs) noexcept
move constructor
Definition fixedtable.h:198
void operator=(FixedTable< TYPE > &&rhs) noexcept
move assignment operator
Definition fixedtable.h:233
void Allocate(SizeT w, SizeT h)
allocate for given size
Definition fixedtable.h:101
~FixedTable()
destructor
Definition fixedtable.h:212
void operator=(const FixedTable< TYPE > &rhs)
assignment operator
Definition fixedtable.h:222
void Clear(const TYPE &val)
clear the table with value
Definition fixedtable.h:143
SizeT height
Definition fixedtable.h:64
#define n_assert(exp)
Definition debug.h:50
A pinned array is an array which manages its own virtual memory.
Definition String.cs:6
int SizeT
Definition types.h:49
int IndexT
Definition types.h:48