55 return (ofile_ && scene_);
90 ofile_.reset(
new OFstream(jsonFile));
99 scene_->write(*ofile_);
101 ofile_.reset(
nullptr);
102 scene_.reset(
nullptr);
Functions used by OpenFOAM that are specific to POSIX compliant operating systems and need to be repl...
Output to file stream, using an OSstream.
A class for handling file names.
fileName lessExt() const
Return file name without extension (part before last .)
word ext() const
Return file name extension (part after last .)
static std::string path(const std::string &str)
Return directory path name (part before last /)
sceneWriter()=default
Default construct.
void close()
Write scene and close file.
void open(const fileName &outputFile)
Flush, output and open a new file for output.
const fileName & path() const
The json file name. Empty with !valid()
bool valid() const noexcept
True if output file and scene exist.
~sceneWriter()
Destructor - calls close()
const scene & getScene() const
Const access to the scene. Error if valid() is not true!
Main class to assemble glTF components into a scene.
bool mkDir(const fileName &pathName, mode_t mode=0777)
Make a directory and return an error if it could not be created.
bool isDir(const fileName &name, const bool followLink=true)
Does the name exist as a DIRECTORY in the file system?
static constexpr char open