FEDEM Solver
R8.0
Source code of the dynamics solver
|
Utilities for input file parsing. More...
Functions | |
bool | parseFMFASCII (char *keyWord, std::istream &s, std::stringstream &statement, const char start, const char stop) |
Reads a model file record from an input stream. More... | |
int | findIndex (const char **vocabulary, const char *s) |
Searches for the string s in the list of strings vocabulary. More... | |
std::string | extractDescription (std::istream &is, const char startChar='"', const char stopChar = '"') |
Extracts a text string between the given start and stop characters. More... | |
bool | skipToWordOrNum (std::istream &s, const char commentChar) |
Skips until next word or number. More... | |
bool | skipToWord (std::istream &s, const char commentChar) |
Skips until next word (no number). More... | |
void | nextLine (std::istream &s, const char commentChar) |
Skips the rest of current line. More... | |
bool | skipWhiteSpaceAndComments (std::istream &s, bool acceptString=false) |
Skips whitespaces and comments. More... | |
bool | getKeyword (std::istream &s, std::string &keyWord) |
Skips whitespaces and returns the next (non-numerical) keyword. More... | |
Utilities for input file parsing.
std::string FaParse::extractDescription | ( | std::istream & | is, |
const char | startChar = '"' , |
||
const char | stopChar = '"' |
||
) |
Extracts a text string between the given start and stop characters.
int FaParse::findIndex | ( | const char ** | vocabulary, |
const char * | s | ||
) |
Searches for the string s in the list of strings vocabulary.
bool FaParse::getKeyword | ( | std::istream & | s, |
std::string & | keyWord | ||
) |
Skips whitespaces and returns the next (non-numerical) keyword.
void FaParse::nextLine | ( | std::istream & | s, |
const char | commentChar | ||
) |
Skips the rest of current line.
bool FaParse::parseFMFASCII | ( | char * | keyWord, |
std::istream & | s, | ||
std::stringstream & | statement, | ||
const char | start, | ||
const char | stop | ||
) |
Reads a model file record from an input stream.
[out] | keyWord | The keyword of the record that was read |
s | The input stream to read from | |
[out] | statement | String stream containing unparsed data of the record |
[in] | start | Separator between the keyword and data section |
[in] | stop | End-of-record character |
bool FaParse::skipToWord | ( | std::istream & | s, |
const char | commentChar | ||
) |
Skips until next word (no number).
bool FaParse::skipToWordOrNum | ( | std::istream & | s, |
const char | commentChar | ||
) |
Skips until next word or number.
bool FaParse::skipWhiteSpaceAndComments | ( | std::istream & | s, |
bool | acceptString = false |
||
) |
Skips whitespaces and comments.
All kinds of text is considered to be comments, except any text within "" if acceptString is true.