Pointwise Plugin SDK
Public Member Functions | List of all members
PwpUnformattedWriter Class Reference
+ Inheritance diagram for PwpUnformattedWriter:
+ Collaboration diagram for PwpUnformattedWriter:

Public Member Functions

virtual bool beginRecord ()
 NOP default implementation. More...
 
virtual bool beginRecord (PWP_UINT32 bytes, PWP_UINT32 count=1)
 NOP default implementation. More...
 
virtual bool endRecord ()
 NOP default implementation. More...
 
 PwpUnformattedWriter (PwpFile &file)
 
virtual bool write (const char *val, PWP_INT size=-1, char pad=0)
 Writes a string value. More...
 
virtual bool write (PWP_FLOAT val, const char *suffix=0, const char *prefix=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)
 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)
 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)
 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)
 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)
 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)
 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)
 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)
 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)
 Writes a integer value with proper encoding and byte order. More...
 
virtual ~PwpUnformattedWriter ()
 
- Public Member Functions inherited from PwpFileWriter
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...
 
- Public Member Functions inherited from PwpWriterInterface
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...
 

Additional Inherited Members

- Public Types inherited from PwpWriterInterface
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...
 
- Protected Types inherited from PwpWriterInterface
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...
 
- Protected Attributes inherited from PwpFileWriter
PwpFilefile_
 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...
 

Detailed Description

Definition at line 354 of file PwpFile.cxx.

Constructor & Destructor Documentation

◆ PwpUnformattedWriter()

PwpUnformattedWriter::PwpUnformattedWriter ( PwpFile file)
inline

◆ ~PwpUnformattedWriter()

virtual PwpUnformattedWriter::~PwpUnformattedWriter ( )
inlinevirtual

Definition at line 364 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfFileEnd(), and PwpFile::unfData().

Member Function Documentation

◆ beginRecord() [1/2]

virtual bool PwpUnformattedWriter::beginRecord ( )
inlinevirtual

NOP default implementation.

Only FORTRAN unformatted files use records. The PwpUnformattedWriter subclass will reimplement this method as needed.

Reimplemented from PwpFileWriter.

Definition at line 370 of file PwpFile.cxx.

References endRecord(), PwpFileWriter::file_, PwpFile::getByteOrder(), PwuUnfFileSetEndianness(), PwuUnfRecBegin(), and PwpFile::unfData().

◆ beginRecord() [2/2]

virtual bool PwpUnformattedWriter::beginRecord ( PWP_UINT32  ,
PWP_UINT32  = 1 
)
inlinevirtual

NOP default implementation.

Only FORTRAN unformatted files use records. The PwpUnformattedWriter subclass will reimplement this method as needed.

Reimplemented from PwpFileWriter.

Definition at line 377 of file PwpFile.cxx.

References endRecord(), PwpFileWriter::file_, PwpFile::getByteOrder(), PwuUnfFileSetEndianness(), PwuUnfRecBeginFixed(), and PwpFile::unfData().

◆ endRecord()

virtual bool PwpUnformattedWriter::endRecord ( )
inlinevirtual

NOP default implementation.

Only FORTRAN unformatted files use records. The PwpUnformattedWriter subclass will reimplement this method as needed.

Reimplemented from PwpFileWriter.

Definition at line 384 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecEnd(), and PwpFile::unfData().

Referenced by beginRecord().

◆ write() [1/11]

virtual bool PwpUnformattedWriter::write ( const char *  val,
PWP_INT  size = -1,
char  pad = 0 
)
inlinevirtual

Writes a string value.

Parameters
valThe string to write.
sizeThe number of string characters to write. If -1, strlen(val) is used.
padIf size > strlen(val), the pad value will be used to fill the remaining characters.
Returns
true on success.
Note
For pwpUnformatted mode, the record byte count is incremented by size or strlen(val) if size is -1.

Implements PwpWriterInterface.

Definition at line 475 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteBuf(), and PwpFile::unfData().

◆ write() [2/11]

virtual bool PwpUnformattedWriter::write ( PWP_FLOAT  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a floating point value with proper precision, encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, precision and byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof((precision)val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 453 of file PwpFile.cxx.

References PwpFileWriter::file_, PwpFile::isDouble(), PwuUnfRecWriteFLOAT(), PwuUnfRecWriteREAL(), and PwpFile::unfData().

◆ write() [3/11]

virtual bool PwpUnformattedWriter::write ( PWP_INT16  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 405 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteINT16(), and PwpFile::unfData().

◆ write() [4/11]

virtual bool PwpUnformattedWriter::write ( PWP_INT32  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 397 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteINT32(), and PwpFile::unfData().

◆ write() [5/11]

virtual bool PwpUnformattedWriter::write ( PWP_INT64  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 389 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteINT64(), and PwpFile::unfData().

◆ write() [6/11]

virtual bool PwpUnformattedWriter::write ( PWP_INT8  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 413 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteINT8(), and PwpFile::unfData().

◆ write() [7/11]

virtual bool PwpUnformattedWriter::write ( PWP_REAL  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a floating point value with proper precision, encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, precision and byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof((precision)val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 464 of file PwpFile.cxx.

References PwpFileWriter::file_, PwpFile::isSingle(), PwuUnfRecWriteFLOAT(), PwuUnfRecWriteREAL(), and PwpFile::unfData().

◆ write() [8/11]

virtual bool PwpUnformattedWriter::write ( PWP_UINT16  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 437 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteUINT16(), and PwpFile::unfData().

◆ write() [9/11]

virtual bool PwpUnformattedWriter::write ( PWP_UINT32  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 429 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteUINT32(), and PwpFile::unfData().

◆ write() [10/11]

virtual bool PwpUnformattedWriter::write ( PWP_UINT64  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 421 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteUINT64(), and PwpFile::unfData().

◆ write() [11/11]

virtual bool PwpUnformattedWriter::write ( PWP_UINT8  val,
const char *  suffix = 0,
const char *  prefix = 0 
)
inlinevirtual

Writes a integer value with proper encoding and byte order.

Parameters
valThe value to write.
suffixString written after val (pwpAscii mode only).
prefixString written before val (pwpAscii mode only).
Returns
true on success.
Note
For pwpBinary and pwpUnformatted modes, byte ordering is enforced.
For pwpUnformatted mode, the record byte count is incremented by sizeof(val).
suffix and prefix are ignored by all modes except pwpAscii.

Implements PwpWriterInterface.

Definition at line 445 of file PwpFile.cxx.

References PwpFileWriter::file_, PwuUnfRecWriteUINT8(), and PwpFile::unfData().


The documentation for this class was generated from the following file: