Workspace 6.21.5
|
Base class from which all mesh model writers must inherit. More...
#include <Mesh/FileIO/Writers/meshwriter.h>
Public Member Functions | |
MeshWriter (const std::string &fName) | |
MeshWriter (std::ostream &os) | |
virtual bool | Write (MeshModel &model)=0 |
Public Member Functions inherited from BaseWriter | |
BaseWriter (const std::string &fName) | |
BaseWriter (std::ostream &os) | |
~BaseWriter () override=default | |
void | Close () |
void | Flush () |
Flush the file's contents. Not usually called directly by the user. | |
std::string | GetBaseName () const |
std::string | GetBaseNameSuffix () const |
std::string | GetFileName () const |
virtual std::string | GetFormatExtension () const =0 |
virtual std::string | GetFormatName () const =0 |
double | GetScaleFactor () const |
bool | IsReady () const |
std::string | Open () |
void | SetBaseName (const std::string &base) |
void | SetBaseNameSuffix (const std::string &suffix) |
void | SetBaseNameSuffix (double caseNum, const std::string &caseLabel="_") |
void | SetBaseNameSuffix (int caseNum, const std::string &caseLabel="_") |
template<typename T > | |
void | SetBaseNameSuffix (T caseNum, const std::string &caseLabel="_") |
void | SetFileName (const std::string &fileName) |
virtual void | SetProgress (int progress) |
void | SetScaleFactor (double scale) |
void | SetUseCompressionOff () |
Do not use on-the-fly compression when writing to file. | |
void | SetUseCompressionOn () |
Use on-the-fly compression when writing to file. | |
bool | UsingCompression () const |
Public Member Functions inherited from Logger | |
Logger () | |
The default constructor logs to standard output with a plain text log mode. | |
Logger (const Logger &logger) | |
virtual | ~Logger () |
We own the log mode, so delete it. | |
std::string | ErrorOff () const |
std::string | ErrorOn () const |
std::ostream & | GetLog () const |
const LogMode & | GetLogMode () const |
void | SetLog (std::ostream &log) |
void | SetLogMode (const LogMode &logMode) |
void | SetLogModeHTML () |
void | SetLogModePlainText () |
Set log mode to plain text output. | |
template<Styles s> | |
void | StyleOff () const |
template<Styles s> | |
void | StyleOn () const |
std::string | WarningOff () const |
std::string | WarningOn () const |
Public Member Functions inherited from Observable | |
virtual | ~Observable () |
void | attachObserver (Observer &observer) |
void | destroy () |
void | detachObserver (Observer &observer) |
void | notifyEvent (const ObservableEvent &event) |
Static Protected Member Functions | |
static std::string | FieldDouble (double val) |
static std::string | FieldInt (long val) |
static std::string | FieldString (const std::string &val) |
Additional Inherited Members | |
Public Types inherited from Logger | |
enum | Styles { Warning , Error , Preformat } |
Protected Member Functions inherited from Logger | |
virtual void | LogChanged () |
virtual void | LogModeChanged () |
Protected Member Functions inherited from Observable | |
Observable () | |
Observable (const Observable &) | |
Protected Attributes inherited from BaseWriter | |
std::string | baseName_ |
std::string | baseNameSuffix_ |
oautogzstream | outFile_ |
int | progress_ {} |
double | scaleFactor_ |
bool | useCompression_ |
Writers must write a node before any element that references it. This often (but not always) means that all nodes will be written out first, then all the elements.
MeshWriter | ( | const std::string & | fName | ) |
fName | Defines the base file name for the writer. The file name extension can be omitted if it matches the return value of GetFormatExtension(). |
The constructor initially sets the baseNameSuffix data member to an empty string. This suffix is easily changed through a call to SetBaseNameSuffix(). The final file name is constructed as the base file name (fName), followed by the base filename suffix (set with SetBaseNameSuffix()) and then the filename extension if necessary.
MeshWriter | ( | std::ostream & | os | ) |
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
pure virtual |
model | The model to write to file. |
Derived classes must override this method to implement the actual writing of the data. It is also responsible for opening and closing the file being written to.
Implemented in NastranWriter.