Files
scandocs/uni/masterarbeit/source/moversight/ms/events/ViewChangeEvent.h
2014-06-30 13:58:10 +02:00

68 lines
1.4 KiB
C++

/*
* File: ViewChangeEvent.h
* Author: jgaebler
*
* Created on March 5, 2014, 6:27 PM
*/
#pragma once
#ifndef VIEWCHANGEEVENT_H
#define VIEWCHANGEEVENT_H
#include "ms/events/GroupEvent.h"
#include "ms/ViewID.h"
namespace ubeeme {
namespace moversight {
/**
* @brief Event: The view has changed.
* @class ViewChangeEvent
* @author Jan Gäbler
* @ingroup Moversight
*/
class ViewChangeEvent : public GroupEventGroup<ViewChangeEvent> {
public:
/**
* @brief Constructor.
* @param id The new id of the view
*/
ViewChangeEvent(const ViewID & id):viewID(id) {
}
/**
* @brief Destructor
*/
virtual ~ViewChangeEvent() {
}
/**
* @brief Permits access to the new id of the view.
* @returns The new ID of the view.
*/
const ViewID getViewID() const {
return viewID;
}
virtual std::string toString() const {
std::stringstream buf;
buf << "ViewChangeEvent ["
<< "ViewID: "
<< viewID
<< "]";
return buf.str();
}
private:
ViewID viewID;
};
}
}
#endif /* VIEWCHANGEEVENT_H */