/* * Copyright (c) 2002, Name * $Id: object.h,v 1.2 2002/09/19 10:42:02 stefan Exp $ */ #ifndef JFK_OBJECT_H #define JFK_OBJECT_H #include namespace JFK { class object { public: object(); object(const object&); virtual ~object(); /* pack all attributes (except the id) into a string */ virtual std::string tostring() const = 0; /* assign the attributes with their values in 's' */ virtual void fromstring(const std::string& s) = 0; /* update the position depending on passed time 't' */ virtual void move(double t); virtual std::string classname() const = 0; unsigned long id; double x; /* x position */ double y; /* y position */ double dx; /* x direction */ double dy; /* y direction */ double v; /* velocity */ double w; /* rotation velocity */ double r; /* radius */ }; } #endif