⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 isession.h

📁 GIS格式转换软件vc源码.GIS格式转换软件vc源码.
💻 H
📖 第 1 页 / 共 3 页
字号:
#ifndef IFME_SESSION_H
#define IFME_SESSION_H 
// $Id: isession.h,v 17.3.2.1 2006/03/09 01:19:52 zwang Exp $
/*! \file isession.h
    \brief IFMESession
*/
/*! \internal
============================================================================

   Name     : isession.h

   System   : FME Developer Kit

   Language : C++

   Purpose  : Definition of Class "IFMESession"


   Author               Date            Changes made
   ------------------   ------------    -------------------------------
   Don Murray           Apr 22, 1999    Original Implementation   
   Don Murray           Jun 21, 1999    Added getLastErrorMsg
                                        and getLastErrorNum
   Graeme Hiebert       Jun 28, 1999    Fixed FMESESSION_API spelling for
                                        non-WIN32.
   Dale Lutz            Aug 30, 1999    Made "create" directives alternate
                                        keyword/value
   Don Murray           Sep 29, 1999    Added new methods fmeHome.
   Kevin Wiebe          Oct 04, 1999    Exposed the CoordSysManager.
   Kevin Wiebe          Oct 06, 1999    Added directives to init().
   Don Murray           Oct 13, 1999    Assimilated Dialog into the
                                        session.
   Don Murray           Nov 23, 1999    Added configure method enabling
                                        functions like @Lookup etc. to
                                        be used without having to define 
                                        a factory pipeline.
   Kevin Wiebe          Feb 02, 2000    Added DEFLINE directive
   Don Murray           Feb 23, 2000    Added SpatialIndex interface.
   Don Murray           Apr 20, 2000    Added Rectangle interface.
   Dale Lutz            Mar 24, 2001    Added OUTPUT_STATS directive option
   James Shew           Jun 07, 2001    Added createFeatureVectorOnDisk(and 
                                        the destroy function too).
   Kevin Wiebe          Feb 04, 2002    Added PASSPHRASE and BYTE_ORDER support
   Hieu Nguyen          Feb 12, 2002    Removed all indications of destroyFMEString
   Hieu Nguyen          Feb 19, 2002    Added getSettings method
   Hieu Nguyen          Mar 05, 2002    Added logSettings method
   Juan Chu Chow        Aug 19, 2002    Added getSchemaFeatures method.
   Juan Chu Chow        Mar 20, 2003    Added persistentCache method.
   Don Murray           May 20, 2003    Added getProperties and getAllProperties methods.
   Zheng Wang           May 20, 2004    Added getLicenseManager method.
   Tom Weir             Jun 01, 2004    Fixed documentation.
   Kaustav Mukherjee    Nov 16, 2004    Added the internal tag to hide this revision control part.
   Kevin Wiebe          Jan 31, 2005    Added access to the GeometryManager
   Peter Leung          Apr 12, 2005    Added transformerMgr method
   Peter Leung          Jun 15, 2005    Changed transformerMgr to transformerManager
                                        IFMETransformerMgr to IFMETransformerManager 
   Kevin Wiebe          Jun 24, 2005    Removed access to the GeometryManager
   Kevin Wiebe          Oct 14, 2005    Added access to the GeometryTools object

                  Copyright (c) 1995 - 2005, Safe Software Inc.
                              All Rights Reserved          
 
    This software may not be copied or reproduced, in all or in part, 
    without the prior written consent of Safe Software Inc.

    The entire risk as to the results and performance of the software,
    supporting text and other information contained in this file
    (collectively called the "Software") is with the user.  
    In no event will Safe Software Incorporated be liable for damages,
    including loss of profits or consequential damages, arising out of
    the use of the Software.
*/
/*! \class IFMESession
    \brief Session class

   This defines the entry-point class used to provide access to
   the fundamental building blocks of FME to C++ users.  It provides methods
   to create readers and writers, factory pipelines, and FME features.

*/
#include "fmetypes.h"
class IFMEFeature;
class IFMEUniversalReader;
class IFMEUniversalWriter;
class IFMESession;
class IFMEFactoryPipeline;
class IFMEFeatureVector;
class IFMEDialog;
class IFMEFactory; 
class IFMESpatialIndex;
class IFMERectangle;
class IFMERectangleVector;
class IFMEFeatureVectorOnDisk;
class IFMEPersistentCache;
class IFMEApplicationService;
class IFMELicenseManager;
class IFMEDisconnectedEdit;
class IFMEGeometryTools;
class IFMETransformerManager; 
class IFMEWorkspaceLoader;

