MIE::FORMAT_LINKABLE Class Reference

Base import / export class for linkable formats. More...

#include <mie/fmtlink.h>

Inheritance diagram for MIE::FORMAT_LINKABLE:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 ~FORMAT_LINKABLE ()
ERRVALUE CreateLink (const MISTRING &SrcFile, const RVC::OBJITEM &DestParentObj, RVC::OBJITEM &DestObj, const SETTINGS *settings, int Index=0) const
ERRVALUE ImportGeoreference (const MISTRING &source, const SETTINGS &settings, const RVC::OBJITEM &destParent) const

Protected Member Functions

 FORMAT_LINKABLE (FORMATTYPE FormatType, OBJTYPEFLAG ImportObjType, MODE Modes, const char *FormatName, const char *source, OBJTYPEFLAG ExportObjType=OBJTYPEFLAG_None)
ERRVALUE SetupLinkFile (const MISTRING &Source, const SETTINGS &Settings, RVC::OBJITEM &LinkObjItem, INT32 LinkIndex=0) const
ERRVALUE SetupLinkFile (const MISTRING &Source, RVC::OBJECT &LinkFile, RVC::OBJITEM &LinkObjItem) const
virtual ERRVALUE v_AnalyzeSource (const MISTRING &source, SETTINGS *settings) const
virtual ERRVALUE v_Import (const MISTRING &source, const SETTINGS &settings, const SIMPLE_ARRAY< JOB_IMPORT * > &jobs) const
virtual ERRVALUE v_ImportGeoreference (const MISTRING &source, const SETTINGS &settings, const RVC::OBJITEM &destParent) const

Private Member Functions

virtual RVC::CAD::LINKPARMSv_AllocCADLinkParms (const FILEPATH &source, const SETTINGS *settings) const
virtual RVC::DBTABLE::LINKPARMSv_AllocDBTableLinkParms (const FILEPATH &source, const SETTINGS *settings) const
virtual JOB_IMPORTv_AllocJobImport (OBJTYPEFLAG ObjectType, const SETTINGS &settings) const
virtual RVC::RASTER::LINKPARMSv_AllocRastLinkParms (const FILEPATH &source, const SETTINGS *settings, INT32 ImageIndex=0, INT32 Component=0) const
virtual RVC::SHAPE::LINKPARMSv_AllocShapeLinkParms (const MISTRING &source, const SETTINGS *settings, INT32 Index) const
virtual RVC::SHAPE::LINKPARMSv_AllocShapeLinkParms (const FILEPATH &source, const SETTINGS *settings, INT32 Index) const
virtual DEPRECATED ERRVALUE v_ImportGeoreference (const MISTRING &source, const SETTINGS &settings, const SIMPLE_ARRAY< JOB_IMPORT * > &jobs) const
virtual FORMAT::TESTRESULT v_TestFile (const FILEPATH &filepath) const

Detailed Description

Base import / export class for linkable formats.

This class is to be used for importing linkable formats. It should only be derived from if the import creates one output object per linked object. Export is not implemented in this class, since that is not possible through the link classes at this point.

Derived classes must implement the appropriate method for allocating linkparms.


Constructor & Destructor Documentation

MIE::FORMAT_LINKABLE::~FORMAT_LINKABLE (  )  [inline]
MIE::FORMAT_LINKABLE::FORMAT_LINKABLE ( FORMATTYPE  FormatType,
OBJTYPEFLAG  ImportObjType,
MODE  Modes,
const char *  FormatName,
const char *  source,
OBJTYPEFLAG  ExportObjType = OBJTYPEFLAG_None 
) [protected]

Member Function Documentation

ERRVALUE MIE::FORMAT_LINKABLE::CreateLink ( const MISTRING SrcFile,
const RVC::OBJITEM DestParentObj,
RVC::OBJITEM DestObj,
const SETTINGS settings,
int  Index = 0 
) const

Creates a new link and returns info in DestObj.

Parameters:
Index For linked rasters with multiple bands
ERRVALUE MIE::FORMAT_LINKABLE::ImportGeoreference ( const MISTRING source,
const SETTINGS settings,
const RVC::OBJITEM destParent 
) const [inline]

Imports the georeference underneath the given parent if it is not already georeferenced.

ERRVALUE MIE::FORMAT_LINKABLE::SetupLinkFile ( const MISTRING Source,
const SETTINGS Settings,
RVC::OBJITEM LinkObjItem,
INT32  LinkIndex = 0 
) const [protected]

Sets up the link.

