Go to the documentation of this file.
32 return std::end(*
this);
37 "out of range access to list element. \n";
41 auto iter = listType::begin();
42 std::advance(iter, i);
57 return std::end(*
this);
62 "out of range access to list element. \n";
66 auto iter = listType::cbegin();
67 std::advance(iter, i);
78 return std::count( listType::begin(), listType::end(), elm);
84 return listType::size();
112 return std::find(this->begin(),this->end(), val);
121 return std::find(this->begin(),this->end(), val);
127 auto pos =
find(val);
128 if( pos == this->end() )
return -1;
129 return static_cast<int32> (std::distance(this->begin(), pos));
138 if(
find(val) == this->end())
return false;
166 size_t stride = getListStride(len);
172 for(
auto elm = listType::begin(); elm!=listType::end(); )
176 for(
size_t j=0; j<stride && elm!=listType::end(); j++)
181 if( elm!=listType::end() )
203 token firstToken(is);
210 <<
"expected token "<< token::BEGIN_LIST
211 <<
" but found "<< firstToken ;
223 && lastToken == token::END_LIST
234 listType::push_back(val);
246 <<
" but found "<< firstToken ;
268 if( !lst.readList(is) )
auto count(const Vector< T, Allocator > &vec, const T &val)
#define fatalExit
Fatal exit.
Token class based on OpenFOAM stream, with some modifications/simplifications to be tailored to our n...
void set(size_t i, const T &val)
int64 find(Vector< T, Allocator > &vec, const T &val)
bool isPunctuation() const
Token is PUNCTUATION.
bool search(const T &val) const
typename listType::const_iterator const_iterator
const_iterator find(const T &val) const
int32 countElement(const T &elm) const
virtual bool check(const char *operation) const
Check IOstream status for given operation.
int32 findi(const T &val) const
Interface class for any input stream
#define fatalErrorInFunction
Report a fatal error and function name and exit the application.
void putBack(const token &tok)
Put back token Only a single put back is permitted.
INLINE_FUNCTION iIstream & operator>>(iIstream &str, AB3History &ab3)
bool fatalCheck(const char *operation) const
Check IOstream status for given operation.
typename listType::iterator iterator
INLINE_FUNCTION iOstream & operator<<(iOstream &str, const AB3History &ab3)
virtual const word & name() const
Return the name of the stream.
bool writeList(iOstream &os) const
bool readList(iIstream &is)
auto pos(size_t i, bool noError=false)
#define ioErrorInFile(fileName, lineNumber)
Report an error in file operation with supplied fileName and lineNumber.
int32 lineNumber() const
Const access to the current stream line number.
Interface class for any output stream.