Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

qgar::AbstractGraphicsFile Class Reference
[Files]

#include <qgarlib/AbstractGraphicsFile.H>

Inheritance diagram for qgar::AbstractGraphicsFile:

qgar::AbstractFile qgar::DxfFile qgar::TgifFile List of all members.

Detailed Description

Basic function to read/write graphical and geometrical primitives in graphics files like Tgif files, DXF files, etc.

Pure virtual functions are:

Warning:
Author:
Gerald Masini
Date:
June, 27 2003 16:21
Since:
Qgar 2.1

Definition at line 110 of file AbstractGraphicsFile.H.

Public Member Functions

Constructors
 AbstractGraphicsFile (const char *aFileName)
 Initialize with given name.
Destructor
virtual ~AbstractGraphicsFile ()
 Virtual destructor.
Points
virtual void write (const GenPoint< int > &aPt, int aThickness=3, QGEcolor aColor=QGE_COLOR_DEFAULT)=0
 Record a point with coordinates of type int.
virtual void write (const GenPoint< float > &aPt, int aThickness=3, QGEcolor aColor=QGE_COLOR_DEFAULT)=0
 Record a point with coordinates of type float.
virtual void write (const GenPoint< double > &aPt, int aThickness=3, QGEcolor aColor=QGE_COLOR_DEFAULT)=0
 Record a point with coordinates of type double.
virtual void write (AbstractGenPointChain< int > &aChain, int aThickness=3, QGEcolor aColor=QGE_COLOR_DEFAULT)=0
 Record a chain of points with coordinates of type int.
virtual void write (AbstractGenPointChain< float > &aChain, int aThickness=3, QGEcolor aColor=QGE_COLOR_DEFAULT)=0
 Record a chain of points with coordinates of type float.
virtual void write (AbstractGenPointChain< double > &aChain, int aThickness=3, QGEcolor aColor=QGE_COLOR_DEFAULT)=0
 Record a chain of points with coordinates of type double.
