Pointwise Plugin SDK
|
The abstract PwpWriterInterface class. More...
#include <PwpFileWriter.h>
Public Types | |
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... | |
Public Member Functions | |
virtual bool | beginRecord ()=0 |
Starts an unformatted record. More... | |
virtual bool | beginRecord (PWP_UINT32 bytes, PWP_UINT32 count=1)=0 |
Starts a fixed size unformatted record. More... | |
virtual bool | endRecord ()=0 |
Ends an unformatted record. More... | |
virtual void | getFmtFieldDouble (int &width, int &prec) const =0 |
virtual void | getFmtFieldSingle (int &width, int &prec) const =0 |
virtual FormatType | getFmtType () const =0 |
virtual void | setFmtFieldDouble (const int width, const int prec)=0 |
virtual void | setFmtFieldSingle (const int width, const int prec)=0 |
virtual void | setFmtType (FormatType type)=0 |
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 Types | |
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... | |
Private Member Functions | |
bool | writefImpl (PWP_INT size, char pad, const char *fmt, va_list &args) |
Implementation to write a formatted string value. More... | |
The abstract PwpWriterInterface class.
Inherited by subclasses that implement the PwpWriterInterface.
Definition at line 265 of file PwpFileWriter.h.
|
protected |
Bit flags use to build public FormatX enums.
Enumerator | |
---|---|
G_ | |
F_ | |
E_ | |
GFEMask_ | |
Wd_ | |
Prec_ | |
WdPrec_ | |
WPMask_ |
Definition at line 269 of file PwpFileWriter.h.
Formatted output types for floating point values.
Definition at line 286 of file PwpFileWriter.h.
|
inlinevirtual |
Destructor.
Definition at line 307 of file PwpFileWriter.h.
|
pure virtual |
Starts an unformatted record.
Starts an unformatted record. If a record is already active, it will be closed.
Implemented in PwpFileWriter, PwpFileRecord, PwpFile, and PwpUnformattedWriter.
|
pure virtual |
Starts a fixed size unformatted record.
Starts a fixed size unformatted record. If a record is already active, it will be closed.
Fixed size record I/O is significantly faster than variable sized records. Fixed size records should be used, if possible, when there are large numbers (> ~1e6) of records written to an export file.
The call to endRecord() will fail if the number of bytes written to the record is not equal to (bytes * count).
Implemented in PwpFileWriter, PwpFileRecord, PwpFile, and PwpUnformattedWriter.
|
pure virtual |
Ends an unformatted record.
Ends an active record for files opened with pwpUnformatted mode.
Implemented in PwpFileWriter, PwpFileRecord, PwpFile, and PwpUnformattedWriter.
|
pure virtual |
Implemented in PwpFileWriter, PwpFileRecord, and PwpFile.
|
pure virtual |
Implemented in PwpFileWriter, PwpFileRecord, and PwpFile.
|
pure virtual |
Implemented in PwpFileWriter, PwpFileRecord, and PwpFile.
|
pure virtual |
Implemented in PwpFileWriter, PwpFileRecord, and PwpFile.
|
pure virtual |
Implemented in PwpFileWriter, PwpFileRecord, and PwpFile.
|
pure virtual |
Implemented in PwpFileWriter, PwpFileRecord, and PwpFile.
|
pure virtual |
Writes a string value.
val | The string to write. |
size | The number of string characters to write. If -1, strlen(val) is used. |
pad | If size > strlen(val), the pad value will be used to fill the remaining characters. |
Implemented in PwpAsciiWriter, PwpFileRecord, PwpFile, PwpUnformattedWriter, and PwpBinaryWriter.
|
pure virtual |
Writes a floating point value with proper precision, encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
Referenced by PwpFile::write(), and writefImpl().
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a floating point value with proper precision, encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
pure virtual |
Writes a integer value with proper encoding and byte order.
val | The value to write. |
suffix | String written after val (pwpAscii mode only). |
prefix | String written before val (pwpAscii mode only). |
Implemented in PwpFileRecord, PwpFile, PwpUnformattedWriter, PwpBinaryWriter, and PwpAsciiWriter.
|
inline |
Writes a formatted string value.
Definition at line 347 of file PwpFileWriter.h.
References writefImpl().
|
inline |
Writes a formatted string value.
Definition at line 327 of file PwpFileWriter.h.
References writefImpl().
|
inlineprivate |
Implementation to write a formatted string value.
Definition at line 361 of file PwpFileWriter.h.
References write().
Referenced by writef().