61 content_ = std::cref<std::string>(
s);
68 std::string::const_iterator
71 const std::string&
s = content_.get();
73 if (start_ >=
s.length())
78 return s.cbegin() + start_;
82 std::string::const_iterator
85 const std::string&
s = content_.get();
87 if (length_ == std::string::npos || start_ >=
s.length())
92 const size_t strEnd = start_ + length_;
94 if (strEnd >=
s.length())
99 return s.cbegin() + strEnd;
108 const auto endIter =
cend();
110 for (
auto iter =
cbegin(); iter != endIter; ++iter)
133 const std::string& msg
138 reportFatal(msg, position_);
150 os <<
nl << msg.c_str() <<
" in expression\n" 162 const std::string& msg,
174 os <<
nl << msg.c_str()
175 <<
" in expression at position:" << long(
pos) <<
nl 178 const auto begIter =
cbegin();
179 const auto endIter =
cend();
182 size_t newline0 = 0, newline1 = 0;
186 for (; iter != endIter; ++iter)
199 newline1 = (iter-begIter);
217 if (newline0 == newline1 || newline1 ==
pos)
222 size_t col =
std::min(newline0, newline1);
235 os <<
"^^^^ near here\n";
238 for (; iter != endIter; ++iter)
errorManipArg< error, int > exit(error &err, const int errNo=1)
size_t length_
Length of input (sub)string.
constexpr char nl
The newline '\n' character (0x0a)
size_t position_
The last known parser position.
std::reference_wrapper< const std::string > content_
Reference to the input string.
dimensionedScalar pos(const dimensionedScalar &ds)
constexpr auto cend(const C &c) -> decltype(c.end())
Return const_iterator to the end of the container c.
size_t start_
Start position within input string.
label min(const labelHashSet &set, label minValue=labelMax)
Find the min value in labelHashSet, optionally limited by second argument.
static const string null
An empty string.
An Ostream is an abstract base class for all output systems (streams, files, token lists...
const std::string & content() const
Get reference to the input buffer content.
OBJstream os(runTime.globalPath()/outputName)
constexpr auto cbegin(const C &c) -> decltype(c.begin())
Return const_iterator to the beginning of the container c.
genericRagelLemonDriver()
Construct null.
Ostream & printBuffer(Ostream &os) const
Output the input buffer string content.
void clear()
Reset references.
const dimensionedScalar c
Speed of light in a vacuum.
gmvFile<< "tracers "<< particles.size()<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().x()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().y()<< " ";}gmvFile<< nl;for(const passiveParticle &p :particles){ gmvFile<< p.position().z()<< " ";}gmvFile<< nl;forAll(lagrangianScalarNames, i){ word name=lagrangianScalarNames[i];IOField< scalar > s(IOobject(name, runTime.timeName(), cloud::prefix, mesh, IOobject::MUST_READ, IOobject::NO_WRITE))
std::string::const_iterator cend() const
Iterator to end of content (sub)string.
A class for handling character strings derived from std::string.
void reportFatal(const std::string &msg) const
Report FatalError.
std::string::const_iterator cbegin() const
Iterator to begin of content (sub)string.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...