mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-06-13 17:44:48 -07:00
initial commit
This commit is contained in:
commit
a11f93df4d
99 changed files with 7493 additions and 0 deletions
19
cockatrice/src/pendingcommand.h
Normal file
19
cockatrice/src/pendingcommand.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef PENDINGCOMMAND_H
|
||||
#define PENDINGCOMMAND_H
|
||||
|
||||
#include <QString>
|
||||
|
||||
class PendingCommand {
|
||||
private:
|
||||
QString cmd;
|
||||
int msgid;
|
||||
int time;
|
||||
public:
|
||||
int getMsgId() const { return msgid; }
|
||||
QString getCmd() const { return cmd; }
|
||||
bool timeout() const { return time > 5; }
|
||||
void incTime() { ++time; }
|
||||
PendingCommand(const QString &_cmd, int _msgid) : cmd(_cmd), msgid(_msgid), time(0) { }
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue