ExportDC Class Reference

Provide a device context for rendering to a file rather than the screen. This base class handles opening the file. More...

#include <kerneldc.h>

Inheritance diagram for ExportDC:

KernelDC CCDummyDC CCDC ListItem CCObject SimpleCCObject CMXExportDC EPSExportDC FlashExportDC NativeExportDC List of all members.

Public Member Functions

 ExportDC (Filter *Parent)
 Creates a DC of the correct type (RENDERTYPE_FILE).
 ~ExportDC ()
 Deinitialise an Export device context. If the file connected to this DC is still open, the file is closed.
BOOL Init (CCLexFile *)
 Initialise an export DC by connecting it to a named file.
virtual FilterGetParentFilter ()
 Get a pointer to the filter object associated with this export device context.

Public Attributes

CCLexFileExportFile

Protected Attributes

FilterParentFilter

Detailed Description

Provide a device context for rendering to a file rather than the screen. This base class handles opening the file.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/03/94
See also:
EPSExportDC

Definition at line 232 of file kerneldc.h.


Constructor & Destructor Documentation

ExportDC::ExportDC Filter Parent  ) 
 

Creates a DC of the correct type (RENDERTYPE_FILE).

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/03/94
See also:
EPSExportDC::EPSExportDC

Definition at line 1722 of file kerneldc.cpp.

01722                                  : KernelDC(RENDERTYPE_FILE)
01723 {
01724     // Sanity check
01725     ENSURE(Parent != NULL, "NULL parent filter in ExportDC creation!");
01726 
01727     // Install parent
01728     ParentFilter = Parent;
01729     ExportFile = NULL;
01730 }

ExportDC::~ExportDC  ) 
 

Deinitialise an Export device context. If the file connected to this DC is still open, the file is closed.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/03/94
See also:
ExportDC

Definition at line 1770 of file kerneldc.cpp.

01771 {
01772     // This is no longer needed as the file is closed by the caller
01773     /*
01774     if (ExportFile.isOpen())
01775     {
01776         if (IsUserName("Tim"))
01777             TRACE( _T("File still open in CCExportDC dtor"));
01778 
01779         ExportFile.close();
01780     }
01781     */
01782 }


Member Function Documentation

Filter * ExportDC::GetParentFilter  )  [virtual]
 

Get a pointer to the filter object associated with this export device context.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
05/08/94
Returns:
Pointer to the parent filter object.
See also:
Filter

Reimplemented from KernelDC.

Definition at line 1798 of file kerneldc.cpp.

01799 {
01800     return ParentFilter;
01801 }

BOOL ExportDC::Init CCLexFile pFile  ) 
 

Initialise an export DC by connecting it to a named file.

Author:
Tim_Browse (Xara Group Ltd) <camelotdev@xara.com>
Date:
28/03/94
Parameters:
pFile - the file to connect this DC to. [INPUTS]
Returns:
TRUE if DC connected to file successfully, FALSE if an error occured.

Errors: Unable to open the file.

See also:
ExportDC

Reimplemented in EPSExportDC, and FlashExportDC.

Definition at line 1746 of file kerneldc.cpp.

01747 {
01748     // This file is already open when we get it
01749     ExportFile = pFile;
01750 
01751     // Make sure that the file is open
01752     ERROR2IF(!ExportFile->isOpen(), FALSE, "File was not open in ExportDC::Init()");
01753 
01754     // File opened ok.
01755     return TRUE;
01756 }


Member Data Documentation

CCLexFile* ExportDC::ExportFile
 

Definition at line 241 of file kerneldc.h.

Filter* ExportDC::ParentFilter [protected]
 

Definition at line 244 of file kerneldc.h.


The documentation for this class was generated from the following files:
Generated on Sat Nov 10 03:54:05 2007 for Camelot by  doxygen 1.4.4