Public Member Functions | Protected Attributes

GnpNpsCoordsInfo Class Reference

#include <CoordinateSystem.h>

Inheritance diagram for GnpNpsCoordsInfo:
EuclideanNcsNodeInfo AbstractNcsNodeInfo

List of all members.

Public Member Functions

 GnpNpsCoordsInfo ()
bool isValid ()
int8_t getLayer () const
void setLayer (int8_t layer)
bool update (const AbstractNcsNodeInfo &abstractInfo)
 operator std::vector< double > () const

Protected Attributes

int8_t npsLayer

Detailed Description

Definition at line 79 of file CoordinateSystem.h.


Constructor & Destructor Documentation

GnpNpsCoordsInfo::GnpNpsCoordsInfo (  )  [inline]

Definition at line 82 of file CoordinateSystem.h.

{ npsLayer = -1; };


Member Function Documentation

int8_t GnpNpsCoordsInfo::getLayer (  )  const [inline]

Definition at line 86 of file CoordinateSystem.h.

Referenced by Nps::coordsReqRpcResponse(), Nps::getOwnLayer(), and operator<<().

{ return npsLayer; };

bool GnpNpsCoordsInfo::isValid (  )  [inline, virtual]

Implements AbstractNcsNodeInfo.

Definition at line 84 of file CoordinateSystem.h.

{ return npsLayer != -1; };

GnpNpsCoordsInfo::operator std::vector< double > (  )  const [virtual]

Implements AbstractNcsNodeInfo.

Definition at line 61 of file CoordinateSystem.cc.

{
    std::vector<double> temp;
    for (uint8_t i = 0; i < coordinates.size(); ++i) {
        temp.push_back(coordinates[i]);
    }
    temp.push_back(npsLayer);

    return temp;
}

void GnpNpsCoordsInfo::setLayer ( int8_t  layer  )  [inline]

Definition at line 87 of file CoordinateSystem.h.

Referenced by Nps::init(), and Nps::setOwnLayer().

{ npsLayer = layer; };

bool GnpNpsCoordsInfo::update ( const AbstractNcsNodeInfo abstractInfo  )  [virtual]

Implements AbstractNcsNodeInfo.

Definition at line 48 of file CoordinateSystem.cc.

{
    if (!dynamic_cast<const GnpNpsCoordsInfo*>(&abstractInfo)) return false;

    const GnpNpsCoordsInfo& temp =
        static_cast<const GnpNpsCoordsInfo&>(abstractInfo);

    coordinates = temp.coordinates;
    npsLayer = temp.npsLayer;

    return true;
}


Member Data Documentation


The documentation for this class was generated from the following files: