OpenCAEPoro
v0.5.0
A simulator for multicomponent porous media flow
|
Utilities for reading input file. More...
#include "UtilInput.hpp"
Go to the source code of this file.
Functions | |
OCP_BOOL | ReadLine (ifstream &ifs, vector< string > &result) |
void | DealDefault (vector< string > &result) |
Utilities for reading input file.
Copyright (C) 2021–present by the OpenCAEPoro team. All rights reserved.
Definition in file UtilInput.cpp.
void DealDefault | ( | vector< string > & | result | ) |
DealDefault is used to deal with the expression with asterisk, for example m*n -> <n,...,n> size m , m* -> <DEFAULT,..., DEFAULT> size m.
Definition at line 50 of file UtilInput.cpp.
OCP_BOOL ReadLine | ( | ifstream & | ifs, |
vector< string > & | result | ||
) |
ReadLine is the core function while inputting the file. It will capture the next line which is meanningful, for example, not blank line or comments, and then gets rid of some useless characters such as space, commas. Finally, the segments of rest string will be stored in result. And if return OCP_FALSE, it indicates we have reach the end of file.
Definition at line 14 of file UtilInput.cpp.