item.h
来自「用data miming技术进行false prediction」· C头文件 代码 · 共 44 行
H
44 行
#ifndef ITEM_H
#define ITEM_H
#include <iostream>
#include <string>
#include "AppException.h"
using namespace std;
class Item {
friend ostream& operator<<(ostream& os, const Item& item);
public:
Item(string name);
Item(string name, int count, int seq);
virtual ~Item() {};
bool operator<(const Item& anotherItem) const;
bool operator>(const Item& anotherItem) const;
string getName() const;
int getCount() const;
int getSeq() const;
void incrementCount();
void setCount(int i);
private:
string mName;
int mCount;
int mSeq;
};
inline ostream& operator<<(ostream& os, const Item& item) {
os << "Name: " << item.getName();
os << " Count: " << item.getCount();
return os;
};
#endif /* ITEM_H */
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?