66 lines
1.4 KiB
C++
66 lines
1.4 KiB
C++
/*
|
|
* File: SplitAbortEvent.h
|
|
* Author: noackrob
|
|
*
|
|
* Created on August 30, 2013, 3:00 PM
|
|
*/
|
|
|
|
#ifndef SPLITABORTEVENT_H
|
|
#define SPLITABORTEVENT_H
|
|
|
|
#include "split/events/SplitEvent.h"
|
|
|
|
#include <string>
|
|
|
|
namespace ubeeme {
|
|
namespace moversight {
|
|
|
|
/**
|
|
* @brief Event: A split could not start.
|
|
*
|
|
* @class SplitAbortEvent
|
|
* @author Robert Noack
|
|
* @ingroup Moversight
|
|
*/
|
|
class SplitAbortEvent : public SplitEventGroup<SplitAbortEvent> {
|
|
public:
|
|
|
|
/**
|
|
* @brief Constructor.
|
|
* @param reason Cause of the abort.
|
|
*/
|
|
SplitAbortEvent( const std::string& reason) : reason(reason) {
|
|
}
|
|
|
|
/**
|
|
* @brief Destructor
|
|
*/
|
|
virtual ~SplitAbortEvent() {
|
|
}
|
|
|
|
void setReason(const std::string & reason) {
|
|
this->reason = reason;
|
|
}
|
|
|
|
const std::string & getReason() const {
|
|
return reason;
|
|
}
|
|
|
|
virtual std::string toString() const {
|
|
std::stringstream buf;
|
|
buf << "SplitAbortEvent ["
|
|
<< "Reason: " << reason
|
|
<< "]";
|
|
return buf.str();
|
|
}
|
|
|
|
private:
|
|
std::string reason;
|
|
};
|
|
|
|
}
|
|
}
|
|
|
|
#endif /* SPLITABORTEVENT_H */
|
|
|