Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

GraphBasicsExport Class Reference

base class for exporting the GraphBasics format. More...

#include <GraphBasicsExport.h>

Inheritance diagram for GraphBasicsExport::

GraphBasics2mtv GraphBasics2vtk List of all members.

Public Methods

 GraphBasicsExport ()
virtual ~GraphBasicsExport ()
virtual void usage ()
virtual void processFormatSpecificOptions (VecSimple(String) &arguments, GBPlotSpecifications &plotspec)=0
virtual bool conversionSupported (GBPlotSpecifications &plotspec)=0
virtual void gbHeader (GBPlotSpecifications &plotspec)=0
virtual void gbFooter (GBPlotSpecifications &plotspec)=0
virtual void gbLine (GBPlotSpecifications &plotspec, VecSimple(Ptv(real)) &points)=0
virtual void gbPoint (GBPlotSpecifications &plotspec, VecSimple(Ptv(real)) &points)=0
virtual void gbPolygon (GBPlotSpecifications &plotspec, VecSimple(Ptv(real)) &points)=0
virtual void gbArrow (GBPlotSpecifications &plotspec, VecSimple(Ptv(real)) &points)=0
virtual void gbText (GBPlotSpecifications &plotspec, String &text, VecSimple(Ptv(real)) &points)=0
int driver (int argc, const char *argv[])

Protected Methods

FieldPlotCmd read_nextcommand (Is &is)
void readPlotspec (Is &is, GBPlotSpecifications &plotspec)
void readColors (Is &is, GBPlotSpecifications &plotspec)
void readScale (Is &is, GBPlotSpecifications &plotspec)
void readValue (Is &is, GBPlotSpecifications &plotspec)
void readgbArrowlen (Is &is, GBPlotSpecifications &plotspec)
void readCoordbuffer (Is &is, const GBPlotSpecifications &plotspec, VecSimple(Ptv(real)) &pointbuffer, const int number_of_points=-1)
void readgbLine (Is &is, GBPlotSpecifications &plotspec)
void readgbPoint (Is &is, GBPlotSpecifications &plotspec)
void readgbPolygon (Is &is, GBPlotSpecifications &plotspec)
void readgbArrow (Is &is, GBPlotSpecifications &plotspec)
void readgbText (Is &is, GBPlotSpecifications &plotspec)

Detailed Description

base class for exporting the GraphBasics format.

NAME: GraphBasicsExport - base class for exporting the GraphBasics format

DESCRIPTION:

This class servers as the base for all export filters transforming "GraphBasics" data to third-party visualization formats. The class offers the generic part of the needed functionality, as well as a definition of the common interface in terms of pure virtual functions.

The functionality in this class and its derivatives makes use of the utility struct "GBPlotSpecifications" which is a simple collection of relevant data items. See also the documentation of class "GraphBasics" to better understand the input data format.


Constructor & Destructor Documentation

GraphBasicsExport::GraphBasicsExport ( ) [inline]
 

There is only one, default constructor in this base class. Initialization takes place in the derived classes that actually implement specific data converters.

GraphBasicsExport::~GraphBasicsExport ( ) [inline, virtual]
 


Member Function Documentation

bool GraphBasicsExport::conversionSupported ( GBPlotSpecifications & plotspec ) [pure virtual]
 

checks the "GBPlotSpecifications" object to ensure that the chosen visualization format covers the type of data that we are dealing with. If it is accepted the function returns true, otherwise false. This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

int GraphBasicsExport::driver ( int argc,
const char * argv[] )
 

this is the entry point to any "GraphBasicsExport"-based class. It accepts input in the traditional "main"-style fashion as an array of option strings ("argv") and the number of such arguments ("argc"). This function extracts the relevant options and instrument the data converter accordingly, possibly calling "processFormatSpecificOptions" tailored for each format. This function is shared between all derived classes.

Supported options are -h (help), -a (ASCII output), -b (binary output), as well as format-specific options that are passed on to the "processFormatSpecificOptions" tailored for the chosen export format. The last argument passed in the "argv" array is the name of the "GraphBasics" data file that should be converted.

void GraphBasicsExport::gbArrow ( GBPlotSpecifications & plotspec,
VecSimple(Ptv(real)) & points ) [pure virtual]
 

