/*
 * HnSRTreeNeighbor.hh
 *
 * DO NOT EDIT THIS FILE!
 *
 * This file is automatically generated by obj2ptr.
 * 2002/09/13 14:07:14
 */

#ifndef _HnSRTreeNeighbor_hh
#define _HnSRTreeNeighbor_hh

#ifndef _HNSRTIMP
#ifdef _MSC_VER
#define _HNSRTIMP _declspec(dllimport)
#else
#define _HNSRTIMP
#endif
#endif

#include "HnSRTree/HnPointer.hh"

#include "HnSRTree/HnPoint.hh"
#include "HnSRTree/HnDataItem.hh"

/*
 * HnSRTreeNeighbor
 */

class _HNSRTIMP HnSRTreeNeighbor: public HnPointer {
private:
    friend class HnSRTreeNeighborObj;
    HnSRTreeNeighbor(const HnSRTreeNeighborObj *ptr) {
	HnPointer::assign((HnObject *)ptr);
    }
    HnSRTreeNeighborObj *getObject(void) const {
	return (HnSRTreeNeighborObj *)HnPointer::getObject();
    }
public:
    static const HnSRTreeNeighbor null;
    HnSRTreeNeighbor(void) {}
public:
    _HNSRTIMP friend HnSRTreeNeighbor
    new_HnSRTreeNeighbor(const HnPoint &point, const HnDataItem &dataItem,
			double distance);
    _HNSRTIMP friend HnSRTreeNeighbor
    new_HnSRTreeNeighbor(long offset, double distance);

    HnPoint getPoint(void) const;
    HnDataItem getDataItem(void) const;
    long getOffset(void) const;
    double getDistance(void) const;

    HnBool isPoint(void) const;

    int compareTo(const HnSRTreeNeighbor &neighbor) const;
    HnString toString(void) const;
};

#include "HnSRTree/HnString.hh"

#define HnClass HnSRTreeNeighbor
#include "HnSRTree/HnClassArray.hh"

#include "HnSRTree/HnSRTreeNeighborObj.hh"

inline HnPoint
HnSRTreeNeighbor::getPoint(void) const
{
    return getObject()->getPoint();
}

inline HnDataItem
HnSRTreeNeighbor::getDataItem(void) const
{
    return getObject()->getDataItem();
}

inline long
HnSRTreeNeighbor::getOffset(void) const
{
    return getObject()->getOffset();
}

inline double
HnSRTreeNeighbor::getDistance(void) const
{
    return getObject()->getDistance();
}

inline HnBool
HnSRTreeNeighbor::isPoint(void) const
{
    return getObject()->isPoint();
}

inline int
HnSRTreeNeighbor::compareTo(const HnSRTreeNeighbor &neighbor) const
{
    return getObject()->compareTo(neighbor);
}

inline HnString
HnSRTreeNeighbor::toString(void) const {
    if ( isInvalid() ) {
	return "HnSRTreeNeighbor::null";
    }
    else {
	return getObject()->toString();
    }
}


#endif /* _HnSRTreeNeighbor_hh */
