51class dynamicCodeContext;
95 std::string makeOptions_;
219 return codeRoot_/codeDirName_;
240 return codeRoot_/codeDirName_/
"Make/SHA1Digest";
295 val[0] = toupper(val[0]);
A 1D vector of objects of type <T> that resizes itself as necessary to accept the new objects.
A HashTable similar to std::unordered_map.
Generic input stream using a standard (STL) stream.
Generic output stream using a standard (STL) stream.
An Ostream is an abstract base class for all output systems (streams, files, token lists,...
A 2-tuple for storing two objects of dissimilar types. The container is similar in purpose to std::pa...
A 1D vector of objects of type <T>, where the size of the vector is known and can be used for subscri...
A list of keyword definitions, which are a keyword followed by a number of values (eg,...
Encapsulation of dynamic code dictionaries.
Tools for handling dynamic code compilation.
static int allowSystemOperations
Flag if system operations are allowed.
static void copyAndFilter(ISstream &, OSstream &, const HashTable< string > &mapping)
Copy lines while expanding variables.
fileName codePath() const
Path for specified code name.
bool copyOrCreateFiles(const bool verbose=false) const
Copy/create files prior to compilation.
void addCopyFile(const fileName &name)
Add a file template name, which will be found and filtered.
fileName libSubDir() const
Subdirectory name for loading libraries.
void reset(const dynamicCodeContext &)
Clear files and reset variables to specified context.
static const char *const targetLibDir
Directory for library targets for Make/files.
fileName libRelPath() const
Library path for specified code name relative to <case>
void addCreateFile(const fileName &name, const string &contents)
Add a file to create with its contents. Will not be filtered.
static bool resolveTemplates(const UList< fileName > &templateNames, DynamicList< fileName > &resolvedFiles, DynamicList< fileName > &badFiles)
Resolve code-templates via the codeTemplateEnvName.
void setFieldTemplates()
Define a filter variables TemplateType and FieldType.
static const word codeTemplateEnvName
Name of the code template environment variable.
static const char *const topDirName
Top-level directory name for copy/compiling.
void setFilterVariable(const word &key, const std::string &value)
Define a filter variable.
const fileName & codeRoot() const
Root for dynamic code compilation.
const word & codeDirName() const
Return the code-dirname.
void setFilterContext(const dynamicCodeContext &)
Define filter variables for code, codeInclude, SHA1sum.
static void checkSecurity(const char *title, const dictionary &)
Check security for creating dynamic code.
bool createMakeFiles() const
Copy/create Make/files prior to compilation.
fileName digestFile() const
Path for SHA1Digest.
bool writeDigest(const SHA1Digest &) const
Write digest to Make/SHA1Digest.
fileName codeRelPath() const
Path for specified code name relative to <case>
void addCompileFile(const fileName &name)
Add a file template name, which will be found and filtered.
Tuple2< fileName, string > fileAndContent
void clear()
Clear files and variables.
bool upToDate(const dynamicCodeContext &context) const
Verify if the copied code is up-to-date, based on Make/SHA1Digest.
fileName libPath() const
Library path for specified code name.
const word & codeName() const
Return the code-name.
static const fileName codeTemplateDirName
Name of the code template sub-directory.
bool createMakeOptions() const
Copy/create Make/options prior to compilation.
bool wmakeLibso() const
Compile a libso.
bool writeCommentSHA1(Ostream &) const
Write SHA1 value as C-comment.
void setMakeOptions(const std::string &content)
Define contents for Make/options.
A class for handling file names.
A traits class, which is primarily used for primitives.
A class for handling words, derived from Foam::string.
word name(const expressions::valueTypeCode typeCode)
A word representation of a valueTypeCode. Empty for INVALID.