Lines Matching refs:std

107 bool CommandParser::ProcessCommand(std::vector<std::string> strs)
146 bool CommandParser::IsSet(std::string key)
148 if (argsMap.find(std::string("-") + key) == argsMap.end()) {
154 std::string CommandParser::Value(std::string key)
156 auto args = argsMap[std::string("-") + key];
160 return std::string();
163 std::vector<std::string> CommandParser::Values(std::string key)
166 return std::vector<std::string>();
168 std::vector<std::string> args = argsMap[key];
172 void CommandParser::Register(std::string key, uint32_t argc, std::string help)
186 std::string CommandParser::GetDeviceType() const
201 std::string CommandParser::GetConfigPath() const
206 std::string CommandParser::GetProjectID() const
211 std::string CommandParser::GetAppResourcePath() const
216 std::string CommandParser::GetScreenShape() const
221 std::string CommandParser::GetProjectModel() const
226 std::string CommandParser::GetPages() const
231 std::string CommandParser::GetContainerSdkPath() const
241 std::string CommandParser::GetConfigChanges() const
271 std::string CommandParser::GetAppName() const
286 std::string CommandParser::GetAbilityPath() const
291 std::string CommandParser::GetAbilityName() const
311 std::string("Debug server port out of range: " + std::to_string(MIN_PORT) + "-" +
312 std::to_string(MAX_PORT) + ".");
324 errorInfo = std::string("No app path specified.");
328 std::string path = Value("j");
330 errorInfo = std::string("Js app path not exist.");
347 errorInfo = std::string("Js app name it too long, max: " + std::to_string(MAX_NAME_LENGTH) + ".");
359 if (IsResolutionArgValid(std::string("-or")) && IsResolutionArgValid(std::string("-cr"))) {
372 errorInfo = std::string("Origin resolution and compress resolution must be setted.");
385 errorInfo = std::string("JS heap size out of range: " + std::to_string(MIN_JSHEAPSIZE) + "-" +
386 std::to_string(MAX_JSHEAPSIZE) + ".");
399 std::string flag = Value("hf");
401 errorInfo = std::string("JS heap flag suported: true or false");
414 std::string shape = Value("shape");
416 errorInfo = std::string("Screen shape suported: rect or circle");
431 errorInfo += std::string("Device type unsupport, please upgrade the Previewer SDK!");
458 std::string path = Value("f");
460 errorInfo = std::string("The configuration file path does not exist.");
474 std::string path = Value("arp");
476 errorInfo = std::string("The configuration appResource path does not exist.");
490 std::string projectModelStr = Value("pm");
493 errorInfo = std::string("The project model does not exist.");
517 bool CommandParser::IsResolutionArgValid(std::string command)
519 std::vector<std::string> value = Values(command);
522 errorInfo = std::string("Invalid argument's count.");
531 bool CommandParser::IsResolutionRangeValid(std::string value)
539 errorInfo = std::string("Resolution range " + std::to_string(MIN_RESOLUTION) + "-" +
540 std::to_string(MAX_RESOLUTION) + ".");
552 std::string refresh = Value("refresh");
554 errorInfo = std::string("The refresh argument unsupported.");
570 std::string card = Value("card");
572 errorInfo = std::string("The card argument unsupported.");
577 std::string devicetype = GetDeviceType();
603 std::string colorMode = Value("cm");
605 errorInfo = std::string("The colormode argument unsupported.");
618 std::string aceVersion = Value("av");
620 errorInfo = std::string("The aceVersion argument unsupported.");
633 std::string orientation = Value("o");
635 errorInfo = std::string("The orientation argument unsupported.");
651 errorInfo = std::string("WebSocket listening port out of range: " + std::to_string(MIN_PORT) + "-" +
652 std::to_string(MAX_PORT) + ".");
663 std::string mode("dynamic");
667 errorInfo = std::string("Screen picture transport mode suported: dynamic or static");
683 std::string lan = Value("l");
697 std::string tsName = Value("ts");
711 std::string socketName = Value("s");
712 std::string regexStr = "^(?:[a-zA-Z0-9-_./\\s*]+)$";
713 std::regex reg(regexStr);
714 if (!std::regex_match(socketName.cbegin(), socketName.cend(), reg)) {
727 std::string configChange = Value("cc");
741 std::string density = Value("sd");
756 std::string path = Value("hsp");
758 errorInfo = std::string("The container sdk path does not exist.");
766 std::string CommandParser::HelpText()
768 std::string helpText = "Usage:\n";
776 void CommandParser::ProcessingCommand(const std::vector<std::string>& strs)
779 std::string index = strs[i];
785 std::vector<std::string> args;
799 auto idxVal = std::distance(projectModels.begin(),
805 std::string CommandParser::GetProjectModelEnumName(int enumValue) const
813 bool CommandParser::CheckParamInvalidity(std::string param, bool isNum = false)
815 std::regex reg(isNum ? regex4Num : regex4Str);
816 return !std::regex_match(param.cbegin(), param.cend(), reg);
825 std::string cpm = Value("cpm");
827 errorInfo = std::string("The component mode argument unsupported.");
848 std::string path = Value("abp");
850 errorInfo = std::string("The ability path is empty.");
870 std::string name = Value("abn");
872 errorInfo = std::string("The ability name is empty.");
885 std::string val = Value("staticCard");
887 errorInfo = std::string("The staticCard argument unsupported.");
912 std::string val = Value("foldable");
914 errorInfo = std::string("The foldable argument unsupported.");
946 if (IsResolutionArgValid(std::string("-fr"))) {
956 errorInfo = std::string("Fold resolution must be setted.");
965 std::string CommandParser::GetFoldStatus() const
980 std::string CommandParser::GetLoaderJsonPath() const
990 std::string path = Value("ljPath");
992 errorInfo = std::string("The configuration loader.json path does not exist.");
1004 std::vector<std::string> strs;
1049 std::string CommandParser::GetComponentTestConfig() const