// Velocity class template // ----------------------- #ifndef VELOCITY #define VELOCITY const Velocity template class Distance; template class Velocity { friend class Distance; double value; static char* units; public: Velocity(DOUBLE v) : value(v) {} #define Class Velocity #include "Additive.hpp" }; template inline Velocity& Velocity::operator+=(VELOCITY rs) {value+=rs.value; return *this;} template inline Velocity& Velocity::operator-=(VELOCITY rs) {value-=rs.value; return *this;} template inline Velocity& Velocity::operator*=(DOUBLE rs) {value*=rs; return *this;} template inline Velocity& Velocity::operator/=(DOUBLE rs) {value/=rs; return *this;} #undef Class #endif