QWT API (English) 7.3.0
Qt Widget Library for Technical Applications - English API Documentation
Loading...
Searching...
No Matches
Classes | Public Types | Static Public Member Functions | List of all members
Qwt3D::IO Class Reference

Generic interface for standard and user written I/O handlers. More...

#include <qwt3d_io.h>

Classes

class  Functor
 Functor class for more flexible IO handler implementation. More...
 

Public Types

using Function = bool(*)(Plot3D *, QString const &fname)
 

Static Public Member Functions

static bool defineInputHandler (QString const &format, Function func)
 Registers a new IO::Function for data input.
 
static bool defineOutputHandler (QString const &format, Function func)
 Registers a new IO::Function for data output.
 
static bool defineInputHandler (QString const &format, Functor const &func)
 Registers a new Functor for data input.
 
static bool defineOutputHandler (QString const &format, Functor const &func)
 Registers a new Functor for data output.
 
static bool save (Plot3D *, QString const &fname, QString const &format)
 Applies a writing IO::Function or IO::Functor.
 
static bool load (Plot3D *, QString const &fname, QString const &format)
 Applies a reading IO::Function or IO::Functor.
 
static QStringList inputFormatList ()
 Returns a list of currently registered input formats.
 
static QStringList outputFormatList ()
 Returns a list of currently registered output formats.
 
static FunctoroutputHandler (QString const &format)
 Returns the output functor in charge for format.
 
static FunctorinputHandler (QString const &format)
 Returns the input functor in charge for format.
 

Detailed Description

Generic interface for standard and user written I/O handlers.

IO provides a generic interface for standard and user written I/O handlers. It also provides functionality for the registering of such handlers in the framework. The interface mimics roughly Qt's QImageIO functions for defining image input/output functions.

Member Function Documentation

◆ defineInputHandler() [1/2]

bool IO::defineInputHandler ( QString const &  format,
IO::Function  func 
)
static

Registers a new IO::Function for data input.

Parameters
formatFormat string identifier
funcInput handler function
Returns
True on successful registration

Every call overwrites a formerly registered handler for the same format string (case sensitive).

◆ defineInputHandler() [2/2]

bool IO::defineInputHandler ( QString const &  format,
IO::Functor const &  func 
)
static

Registers a new Functor for data input.

Parameters
formatFormat string identifier
funcInput handler functor
Returns
True on successful registration

Every call overwrites a formerly registered handler for the same format string (case sensitive).

◆ defineOutputHandler() [1/2]

bool IO::defineOutputHandler ( QString const &  format,
IO::Function  func 
)
static

Registers a new IO::Function for data output.

Parameters
formatFormat string identifier
funcOutput handler function
Returns
True on successful registration

Every call overwrites a formerly registered handler for the same format string (case sensitive).

◆ defineOutputHandler() [2/2]

bool IO::defineOutputHandler ( QString const &  format,
IO::Functor const &  func 
)
static

Registers a new Functor for data output.

Parameters
formatFormat string identifier
funcOutput handler functor
Returns
True on successful registration

Every call overwrites a formerly registered handler for the same format string (case sensitive).

◆ inputFormatList()

QStringList IO::inputFormatList ( )
static

Returns a list of currently registered input formats.

Returns
List of input format strings

◆ inputHandler()

IO::Functor * IO::inputHandler ( QString const &  format)
static

Returns the input functor in charge for format.

Parameters
formatFormat string identifier
Returns
Pointer to the input functor, or 0 if non-existent

◆ load()

bool IO::load ( Plot3D plot,
QString const &  fname,
QString const &  format 
)
static

Applies a reading IO::Function or IO::Functor.

Parameters
plotPlot with the content that should be loaded
fnameFile name
formatInput format
Returns
The return value from the called Function/Functor. Returns false if no registered handler could be found.

◆ outputFormatList()

QStringList IO::outputFormatList ( )
static

Returns a list of currently registered output formats.

Returns
List of output format strings

◆ outputHandler()

IO::Functor * IO::outputHandler ( QString const &  format)
static

Returns the output functor in charge for format.

Parameters
formatFormat string identifier
Returns
Pointer to the output functor, or 0 if non-existent

◆ save()

bool IO::save ( Plot3D plot,
QString const &  fname,
QString const &  format 
)
static

Applies a writing IO::Function or IO::Functor.

Parameters
plotPlot with the content that should be saved
fnameFile name
formatOutput format
Returns
The return value from the called Function/Functor. Returns false if no registered handler could be found.

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