Default constructor, see class IOFormat for the meaning of the parameters */
| 43 | { |
| 44 | /** Default constructor, see class IOFormat for the meaning of the parameters */ |
| 45 | IOFormat(int _precision = StreamPrecision, int _flags = 0, |
| 46 | const std::string& _coeffSeparator = " ", |
| 47 | const std::string& _rowSeparator = "\n", const std::string& _rowPrefix = "", const std::string& _rowSuffix = "", |
| 48 | const std::string& _matPrefix = "", const std::string& _matSuffix = "", const char _fill = ' ', |
| 49 | const std::string& _batchPrefix = "[\n", const std::string& _batchSuffix="\n]", const std::string& _batchSeparator = "\n],[\n") |
| 50 | : matPrefix(_matPrefix), matSuffix(_matSuffix), rowPrefix(_rowPrefix), rowSuffix(_rowSuffix), rowSeparator(_rowSeparator), |
| 51 | rowSpacer(""), coeffSeparator(_coeffSeparator), fill(_fill), precision(_precision), flags(_flags), |
| 52 | batchPrefix(_batchPrefix), batchSuffix(_batchSuffix), batchSeparator(_batchSeparator) |
| 53 | { |
| 54 | // TODO check if rowPrefix, rowSuffix or rowSeparator contains a newline |
| 55 | // don't add rowSpacer if columns are not to be aligned |
| 56 | if ((flags & DontAlignCols)) |
| 57 | return; |
| 58 | int i = int(matSuffix.length()) - 1; |
| 59 | while (i >= 0 && matSuffix[i] != '\n') |
| 60 | { |
| 61 | rowSpacer += ' '; |
| 62 | i--; |
| 63 | } |
| 64 | } |
| 65 | std::string matPrefix, matSuffix; |
| 66 | std::string rowPrefix, rowSuffix, rowSeparator, rowSpacer; |
| 67 | std::string coeffSeparator; |
nothing calls this directly
no outgoing calls
no test coverage detected