forked from domi91c/Submitter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
User.h
34 lines (31 loc) · 772 Bytes
/
User.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#ifndef SICT_USER_H__
#define SICT_USER_H__
#include <string>
#include <iostream>
#include "debug.h"
namespace sict {
#ifndef SICT_DEBUG
#include <unistd.h>
#include <pwd.h>
#endif
class User {
unsigned int m_uid;
std::string m_userid;
std::string m_ip;
bool m_multipleIp;
void remParentheses(std::string& whoIP)const;
public:
User();
void getIP();
bool operator==(unsigned int uid)const;
bool operator==(std::string userid)const;
bool operator==(const char* userid)const;
bool operator==(const User& U)const;
bool valid()const;
bool multipleLogins()const;
const std::string& ip()const;
std::ostream& print(std::ostream& os)const;
};
std::ostream& operator<<(std::ostream& os, const User& U);
}
#endif