Lynkeos
Instance Methods | Class Methods | List of all members
<LynkeosFileWriter> Protocol Reference

Common protocol for all file writers. More...

#import <LynkeosFileWriter.h>

Inheritance diagram for <LynkeosFileWriter>:
Inheritance graph
[legend]
Collaboration diagram for <LynkeosFileWriter>:
Collaboration graph
[legend]

Instance Methods

(NSPanel *) - configurationPanel
 Get a configuration panel for this writer. More...
 

Class Methods

(NSString *) + writerName
 Get a string identifying this writer. More...
 
(NSString *) + fileExtension
 Get the extension that should be appended to a file name, when written by this reader. More...
 
(BOOL) + canSaveDataWithPlanes:width:height:metaData:
 Check if this writer is able to save that kind of data. More...
 
(id< LynkeosFileWriter >) + writerForURL:planes:width:height:metaData:
 Constructor which creates a writer ready for writing some data with the given parameters. More...
 

Detailed Description

Common protocol for all file writers.

This protocol is not meant to be directly implemented. It is the common part of more specialized protocols.

Method Documentation

+ (BOOL) canSaveDataWithPlanes: (u_short)  nPlanes
width: (u_short)  w
height: (u_short)  h
metaData: (NSDictionary *)  metaData 

Check if this writer is able to save that kind of data.

For example: some format only supports monochrome images.
Implementations that do not support metadata can return YES, and ignore the metaData parameter.

Parameters
nPlanesThe number of color planes to save
wThe image width
hThe image height
metaDataA property list containing image metadata
Returns
Wether the writer can save this data
- (NSPanel*) configurationPanel

Get a configuration panel for this writer.

The application calls runModal on this panel, when the call returns with NSOKButton, the writer's configurable parameters are set for writing.

Returns
This writer's configuration panel.
+ (NSString*) fileExtension

Get the extension that should be appended to a file name, when written by this reader.

Returns
This writer's file type extension.
+ (id <LynkeosFileWriter>) writerForURL: (NSURL *)  url
planes: (u_short)  nPlanes
width: (u_short)  w
height: (u_short)  h
metaData: (NSDictionary *)  metaData 

Constructor which creates a writer ready for writing some data with the given parameters.

Implementations are not required to make use of the arguments, therefore they shall be repeated verbatim in the saveData method.

Parameters
urlThe URL of the file to be saved
nPlanesThe number of color planes in the image
wThe image width
hThe image height
metaDataThe imag metadata
Returns
A new initialized writer
+ (NSString*) writerName

Get a string identifying this writer.

This string will be displayed by the application in a menu for choosing the writer.

Returns
The writer's name

The documentation for this protocol was generated from the following file: