Template Function file_read_and_validate_type#
Defined in File inputval.h
Function Documentation#
-
template<typename T>
bool file_read_and_validate_type(std::ifstream &file, T &par, const std::string &par_name, const std::string &par_type) Reads the next value from a filestream and assigns it to the parameter variable if the types match.
- Template Parameters:
T – type of the parameter value
- Parameters:
file – [inout] filestream
par – [out] parameter variable
par_name – [in] parameter name (for error messages)
par_type – [in] parameter type (for error messages)
- Returns:
Whether the assignment process has been successful.