FEDEM Model Database  R8.0
Source code of the FEDEM model database
Public Member Functions | Private Attributes | List of all members
FmModelFileQuery Class Reference

Utility to query the contents of a model file by keyWord. More...

#include <FmModelFileQuery.H>

Public Member Functions

 FmModelFileQuery (const std::string &filePath="")
 
std::vector< std::string > getEntries (const std::string &keyWord, bool all=true)
 Returns the values of the provided keyword. More...
 
std::string getFirstEntry (const std::string &keyWord)
 

Private Attributes

std::string myModelFile
 

Detailed Description

Utility to query the contents of a model file by keyWord.

Comes in handy if you want to check the contents of other model files than the one you are currently working with.

Author
Sven-Kaare Evenseth

Constructor & Destructor Documentation

◆ FmModelFileQuery()

FmModelFileQuery::FmModelFileQuery ( const std::string &  filePath = "")
inline

Member Function Documentation

◆ getEntries()

std::vector< std::string > FmModelFileQuery::getEntries ( const std::string &  keyWord,
bool  all = true 
)

Returns the values of the provided keyword.

If all is false, it will stop after the first occurance of keyWord. Returns empty vector if no model file is set or if the file cannot be read.

See also
getFirstEntry

◆ getFirstEntry()

std::string FmModelFileQuery::getFirstEntry ( const std::string &  keyWord)

Provided for convenience. Does the same as the above, and returns the first occurance of the keyWord.

See also
getEntries

Member Data Documentation

◆ myModelFile

std::string FmModelFileQuery::myModelFile
private

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