Encapsulation of dynamic code dictionaries. More...
Public Member Functions | |
dynamicCodeContext (const dictionary &) | |
Construct from a dictionary. More... | |
const dictionary & | dict () const |
Return the parent dictionary context. More... | |
const string & | include () const |
Return the code-includes. More... | |
const string & | options () const |
Return the code-options. More... | |
const string & | libs () const |
Return the code-libs. More... | |
const string & | code () const |
Return the code. More... | |
const string & | localCode () const |
Return the local (file-scope) code. More... | |
const SHA1Digest & | sha1 () const |
Return SHA1 digest calculated from include, options, code. More... | |
Static Public Member Functions | |
static void | addLineDirective (string &, const label lineNum, const fileName &name) |
Helper: add #line directive. More... | |
Private Attributes | |
const dictionary & | dict_ |
The parent dictionary context. More... | |
string | code_ |
Mandatory "code" entry. More... | |
string | localCode_ |
Optional "localCode" entry. More... | |
string | include_ |
Optional "codeInclude" entry. More... | |
string | options_ |
Optional "codeOptions" entry. More... | |
string | libs_ |
Optional "codeLib" entry. More... | |
SHA1Digest | sha1_ |
Calculated SHA1Digest. More... | |
Encapsulation of dynamic code dictionaries.
Definition at line 49 of file dynamicCodeContext.H.
dynamicCodeContext | ( | const dictionary & | dict | ) |
Construct from a dictionary.
Definition at line 33 of file dynamicCodeContext.C.
References dynamicCodeContext::addLineDirective(), dynamicCodeContext::code_, dynamicCodeContext::dict(), OSHA1stream::digest(), dynamicCodeContext::include_, Foam::stringOps::inplaceExpand(), dynamicCodeContext::libs_, dynamicCodeContext::localCode_, dictionary::lookupEntry(), dictionary::lookupEntryPtr(), dictionaryName::name(), dynamicCodeContext::options_, dynamicCodeContext::sha1_, entry::startLineNumber(), entry::stream(), and Foam::stringOps::trim().
|
inline |
Return the parent dictionary context.
Definition at line 84 of file dynamicCodeContext.H.
References dynamicCodeContext::dict_.
Referenced by codedBase::createLibrary(), dynamicCodeContext::dynamicCodeContext(), and codedBase::updateLibrary().
|
inline |
Return the code-includes.
Definition at line 90 of file dynamicCodeContext.H.
References dynamicCodeContext::include_.
Referenced by dynamicCode::setFilterContext().
|
inline |
Return the code-options.
Definition at line 96 of file dynamicCodeContext.H.
References dynamicCodeContext::options_.
Referenced by codeStream::getFunction(), codedFunctionObject::prepare(), codedFixedValuePointPatchField< Type >::prepare(), codedFixedValueFvPatchField< Type >::prepare(), codedMixedFvPatchField< Type >::prepare(), and CodedSource< Type >::prepare().
|
inline |
Return the code-libs.
Definition at line 102 of file dynamicCodeContext.H.
References dynamicCodeContext::libs_.
Referenced by codeStream::getFunction(), codedFunctionObject::prepare(), codedFixedValuePointPatchField< Type >::prepare(), codedFixedValueFvPatchField< Type >::prepare(), codedMixedFvPatchField< Type >::prepare(), and CodedSource< Type >::prepare().
|
inline |
Return the code.
Definition at line 108 of file dynamicCodeContext.H.
References dynamicCodeContext::code_.
Referenced by dynamicCode::setFilterContext().
|
inline |
Return the local (file-scope) code.
Definition at line 114 of file dynamicCodeContext.H.
References dynamicCodeContext::localCode_.
Referenced by dynamicCode::setFilterContext().
|
inline |
Return SHA1 digest calculated from include, options, code.
Definition at line 120 of file dynamicCodeContext.H.
References dynamicCodeContext::sha1_.
Referenced by codeStream::getFunction(), dynamicCode::setFilterContext(), codedBase::updateLibrary(), and dynamicCode::upToDate().
Helper: add #line directive.
Definition at line 128 of file dynamicCodeContext.C.
References Foam::name().
Referenced by dynamicCodeContext::dynamicCodeContext(), and codedFunctionObject::read().
|
private |
The parent dictionary context.
Definition at line 54 of file dynamicCodeContext.H.
Referenced by dynamicCodeContext::dict().
|
private |
Mandatory "code" entry.
Definition at line 57 of file dynamicCodeContext.H.
Referenced by dynamicCodeContext::code(), and dynamicCodeContext::dynamicCodeContext().
|
private |
Optional "localCode" entry.
Definition at line 60 of file dynamicCodeContext.H.
Referenced by dynamicCodeContext::dynamicCodeContext(), and dynamicCodeContext::localCode().
|
private |
Optional "codeInclude" entry.
Definition at line 63 of file dynamicCodeContext.H.
Referenced by dynamicCodeContext::dynamicCodeContext(), and dynamicCodeContext::include().
|
private |
Optional "codeOptions" entry.
Definition at line 66 of file dynamicCodeContext.H.
Referenced by dynamicCodeContext::dynamicCodeContext(), and dynamicCodeContext::options().
|
private |
Optional "codeLib" entry.
Definition at line 69 of file dynamicCodeContext.H.
Referenced by dynamicCodeContext::dynamicCodeContext(), and dynamicCodeContext::libs().
|
private |
Calculated SHA1Digest.
Definition at line 72 of file dynamicCodeContext.H.
Referenced by dynamicCodeContext::dynamicCodeContext(), and dynamicCodeContext::sha1().
Copyright © 2011-2018 OpenFOAM | OPENFOAM® is a registered trademark of OpenCFD Ltd.