const fileName & codeRoot() const
Root for dynamic code compilation.
bool createMakeFiles() const
Copy/create Make/files prior to compilation.
static const char *const topDirName
Top-level directory name for copy/compiling.
bool writeCommentSHA1(Ostream &) const
Write SHA1 value as C-comment.
A class for handling words, derived from string.
A class for handling file names.
fileName libPath() const
Library path for specified code name.
static void copyAndFilter(ISstream &, OSstream &, const HashTable< string > &mapping)
Copy lines while expanding variables.
bool copyOrCreateFiles(const bool verbose=false) const
Copy/create files prior to compilation.
Tools for handling dynamic code compilation.
bool wmakeLibso() const
Compile a libso.
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
Encapsulation of dynamic code dictionaries.
bool createMakeOptions() const
Copy/create Make/options prior to compilation.
bool writeDigest(const SHA1Digest &) const
Write digest to Make/SHA1Digest.
fileName codePath() const
Path for specified code name.
fileName libSubDir() const
Subdirectory name for loading libraries.
void setFilterContext(const dynamicCodeContext &)
Define filter variables for code, codeInclude, SHA1sum.
fileName digestFile() const
Path for SHA1Digest.
static bool resolveTemplates(const UList< fileName > &templateNames, DynamicList< fileName > &resolvedFiles, DynamicList< fileName > &badFiles)
Resolve code-templates via the codeTemplateEnvName.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
static int allowSystemOperations
Flag if system operations are allowed.
Tuple2< fileName, string > fileAndContent
static const word codeTemplateEnvName
Name of the code template environment variable.
dynamicCode(const dynamicCode &)
Disallow default bitwise copy construct.
const fileName libSubDir_
Subdirectory name for loading libraries.
DynamicList< fileName > compileFiles_
Files to copy and filter.
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
const word & codeName() const
Return the code-name.
fileName codeRoot_
Root for dynamic code compilation.
const word & codeDirName() const
Return the code-dirname.
static void checkSecurity(const char *title, const dictionary &)
Check security for creating dynamic code.
fileName codeRelPath() const
Path for specified code name relative to $FOAM_CASE.
fileName libRelPath() const
Library path for specified code name relative to $FOAM_CASE.
HashTable< string > filterVars_
Variables to use during filtering.
DynamicList< fileAndContent > createFiles_
Direct contents for files.
A list of keyword definitions, which are a keyword followed by any number of values (e....
void operator=(const dynamicCode &)
Disallow default bitwise assignment.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
void reset(const dynamicCodeContext &)
Clear files and reset variables to specified context.
An STL-conforming hash table.
static word libraryBaseName(const fileName &libPath)
Return the library basename without leading 'lib' or trailing '.so'.
std::string makeOptions_
Contents for Make/options.
bool upToDate(const dynamicCodeContext &context) const
Verify if the copied code is up-to-date, based on Make/SHA1Digest.
void setMakeOptions(const std::string &content)
Define contents for Make/options.
DynamicList< fileName > copyFiles_
Files to copy and filter.
void clear()
Clear files and variables.
static const fileName codeTemplateDirName
Name of the code template sub-directory.
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
word codeName_
Name for code.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 2-tuple for storing two objects of different types.
word name(const complex &)
Return a string representation of a complex.
void addCreateFile(const fileName &name, const string &contents)
Add a file to create with its contents. Will not be filtered.
word codeDirName_
Name for code subdirectory.
static const char *const libTargetRoot
Root of the LIB target for Make/files.