Implement serialization/deserialization and persistent storage across services
- Add serialize/deserialize support for core models - Add file-based load/save functions in management services - Introduce FileManager, Config, Utility and helper utilities - Persist observer IDs for notification services - Resolve object relationships during load (services, bookings, invoices, job cards) - Add controller-level loadSystemData/saveSystemData - Load data at app startup and save on shutdown
This commit is contained in:
@@ -34,7 +34,7 @@ namespace util
|
||||
|
||||
/*
|
||||
* Function: read
|
||||
* Description: Reads a line of text input from console into a string.
|
||||
* Description: Reads a line of text input from console into a string and cleans it up.
|
||||
* Parameters:
|
||||
* value - reference to a string where the input will be stored
|
||||
* Returns:
|
||||
@@ -43,6 +43,15 @@ namespace util
|
||||
inline void read(std::string& value)
|
||||
{
|
||||
std::getline(std::cin >> std::ws, value);
|
||||
std::string cleanedValue;
|
||||
for (int index = 0; index < value.length(); index++)
|
||||
{
|
||||
if (value[index] != ',')
|
||||
{
|
||||
cleanedValue += value[index];
|
||||
}
|
||||
}
|
||||
value = cleanedValue;
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user