Converts a string containing a list of plugin unique identifiers to a vector of GUID structs. @param p_PluginIdsAsString String containing the plugin IDs. @param p_Separator Character used to separate the plugin IDs in the string. @return Vector of plugin IDs as GUID structs.
| 485 | // @return Vector of plugin IDs as GUID structs. |
| 486 | // |
| 487 | GUIDV PluginUtils::StringToPluginIds(std::wstring p_PluginIdsAsString, |
| 488 | const wchar_t p_Separator) |
| 489 | { |
| 490 | // Assume there are no plugin IDs. |
| 491 | GUIDV vPluginIds; |
| 492 | |
| 493 | // First split the string. |
| 494 | WStringV vStringParts = StringUtils::Split(std::move(p_PluginIdsAsString), p_Separator); |
| 495 | |
| 496 | // Scan parts and convert to GUIDs. |
| 497 | GUID onePluginId = { 0 }; |
| 498 | for (const std::wstring& stringPart : vStringParts) { |
| 499 | if (SUCCEEDED(::CLSIDFromString(stringPart.c_str(), &onePluginId))) { |
| 500 | vPluginIds.push_back(onePluginId); |
| 501 | } |
| 502 | } |
| 503 | |
| 504 | return vPluginIds; |
| 505 | } |
| 506 | |
| 507 | // |
| 508 | // Converts a string containing a list of unsigned integers to a vector. |
nothing calls this directly
no outgoing calls
no test coverage detected