writes commands to standard output for drawing an arrow using the points in the array "points", which is a collection of "Ptv(real)" objects. This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::gbFooter ( GBPlotSpecifications & plotspec ) [pure virtual]
 

writes the file header for the chosen export format to standard output. This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::gbHeader ( GBPlotSpecifications & plotspec ) [pure virtual]
 

writes the file header for the chosen export format to standard output. This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::gbLine ( GBPlotSpecifications & plotspec,
VecSimple(Ptv(real)) & points ) [pure virtual]
 

writes commands to standard output for drawing lines between the points in the array "points". This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::gbPoint ( GBPlotSpecifications & plotspec,
VecSimple(Ptv(real)) & points ) [pure virtual]
 

writes commands to standard output for marking the points in the array "points". This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::gbPolygon ( GBPlotSpecifications & plotspec,
VecSimple(Ptv(real)) & points ) [pure virtual]
 

writes commands to standard output for drawing a polygon between the points in the array "points", which is a collection of "Ptv(real)" objects. This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::gbText ( GBPlotSpecifications & plotspec,
String & text,
VecSimple(Ptv(real)) & points ) [pure virtual]
 

writes the specified text at the position given by "points". This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::processFormatSpecificOptions ( VecSimple(String) & arguments,
GBPlotSpecifications & plotspec ) [pure virtual]
 

processes options delivered in the input array "arguments" (in command line fashion) that are specific to a particular visualization format. This is a pure virtual function that needs to be tailored for each format in question.

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.

void GraphBasicsExport::readColors ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads the low and high color values from the input data stream, to be used as basis for color interpolations. Result stored in the "GBPlotSpecifications" object. (For internal use only).

void GraphBasicsExport::readCoordbuffer ( Is & is,
const GBPlotSpecifications & plotspec,
VecSimple(Ptv(real)) & pointbuffer,
const int number_of_points = -1 ) [protected]
 

reads a list of coordinates from the input data stream and returns them in "pointbuffer". (For internal use only).

void GraphBasicsExport::readPlotspec ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

sets default plot specifications and impose any changes imposed by data read from the input stream. Result stored in the "GBPlotSpecifications" object. (For internal use only).

void GraphBasicsExport::readScale ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads minimum and maximum scalar values from the input data stream, to be used as basis for interpolation. Result stored in the "GBPlotSpecifications" object. (For internal use only).

void GraphBasicsExport::readValue ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads a scalar value from the input data stream. This value can be used for color interpolation, be written directly to file, or just be ignored. Result stored in the "GBPlotSpecifications" object. (For internal use only).

FieldPlotCmd GraphBasicsExport::read_nextcommand ( Is & is ) [protected]
 

reads next "GraphBasics" command from the input data stream and returns is as a "FieldPlotCmd" type.. (For internal use only).

void GraphBasicsExport::readgbArrow ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads a point and a vector from the input stream and translates these data to the export format, using "readCoordbuffer" and "gbLine". (For internal use only).

void GraphBasicsExport::readgbArrowlen ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads maximum length for arrows from the input data stream. Result stored in the "GBPlotSpecifications" object. (For internal use only).

void GraphBasicsExport::readgbLine ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads line data from the input stream and translates it to the export format, using "readCoordbuffer" and "gbLine". (For internal use only).

void GraphBasicsExport::readgbPoint ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads point data from the input stream and translates it to the export format, using "readCoordbuffer" and "gbPoint". (For internal use only).

void GraphBasicsExport::readgbPolygon ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads polygon data from the input stream and translates it to the export format, using "readCoordbuffer" and "gbPolygon". (For internal use only).

void GraphBasicsExport::readgbText ( Is & is,
GBPlotSpecifications & plotspec ) [protected]
 

reads text data from the input stream and translates it to the export format, using "readCoordbuffer" and "gbText". (For internal use only).

void GraphBasicsExport::usage ( ) [inline, virtual]
 

prints the usage message telling the user how the filter should be used (when run in command-line mode).

Reimplemented in GraphBasics2mtv, and GraphBasics2vtk.


The documentation for this class was generated from the following file:
Copyright © 2003 inuTech GmbH. All rights reserved.