8 static const unsigned int DEFAULT_SERVER_PORT = 5001;
9 static const std::string DEFAULT_MAP_FILE =
"./testFile.map";
10 static const unsigned int DEFAULT_PROTOCOL_VERSION = 0x0;
28 return std::stoul(portNumber);
31 return DEFAULT_SERVER_PORT;
35 Argument mapFileLocationFlag(
"-m",
"--mapfile");
36 std::string mapFileLocation =
getArgumentValue(mapFileLocationFlag, argumentArray);
38 if(mapFileLocation.empty()) {
39 return DEFAULT_MAP_FILE;
42 return mapFileLocation;
47 Argument protocolVersionFlag(
"-V",
"--protocol-version");
48 std::string protocolVersion =
getArgumentValue(protocolVersionFlag, argumentArray);
51 return std::stoul(protocolVersion);
54 return DEFAULT_PROTOCOL_VERSION;
59 if(*argumentArray ==
nullptr || *(argumentArray + 1) ==
nullptr) {
63 return std::string(*(argumentArray + 1));