Base class for function objects and boundary conditions using dynamic code. More...
Public Member Functions | |
TypeName ("codedBase") | |
Runtime type information. More... | |
codedBase () | |
Construct null. More... | |
codedBase (const word &name, const dictionary &dict) | |
Construct from name and dictionary. More... | |
codedBase (const dictionary &dict) | |
Construct from dictionary. More... | |
codedBase (const codedBase &cb) | |
Copy constructor. More... | |
virtual | ~codedBase () |
Destructor. More... | |
void | operator= (const codedBase &)=delete |
Disallow default bitwise assignment. More... | |
word | codeTemplateC (const word &baseTypeName) const |
word | codeTemplateH (const word &baseTypeName) const |
virtual void | writeCode (Ostream &os) const |
Protected Member Functions | |
void | updateLibrary () const |
Update library as required. More... | |
virtual const word & | codeName () const |
Name of the dynamically generated CodedType. More... | |
virtual string | description () const |
Return a description (type + name) for the output. More... | |
virtual const dictionary & | codeDict () const |
Get the dictionary to initialise the codeContext. More... | |
virtual wordList | codeKeys () const =0 |
Get the keywords associated with source code. More... | |
virtual void | prepare (dynamicCode &, const dynamicCodeContext &) const =0 |
Adapt the context for the current object. More... | |
virtual void | clearRedirect () const =0 |
Clear any redirected objects. More... | |
Base class for function objects and boundary conditions using dynamic code.
Definition at line 53 of file codedBase.H.
codedBase | ( | ) |
Construct null.
Definition at line 364 of file codedBase.C.
codedBase | ( | const word & | name, |
const dictionary & | dict | ||
) |
Construct from name and dictionary.
Definition at line 368 of file codedBase.C.
codedBase | ( | const dictionary & | dict | ) |
Construct from dictionary.
Definition at line 375 of file codedBase.C.
Copy constructor.
Definition at line 382 of file codedBase.C.
|
virtual |
Destructor.
Definition at line 391 of file codedBase.C.
|
protected |
Update library as required.
Definition at line 288 of file codedBase.C.
References dynamicCode::checkSecurity(), dynamicCode::codeName(), dict, dynamicCodeContext::dict(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, dlLibraryTable::findLibrary(), Foam::Info, dynamicCode::libPath(), dynamicCode::libraryBaseName(), Foam::libs, dictionaryName::name(), Foam::name(), dynamicCodeContext::sha1(), dictionary::startLineNumber(), and SHA1Digest::str().
Referenced by compileTemplate::compileTemplate().
|
protectedvirtual |
Name of the dynamically generated CodedType.
Definition at line 350 of file codedBase.C.
Referenced by codedBase::writeCode().
|
protectedvirtual |
Return a description (type + name) for the output.
Definition at line 170 of file codedBase.C.
References dynamicCode::copyOrCreateFiles(), dynamicCodeContext::dict(), Foam::endl(), Foam::exit(), Foam::FatalIOError, FatalIOErrorInFunction, regIOobject::fileModificationSkew, Foam::fileSize(), dynamicCode::libPath(), dynamicCode::libRelPath(), UPstream::master(), UPstream::myProcNo(), Foam::nl, Foam::Pout, dynamicCode::reset(), Pstream::scatter(), Foam::sleep(), Foam::type(), dynamicCode::upToDate(), and dynamicCode::wmakeLibso().
|
protectedvirtual |
Get the dictionary to initialise the codeContext.
Definition at line 356 of file codedBase.C.
Referenced by codedBase::writeCode().
|
protectedpure virtual |
Get the keywords associated with source code.
Referenced by codedBase::writeCode().
|
protectedpure virtual |
Adapt the context for the current object.
|
protectedpure virtual |
Clear any redirected objects.
TypeName | ( | "codedBase" | ) |
Runtime type information.
|
delete |
Disallow default bitwise assignment.
Foam::word codeTemplateC | ( | const word & | baseTypeName | ) | const |
Definition at line 397 of file codedBase.C.
Foam::word codeTemplateH | ( | const word & | baseTypeName | ) | const |
Definition at line 403 of file codedBase.C.
|
virtual |
Definition at line 409 of file codedBase.C.
References List< T >::append(), codedBase::codeDict(), codedBase::codeKeys(), codedBase::codeName(), token::END_STATEMENT, forAll, found, Foam::nl, Ostream::write(), Foam::writeEntry(), and Foam::writeKeyword().
Referenced by Coded< Type >::write().