|
Jpp
18.2.0
the software that should make you happy
|
Utility class to parse parameter values. More...
#include <JProperties.hh>
Classes | |
| class | JFileReader |
| Auxiliary class to handle input from file. More... | |
Public Types | |
| typedef std::map< std::string, JPropertiesElement > | JMap_t |
Public Member Functions | |
| JProperties (const int debug=0) | |
| Constructor. More... | |
| JProperties (const JEquationParameters ¶meters, const int debug=0) | |
| Constructor. More... | |
| template<class T > | |
| void | put (const std::string &key, T &object) |
| Put object at given key. More... | |
| JProperties & | join (const JProperties &properties) |
| Join properties objects. More... | |
| bool | read (const JEquation &equation) |
| Read equation. More... | |
| bool | read (const std::string &buffer) |
| Read from input string. More... | |
| std::istream & | read (std::istream &in) |
| Read from input stream. More... | |
| std::istream & | read (std::istream &in, const std::string &format) |
| Read from input stream according given format. More... | |
| template<class T > | |
| std::istream & | read (std::istream &in, T __begin, T __end) |
| Read from input stream according given format. More... | |
| std::ostream & | write (std::ostream &out) const |
| Write the current parameter values. More... | |
| std::ostream & | write (std::ostream &out, const std::string &format) |
| Write to output stream according given format. More... | |
| template<class T > | |
| std::ostream & | write (std::ostream &out, T __begin, T __end) |
| Write to output stream according given format. More... | |
| std::string | sed (const std::string &format, const std::string &prefix="", const std::string &postfix="") |
| Stream editing of input format. More... | |
| template<class T > | |
| const T & | getValue (const std::string &key) const |
| Get value. More... | |
| template<class T > | |
| T & | getValue (const std::string &key) |
| Get value. More... | |
| template<class T > | |
| void | setValue (const std::string &key, const T &value) |
| Set value. More... | |
| std::string | getString (const std::string &key) const |
| Get string value. More... | |
| std::ostream & | print (std::ostream &out) const |
| Print the current parameter values. More... | |
| const JEquationParameters & | getEquationParameters () const |
| Get equation parameters. More... | |
| void | setEquationParameters (const JEquationParameters &buffer) |
| Set equation parameters. More... | |
| const char | getDefaultSeparator () const |
| Get default separator character. More... | |
| const std::string & | getSeparator () const |
| Get separator characters. More... | |
| std::string & | getSeparator () |
| Get separator characters. More... | |
| void | setSeparator (const std::string &sep) |
| Set separator character(s). More... | |
| const char | getDefaultEndOfLine () const |
| Get default end of line character. More... | |
| const char | getPreferredEndOfLine (const unsigned int index) const |
| Get preferred end of line character. More... | |
| const std::string & | getEndOfLine () const |
| Get end of line characters. More... | |
| std::string & | getEndOfLine () |
| Get end of line characters. More... | |
| void | setEndOfLine (const std::string &eol) |
| Set end of line characters. More... | |
| const char | getDefaultDivision () const |
| Get default division character. More... | |
| const std::string & | getDivision () const |
| Get division characters. More... | |
| std::string & | getDivision () |
| Get division characters. More... | |
| void | setDivision (const std::string &div) |
| Set division characters. More... | |
| const char | getDefaultSkipLine () const |
| Get default skip line character. More... | |
| const std::string & | getSkipLine () const |
| Get skip line characters. More... | |
| std::string & | getSkipLine () |
| Get skip line characters. More... | |
| void | setSkipLine (const std::string &skip) |
| Set skip line characters. More... | |
| void | setBrackets (const char left, const char right) |
| Set brackets. More... | |
| char | getLeftBracket () const |
| Get left bracket. More... | |
| char & | getLeftBracket () |
| Get left bracket. More... | |
| char | getRightBracket () const |
| Get right bracket. More... | |
| char & | getRightBracket () |
| Get right bracket. More... | |
| const char | getDefaultWhiteSpace () const |
| Get default white space character. More... | |
| const std::string & | getWhiteSpace () const |
| Get white space characters. More... | |
| std::string & | getWhiteSpace () |
| Get white space characters. More... | |
| void | setWhiteSpace (const std::string &ws) |
| Set white space characters. More... | |
| const std::string & | getComment () const |
| Get comment string. More... | |
| std::string & | getComment () |
| Get comment string. More... | |
| void | setComment (const std::string &comment) |
| Set comment string. More... | |
| JEquationParameters & | join (const JEquationParameters &value) |
| Join equation parameters. More... | |
| bool | isSeparator (const char c) const |
| Test for separator character. More... | |
| bool | isEndOfLine (const char c) const |
| Test for end of line character. More... | |
| bool | isDivision (const char c) const |
| Test for division character. More... | |
| bool | isSkipLine (const char c) const |
| Test for skip line character. More... | |
| bool | isLeftBracket (const char c) const |
| Test for left bracket character. More... | |
| bool | isRightBracket (const char c) const |
| Test for right bracket character. More... | |
| bool | isWhiteSpace (const char c) const |
| Test for white space character. More... | |
Static Public Member Functions | |
| static std::string | getKey (const std::string &buffer, const std::string &sep) |
| Utility method to strip off all leading characters from a string until specified character(s). More... | |
Static Public Attributes | |
| static int | debug |
Protected Attributes | |
| std::string | sep |
| std::string | eol |
| std::string | div |
| std::string | skip |
| char | left |
| char | right |
| std::string | ws |
| std::string | comment |
Friends | |
| std::istream & | operator>> (std::istream &in, JProperties &properties) |
| Stream input. More... | |
| std::ostream & | operator<< (std::ostream &out, const JProperties &properties) |
| Stream output. More... | |
Utility class to parse parameter values.
The mapping between a parameter (of any type) and a value has to be defined in the user's program, e.g.
Definition at line 497 of file JProperties.hh.
Definition at line 504 of file JProperties.hh.
|
inline |
Constructor.
| debug | debug level |
Definition at line 621 of file JProperties.hh.
|
inline |
Constructor.
| parameters | equation parameters |
| debug | debug level |
Definition at line 635 of file JProperties.hh.
|
inlinestatic |
Utility method to strip off all leading characters from a string until specified character(s).
| buffer | input string |
| sep | last character(s) to strip |
Definition at line 516 of file JProperties.hh.
|
inline |
Put object at given key.
| key | key |
| object | object |
Definition at line 651 of file JProperties.hh.
|
inline |
Join properties objects.
| properties | properties |
Definition at line 662 of file JProperties.hh.
|
inline |
Read equation.
| equation | equation |
Definition at line 678 of file JProperties.hh.
|
inline |
Read from input string.
| buffer | input string |
Definition at line 739 of file JProperties.hh.
|
inline |
Read from input stream.
The input format is:
[<key><sub>]<key><sep><value><eol> [<key><sub>]<key><sep><value><eol>
In this, white spaces are ignored. The reading of key and value pairs is controlled by the JLANG::JEquationFacet class.
| in | input stream |
Definition at line 761 of file JProperties.hh.
|
inline |
Read from input stream according given format.
For each key in the format specification, a corresponding value will be read from the input stream.
| in | input stream |
| format | format |
Definition at line 783 of file JProperties.hh.
|
inline |
Read from input stream according given format.
For each key in the format specification, a corresponding value will be read from the input stream.
| in | input stream |
| __begin | begin of format |
| __end | end of format |
Definition at line 811 of file JProperties.hh.
|
inline |
Write the current parameter values.
The output format is
[<key><sub>]<key><sep><value><eol> [<key><sub>]<key><sep><value><eol>
in this, white spaces are omitted.
| out | output stream |
Definition at line 846 of file JProperties.hh.
|
inline |
Write to output stream according given format.
For each key in the format specification, a corresponding value will be written to the output stream.
| out | output stream |
| format | format |
Definition at line 879 of file JProperties.hh.
|
inline |
Write to output stream according given format.
For each key in the format specification, a corresponding value will be written to the output stream.
| out | output stream |
| __begin | begin of format |
| __end | end of format |
Definition at line 907 of file JProperties.hh.
|
inline |
Stream editing of input format.
For each key in the format specification, a corresponding value will be written to the output stream.
| format | format |
| prefix | prefix key word |
| postfix | postfix key word |
Definition at line 942 of file JProperties.hh.
|
inline |
Get value.
| key | key |
Definition at line 975 of file JProperties.hh.
|
inline |
Get value.
| key | key |
Definition at line 993 of file JProperties.hh.
|
inline |
Set value.
| key | key |
| value | value |
Definition at line 1011 of file JProperties.hh.
|
inline |
Get string value.
| key | key |
Definition at line 1028 of file JProperties.hh.
|
inline |
Print the current parameter values.
| out | output stream |
Definition at line 1045 of file JProperties.hh.
|
inlineinherited |
Get equation parameters.
Definition at line 74 of file JEquationParameters.hh.
|
inlineinherited |
Set equation parameters.
| buffer | equation parameters |
Definition at line 85 of file JEquationParameters.hh.
|
inlineinherited |
Get default separator character.
Definition at line 96 of file JEquationParameters.hh.
|
inlineinherited |
Get separator characters.
Definition at line 110 of file JEquationParameters.hh.
|
inlineinherited |
Get separator characters.
Definition at line 121 of file JEquationParameters.hh.
|
inlineinherited |
Set separator character(s).
| sep | separator between parameter and its value |
Definition at line 132 of file JEquationParameters.hh.
|
inlineinherited |
Get default end of line character.
Definition at line 143 of file JEquationParameters.hh.
|
inlineinherited |
Get preferred end of line character.
| index | index |
Definition at line 158 of file JEquationParameters.hh.
|
inlineinherited |
Get end of line characters.
Definition at line 174 of file JEquationParameters.hh.
|
inlineinherited |
Get end of line characters.
Definition at line 185 of file JEquationParameters.hh.
|
inlineinherited |
Set end of line characters.
| eol | end of line character |
Definition at line 196 of file JEquationParameters.hh.
|
inlineinherited |
Get default division character.
Definition at line 207 of file JEquationParameters.hh.
|
inlineinherited |
Get division characters.
Definition at line 221 of file JEquationParameters.hh.
|
inlineinherited |
Get division characters.
Definition at line 232 of file JEquationParameters.hh.
|
inlineinherited |
Set division characters.
| div | division characters |
Definition at line 243 of file JEquationParameters.hh.
|
inlineinherited |
Get default skip line character.
Definition at line 254 of file JEquationParameters.hh.
|
inlineinherited |
Get skip line characters.
Definition at line 268 of file JEquationParameters.hh.
|
inlineinherited |
Get skip line characters.
Definition at line 279 of file JEquationParameters.hh.
|
inlineinherited |
Set skip line characters.
| skip | skip line characters |
Definition at line 290 of file JEquationParameters.hh.
|
inlineinherited |
Set brackets.
| left | left bracket |
| right | right bracket |
Definition at line 302 of file JEquationParameters.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Get default white space character.
Definition at line 358 of file JEquationParameters.hh.
|
inlineinherited |
Get white space characters.
Definition at line 372 of file JEquationParameters.hh.
|
inlineinherited |
Get white space characters.
Definition at line 383 of file JEquationParameters.hh.
|
inlineinherited |
Set white space characters.
| ws | white space characters |
Definition at line 394 of file JEquationParameters.hh.
|
inlineinherited |
|
inlineinherited |
|
inlineinherited |
Set comment string.
| comment | comment string |
Definition at line 427 of file JEquationParameters.hh.
|
inlineinherited |
Join equation parameters.
| value | equation parameters |
Definition at line 438 of file JEquationParameters.hh.
|
inlineinherited |
Test for separator character.
| c | character |
Definition at line 482 of file JEquationParameters.hh.
|
inlineinherited |
Test for end of line character.
| c | character |
Definition at line 494 of file JEquationParameters.hh.
|
inlineinherited |
Test for division character.
| c | character |
Definition at line 503 of file JEquationParameters.hh.
|
inlineinherited |
Test for skip line character.
| c | character |
Definition at line 515 of file JEquationParameters.hh.
|
inlineinherited |
Test for left bracket character.
| c | character |
Definition at line 527 of file JEquationParameters.hh.
|
inlineinherited |
Test for right bracket character.
| c | character |
Definition at line 539 of file JEquationParameters.hh.
|
inlineinherited |
Test for white space character.
| c | character |
Definition at line 551 of file JEquationParameters.hh.
|
friend |
Stream input.
| in | input stream |
| properties | properties |
Definition at line 1060 of file JProperties.hh.
|
friend |
Stream output.
| out | output stream |
| properties | properties |
Definition at line 1073 of file JProperties.hh.
|
protectedinherited |
Definition at line 557 of file JEquationParameters.hh.
|
protectedinherited |
Definition at line 558 of file JEquationParameters.hh.
|
protectedinherited |
Definition at line 559 of file JEquationParameters.hh.
|
protectedinherited |
Definition at line 560 of file JEquationParameters.hh.
|
protectedinherited |
Definition at line 561 of file JEquationParameters.hh.
|
protectedinherited |
Definition at line 562 of file JEquationParameters.hh.
|
protectedinherited |
Definition at line 563 of file JEquationParameters.hh.
|
protectedinherited |
Definition at line 564 of file JEquationParameters.hh.
|
staticinherited |
debug level (default is off).
Definition at line 45 of file JMessage.hh.
1.8.5