/***************************************************************
 * PrJointState.h
 *
 * This class provides the robot joint state.
 *
 ****************************************************************/

/*
 * modification history
 *----------------------
 *
 * 11/02/97: K.C. Chang: created.
 */

#ifndef _PrJointState_h
#define _PrJointState_h

#include "PrGlobalDefn.h"

class PrJointState
{
  public:
    PrJointState(int noj);

    // copy constructor
    PrJointState(const PrJointState &state);

    ~PrJointState();

    // assignment operator overloading
    PrJointState &operator=(const PrJointState &state);

    // number of joints
    int noj() const { return noj_; }

    // joint position
    Float *q() { return data_; }

    // joint velocity
    Float *dq() { return q()+noj_; }

    // joint acceleration
    Float *ddq() { return dq()+noj_; }

  private:
    const int nos_; //=3 (q,dq,ddq)
    const int noj_;
    Float *data_;
};

#endif //  _PrJointState_h
