📄 event.h
字号:
#ifndef EVENT_H
#define EVENT_H
#include <string>
#include <fstream>
using namespace std;
class Event {
friend ostream& operator<<(ostream& os, const Event& rec);
public:
Event(int mRecId, string mFacility, string mSeverity, int mEventTime, string mCategory);
Event(int mRecId, int mEventTime, string mCategory);
virtual ~Event() {};
bool operator<(const Event& anotherRecord) const;
int getRecId() const;
string getFacility() const;
string getSeverity() const;
int getEventTime() const;
string getCategory() const;
Event(){};
private:
int mRecId;
string mFacility;
string mSeverity;
int mEventTime;
string mCategory;
};
inline ostream& operator<<(ostream& os, const Event& rec) {
os << rec.getRecId() << " " << rec.getEventTime() << " " << rec.getCategory() << " " << rec.getSeverity() << " " << rec.getFacility();
return os;
};
#endif /* EVENT_H */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -