/*! * @file mover_station_list.h * A list to store and handle several stations. */ #ifndef _MOVER_STATION_LIST_H #define _MOVER_STATION_LIST_H #include "mover_station.h" #include "sound_buffer.h" class MoverStationListElement { public: MoverStationListElement(MoverStation *station); ~MoverStationListElement(); MoverStation *station; MoverStationListElement *next; MoverStationListElement *prev; }; class MoverStationList { public: MoverStationList(); ~MoverStationList(); void addStation(MoverStation *station); MoverStation *getNextStation(MoverStation *station); Vector getTotalRelCoor(MoverStation *station); Vector getTotalRelDir(MoverStation *station); bool isOpen(MoverStation *station); bool isClosed(MoverStation *station); bool changeDirection(bool bReopen, bool bRelocse, bool bIsTriggered); Vector getRelTargetCoor(MoverStation *station); Vector getRelTargetDir(MoverStation *station); float getDelay(MoverStation *station) { return station->delay; } float getStayOpenTime(MoverStation *station) { return station->stayOpenTime; } float getMovingTime(MoverStation *station) { return station->movingTime; } Vector getVelocity(MoverStation *station); Vector getRotation(MoverStation *station); OrxSound::SoundBuffer getStartingSound(MoverStation *station); OrxSound::SoundBuffer getMovingSound(MoverStation *station); OrxSound::SoundBuffer getEndingSound(MoverStation *station); private: MoverStation *getStation(int rank); MoverStationListElement *first; MoverStationListElement *last; bool goForward; }; #endif