// Now we define the exports.
#ifdef WIN32

#ifdef FME_DLL
#define FMESESSION_API __declspec(dllexport)
#else
#define FMESESSION_API __declspec(dllimport)
#endif

#else

#define FMESESSION_API

#endif // end of WIN32.

//----------------------------------------------------------------------
// Make these entry points "extern C" so that they could easily be
// dynamically loaded

extern "C" {

//----------------------------------------------------------------------
// This functions returns a pointer to an FME session object.
// The caller can then access all the member functions provided by
// the IFMESession class to attach to readers/writers/pipelines within
// FME.  The returned IFMESession object should only be freed by calling
// the FME_destroySessionObject class.  These entry points are NOT to be
// mixed or confused with with the FME C-API entry points 
// "FME_SessionCreate" and "FME_SessionDestroy".

FMESESSION_API FME_MsgNum FME_createSession(IFMESession*& session);

//----------------------------------------------------------------------
// This function is used to destroy an FME session created by the
// FME_createSessionObject call.

FMESESSION_API FME_MsgNum FME_destroySession(IFMESession*& session);

}

//======================================================================
// Interface Class
//

class IFMESession
{
   friend FMESESSION_API FME_MsgNum FME_destroySession(IFMESession*& session);
   friend FMESESSION_API FME_MsgNum FME_SessionDestroy(FME_SESSION_HANDLE* session);
   
public:
   //-------------------------------------------------------------------
   /*! This method initializes the FMEObjects system. 
   // The directives are reserved for future use.
   // Until they are used, just pass in NULL. */
   virtual FME_MsgNum init(const IFMEStringArray* directives) = 0;
   
