00001
00002 #ifndef INCLUDED_LocomotionEvent_h_
00003 #define INCLUDED_LocomotionEvent_h_
00004
00005 #include "EventBase.h"
00006 #include <iostream>
00007
00008
00009
00010
00011
00012
00013
00014
00015 class LocomotionEvent : public EventBase {
00016 public:
00017
00018
00019
00020
00021 LocomotionEvent() : EventBase(),x(0),y(0),a(0) {}
00022 LocomotionEvent(EventGeneratorID_t gid, unsigned int sid, EventTypeID_t tid, unsigned int dur=0) : EventBase(gid,sid,tid,dur),x(0),y(0),a(0) {}
00023 LocomotionEvent(EventGeneratorID_t gid, unsigned int sid, EventTypeID_t tid, unsigned int dur, const std::string& n, float mag) : EventBase(gid,sid,tid,dur,n,mag),x(0),y(0),a(0) {}
00024 virtual EventBase* clone() const { return new LocomotionEvent(*this); }
00025
00026
00027 virtual unsigned int getClassTypeID() const { return makeClassTypeID("LOCO"); }
00028
00029
00030 LocomotionEvent& setXYA(float X, float Y, float A) {
00031 x=X;
00032 y=Y;
00033 a=A;
00034 return *this;
00035 }
00036
00037 virtual std::string getDescription(bool showTypeSpecific=true, unsigned int verbosity=0) const;
00038
00039 virtual unsigned int getBinSize() const;
00040 virtual unsigned int LoadBinaryBuffer(const char buf[], unsigned int len);
00041 virtual unsigned int SaveBinaryBuffer(char buf[], unsigned int len) const;
00042 virtual void LoadXML(xmlNode* node);
00043 virtual void SaveXML(xmlNode * node) const;
00044
00045 float x;
00046 float y;
00047 float a;
00048 };
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061 #endif