event.h

来自「用data miming技术进行false prediction」· C头文件 代码 · 共 47 行

H
47
字号
#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 + =
减小字号Ctrl + -
显示快捷键?