   //-------------------------------------------------------------------
   /*! This method creates an FME reader to read data from a format
   // or system.  Only the reader's type mneumonic, as found in
   // the FME Reference Manual Part II, need be passed in.
   // Any parameters needed for the reader will be passed
   // to it via its `open' call. 
   //  
   // If the caller specifies FME_TRUE for cacheFeatures then the
   // reader builds a spatial index and caches the features enabling
   // subsequent reads to be much faster.  cacheFeatures should only
   // be set to FME_TRUE when the input data is to be read multiple
   // times.  cacheFeatures should be set to FME_FALSE if each
   // feature from the source dataset is only read once.
   //
   // The final parameter 'directives' is where the user specifies
   // one or more additional directives to the reader.  Directives
   // are of the form of a directive name as an entry in the array,
   // with the next entry having the value for the directive.
   // If no directives are to be specified then an
   // empty string array or a NULL pointer may be specified.
   //
   // The supported directives are:
   // <dl>
   // <dt><b>"USER_PIPELINE"</b> (C++ Constant: kFME_UserPipeline)</dt>
   // <dd>   This directive takes a pipeline file name as its values. If it 
   //        is not a full path name then the pipeline file must be in the 
   //        userPipeline directory under the FME installation.  
   //        If it isan absolute path name then the pipeline file at that location
   //        is opened and used.<br>
   //        Specifying this directive results in all features from the
   //        reader first going thru the user pipeline before being
   //        given to the application.
   // </dd>
   // <dt><b>"RUNTIME_MACROS"</b> (C++ Constant: kFME_RunTimeMacs)</dt>
   // <dd>   This directive takes a System Data Format (SDF) list of macro names and values 
   //        -- see fmedlg.h for a description.<br>
   //        This directive provides a convenient means for settings
   //        to be propagated from the dialog box package to the
   //        reader being created.  These settings control how the 
   //        reader itself will behave.
   // </dd>
   // <dt><b>"META_MACROS"</b> (C++ Constant: kFME_MetaMacs)</dt>
   // <dd>   This directive takes a System Data Format (SDF) list of macro names
   //        and values -- see fmedlg.h for a description.<br>
   //        This directive provides a convenient means for settings
   //        to be propagated from the dialog box package to the
   //        reader being created.  These settings typically govern how
   //        the reader's metafile and schema information will behave.
   // </dd>
   // <dt><b>"METAFILE"</b> (C++ Constant: kFME_MetaFile)</dt>
   // <dd>   This directive takes the name of the metafile that should be used
   //        for this reader.  This is returned in the metafile parameter from 
   //        the dialog box package.<br>
   //        Occasionally the settings box may request a specific metafile
   //        be used to control the reader's behaviour.  This directive
   //        provides a means for propogating this information to the reader.
   // </dd>
   // <dt><b>"COORDSYS"</b> (C++ Constant: kFME_Coordsys)</dt>
   // <dd>   This directive takes the name of the coordinate system that 
   //        all features should be converted to (if the
   //        reader thinks they are from a different coordinate
   //        system), or tagged with.  The value is any valid
   //        FME coordinate system name.<br>
   //        This allows the caller to dictate the coordinate system that
   //        the features should be returned in.
   // </dd>
   // <dt><b>"IDLIST"</b> (C++ Constant: kFME_IDList)</dt>
   // <dd>   This directive takes an SDF formatted list of "IDs" which will limit
   //        the tables being read by the reader.<br>
   //        This allows the caller to limit the tables that will be read in.
   //        For example, the list may contain the basenames of the 
   //        shape files which should be read from a directory.
   // </dd>
   // <dt><b>"DEFLINE"</b> (C++ Constant: kFME_DEFLine)</dt>
   // <dd>   This directive takes an unparsed character string which contains an entire
   //        DEF line to add to any others which will be used.
   //        (The value should not include the first "KEYWORD_DEF" token.)<br>
   //        This allows the caller to specify DEF lines that the reader should 
   //        use in conjunction with any others that may be automatically read 
   //        from the "metafiles/KEYWORD_reader_def.fmi" file.
   // </dd>
   // <dt><b>"OUTPUT_STATS"</b> (C++ Constant: kFME_OutputStats)</dt>
   // <dd>   This directive takes a value of YES or NO.  If NO, then no writer statistics are
   //        output to the log file.  The default is YES.<br>
   //        This allows the caller to turn off some statistic logging that
   //        writers normally do.
   // </dd>
   // <dt><b>"SCHEMA_FORMAT_ATTRIBUTES"</b> (C++ Constant: kFME_SchemaFormatAttributes)</dt>
   // <dd>   This directive takes a value of YES or NO.  If YES, then any readSchema calls on
   //        the reader will contain the format attributes for that reader on the returned
   //        schema features.  The default is NO.<br>
   // </dd>
   // <dt><b>"--&lt;macro_name &gt;"</b></dt>
   // <dd>
   //        Any directive that begins with two dashes is considered to
   //        be a macro name that will be set for use within the canned 
   //        DEF files used by the reader (&lt;readerName&gt;_reader_def.fmi).
   //        For example, if a directive name "--MySetting" with a value 
   //        of "Yes" is given, then the macro "MySetting" will be given
   //        a value of "Yes", for use within the DEF file.</p>
   // </dd>   
   // </dl>*/
   virtual IFMEUniversalReader* createReader(const char* readerName,
                                             const FME_Boolean cacheFeatures,
                                             const IFMEStringArray* directives) const = 0;
   
   //-------------------------------------------------------------------
   /*! This method is called when the reader is no longer needed.
   // IT MUST BE CALLED FOR EACH READER RETURNED BY createReader.     */
   virtual void destroyReader(IFMEUniversalReader*& reader) const = 0;
   

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -