MIE::FORMAT_DBLINKABLE Class Reference

#include <mie/dblinkable.h>

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

List of all members.

Public Member Functions

 FORMAT_DBLINKABLE (const char *name, const char *extns, RVC::DBTABLE::LINKTYPE linktype, MIE::FORMATTYPE type, TEXTID desc, MIE::MODE mode=MIE::MODE_Import|MIE::MODE_Export)
virtual ~FORMAT_DBLINKABLE ()

Private Member Functions

virtual MIE::JOB_IMPORTv_AllocJobImport (MIE::OBJTYPEFLAG ObjType, const MIE::SETTINGS &settings) const
virtual MIE::SETTINGSv_AllocSettings (MIE::MODE mode, MIE::OBJTYPEFLAG ObjType) const
virtual bool v_CanExport (RVC::OBJTYPE ObjType) const
virtual bool v_CanImport (RVC::OBJTYPE ObjType) const
virtual ERRVALUE v_Export (const MISTRING &dest, const MIE::SETTINGS &settings, const SIMPLE_ARRAY< MIE::JOB_EXPORT * > &jobs) const
virtual const char * v_GetDefaultFileExtn () const
virtual void v_GetFormatDesc (MISTRING &desc) const
virtual int v_GetObjItemList (const MISTRING &source, RVC::OBJITEMLIST &items, const MIE::SETTINGS &settings) const
virtual SMLCLASSMEMBERv_GetSMLClassMembers (RVC::OBJTYPE ObjType) const
virtual const char * v_GetSMLClassName (RVC::OBJTYPE objtype) const
virtual ERRVALUE v_Import (const MISTRING &source, const MIE::SETTINGS &settings, const SIMPLE_ARRAY< MIE::JOB_IMPORT * > &jobs) const

Private Attributes

const char * m_FileExtn
RVC::DBTABLE::GETOBJFILTER_ISSELECTABLE m_FiltExport
TEXTID m_FormatDesc
RVC::DBTABLE::LINKTYPE m_LinkType
MIE::MODE m_mode

Constructor & Destructor Documentation

MIE::FORMAT_DBLINKABLE::FORMAT_DBLINKABLE ( const char *  name,
const char *  extns,
RVC::DBTABLE::LINKTYPE  linktype,
MIE::FORMATTYPE  type,
TEXTID  desc,
MIE::MODE  mode = MIE::MODE_Import|MIE::MODE_Export 
)
virtual MIE::FORMAT_DBLINKABLE::~FORMAT_DBLINKABLE (  )  [virtual]

Member Function Documentation

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

Allocate a JOB_EXPORT for this format.

Will be temporary during the actual import Note, the ObjectType parameter is not redundant. In the case of importing a CAD format and then converting to vector, ObjectType will be CAD and settings.ObjTypeSelected will be Vector

Reimplemented from MIE::FORMAT.

virtual MIE::SETTINGS* MIE::FORMAT_DBLINKABLE::v_AllocSettings ( MIE::MODE  mode,
MIE::OBJTYPEFLAG  ObjType 
) const [private, virtual]

Allocate a JOB_IMPORT for this format Default implementation just allocates an MIE::SETTINGS, The optional ObjType parameter allows you to limit the settings to a particular object type.

This is required to keep the SML implementation compatible with previous code.

Reimplemented from MIE::FORMAT.

virtual bool MIE::FORMAT_DBLINKABLE::v_CanExport ( RVC::OBJTYPE  objtype  )  const [private, virtual]

Return true if a given object type can be exported to this format.

Default implementation checks objtype against the FORMAT's OBJTYPEFLAG and mode, which were both set by constructor.

Reimplemented from MIE::FORMAT.

virtual bool MIE::FORMAT_DBLINKABLE::v_CanImport ( RVC::OBJTYPE  objtype  )  const [private, virtual]

Return true if this format can import to a given object type.

Default implementation checks objtype against the FORMAT's OBJTYPEFLAG and mode, which were both set by constructor.

Reimplemented from MIE::FORMAT.

virtual ERRVALUE MIE::FORMAT_DBLINKABLE::v_Export ( const MISTRING dest,
const MIE::SETTINGS settings,
const SIMPLE_ARRAY< MIE::JOB_EXPORT * > &  jobs 
) const [private, virtual]

Virtual method to do the actual export.

Called once for each object selected for export if settings.GetSingleFile() is false (in which case the sources list contains a single item). Otherwise this method is called only once, and the sources list contains all the objects selected for export.

