38 componentColumns_(dict.
lookup(
"valueColumns")),
39 separator_(dict.lookupOrDefault<
string>(
"separator",
string(
","))[0])
43 FatalErrorIn(
"csvTableReader<Type>::csvTableReader(const dictionary&)")
44 << componentColumns_ <<
" does not have the expected length " 66 if (componentColumns_[0] >= splitted.
size())
70 "csvTableReader<scalar>::readValue(const List<string>&)" 71 ) <<
"No column " << componentColumns_[0] <<
" in " 85 for(
label i = 0;i < pTraits<Type>::nComponents; i++)
87 if (componentColumns_[i] >= splitted.
size())
91 "csvTableReader<Type>::readValue(const List<string>&)" 92 ) <<
"No column " << componentColumns_[i] <<
" in " 134 while (pos != std::string::npos)
136 std::size_t nPos = line.find(separator_, pos);
138 if (nPos == std::string::npos)
140 splitted.
append(line.substr(pos));
145 splitted.
append(line.substr(pos, nPos-pos));
150 if (splitted.
size() <= 1)
156 Type value = readValue(splitted);
191 os << componentColumns_;
Input from memory buffer stream.
A 2-tuple for storing two objects of different types.
virtual ~csvTableReader()
Destructor.
virtual void write(Ostream &os) const
Write additional information.
intWM_LABEL_SIZE_t label
A label is an int32_t or int64_t as specified by the pre-processor macro WM_LABEL_SIZE.
A class for handling character strings derived from std::string.
void size(const label)
Override size to be inconsistent with allocated storage.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
errorManipArg< error, int > exit(error &err, const int errNo=1)
Database for solution data, solver performance and other reduced data.
A list of keyword definitions, which are a keyword followed by any number of values (e...
label readLabel(Istream &is)
Ostream & endl(Ostream &os)
Add newline and flush stream.
stressControl lookup("compactNormalStress") >> compactNormalStress
bool readScalar(const char *buf, doubleScalar &s)
Read whole of buf as a scalar. Return true if succesful.
bool good() const
Return true if next operation might succeed.
streamFormat format() const
Return current stream format.
Reads an interpolation table from a file - CSV-format.
Base class to read table data for the interpolationTable.
csvTableReader(const dictionary &dict)
Construct from dictionary.
ISstream & getLine(string &)
Raw, low-level getline into a string function.
Ostream & writeKeyword(const keyType &)
Write the keyword followed by an appropriate indentation.
#define FatalErrorIn(functionName)
Report an error message using Foam::FatalError.
Traits class for primitives.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects...
A class for handling file names.
virtual void write(Ostream &os) const
Write the remaining parameters.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
dimensionedScalar pos(const dimensionedScalar &ds)
#define notImplemented(functionName)
Issue a FatalErrorIn for a function not currently implemented.
void transfer(dictionary &)
Transfer the contents of the argument and annul the argument.