Class xlifepp::iomel::StringInput#

class StringInput#

Collaboration diagram for xlifepp::iomel::StringInput:

digraph { graph [bgcolor="#00000000"] node [shape=rectangle style=filled fillcolor="#FFFFFF" font=Helvetica padding=2] edge [color="#1414CE"] "3" [label="std::basic_ifstream< char >" tooltip="std::basic_ifstream< char >"] "5" [label="std::basic_ios< char >" tooltip="std::basic_ios< char >"] "4" [label="std::basic_istream< char >" tooltip="std::basic_istream< char >"] "13" [label="std::basic_string< char >" tooltip="std::basic_string< char >"] "10" [label="std::basic_ifstream< Char >" tooltip="std::basic_ifstream< Char >"] "7" [label="std::basic_ios< Char >" tooltip="std::basic_ios< Char >"] "9" [label="std::basic_ios< Char >" tooltip="std::basic_ios< Char >"] "8" [label="std::basic_istream< Char >" tooltip="std::basic_istream< Char >"] "11" [label="std::basic_istream< Char >" tooltip="std::basic_istream< Char >"] "14" [label="std::basic_string< Char >" tooltip="std::basic_string< Char >"] "2" [label="std::ifstream" tooltip="std::ifstream"] "6" [label="std::ios_base" tooltip="std::ios_base"] "12" [label="std::string" tooltip="std::string"] "1" [label="xlifepp::iomel::StringInput" tooltip="xlifepp::iomel::StringInput" fillcolor="#BFBFBF"] "3" -> "4" [dir=forward tooltip="public-inheritance"] "3" -> "10" [dir=forward tooltip="template-instance"] "5" -> "6" [dir=forward tooltip="public-inheritance"] "5" -> "7" [dir=forward tooltip="template-instance"] "4" -> "5" [dir=forward tooltip="public-inheritance"] "4" -> "8" [dir=forward tooltip="template-instance"] "13" -> "14" [dir=forward tooltip="template-instance"] "10" -> "11" [dir=forward tooltip="public-inheritance"] "7" -> "6" [dir=forward tooltip="public-inheritance"] "9" -> "6" [dir=forward tooltip="public-inheritance"] "8" -> "9" [dir=forward tooltip="public-inheritance"] "11" -> "9" [dir=forward tooltip="public-inheritance"] "2" -> "3" [dir=forward tooltip="public-inheritance"] "12" -> "13" [dir=forward tooltip="public-inheritance"] "1" -> "2" [dir=forward tooltip="usage"] "1" -> "12" [dir=forward tooltip="usage"] }

This class is used by the function Mesh::loadMelina to read data from a file containing a mesh in Melina format.

Public Functions

StringInput()#

default constructor

StringInput(const std::string &filename)#

constructor by file name (opens stream)

constructor by filename (opens stream)

~StringInput()#

destructor (closes stream)

char char2code(const char)#

char2code returns melina++’s code of a char

inline char code() const#

current string code

inline std::string endWords()#

return end words

void eval()#

computes current input string code (si_code_) and value

inline std::string File() const#

return file name

int integerValue() const#

current string integer value

std::ifstream &next()#

get next value of string

std::ifstream &nextInteger()#

find next integer-valued string

std::ifstream &nextReal()#

find next real-valued string

std::ifstream &nextString()#

find next string-valued string

std::ifstream &nextWord()#

find next word in input file

std::ifstream &notComment()#

find next non-comment string in input file

std::ifstream &notWord(const char)#

find next input string of type ‘char’

std::string previousString() const#

previous string value

void print()#

main routine to print

void print(const std::string&)#

print input string to filename according to code

void readLines(const number_t n)#

read next n lines from input file

real_t realValue() const#

current string real value

inline void setVerboseLevel(const number_t vb) const#

sets verbose level

void stop(const char)#

stop on reading (type ‘char’ string found)

std::ifstream &String()#

get next string-valued string

std::string value() const#

current string value

inline number_t verboseLevel() const#

returns verbose level

std::ifstream &word()#

find word in input file

std::ifstream &word(char*)#

find given (char*) word in input file

std::ifstream &word(const std::string&)#

find given (string) word in input file

std::ifstream &wordBegin(char*)#

find (char*)word as the beginning of a string in input file

std::ifstream &wordBegin(const std::string&)#

find (string)word as the beginning of a string

std::ifstream &wordContain(char*)#

find (char*)word as substring of a string in input file

std::ifstream &wordContain(const std::string&)#

find (string)word as substring of a string

Public Members

std::ifstream si_stream_#

input file stream