MCPcopy Create free account
hub / github.com/aiekick/ImGuiFileDialog / SerializePlaces

Method SerializePlaces

ImGuiFileDialog.cpp:3264–3280  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3262}
3263
3264std::string IGFD::PlacesFeature::SerializePlaces(const bool /*vForceSerialisationForAll*/) {
3265 std::string res;
3266 size_t idx = 0;
3267 for (const auto& group : m_Groups) {
3268 if (group.second->canBeSaved) {
3269 // ## is used because reserved by imgui, so an input text cannot have ##
3270 res += "###" + group.first + "###";
3271 for (const auto& place : group.second->places) {
3272 if (place.canBeSaved) {
3273 if (idx++ != 0) res += "##";
3274 res += place.name + "##" + place.path;
3275 }
3276 }
3277 }
3278 }
3279 return res;
3280}
3281
3282void IGFD::PlacesFeature::DeserializePlaces(const std::string& vPlaces) {
3283 if (!vPlaces.empty()) {

Callers 1

IGFD_SerializePlacesFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected