Added function to get Array size.

Added new operators to Vector.
This commit is contained in:
David Williams
2011-01-10 21:29:18 +00:00
parent b607653e9f
commit 359c9ec343
4 changed files with 119 additions and 39 deletions

View File

@ -155,7 +155,7 @@ namespace PolyVox
////////////////////////////////////////////////////////////////////////////////
/// Because this class does not have a public assignment operator or copy constructor
/// it cnnot be used with the STL swap() function. This function provides an efficient
/// it cannot be used with the STL swap() function. This function provides an efficient
/// implementation of that feature.
/// \param rhs The array to swap this object with.
////////////////////////////////////////////////////////////////////////////////
@ -180,6 +180,16 @@ namespace PolyVox
rhs.m_pElements = m_pTempElements;
}
////////////////////////////////////////////////////////////////////////////////
/// \param uDimension The dimension to get the size of.
////////////////////////////////////////////////////////////////////////////////
template <uint32_t noOfDims, typename ElementType>
uint32_t Array<noOfDims, ElementType>::getDimension(uint32_t uDimension)
{
assert(uDimension < noOfDims);
return m_pDimensions[uDimension];
}
template <uint32_t noOfDims, typename ElementType>
Array<noOfDims, ElementType>::Array(const Array<noOfDims, ElementType>& rhs)
:m_pElements(0)