25 #include "ndCoreStdafx.h"
29 #include "ndClassAlloc.h"
40 inline ndStackBase::ndStackBase (ndInt32 size)
42 ,m_ptr (
ndMemory::Malloc (size_t (size)))
46 inline ndStackBase::~ndStackBase ()
57 ndInt32 GetSizeInBytes()
const;
58 ndInt32 GetElementsCount()
const;
60 inline T& operator[] (ndInt32 entry);
61 inline const T& operator[] (ndInt32 entry)
const;
88 return ndInt32 (m_size *
sizeof(T));
94 ndAssert (entry >= 0);
95 ndAssert ((entry < m_size) || ((m_size == 0) && (entry == 0)));
97 T*
const mem = (T*) m_ptr;
104 ndAssert (entry >= 0);
105 ndAssert ((entry < m_size) || ((m_size == 0) && (entry == 0)));
107 const T*
const mem = (T*) m_ptr;