If you are exporting a raster, you should use MIE::JOB_EXPORT::SetRastObj() and MIE::JOB_EXPORT::ReadRaster() instead of the RVC::RASTER methods. This will convert the null mask of the raster (if any) to the null value specified by the user. Handles cell value conflicts.

Reimplemented from MIE::FORMAT.

virtual const char* MIE::FORMAT_DBLINKABLE::v_GetDefaultFileExtn (  )  const [private, virtual]

Return the default extension for files of this format Extension should not contain the "." If multiple extension are allowed, returns a space-seperated list Returns NULL if there is no extension Default implementation returns NULL.

Reimplemented from MIE::FORMAT.

virtual void MIE::FORMAT_DBLINKABLE::v_GetFormatDesc ( MISTRING desc  )  const [private, virtual]

Get the format description (new stuff will look up given TEXTID) Old stuff will use old group/key to lookup resource.

Implements MIE::FORMAT.

virtual int MIE::FORMAT_DBLINKABLE::v_GetObjItemList ( const MISTRING source,
RVC::OBJITEMLIST items,
const MIE::SETTINGS settings 
) const [private, virtual]

Determine the number and types of objects that a given source file or datasource contains.

Should return the number of items. If you want MIE to supply default object names, just return the number of objects without filling in the items (or you can push blank OBJITEMs to the list) Default implementation returns one default OBJITEM.

Reimplemented from MIE::FORMAT.

virtual SMLCLASSMEMBER* MIE::FORMAT_DBLINKABLE::v_GetSMLClassMembers ( RVC::OBJTYPE  ObjType  )  const [private, virtual]

Return an array of SMLCLASSMEMBERs for your derived class's SETTINGS.

You should implement this if you are rewriting a module that has SML class members. Your SML members should have the same names as they did in the legacy module so that existing scripts don't break. Otherwise, if you have no need for format-specific SETTINGS, you don't need to implement this.

Recomended practice is to have this call a static method on your derived SETTINGS class which sets up the SML classes (see miemrsid.c for an example of this). You can either write your own SML write and read functions (as in mielegacy.c), or just use SML::CLASSWriteSimple and SML::CLASSReadSimple if you need to modify "simple" settings members.

SML::CLASSMEMBERs that you return will not be freed, so define your SML classes statically in your module. The SETTINGS members that they reference can be modified by SML even if they are const.

Reimplemented from MIE::FORMAT.

virtual const char* MIE::FORMAT_DBLINKABLE::v_GetSMLClassName ( RVC::OBJTYPE  ObjType  )  const [private, virtual]

Return the SML Class name for this format.

Default implementation returns NULL. Override only if you want your SML class name to be something other than that created by SetupSMLClass.

Reimplemented from MIE::FORMAT.

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

Virtual method to do the actual import.

Called once for each input file. The jobs array contains a job for each output object.

Your derived class should NOT do any of the "standard" operations such as optimizing a vector, creating standard attribute tables, setting raster compression, etc. The main interface will do that for you.

Note: in order to create your destination object, use the Make method from the appropriate JOB_IMPORT-derived class if one is available (JOB_RASTER::MakeRaster instead of RVC::RASTER::Make, for example).

If the JOB class you are using does not have its own Make method, or if you want to make the object yourself, you can retrieve the destination RVC::OBJITEM via JOB::GetObjItem(). Note that you must update each job's objitem after creating your output objects (possibly using RVC::OBJECT::GetObjectItem()). In the case of creating rasters, you must also either disable compression options (FEATURE_NeedRasterCompressOptions), or import to a temp file (FEATURE_TempFileIfCompressing).

Parameters:
source Either a filename (from FILEPATH::GetMioPath()) or an ODBC connection string.
settings The import settings. If you implement v_AllocSettings, and have it return a class derived from MIE::SETTINGS, you can safely static_cast the settings to your own derived class.
jobs An array of MIE::JOB_IMPORT-derived classes, one for each OBJITEM in dest. If you implement v_AllocJobImport, and have it return a derived class, you can sefely static_cast the job to your own derived class. The jobs are allocated for you and will be freed when the import is done. Note, if the user "skipped" any of the output objects for this file, the "job" pointer for that object will be NULL

Reimplemented from MIE::FORMAT.


Member Data Documentation

const char* MIE::FORMAT_DBLINKABLE::m_FileExtn [private]

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