A property set.  
 More...
#include <property_set.hpp>
 | 
|   | property_set (std::unique_ptr< storage_loader > &&p_storage_loader, const std::filesystem::path &path) | 
|   | Creates a property set.  
  | 
|   | 
| 
virtual  | ~property_set () | 
|   | Destroys the property set. 
  | 
|   | 
| std::optional< bool >  | get_bool (const std::filesystem::path &key) const | 
|   | Returns the value in a boolean.  
  | 
|   | 
| void  | set_bool (const std::filesystem::path &key, bool value) | 
|   | Sets a value in a boolean.  
  | 
|   | 
| std::optional< std::uint32_t >  | get_uint32 (const std::filesystem::path &key) const | 
|   | Returns the value in an unsigned 32-bit integer.  
  | 
|   | 
| void  | set_uint32 (const std::filesystem::path &key, std::uint32_t value) | 
|   | Sets a value in an unsigned 32-bit integer.  
  | 
|   | 
| std::optional< std::string >  | get_string (const std::filesystem::path &key) const | 
|   | Returns the value in a string.  
  | 
|   | 
| void  | set_string (const std::filesystem::path &key, const std::string &value) | 
|   | Sets a value in a string.  
  | 
|   | 
| 
void  | update () | 
|   | Updates the property values to the latest state in the storage. 
  | 
|   | 
| 
void  | commit () const | 
|   | Commits the property value changes to the storage. 
  | 
|   | 
◆ property_set()
      
        
          | tetengo::property::property_set::property_set  | 
          ( | 
          std::unique_ptr< storage_loader > && |           p_storage_loader,  | 
        
        
           | 
           | 
          const std::filesystem::path & |           path ) | 
        
      
 
Creates a property set. 
- Parameters
 - 
  
    | p_storage_loader | A unique pointer to a storage loader.  | 
    | path | A path.  | 
  
   
 
 
◆ get_bool()
  
  
      
        
          | std::optional< bool > tetengo::property::property_set::get_bool  | 
          ( | 
          const std::filesystem::path & |           key | ) | 
           const | 
         
       
   | 
  
nodiscard   | 
  
 
Returns the value in a boolean. 
- Parameters
 - 
  
  
 
- Returns
 - The value. Or std::nullopt when no such key. 
 
 
 
◆ get_string()
  
  
      
        
          | std::optional< std::string > tetengo::property::property_set::get_string  | 
          ( | 
          const std::filesystem::path & |           key | ) | 
           const | 
         
       
   | 
  
nodiscard   | 
  
 
Returns the value in a string. 
- Parameters
 - 
  
  
 
- Returns
 - The value. Or std::nullopt when no such key. 
 
 
 
◆ get_uint32()
  
  
      
        
          | std::optional< std::uint32_t > tetengo::property::property_set::get_uint32  | 
          ( | 
          const std::filesystem::path & |           key | ) | 
           const | 
         
       
   | 
  
nodiscard   | 
  
 
Returns the value in an unsigned 32-bit integer. 
- Parameters
 - 
  
  
 
- Returns
 - The value. Or std::nullopt when no such key. 
 
 
 
◆ set_bool()
      
        
          | void tetengo::property::property_set::set_bool  | 
          ( | 
          const std::filesystem::path & |           key,  | 
        
        
           | 
           | 
          bool |           value ) | 
        
      
 
Sets a value in a boolean. 
- Parameters
 - 
  
  
 
 
 
◆ set_string()
      
        
          | void tetengo::property::property_set::set_string  | 
          ( | 
          const std::filesystem::path & |           key,  | 
        
        
           | 
           | 
          const std::string & |           value ) | 
        
      
 
Sets a value in a string. 
- Parameters
 - 
  
  
 
 
 
◆ set_uint32()
      
        
          | void tetengo::property::property_set::set_uint32  | 
          ( | 
          const std::filesystem::path & |           key,  | 
        
        
           | 
           | 
          std::uint32_t |           value ) | 
        
      
 
Sets a value in an unsigned 32-bit integer. 
- Parameters
 - 
  
  
 
 
 
The documentation for this class was generated from the following file: