![]() |
Mapper
0.9.0
API documentation
|
Representation of the format used by OCAD 8. More...
#include <ocad8_file_format.h>
Public Member Functions | |
OCAD8FileFormat () | |
ImportSupportAssumption | understands (const char *buffer, int size) const override |
Determines whether this FileFormat is capable of understanding a file which starts with the given byte sequence. More... | |
std::unique_ptr< Importer > | makeImporter (const QString &path, Map *map, MapView *view) const override |
Creates an Importer that will read a map file from the given stream. More... | |
std::unique_ptr< Exporter > | makeExporter (const QString &path, const Map *map, const MapView *view) const override |
Creates an Exporter that will save a map to the given path. More... | |
![]() | |
FileFormat (FileType file_type, const char *id, const QString &description, const QString &file_extension, Features features) | |
Creates a new file format with the given parameters. More... | |
FileFormat (const FileFormat &)=delete | |
FileFormat (FileFormat &&)=delete | |
virtual | ~FileFormat () |
Destroys the file format information. More... | |
FileFormat & | operator= (const FileFormat &)=delete |
FileFormat & | operator= (FileFormat &&)=delete |
void | addExtension (const QString &file_extension) |
Registers an alternative file name extension. More... | |
FileType | fileType () const |
Returns the type of file. More... | |
const char * | id () const |
Returns the internal ID of the file format. More... | |
const QString & | description () const |
Returns a short human-readable description of the file format. More... | |
const QString & | primaryExtension () const |
Returns the primary file name extension used by this file format. More... | |
const QStringList & | fileExtensions () const |
Returns all file name extension supported by this file format. More... | |
const QString & | filter () const |
Returns the filter that represents this format in file dialogs. More... | |
bool | supportsReading () const |
Returns true if this format supports reading a Map from a file. More... | |
bool | supportsWriting () const |
Returns true if this format supports writing a Map to a file. More... | |
bool | supportsFileOpen () const |
Returns true if this format is available for File > Open... More... | |
bool | supportsFileSave () const |
Returns true if this format is available for File > Save. More... | |
bool | supportsFileSaveAs () const |
Returns true if this format is available for File > Save as... More... | |
bool | supportsFileImport () const |
Returns true if this format is available for File > Import... More... | |
bool | supportsFileExport () const |
Returns true if this format is available for File > Export... More... | |
bool | isReadingLossy () const |
Returns true if an importer for this file format is potentially lossy. More... | |
bool | isWritingLossy () const |
Returns true if an exporter for this file format is potentially lossy. More... | |
Additional Inherited Members | |
![]() | |
enum | FileType { MapFile = 0x01, OgrFile = 0x02, AllFiles = MapFile, EndOfFileTypes } |
File type enumeration. More... | |
enum | Feature { Feature::FileOpen = 0x01, Feature::FileSave = 0x02, Feature::FileSaveAs = 0x04, Feature::FileImport = 0x08, Feature::FileExport = 0x10, Feature::ReadingLossy = 0x100, Feature::WritingLossy = 0x200 } |
A type which handles OR-combinations of file types. More... | |
enum | ImportSupportAssumption { NotSupported = 0, Unknown = 1, FullySupported = 2 } |
A type which handles OR-combinations of format implementation features. More... | |
Representation of the format used by OCAD 8.
OpenOrienteering::OCAD8FileFormat::OCAD8FileFormat | ( | ) |
|
overridevirtual |
Creates an Exporter that will save a map to the given path.
The default implementation returns an unset unique_ptr.
Reimplemented from OpenOrienteering::FileFormat.
|
overridevirtual |
Creates an Importer that will read a map file from the given stream.
The default implementation returns an unset unique_ptr.
Reimplemented from OpenOrienteering::FileFormat.
|
overridevirtual |
Determines whether this FileFormat is capable of understanding a file which starts with the given byte sequence.
Magic numbers and version information are commonly placed at the beginning of a file. This method is used by the application to pre-screen for a suitable Importer.
The default implementation returns Unknown for file formats which support import, and NotSupported otherwise.
Reimplemented from OpenOrienteering::FileFormat.