#include <qgarlib/AbstractGraphicsFile.H>
Inheritance diagram for qgar::AbstractGraphicsFile:

Pure virtual functions are:
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. | |
|
|
Initialize with given name.
Definition at line 59 of file AbstractGraphicsFile.C. |
|
|
Virtual destructor.
Definition at line 73 of file AbstractGraphicsFile.C. |
|
|
Close the file. No effect is the file is already closed.
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(). |
|
|
Get file name.
Definition at line 395 of file AbstractFile.H. References qgar::AbstractFile::_fileName. |
|
|
Get current file status.
Definition at line 404 of file AbstractFile.H. References qgar::AbstractFile::_fileStatus. |
|
|
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. |
|
|
Abort if the file is not open in a mode allowing appending.
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. |
|
|
Abort if the file is not open in a mode allowing reading.
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(). |
|
|
Abort if the file is not open in readi-append mode.
Definition at line 347 of file AbstractFile.C. References qgar::AbstractFile::_fileName, qgar::AbstractFile::_fileStatus, and qgar::QGE_FILE_STATUS_READ_APPEND. |
|
|
Abort if the file is 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. |
|
|
Abort if the file is not open in a mode allowing writing.
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(). |
|
|
Open in append mode. The eventual content of the file is preserved and the file pointer is set to the end of the file.
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(). |
|
|
Open in read-append mode. The file pointer is set to the end of the file.
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(). |
|
|
Open in read-only mode. The file pointer is set to the first character after the header.
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(). |
|
|
Open in read-write mode.
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(). |
|
|
Open in write-only mode.
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(). |
|
|
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(). |
|
||||||||||||||||||||
|
Record a (connected) component. A component is represented by its contour and the contours of included components.
Implemented in qgar::DxfFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a bounding box.
Implemented in qgar::DxfFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a Qgar polyline with coordinates of type double.
|
|
||||||||||||||||||||
|
Record a Qgar polyline with coordinates of type float.
|
|
||||||||||||||||||||
|
Record a Qgar polyline with coordinates of type int.
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(). |
|
||||||||||||||||||||
|
Record a geometrical polyline with coordinates of type double.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a geometrical polyline with coordinates of type float.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a geometrical polyline with coordinates of type int.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a Qgar arc with coordinates of type double.
|
|
||||||||||||||||||||
|
Record a Qgar arc with coordinates of type float.
|
|
||||||||||||||||||||
|
Record a Qgar arc with coordinates of type int.
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(). |
|
||||||||||||||||||||
|
Record a geometrical arc with coordinates of type double.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a geometrical arc with coordinates of type float.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a geometrical arc with coordinates of type int.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||||||
|
Record a circle with coordinates of type double.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||||||
|
Record a circle with coordinates of type float.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||||||
|
Record a circle with coordinates of type int.
Implemented in qgar::DxfFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a Qgar segment with coordinates of type double.
|
|
||||||||||||||||||||
|
Record a Qgar segment with coordinates of type float.
|
|
||||||||||||||||||||
|
Record a Qgar segment with coordinates of type int.
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(). |
|
||||||||||||||||||||
|
Record a geometrical segment with coordinates of type double.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a geometrical segment with coordinates of type float.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||||||
|
Record a geometrical segment with coordinates of type int.
Implemented in qgar::DxfFile, and qgar::TgifFile. |
|
||||||||||||||||
|
Record a chain of points with coordinates of type double.
Implemented in qgar::DxfFile, and qgar::DxfFile. |
|
||||||||||||||||
|
Record a chain of points with coordinates of type float.
Implemented in qgar::DxfFile, and qgar::DxfFile. |
|
||||||||||||||||
|
Record a chain of points with coordinates of type int.
Implemented in qgar::DxfFile, and qgar::TgifFile. |
|
||||||||||||||||
|
Record a point with coordinates of type double.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||
|
Record a point with coordinates of type float.
Implemented in qgar::DxfFile, qgar::DxfFile, qgar::TgifFile, and qgar::TgifFile. |
|
||||||||||||||||
|
Record a point with coordinates of type int.
Implemented in qgar::DxfFile, and qgar::TgifFile. Referenced by write(). |
|
|
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(). |
|
|
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(). |
|
|
|