52 writeObjectNames_.clear();
53 writeObjectNames_.append(names);
60 forAll(writeObjectNames_, i)
73 <<
"writeObjects: object " << writeObjectNames_[i]
74 <<
" not found in database. Available objects:" <<
endl;
75 writeObr_.printToc(
Info);
80 const word name(writeObjectNames_[i]);
89 <<
"writeObjects: object " <<
name
90 <<
" not found in database. Available objects:" <<
endl;
91 writeObr_.printToc(
Info);
105 if (log_)
Info <<
" writing object " << obj.
name() <<
endl;
135 return writeObjectNames_;
141 regExp_ =
dict.lookupOrDefault<
Switch>(
"regExp",
true);
145 dict.lookup(
"objects") >> writeObjectNames_;
150 writeObjectNames_.setSize(objectNames.
size());
153 writeObjectNames_[i] = objectNames[i];
167 if (!writeObr_.time().writeTime())
169 writeObr_.time().writeTimeDict();
174 writeObject(writeObr_.lookupObject<
regIOobject>(names[i]));
#define forAll(list, i)
Loop across all elements in list.
DynamicList< T, SizeInc, SizeMult, SizeDiv > & append(const T &)
Append an element at the end of the list.
const word & name() const
Return name.
void append(const T &)
Append an element at the end of the list.
void size(const label)
Override size to be inconsistent with allocated storage.
void clear()
Clear the list, i.e. set size to zero.
A simple wrapper around bool so that it can be read as a word: true/false, on/off,...
bool empty() const
Return true if the UList is empty (ie, size() is zero)
A list of keyword definitions, which are a keyword followed by any number of values (e....
Calculates the natural logarithm of the specified scalar field.
wordReList writeObjectNames_
Object names requested by the user to be written.
writeObjectsBase(const objectRegistry &obr, const Switch &logRef=logFalse)
Construct from objectRegistry and inheriting function object.
virtual void writeObject(const regIOobject &obj)
Write the requested registered IO object.
void resetWriteObjectNames(const wordReList &names)
Reset the list of object names to be written.
const wordReList & writeObjectNames() const
Return const access to the object names requested to be written.
void resetWriteObjectName(const wordRe &name)
Reset the list of object names to be written to a single regular.
virtual wordList objectNames()
Get the list of field names to be written.
static const Switch logFalse
False switch to which log_ defaults.
virtual ~writeObjectsBase()
Destructor.
virtual bool write()
Write function.
virtual bool read(const dictionary &)
Read the list of objects to be written.
Registry of regIOobjects.
regIOobject is an abstract class derived from IOobject to handle automatic object registration with t...
virtual bool write(const bool write=true) const
Write using setting from DB.
A wordRe is a word, but can also have a regular expression for matching words.
A class for handling words, derived from string.
Ostream & endl(Ostream &os)
Add newline and flush stream.
word name(const bool)
Return a word representation of a bool.