|
EGSnrc C++ class library
Report PIRS-898 (2021)
Iwan Kawrakow, Ernesto Mainegra-Hing, Frederic Tessier, Reid Townson and Blake Walters
|
EGS_Input class header file. More...
Go to the source code of this file.
Classes | |
| class | EGS_Input |
| A class for storing information in a tree-like structure of key-value pairs. This class is used throughout the egspp class library for passing information to the various objects. More... | |
Functions | |
| vector< string > | egsTokenize (const string &inp) |
| Tokenize a string into individual tokens. More... | |
| vector< int > | egsParseIntegerRanges (vector< string >::const_iterator begin, vector< string >::const_iterator end) |
| Parse integers and integer ranges from string tokens. More... | |
EGS_Input class header file.
Definition in file egs_input.h.
| vector<string> egsTokenize | ( | const string & | inp | ) |
Tokenize a string into individual tokens.
Splits the input string into tokens separated by whitespace or commas. Multiple consecutive whitespace characters are treated as a single separator. Commas are converted to spaces before tokenization.
| str | The input string to tokenize |
Example:
Definition at line 1184 of file egs_input.cpp.
Referenced by EGS_BaseGeometry::getLabelRegions(), and EGS_BaseGeometry::getNumberRegions().
| vector<int> egsParseIntegerRanges | ( | vector< string >::const_iterator | begin, |
| vector< string >::const_iterator | end | ||
| ) |
Parse integers and integer ranges from string tokens.
Parses a sequence of string tokens, where each token can be either:
Ranges are expanded to include all integers between the bounds (inclusive). The order of range bounds doesn't matter (e.g., "15-10" works the same as "10-15").
| begin | Iterator to the first token to parse |
| end | Iterator one past the last token to parse |
Examples:
Definition at line 1207 of file egs_input.cpp.
1.9.1