Pointwise Plugin SDK
|
The abstract PwpFileWriter class. More...
#include <PwpFileWriter.h>
Public Member Functions | |
virtual FormatType | getFmtType () const |
default implementation. More... | |
PwpFileWriter (PwpFile &file) | |
PwpFile constructor. More... | |
virtual void | setFmtType (FormatType type) |
default implementation. More... | |
virtual | ~PwpFileWriter () |
Destructor. More... | |
virtual void | setFmtFieldSingle (const int width, const int prec) |
default implementation. More... | |
virtual void | getFmtFieldSingle (int &width, int &prec) const |
default implementation. More... | |
virtual void | setFmtFieldDouble (const int width, const int prec) |
default implementation. More... | |
virtual void | getFmtFieldDouble (int &width, int &prec) const |
default implementation. More... | |
virtual bool | beginRecord () |
NOP default implementation. More... | |
virtual bool | beginRecord (PWP_UINT32, PWP_UINT32=1) |
NOP default implementation. More... | |
virtual bool | endRecord () |
NOP default implementation. More... | |
![]() | |
virtual bool | write (const char *val, PWP_INT size=-1, char pad=0)=0 |
Writes a string value. More... | |
virtual bool | write (PWP_FLOAT val, const char *suffix=0, const char *prefix=0)=0 |
Writes a floating point value with proper precision, encoding and byte order. More... | |
virtual bool | write (PWP_INT16 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
virtual bool | write (PWP_INT32 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
virtual bool | write (PWP_INT64 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
virtual bool | write (PWP_INT8 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
virtual bool | write (PWP_REAL val, const char *suffix=0, const char *prefix=0)=0 |
Writes a floating point value with proper precision, encoding and byte order. More... | |
virtual bool | write (PWP_UINT16 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
virtual bool | write (PWP_UINT32 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
virtual bool | write (PWP_UINT64 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
virtual bool | write (PWP_UINT8 val, const char *suffix=0, const char *prefix=0)=0 |
Writes a integer value with proper encoding and byte order. More... | |
bool | writef (const char *fmt,...) |
Writes a formatted string value. More... | |
bool | writef (PWP_INT size, char pad, const char *fmt,...) |
Writes a formatted string value. More... | |
virtual | ~PwpWriterInterface () |
Destructor. More... | |
Protected Attributes | |
PwpFile & | file_ |
The file being written. More... | |
int | fmtFieldWdDouble_ |
Double precision format field width. More... | |
int | fmtFieldWdSingle_ |
Single precision format field width. More... | |
int | fmtPrecDouble_ |
Double precision format decimals. More... | |
int | fmtPrecSingle_ |
Single precision format decimals. More... | |
FormatType | fmtType_ |
Formatting flags. More... | |
Private Member Functions | |
PwpFileWriter & | operator= (const PwpFileWriter &)=delete |
Additional Inherited Members | |
![]() | |
enum | FormatType { FormatG = G_, FormatWdPrecG = G_ | Wd_ | Prec_, FormatWdG = G_ | Wd_, FormatPrecG = G_ | Prec_, FormatF = F_, FormatWdPrecF = F_ | Wd_ | Prec_, FormatWdF = F_ | Wd_, FormatPrecF = F_ | Prec_, FormatE = E_, FormatWdPrecE = E_ | Wd_ | Prec_, FormatWdE = E_ | Wd_, FormatPrecE = E_ | Prec_ } |
Formatted output types for floating point values. More... | |
![]() | |
enum | { G_ = 0x00, F_ = 0x01, E_ = 0x02, GFEMask_ = 0x0F, Wd_ = 0x10, Prec_ = 0x20, WdPrec_ = Wd_ | Prec_, WPMask_ = 0xF0 } |
Bit flags use to build public FormatX enums. More... | |
The abstract PwpFileWriter class.
Inherited by subclasses that implement the PwpWriterInterface for writing to PwpFile objects.
Definition at line 377 of file PwpFileWriter.h.
|
inline |
PwpFile constructor.
Constructs a file writer object bound to the specified file.
file | The PwpFile object. |
Definition at line 384 of file PwpFileWriter.h.
|
inlinevirtual |
Destructor.
Definition at line 395 of file PwpFileWriter.h.
|
inlinevirtual |
NOP default implementation.
Only FORTRAN unformatted files use records. The PwpUnformattedWriter subclass will reimplement this method as needed.
Implements PwpWriterInterface.
Reimplemented in PwpUnformattedWriter.
Definition at line 448 of file PwpFileWriter.h.
Referenced by PwpFile::beginRecord().
|
inlinevirtual |
NOP default implementation.
Only FORTRAN unformatted files use records. The PwpUnformattedWriter subclass will reimplement this method as needed.
Implements PwpWriterInterface.
Reimplemented in PwpUnformattedWriter.
Definition at line 452 of file PwpFileWriter.h.
|
inlinevirtual |
NOP default implementation.
Only FORTRAN unformatted files use records. The PwpUnformattedWriter subclass will reimplement this method as needed.
Implements PwpWriterInterface.
Reimplemented in PwpUnformattedWriter.
Definition at line 456 of file PwpFileWriter.h.
Referenced by PwpFile::endRecord().
|
inlinevirtual |
default implementation.
Sets and gets the field width, and decimal precision.
width | The format field width. |
prec | The format field decimal places. |
Implements PwpWriterInterface.
Definition at line 420 of file PwpFileWriter.h.
References fmtFieldWdDouble_, and fmtPrecDouble_.
Referenced by PwpFile::getFmtFieldDouble().
|
inlinevirtual |
default implementation.
Sets and gets the field width, and decimal precision.
width | The format field width. |
prec | The format field decimal places. |
Implements PwpWriterInterface.
Definition at line 412 of file PwpFileWriter.h.
References fmtFieldWdSingle_, and fmtPrecSingle_.
Referenced by PwpFile::getFmtFieldSingle().
|
inlinevirtual |
default implementation.
Gets the format type.
Implements PwpWriterInterface.
Definition at line 438 of file PwpFileWriter.h.
References fmtType_.
Referenced by PwpFile::getFmtType().
|
privatedelete |
|
inlinevirtual |
default implementation.
Sets and gets the field width, and decimal precision.
width | The format field width. |
prec | The format field decimal places. |
Implements PwpWriterInterface.
Definition at line 416 of file PwpFileWriter.h.
References fmtFieldWdDouble_, and fmtPrecDouble_.
Referenced by PwpFile::setFmtFieldDouble().
|
inlinevirtual |
default implementation.
Sets and gets the field width, and decimal precision.
width | The format field width. |
prec | The format field decimal places. |
Implements PwpWriterInterface.
Definition at line 408 of file PwpFileWriter.h.
Referenced by PwpFile::setFmtFieldSingle().
|
inlinevirtual |
default implementation.
Sets the format type.
type | The format type. |
Implements PwpWriterInterface.
Definition at line 431 of file PwpFileWriter.h.
References fmtType_.
Referenced by PwpFile::setFmtType().
|
protected |
The file being written.
Definition at line 474 of file PwpFileWriter.h.
Referenced by PwpUnformattedWriter::beginRecord(), PwpUnformattedWriter::endRecord(), PwpUnformattedWriter::PwpUnformattedWriter(), PwpBinaryWriter::write(), PwpAsciiWriter::write(), PwpUnformattedWriter::write(), PwpBinaryWriter::writeOrdered(), PwpAsciiWriter::writeWdPrec(), and PwpUnformattedWriter::~PwpUnformattedWriter().
|
protected |
Double precision format field width.
Definition at line 472 of file PwpFileWriter.h.
Referenced by getFmtFieldDouble(), setFmtFieldDouble(), and PwpAsciiWriter::write().
|
protected |
Single precision format field width.
Definition at line 470 of file PwpFileWriter.h.
Referenced by getFmtFieldSingle(), and PwpAsciiWriter::write().
|
protected |
Double precision format decimals.
Definition at line 473 of file PwpFileWriter.h.
Referenced by getFmtFieldDouble(), setFmtFieldDouble(), and PwpAsciiWriter::write().
|
protected |
Single precision format decimals.
Definition at line 471 of file PwpFileWriter.h.
Referenced by getFmtFieldSingle(), and PwpAsciiWriter::write().
|
protected |
Formatting flags.
Definition at line 469 of file PwpFileWriter.h.
Referenced by getFmtType(), setFmtType(), and PwpAsciiWriter::writeWdPrec().