a2dDocumentTemplateAuto Class Reference

Automatic template, which searches a suitable handler for the document. More...

#include <docviewref.h>

Inheritance diagram for a2dDocumentTemplateAuto:

Inheritance graph
[legend]
Collaboration diagram for a2dDocumentTemplateAuto:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 a2dDocumentTemplateAuto (const wxString &descr, const wxString &filter, const wxString &dir, const wxString &ext, const wxString &docTypeName, wxClassInfo *docClassInfo=(wxClassInfo *) NULL, a2dViewConnector *connector=(a2dViewConnector *) NULL, long flags=a2dTemplateFlag::DEFAULT)
 ~a2dDocumentTemplateAuto ()
 Destructor.
virtual a2dIOHandlerStrInGetDocumentIOHandlerForLoad (a2dDocumentInputStream &stream, a2dDocument *document)
 if there is an io handler, and it can load the document of this template, return it
virtual a2dIOHandlerStrOutGetDocumentIOHandlerForSave (const wxString &filename, a2dDocument *document)
 if there is an io handler, and it can save the document of this template, return it


Detailed Description

Automatic template, which searches a suitable handler for the document.

a2dDocviewGlobals->GetDocviewCommandProcessor()->GetDocTemplates() is used to find a template which fits the document type of the template.

An extra test is performed in GetDocumentIOHandlerForLoad() GetDocumentIOHandlerForSave(), to see if that template can be used for saving or loading the document.

This template is handy in use when you what an All Files template. The document with this template, will automatically choose the right handler for files you choose. Extension is not important.

Definition at line 2750 of file docviewref.h.


Member Function Documentation

a2dIOHandlerStrOut * a2dDocumentTemplateAuto::GetDocumentIOHandlerForSave ( const wxString &  filename,
a2dDocument document 
) [virtual]

if there is an io handler, and it can save the document of this template, return it

Parameters:
filename when not empty, it is/can be used to choose io handler also based on the extension of the filename.
document the document that needs to be saved.

Reimplemented from a2dDocumentTemplate.

Definition at line 2157 of file docviewref.cpp.


The documentation for this class was generated from the following files:
a2dDocumentTemplateAuto Class Reference -- Tue Aug 31 18:23:02 2010 -- 31 Aug 2010 -- 1.5.5 -- wxArt2D -- . -- Main Page Reference Documentation