24 lines
531 B
C++
24 lines
531 B
C++
#include "IPAddressList.h"
|
|
|
|
namespace core {
|
|
|
|
IPAddressList::IPAddressList() {}
|
|
|
|
std::map<std::string, IPAddress> IPAddressList::getList() {
|
|
return list;
|
|
}
|
|
|
|
void IPAddressList::add(IPAddress ipAddress) {
|
|
list.insert(std::make_pair(ipAddress.getClientAddress(), ipAddress));
|
|
}
|
|
|
|
bool IPAddressList::remove(IPAddress ipAddress) {
|
|
return false;
|
|
}
|
|
|
|
bool IPAddressList::contains(std::string ipAddress) {
|
|
return list.size() > 0 ? list.find(ipAddress) != list.end(): false;
|
|
}
|
|
|
|
}
|