Node.cc   Node.cc 
skipping to change at line 26 skipping to change at line 26
// License along with this library; if not, write to the Free Software // License along with this library; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
// //
// Email: // Email:
// mhadji@gmail.com // mhadji@gmail.com
#include <cstring> #include <cstring>
#include <cmath> #include <cmath>
#include <limits> #include <limits>
#include "../spatialindex/SpatialIndexImpl.h" #include <spatialindex/SpatialIndex.h>
#include "MVRTree.h" #include "MVRTree.h"
#include "Node.h" #include "Node.h"
#include "Index.h" #include "Index.h"
#include "Leaf.h" #include "Leaf.h"
using namespace SpatialIndex;
using namespace SpatialIndex::MVRTree; using namespace SpatialIndex::MVRTree;
// //
// Tools::IObject interface // Tools::IObject interface
// //
Tools::IObject* Node::clone() Tools::IObject* Node::clone()
{ {
throw Tools::NotSupportedException("IObject::clone should never be c alled."); throw Tools::NotSupportedException("IObject::clone should never be c alled.");
} }
skipping to change at line 195 skipping to change at line 197
// //
// SpatialIndex::INode interface // SpatialIndex::INode interface
// //
uint32_t Node::getChildrenCount() const uint32_t Node::getChildrenCount() const
{ {
return m_children; return m_children;
} }
SpatialIndex::id_type Node::getChildIdentifier(uint32_t index) const SpatialIndex::id_type Node::getChildIdentifier(uint32_t index) const
{ {
if (index < 0 || index >= m_children) throw Tools::IndexOutOfBoundsE xception(index); if (index >= m_children) throw Tools::IndexOutOfBoundsException(inde x);
return m_pIdentifier[index]; return m_pIdentifier[index];
} }
void Node::getChildShape(uint32_t index, IShape** out) const void Node::getChildShape(uint32_t index, IShape** out) const
{ {
if (index < 0 || index >= m_children) throw Tools::IndexOutOfBoundsE xception(index); if (index >= m_children) throw Tools::IndexOutOfBoundsException(inde x);
*out = new TimeRegion(*(m_ptrMBR[index])); *out = new TimeRegion(*(m_ptrMBR[index]));
} }
void Node::getChildData(uint32_t index, uint32_t& length, byte** data) cons t void Node::getChildData(uint32_t index, uint32_t& length, byte** data) cons t
{ {
if (index < 0 || index >= m_children) throw Tools::IndexOutOfBounds Exception(index); if (index >= m_children) throw Tools::IndexOutOfBoundsException(ind ex);
if (m_pData[index] == NULL) if (m_pData[index] == NULL)
{ {
length = 0; length = 0;
data = NULL; data = NULL;
} }
else else
{ {
length = m_pDataLength[index]; length = m_pDataLength[index];
*data = m_pData[index]; *data = m_pData[index];
} }
 End of changes. 5 change blocks. 
4 lines changed or deleted 6 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/