Segments
virtual void write (const GenSegment< int > &aSeg, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical segment with coordinates of type int.
virtual void write (const GenSegment< float > &aSeg, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical segment with coordinates of type float.
virtual void write (const GenSegment< double > &aSeg, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical segment with coordinates of type double.
void write (const GenQgarSegment< int > &aQSeg, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar segment with coordinates of type int.
void write (const GenQgarSegment< float > &aQSeg, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar segment with coordinates of type float.
void write (const GenQgarSegment< double > &aQSeg, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar segment with coordinates of type double.
Circles and arcs of circle
virtual void write (const GenPoint< int > &aCentre, double aRadius, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a circle with coordinates of type int.
virtual void write (const GenPoint< float > &aCentre, double aRadius, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a circle with coordinates of type float.
virtual void write (const GenPoint< double > &aCentre, double aRadius, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a circle with coordinates of type double.
virtual void write (const GenArc< int > &anArc, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical arc with coordinates of type int.
virtual void write (const GenArc< float > &anArc, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical arc with coordinates of type float.
virtual void write (const GenArc< double > &anArc, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical arc with coordinates of type double.
void write (const GenQgarArc< int > &aQArc, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar arc with coordinates of type int.
void write (const GenQgarArc< float > &aQArc, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar arc with coordinates of type float.
void write (const GenQgarArc< double > &aQArc, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar arc with coordinates of type double.
Polylines
virtual void write (const GenPolyline< int > &aPoly, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical polyline with coordinates of type int.
virtual void write (const GenPolyline< float > &aPoly, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical polyline with coordinates of type float.
virtual void write (const GenPolyline< double > &aPoly, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a geometrical polyline with coordinates of type double.
void write (const GenQgarPolyline< int > &aQPoly, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar polyline with coordinates of type int.
void write (const GenQgarPolyline< float > &aQPoly, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar polyline with coordinates of type float.
void write (const GenQgarPolyline< double > &aQPoly, int aThickness=-1, QGEcolor aColor=QGE_COLOR_NONE, QGEoutline anOutline=QGE_OUTLINE_NONE)
 Record a Qgar polyline with coordinates of type double.
Bounding Boxes
virtual void write (const BoundingBox &aBox, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a bounding box.
Components
virtual void write (const ConnectedComponents::node_type *const aPNode, int aThickness=1, QGEcolor aColor=QGE_COLOR_DEFAULT, QGEoutline anOutline=QGE_OUTLINE_DEFAULT)=0
 Record a (connected) component.
Access to file characteristics
std::fstream & fileStream ()
 Get file stream.
const char *const fileName () const
 Get file name.
QGEfileStatus fileStatus () const
 Get current file status.
Opening
virtual void openRONLY () throw (QgarErrorIO)
 Open in read-only mode.
virtual void openWONLY () throw (QgarErrorIO)
 Open in write-only mode.
virtual void openAPPEND () throw (QgarErrorIO)
 Open in append mode.
virtual void openRW () throw (QgarErrorIO)
 Open in read-write mode.
virtual void openRA () throw (QgarErrorIO)
 Open in read-append mode.
Closing
virtual void close ()
 Close the file.
Checking status
virtual void isOpenR () throw (QgarErrorUser)
 Abort if the file is not open in a mode allowing reading.
virtual void isOpenW () throw (QgarErrorUser)
 Abort if the file is not open in a mode allowing writing.
virtual void isOpenA () throw (QgarErrorUser)
 Abort if the file is not open in a mode allowing appending.
virtual void isOpenRW () throw (QgarErrorUser)
 Abort if the file is not open in read-write mode.
virtual void isOpenRA () throw (QgarErrorUser)
 Abort if the file is not open in readi-append mode.

Protected Member Functions

Headers & footers
virtual void readHeader ()=0
 Read header of the file (pure virtual function).
virtual void writeHeader ()=0
 Write header of the file (pure virtual function).
virtual void writeFooter ()=0
 Write footer of the file (pure virtual function).

Protected Attributes

Representation of a file
char * _fileName
 File name.
QGEfileStatus _fileStatus
 File status.
std::fstream _fileStream
 Associated file stream.


Constructor & Destructor Documentation

qgar::AbstractGraphicsFile::AbstractGraphicsFile const char *  aFileName  ) 
 

Initialize with given name.

Warning:
A file must be opened to be used.

Definition at line 59 of file AbstractGraphicsFile.C.

qgar::AbstractGraphicsFile::~AbstractGraphicsFile  )  [virtual]
 

Virtual destructor.

Definition at line 73 of file AbstractGraphicsFile.C.


Member Function Documentation

void qgar::AbstractFile::close  )  [virtual, inherited]
 

Close the file.

No effect is the file is already closed.

Warning:
If the file is currently open in write-only or read-write modes, a footer is written into the file using function qgar::AbstractFile::writeFooter.

Definition at line 251 of file AbstractFile.C.

References qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::QGE_FILE_STATUS_CLOSED, qgar::QGE_FILE_STATUS_READ_WRITE, qgar::QGE_FILE_STATUS_WRITE_ONLY, and qgar::AbstractFile::writeFooter().

Referenced by qgar::GenImage< T, CheckPolicy >::GenImage(), qgar::MapleFile::MapleFile(), qgar::AbstractFile::openAPPEND(), qgar::AbstractFile::openRA(), qgar::AbstractFile::openRONLY(), qgar::AbstractFile::openRW(), qgar::AbstractFile::openWONLY(), and qgar::GenImage< T, CheckPolicy >::save().

const char *const qgar::AbstractFile::fileName  )  const [inline, inherited]
 

Get file name.

Definition at line 395 of file AbstractFile.H.

References qgar::AbstractFile::_fileName.

QGEfileStatus qgar::AbstractFile::fileStatus  )  const [inline, inherited]
 

Get current file status.

Definition at line 404 of file AbstractFile.H.

References qgar::AbstractFile::_fileStatus.

std::fstream & qgar::AbstractFile::fileStream  )  [inline, inherited]
 

Get file stream.

When saving the stream, usual I/O operations apply to the associated file, depending on the opening mode.

Definition at line 386 of file AbstractFile.H.

References qgar::AbstractFile::_fileStream.

void qgar::AbstractFile::isOpenA  )  throw (QgarErrorUser) [virtual, inherited]
 

Abort if the file is not open in a mode allowing appending.

Exceptions:
qgar::QgarErrorUser (file not open in append mode)

Definition at line 310 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::QGE_FILE_STATUS_APPEND, and qgar::QGE_FILE_STATUS_READ_APPEND.

void qgar::AbstractFile::isOpenR  )  throw (QgarErrorUser) [virtual, inherited]
 

Abort if the file is not open in a mode allowing reading.

Exceptions:
qgar::QgarErrorUser (file not open in read mode)

Definition at line 273 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::QGE_FILE_STATUS_APPEND, and qgar::QGE_FILE_STATUS_WRITE_ONLY.

Referenced by qgar::PgmFile::readRow(), and qgar::PbmFile::readRow().

void qgar::AbstractFile::isOpenRA  )  throw (QgarErrorUser) [virtual, inherited]
 

Abort if the file is not open in readi-append mode.

Exceptions:
qgar::QgarErrorUser (file not open in read/append mode)

Definition at line 347 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, and qgar::QGE_FILE_STATUS_READ_APPEND.

void qgar::AbstractFile::isOpenRW  )  throw (QgarErrorUser) [virtual, inherited]
 

Abort if the file is not open in read-write mode.

Exceptions:
qgar::QgarErrorUser (file not open in read/write mode)

Definition at line 329 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, and qgar::QGE_FILE_STATUS_READ_WRITE.

void qgar::AbstractFile::isOpenW  )  throw (QgarErrorUser) [virtual, inherited]
 

Abort if the file is not open in a mode allowing writing.

Exceptions:
qgar::QgarErrorUser (file not open in write mode)

Definition at line 292 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, and qgar::QGE_FILE_STATUS_READ_ONLY.

Referenced by qgar::TgifFile::write(), qgar::DxfFile::write(), qgar::PgmFile::writeRow(), and qgar::PbmFile::writeRow().

void qgar::AbstractFile::openAPPEND  )  throw (QgarErrorIO) [virtual, inherited]
 

Open in append mode.

The eventual content of the file is preserved and the file pointer is set to the end of the file.

Warning:
The file header is read using function qgar::AbstractFile::readHeader.
Exceptions:
qgar::QgarErrorIO (file cannot be opened)

Definition at line 166 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_APPEND, and qgar::AbstractFile::readHeader().

void qgar::AbstractFile::openRA  )  throw (QgarErrorIO) [virtual, inherited]
 

Open in read-append mode.

The file pointer is set to the end of the file.

Warning:
The file header is read using function qgar::AbstractFile::readHeader.
Exceptions:
qgar::QgarErrorIO (file cannot be opened)

Definition at line 223 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_READ_APPEND, and qgar::AbstractFile::readHeader().

void qgar::AbstractFile::openRONLY  )  throw (QgarErrorIO) [virtual, inherited]
 

Open in read-only mode.

The file pointer is set to the first character after the header.

Warning:
The file header is read using function qgar::AbstractFile::readHeader.
Exceptions:
qgar::QgarErrorIO (file cannot be opened)

Definition at line 107 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_READ_ONLY, and qgar::AbstractFile::readHeader().

Referenced by qgar::GenImage< T, CheckPolicy >::GenImage().

void qgar::AbstractFile::openRW  )  throw (QgarErrorIO) [virtual, inherited]
 

Open in read-write mode.

Warning:
The file is new and a header is written into the file using function qgar::AbstractFile::writeHeader. If a file with given name already exists, its content is lost.
Exceptions:
qgar::QgarErrorIO (file cannot be opened)

Definition at line 197 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_READ_WRITE, and qgar::AbstractFile::writeHeader().

void qgar::AbstractFile::openWONLY  )  throw (QgarErrorIO) [virtual, inherited]
 

Open in write-only mode.

Warning:
The file is new and a header is written into the file using function qgar::AbstractFile::writeHeader. If a file with given name already exists, its content is lost.
Exceptions:
qgar::QgarErrorIO (file cannot be opened)

Definition at line 136 of file AbstractFile.C.

References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, qgar::AbstractFile::_fileStream, qgar::AbstractFile::close(), qgar::QGE_FILE_STATUS_WRITE_ONLY, and qgar::AbstractFile::writeHeader().

Referenced by qgar::MapleFile::MapleFile(), and qgar::GenImage< T, CheckPolicy >::save().

virtual void qgar::AbstractFile::readHeader  )  [protected, pure virtual, inherited]
 

Read header of the file (pure virtual function).

Automatically performed when the file is opened for reading, appending or reading/appending.

Implemented in qgar::DxfFile, qgar::File, qgar::MapleFile, qgar::PbmFile, qgar::PgmFile, and qgar::TgifFile.

Referenced by qgar::AbstractFile::openAPPEND(), qgar::AbstractFile::openRA(), and qgar::AbstractFile::openRONLY().

virtual void qgar::AbstractGraphicsFile::write const ConnectedComponents::node_type *const   aPNode,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a (connected) component.

A component is represented by its contour and the contours of included components.

Parameters:
aPNode pointer to the node of the component tree including the component
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const BoundingBox aBox,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a bounding box.

Parameters:
aBox a bounding box with coordinates of type int.
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, and qgar::TgifFile.

void qgar::AbstractGraphicsFile::write const GenQgarPolyline< double > &  aQPoly,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar polyline with coordinates of type double.

Parameters:
aQPoly a Qgar polyline
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

void qgar::AbstractGraphicsFile::write const GenQgarPolyline< float > &  aQPoly,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar polyline with coordinates of type float.

Parameters:
aQPoly a Qgar polyline
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

void qgar::AbstractGraphicsFile::write const GenQgarPolyline< int > &  aQPoly,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar polyline with coordinates of type int.

Parameters:
aQPoly a Qgar polyline
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

Definition at line 188 of file AbstractGraphicsFile.C.

References qgar::GenQgarPolyline< T >::accessGeomStructure(), qgar::AbstractGenQgarPrimitive< T >::color(), qgar::AbstractGenQgarPrimitive< T >::outline(), qgar::QGE_COLOR_NONE, qgar::QGE_OUTLINE_NONE, qgar::AbstractGenQgarPrimitive< T >::thickness(), and write().

virtual void qgar::AbstractGraphicsFile::write const GenPolyline< double > &  aPoly,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical polyline with coordinates of type double.

Parameters:
aPoly a polyline
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPolyline< float > &  aPoly,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical polyline with coordinates of type float.

Parameters:
aPoly a polyline
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPolyline< int > &  aPoly,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical polyline with coordinates of type int.

Parameters:
aPoly a polyline
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile.

void qgar::AbstractGraphicsFile::write const GenQgarArc< double > &  aQArc,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar arc with coordinates of type double.

Parameters:
aQArc a Qgar arc
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

void qgar::AbstractGraphicsFile::write const GenQgarArc< float > &  aQArc,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar arc with coordinates of type float.

Parameters:
aQArc a Qgar arc
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

void qgar::AbstractGraphicsFile::write const GenQgarArc< int > &  aQArc,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar arc with coordinates of type int.

Parameters:
aQArc a Qgar arc
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

Definition at line 138 of file AbstractGraphicsFile.C.

References qgar::GenQgarArc< T >::accessGeomStructure(), qgar::AbstractGenQgarPrimitive< T >::color(), qgar::AbstractGenQgarPrimitive< T >::outline(), qgar::QGE_COLOR_NONE, qgar::QGE_OUTLINE_NONE, qgar::AbstractGenQgarPrimitive< T >::thickness(), and write().

virtual void qgar::AbstractGraphicsFile::write const GenArc< double > &  anArc,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical arc with coordinates of type double.

Parameters:
anArc a segment
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenArc< float > &  anArc,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical arc with coordinates of type float.

Parameters:
anArc a segment
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenArc< int > &  anArc,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical arc with coordinates of type int.

Parameters:
anArc a segment
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPoint< double > &  aCentre,
double  aRadius,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a circle with coordinates of type double.

Parameters:
aCentre centre of the circle
aRadius radius of the circle
aThickness thickness (default 1)
aColor color (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPoint< float > &  aCentre,
double  aRadius,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a circle with coordinates of type float.

Parameters:
aCentre centre of the circle
aRadius radius of the circle
aThickness thickness (default 1)
aColor color (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPoint< int > &  aCentre,
double  aRadius,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a circle with coordinates of type int.

Parameters:
aCentre centre of the circle
aRadius radius of the circle
aThickness thickness (default 1)
aColor color (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, and qgar::TgifFile.

void qgar::AbstractGraphicsFile::write const GenQgarSegment< double > &  aQSeg,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar segment with coordinates of type double.

Parameters:
aQSeg a Qgar segment
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

void qgar::AbstractGraphicsFile::write const GenQgarSegment< float > &  aQSeg,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar segment with coordinates of type float.

Parameters:
aQSeg a Qgar segment
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

void qgar::AbstractGraphicsFile::write const GenQgarSegment< int > &  aQSeg,
int  aThickness = -1,
QGEcolor  aColor = QGE_COLOR_NONE,
QGEoutline  anOutline = QGE_OUTLINE_NONE
 

Record a Qgar segment with coordinates of type int.

Parameters:
aQSeg a Qgar segment
aThickness thickness to be recorded (default -1, i.e. current)
aColor color to be recorded (default qgar::QGE_COLOR_NONE, i.e. current)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_NONE, i.e. current)

Definition at line 87 of file AbstractGraphicsFile.C.

References qgar::GenQgarSegment< T >::accessGeomStructure(), qgar::AbstractGenQgarPrimitive< T >::color(), qgar::AbstractGenQgarPrimitive< T >::outline(), qgar::QGE_COLOR_NONE, qgar::QGE_OUTLINE_NONE, qgar::AbstractGenQgarPrimitive< T >::thickness(), and write().

virtual void qgar::AbstractGraphicsFile::write const GenSegment< double > &  aSeg,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical segment with coordinates of type double.

Parameters:
aSeg a segment
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenSegment< float > &  aSeg,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical segment with coordinates of type float.

Parameters:
aSeg a segment
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenSegment< int > &  aSeg,
int  aThickness = 1,
QGEcolor  aColor = QGE_COLOR_DEFAULT,
QGEoutline  anOutline = QGE_OUTLINE_DEFAULT
[pure virtual]
 

Record a geometrical segment with coordinates of type int.

Parameters:
aSeg a segment
aThickness thickness to be recorded (default 1)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
anOutline outline to be recorded (default qgar::QGE_OUTLINE_DEFAULT)

Implemented in qgar::DxfFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write AbstractGenPointChain< double > &  aChain,
int  aThickness = 3,
QGEcolor  aColor = QGE_COLOR_DEFAULT
[pure virtual]
 

Record a chain of points with coordinates of type double.

Parameters:
aChain a chain
aThickness thickness to be recorded (default 3)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
Todo:
Parameter aChain cannot be declared const because functions qgar::AbstractGenPointChain::setToBegin and qgar::AbstractGenPointChain::moveNext are not declared const. In particular, their implementation in class qgar::GenLinkedChain modify data member qgar::GenLinkedChain::_iter, that should be declared as mutable.

Implemented in qgar::DxfFile, and qgar::DxfFile.

virtual void qgar::AbstractGraphicsFile::write AbstractGenPointChain< float > &  aChain,
int  aThickness = 3,
QGEcolor  aColor = QGE_COLOR_DEFAULT
[pure virtual]
 

Record a chain of points with coordinates of type float.

Parameters:
aChain a chain
aThickness thickness to be recorded (default 3)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
Todo:
Parameter aChain cannot be declared const because functions qgar::AbstractGenPointChain::setToBegin and qgar::AbstractGenPointChain::moveNext are not declared const. In particular, their implementation in class qgar::GenLinkedChain modify data member qgar::GenLinkedChain::_iter, that should be declared as mutable.

Implemented in qgar::DxfFile, and qgar::DxfFile.

virtual void qgar::AbstractGraphicsFile::write AbstractGenPointChain< int > &  aChain,
int  aThickness = 3,
QGEcolor  aColor = QGE_COLOR_DEFAULT
[pure virtual]
 

Record a chain of points with coordinates of type int.

Parameters:
aChain a chain
aThickness thickness to be recorded (default 3)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)
Todo:
Parameter aChain cannot be declared const because functions qgar::AbstractGenPointChain::setToBegin and qgar::AbstractGenPointChain::moveNext are not declared const. In particular, their implementation in class qgar::GenLinkedChain modify data member qgar::GenLinkedChain::_iter, that should be declared as mutable.

Implemented in qgar::DxfFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPoint< double > &  aPt,
int  aThickness = 3,
QGEcolor  aColor = QGE_COLOR_DEFAULT
[pure virtual]
 

Record a point with coordinates of type double.

Parameters:
aPt a point
aThickness thickness to be recorded (default 3)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPoint< float > &  aPt,
int  aThickness = 3,
QGEcolor  aColor = QGE_COLOR_DEFAULT
[pure virtual]
 

Record a point with coordinates of type float.

Parameters:
aPt a point
aThickness thickness to be recorded (default 3)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)

Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile.

virtual void qgar::AbstractGraphicsFile::write const GenPoint< int > &  aPt,
int  aThickness = 3,
QGEcolor  aColor = QGE_COLOR_DEFAULT
[pure virtual]
 

Record a point with coordinates of type int.

Parameters:
aPt a point
aThickness thickness to be recorded (default 3)
aColor color to be recorded (default qgar::QGE_COLOR_DEFAULT)

Implemented in qgar::DxfFile, and qgar::TgifFile.

Referenced by write().

virtual void qgar::AbstractFile::writeFooter  )  [protected, pure virtual, inherited]
 

Write footer of the file (pure virtual function).

Automatically performed when the file is closed.

Implemented in qgar::DxfFile, qgar::File, qgar::MapleFile, qgar::PbmFile, qgar::PgmFile, and qgar::TgifFile.

Referenced by qgar::AbstractFile::close().

virtual void qgar::AbstractFile::writeHeader  )  [protected, pure virtual, inherited]
 

Write header of the file (pure virtual function).

Automatically performed when the file is opened for writing only or reading/writing.

Implemented in qgar::DxfFile, qgar::File, qgar::MapleFile, qgar::PbmFile, qgar::PgmFile, and qgar::TgifFile.

Referenced by qgar::AbstractFile::openRW(), and qgar::AbstractFile::openWONLY().


Member Data Documentation

char* qgar::AbstractFile::_fileName [protected, inherited]
 

File name.

Definition at line 349 of file AbstractFile.H.

Referenced by qgar::AbstractFile::fileName(), qgar::PbmFile::getBit(), qgar::AbstractPbmPlusFile::getChar(), qgar::AbstractPbmPlusFile::getInt(), qgar::AbstractPbmPlusFile::getRawByte(), qgar::AbstractFile::isOpenA(), qgar::AbstractFile::isOpenR(), qgar::AbstractFile::isOpenRA(), qgar::AbstractFile::isOpenRW(), qgar::AbstractFile::isOpenW(), qgar::AbstractFile::openAPPEND(), qgar::AbstractFile::openRA(), qgar::AbstractFile::openRONLY(), qgar::AbstractFile::openRW(), qgar::AbstractFile::openWONLY(), qgar::PgmFile::readHeader(), qgar::PbmFile::readHeader(), qgar::DxfFile::readHeader(), qgar::DxfFile::retrieveChainOrQgarPolyline(), and qgar::AbstractFile::~AbstractFile().

QGEfileStatus qgar::AbstractFile::_fileStatus [protected, inherited]
 

File status.

Definition at line 354 of file AbstractFile.H.

Referenced by qgar::AbstractFile::close(), qgar::AbstractFile::fileStatus(), qgar::AbstractFile::isOpenA(), qgar::AbstractFile::isOpenR(), qgar::AbstractFile::isOpenRA(), qgar::AbstractFile::isOpenRW(), qgar::AbstractFile::isOpenW(), qgar::AbstractFile::openAPPEND(), qgar::AbstractFile::openRA(), qgar::AbstractFile::openRONLY(), qgar::AbstractFile::openRW(), and qgar::AbstractFile::openWONLY().

std::fstream qgar::AbstractFile::_fileStream [protected, inherited]
 

Associated file stream.

Definition at line 359 of file AbstractFile.H.

Referenced by qgar::TgifFile::beginSavePoly(), qgar::AbstractFile::close(), qgar::TgifFile::endSavePoly(), qgar::AbstractFile::fileStream(), qgar::AbstractPbmPlusFile::getChar(), qgar::AbstractPbmPlusFile::getRawByte(), qgar::MapleFile::MapleFile(), qgar::AbstractFile::openAPPEND(), qgar::AbstractFile::openRA(), qgar::AbstractFile::openRONLY(), qgar::AbstractFile::openRW(), qgar::AbstractFile::openWONLY(), qgar::PgmFile::readHeader(), qgar::PbmFile::readHeader(), qgar::DxfFile::retrieveDxfGroup(), qgar::TgifFile::saveArc(), qgar::TgifFile::saveBox(), qgar::TgifFile::saveChain(), qgar::TgifFile::saveCircle(), qgar::DxfFile::saveDxfGroup(), qgar::TgifFile::savePoint(), qgar::TgifFile::savePolyline(), qgar::TgifFile::saveSegment(), qgar::TgifFile::writeHeader(), qgar::PgmFile::writeHeader(), qgar::PbmFile::writeHeader(), qgar::MapleFile::writeHeader(), qgar::DxfFile::writeHeader(), qgar::PgmFile::writeRow(), and qgar::PbmFile::writeRow().


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