SPH
Public Member Functions | List of all members
IConfigValue Class Referenceabstract

Interface for value written to the config file. More...

#include <Config.h>

Inheritance diagram for IConfigValue:
Polymorphic ConfigValue< Type > ConfigValue< Interval > ConfigValue< Path > ConfigValue< Vector > ConfigValue< std::string >

Public Member Functions

virtual std::string write () const =0
 Writes the value into a string. More...
 
virtual void read (const std::string &source)=0
 Reads the value from string and stores it internally. More...
 
- Public Member Functions inherited from Polymorphic
virtual ~Polymorphic ()
 

Detailed Description

Interface for value written to the config file.

It provides a way to serialize and deserialize the value from string. This class should not be implemented directly, instead new types should be added by specialization of class ConfigValue; IConfigValue serves only as type erasure, but to access the stored value, it is necessary to cast it to ConfigValue.

Definition at line 25 of file Config.h.

Member Function Documentation

◆ read()

virtual void IConfigValue::read ( const std::string &  source)
pure virtual

Reads the value from string and stores it internally.

Exceptions
ConfigExceptionif the value cannot be deserialized.

Implemented in ConfigValue< Path >, ConfigValue< std::string >, ConfigValue< Interval >, ConfigValue< Vector >, and ConfigValue< Type >.

◆ write()

virtual std::string IConfigValue::write ( ) const
pure virtual

The documentation for this class was generated from the following file: