37 const word& entryName,
39 const dictionary&
dict,
40 const word& redirectType,
41 const objectRegistry* obrPtr,
45 word modelType(redirectType);
47 const dictionary* coeffs = (eptr ? eptr->dictPtr() :
nullptr);
54 <<
"For " << entryName <<
" with dictionary entries: " 65 ? IOobjectOption::MUST_READ : IOobjectOption::READ_IF_PRESENT
78 <<
"For " << entryName <<
" with primitive entry" <<
nl;
80 ITstream& is = eptr->stream();
82 if (is.peek().isWord())
84 modelType = is.peek().wordToken();
90 const Type constValue = pTraits<Type>(is);
92 return autoPtr<Function1<Type>>
94 new Function1Types::Constant<Type>
107 if (modelType.empty())
114 <<
"Missing or invalid Function1 entry: " 132 coeffs = &
dict.optionalSubDict(kw +
"Coeffs", keyType::LITERAL);
136 auto* ctorPtr = dictionaryConstructorTable(modelType);
141 <<
"Unknown Function1 type " 142 << modelType <<
" for " << entryName
143 <<
"\n\nValid Function1 types :\n" 144 << dictionaryConstructorTablePtr_->sortedToc() <<
nl 148 return ctorPtr(entryName, *coeffs, obrPtr);
156 const word& entryName,
158 const word& redirectType,
166 dict.findEntry(entryName, keyType::LITERAL),
179 const word& entryName,
180 std::initializer_list<std::pair<const char*,int>> compat,
182 const word& redirectType,
190 dict.findCompat(entryName, compat, keyType::LITERAL),
203 const word& entryName,
217 const word& entryName,
219 const word& redirectType,
232 const word& entryName,
248 const word& entryName,
263 fref.
cref(cache.get(entryName));
272 const entry* eptr =
dict.findEntry(entryName, matchOpt);
277 const auto& kw = eptr->keyword();
280 fref.
cref(cache.get(kw));
301 fref.
cref(fauto.get());
302 cache.set(kw, fauto);
307 if (mandatory && !fref)
310 <<
"No match for " << entryName <<
nl Top level data entry class for use in dictionaries. Provides a mechanism to specify a variable as a c...
errorManipArg< error, int > exit(error &err, const int errNo=1)
A list of keyword definitions, which are a keyword followed by a number of values (eg...
static autoPtr< Function1< Type > > NewCompat(const word &entryName, std::initializer_list< std::pair< const char *, int >> compat, const dictionary &dict, const word &redirectType=word::null, const objectRegistry *obrPtr=nullptr, const bool mandatory=true)
Compatibility selector, with fallback redirection.
constexpr char nl
The newline '\n' character (0x0a)
tmp< DimensionedField< TypeR, GeoMesh > > New(const tmp< DimensionedField< TypeR, GeoMesh >> &tf1, const word &name, const dimensionSet &dimensions, const bool initCopy=false)
Global function forwards to reuseTmpDimensionedField::New.
A HashTable of pointers to objects of type <T>, with deallocation management of the pointers...
const T & cref() const
Return const reference to the object or to the contents of a (non-null) managed pointer.
A class for managing references or pointers (no reference counting)
A class for handling words, derived from Foam::string.
#define DebugInFunction
Report an information message using Foam::Info.
static autoPtr< Function1< Type > > NewIfPresent(const word &entryName, const dictionary &dict, const word &redirectType, const objectRegistry *obrPtr=nullptr)
An optional selector, with fallback redirection.
#define FatalIOErrorInFunction(ios)
Report an error message using Foam::FatalIOError.
option
Enumeration for the data type and search/match modes (bitmask)
Pointer management similar to std::unique_ptr, with some additional methods and type checking...
Registry of regIOobjects.
FlatOutput::OutputAdaptor< Container, Delimiters > flatOutput(const Container &obj, Delimiters delim)
Global flatOutput() function with specified output delimiters.
IOerror FatalIOError
Error stream (stdout output on all processes), with additional 'FOAM FATAL IO ERROR' header text and ...