To be used in actual import, where SETTINGS and JOBS are available. Is normally passed the JOB's ObjItem as the LinkObjItem parameter.

Parameters:
LinkIndex For linked rasters with multiple bands
ERRVALUE MIE::FORMAT_LINKABLE::SetupLinkFile ( const MISTRING Source,
RVC::OBJECT LinkFile,
RVC::OBJITEM LinkObjItem 
) const [protected]

Sets up the link.

If one already exists for Source, LinkFile will point to .rlk file containing link, and LinkObjItem will reference to the linked object. Otherwise will call CreateLink, and LinkFile will point to a temporary file.

Need to pass LinkFile as parameter since it may be created here.

virtual RVC::CAD::LINKPARMS* MIE::FORMAT_LINKABLE::v_AllocCADLinkParms ( const FILEPATH source,
const SETTINGS settings 
) const [private, virtual]

Override if format is CAD. Settings may be null.

virtual RVC::DBTABLE::LINKPARMS* MIE::FORMAT_LINKABLE::v_AllocDBTableLinkParms ( const FILEPATH source,
const SETTINGS settings 
) const [private, virtual]

Override if format is database table. Settings may be null.

virtual JOB_IMPORT* MIE::FORMAT_LINKABLE::v_AllocJobImport ( OBJTYPEFLAG  ObjectType,
const SETTINGS settings 
) const [private, virtual]

Allocates the proper linkable JOB class based on the OBJTYPEFLAG passed.

Reimplemented from MIE::FORMAT.

virtual RVC::RASTER::LINKPARMS* MIE::FORMAT_LINKABLE::v_AllocRastLinkParms ( const FILEPATH source,
const SETTINGS settings,
INT32  ImageIndex = 0,
INT32  Component = 0 
) const [private, virtual]

Override if format is raster.

Settings may be null.

Note: this method is not recommended for formats that use the generic link. In that case it is preferred that you derive your format from FORMAT, setting FEATURE_NeedLink and writing a FORMAT::v_Import that just calls JOB_RASTER::ImportGeneric.

Reimplemented in MIE::FORMAT_LINKMULTI.

virtual RVC::SHAPE::LINKPARMS* MIE::FORMAT_LINKABLE::v_AllocShapeLinkParms ( const MISTRING source,
const SETTINGS settings,
INT32  Index 
) const [private, virtual]

Override if format is Shape.

Settings may be null. Default implementation converts the MISTRING to a FILEPATH and calls the FILEPATH version

virtual RVC::SHAPE::LINKPARMS* MIE::FORMAT_LINKABLE::v_AllocShapeLinkParms ( const FILEPATH source,
const SETTINGS settings,
INT32  Index 
) const [private, virtual]

Override if format is Shape. Settings may be null.

virtual ERRVALUE MIE::FORMAT_LINKABLE::v_AnalyzeSource ( const MISTRING source,
SETTINGS settings 
) const [protected, virtual]

Analyze the file, setting up defaults.

Reimplemented from MIE::FORMAT.

Reimplemented in MIE::FORMAT_RDBMS_SPATIAL.

virtual ERRVALUE MIE::FORMAT_LINKABLE::v_Import ( const MISTRING source,
const SETTINGS settings,
const SIMPLE_ARRAY< JOB_IMPORT * > &  jobs 
) const [protected, virtual]

Default implementation sets up the link in a temporary file.

The jobs handle copying to the destination object type. Normally you should not need to implement this.

Reimplemented from MIE::FORMAT.

virtual DEPRECATED ERRVALUE MIE::FORMAT_LINKABLE::v_ImportGeoreference ( const MISTRING source,
const SETTINGS settings,
const SIMPLE_ARRAY< JOB_IMPORT * > &  jobs 
) const [private, virtual]

Imports the georeference for each job.

Implement if the link type you are using does not support georeferencing. Default implementation does nothing.

virtual ERRVALUE MIE::FORMAT_LINKABLE::v_ImportGeoreference ( const MISTRING source,
const SETTINGS settings,
const RVC::OBJITEM destParent 
) const [protected, virtual]

Imports the georeference for the given parent.

Implement if the link type you are using does not support georeferencing. Default implementation does nothing.

virtual FORMAT::TESTRESULT MIE::FORMAT_LINKABLE::v_TestFile ( const FILEPATH filepath  )  const [private, virtual]

Tests the file by linking to it. Normally should not need to override.

Reimplemented from MIE::FORMAT.


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

Generated on Sun Oct 7 21:36:25 2012 for TNTsdk 2012 by  doxygen 1.6.1