📄 record.cpp
字号:
#include "Record.h"
Record::Record(string mRecId, string mEventType,
string mFacility, string mSeverity, int mEventTime,
string mFlags, string mThread, string mJobId, string mProcessor,
string mNode, string mBlock, string mEntryData, string mLocation) {
this->mRecId = mRecId;
this->mEventType = mEventType;
this->mFacility = mFacility;
this->mSeverity = mSeverity;
this->mEventTime = mEventTime;
this->mFlags = mFlags;
this->mThread = mThread;
this->mJobId = mJobId;
this->mProcessor = mProcessor;
this->mNode = mNode;
this->mBlock = mBlock;
this->mEntryData = mEntryData;
this->mLocation = mLocation;
//this->mSize = mSize;
//this->mFormat = mFormat;
//this->mSerialNumber = mSerialNumber;
}
Record::Record(string mRecId, string mEventType,
string mFacility, string mSeverity, int mEventTime,
string mEntryData, string mLocation, string mJobId) {
this->mRecId = mRecId;
this->mEventType = mEventType;
this->mFacility = mFacility;
this->mSeverity = mSeverity;
this->mEventTime = mEventTime;
this->mEntryData = mEntryData;
this->mLocation = mLocation;
this->mJobId = mJobId;
}
bool Record::operator<(const Record& anotherRecord) const {
//cout << "into < operator" << endl;
//cout << "currRecord: " << currRecord << endl;
//cout << "anotherRecord: " << anotherRecord << endl;
return (this->getEventTime() < anotherRecord.getEventTime());
};
string Record::getRecId() const {
return mRecId;
};
string Record::getEventType() const {
return mEventType;
};
string Record::getFacility() const {
return mFacility;
};
string Record::getSeverity() const {
return mSeverity;
};
int Record::getEventTime() const {
return mEventTime;
};
string Record::getFlags() const {
return mFlags;
};
string Record::getThread() const {
return mThread;
};
string Record::getJobId() const {
return mJobId;
};
string Record::getProcessor() const {
return mProcessor;
};
string Record::getNode() const {
return mNode;
};
string Record::getBlock() const {
return mBlock;
};
string Record::getEntryData() const {
return mEntryData;
};
string Record::getLocation() const {
return mLocation;
};
string Record::getCategory() const {
return mFacility;
};
/*
string Record::getSize() const {
return mSize;
};
string Record::getFormat() const {
return mFormat;
};
string Record::getSerialNumber() const {
return mSerialNumber;
};
*/
/*
inline ostream& operator<<(ostream& os, const Record& rec) {
os << "Id: " << rec.getRecId();
os << " Severity: " << rec.getSeverity();
os << " Time: " << rec.getEventTime();
os << " Facility: " << rec.getFacility();
return os;
};
inline bool operator<(const Record& currRecord, const Record& anotherRecord) {
//cout << "into < operator" << endl;
//cout << "currRecord: " << currRecord << endl;
//cout << "anotherRecord: " << anotherRecord << endl;
return (currRecord.getEventTime() < anotherRecord.getEventTime());
};
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -