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

📄 ipipeline.h

📁 GIS格式转换软件vc源码.GIS格式转换软件vc源码.
💻 H
字号:
#ifndef IFME_FACTORY_PIPELINE_H
#define IFME_FACTORY_PIPELINE_H
// $Id: ipipeline.h,v 17.1 2006/01/30 23:08:08 ogibbins Exp $
/*! \file ipipeline.h
    \brief Defines the IFMEFactoryPipeline interface.
*/
/*! \internal
===================================================================

   Name     : ipipeline.h

   System   : FMEObjects

   Language : C++

   Purpose  : Declaration of IFMEFactoryPipeline class

   
   Author               Date            Changes made
   ------------------   ------------    -----------------------------
   Don Murray           May 12, 1999    Original definition
   Tom Weir             Jun 01, 2004    Fixed documentation.
   Kaustav Mukherjee    Nov 16, 2004    Added the internal tag to hide this revision control part.
   Owen Gibbins         Jan 20, 2006    Added getErrorMessage().

                  Copyright (c) 1994 - 2006 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.  Although
    Safe Software Incorporated has used considerable efforts in preparing 
    the Software, Safe Software Incorporated does not warrant the
    accuracy or completeness of the Software. 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 IFMEFactoryPipeline 
    \brief Pipeline class

    This provides the abstract class interface to the FME Factory
    pipeline capabilities enabling FMEObject based programs to
    exploit the factory processing power of the FME.

*/

// parent class include
#include "fmetypes.h"

// class declarations
class IFMEFeature;
class IFMEFactory;

// Typedefs which define the signature that the callback
// function for the pipelines must have.  When a feature
// is passed to the callback, the callback function then
// owns the feature and is responsible for freeing the
// feature or passing it back to the FMEObject system.

// An example function signature is
// FME_MsgNum processOutputFeature(IFMEFeature *feature, void *data);
typedef FME_MsgNum (*FMEPipelineCallback)(IFMEFeature* feature, void* clientData);

//===================================================================
// Interface class
class IFMEFactoryPipeline
{
public:

   // -----------------------------------------------------------------------
   /*! This method is used to specify configuration lines for
   // functions such as @Lookup, @Relate, and @Sql, which require
   // configuration information to operate.
   */
   virtual FME_MsgNum configureFunction(const IFMEStringArray& functionConfig) = 0;

   // -----------------------------------------------------------------------
   /*! This method is used to add a new factory to the end of the
   // factory pipeline.
   // The factory to be added is specified as a set of tokens; one token for 
   // every whitespace-delimited string in the factory definition.
   // Each token is represented as one entry in the 'factoryDef' parameter.
   //
   // For example, the PolygonFactory show below is be specified using 20 
   // tokens:
   //
      <PRE>
           FACTORY_DEF * PolygonFactory
           FACTORY_NAME SamplePolygon
           INPUT FEATURE_TYPE *
           GROUP_BY someAttr_
           VERTEX_NODED
           REMOVE_CORRIDORS
           OUTPUT POLYGON FEATURE_TYPE poly
           OUTPUT LINE    FEATURE_TYPE line
      </PRE>
   //
   // If successful, this method returns 0; otherwise a non-zero
   // error number is returned.
   */
   virtual FME_MsgNum addFactory(const IFMEStringArray& factoryDef) = 0;

   // -----------------------------------------------------------------------
   /*! This method is used to add a new factory to the end of the
   // factory pipeline.
   // The 'factoryDef' parameter specifies the factory to be added as an ASCII 
   // character string.
   // The 'delimiter' parameter specifies the string to be used as delimiter 
   // when parsing the 'factoryDef' string for tokens.
   //
   // If successful, this method returns 0; otherwise a non-zero error number 
   // is returned.                                                         */
   virtual FME_MsgNum addFactory(const char* factoryDef,
                                 const char* delimiter = " ") = 0;

   // -----------------------------------------------------------------------
   // This method takes a factory object and adds it to the pipeline.
   // Upon return the client still owns the factory object enabling it to be 
   // used for other pipelines if necessary.
   //
   virtual FME_MsgNum addFactory(const IFMEFactory& factory) = 0;

   // -----------------------------------------------------------------------
   /*! This method is used to add a set of factories to the end of the
   // factory pipeline.
   // The 'factoryDefFile' parameter specifies the name of a file containing
   // the factory definitions.
   //
   // If successful, this method returns 0; otherwise a non-zero error number 
   // is returned.                                                         */
   virtual FME_MsgNum addFactories(const char* factoryDefFile) = 0;

   // -----------------------------------------------------------------------
   /*! This method is used to insert a feature into the pipeline for processing.
   // The 'feature' parameter is an in/out parameter.
   // On output, 'feature' is returned void of all attributes and geometry.*/
   virtual FME_MsgNum processFeature(IFMEFeature& feature) = 0;

   // -----------------------------------------------------------------------
   /*! This method is used to fetch a feature ready for output from
   // the pipeline.
   // If no feature is ready for output, the 'endOfPipeline' parameter is set 
   // to FME_TRUE; otherwise it is set to FME_FALSE.
   // This method should not be used if the setCallback() method has been 
   // called on the pipeline. If a callback function has been specified, 
   // this method will always set the 'endOfPipeline' parameter to FME_TRUE.*/
   virtual FME_MsgNum getOutputFeature(IFMEFeature& feature,
                                       FME_Boolean& endOfPipeline) = 0;

   // -----------------------------------------------------------------------
   /*! This method is used to indicate that no more features will be entering 
   // the pipeline.
   // Any factories in the pipeline that are still holding features will 
   // release them when this method is called.
   // This method can only be called once on per pipeline.                 */
   virtual FME_MsgNum allDone() = 0;   

   // -----------------------------------------------------------------------
   /*! This method is used to specify the name of a fuction that will be 
   // called by the pipeline when a feature is ready for output. If a 
   // callback function is  specified, features must not be retrieved using 
   // the getOuptuFeature() method.                                        */
   virtual FME_MsgNum setCallback(FMEPipelineCallback func, 
                                  void* clientData) = 0;

   //----------------------------------------------------------------
   /*! If allDone returns an error, the whole message produced
   // can be retrieved with this method.                                   */
   virtual void getErrorMessage(IFMEString& msg) = 0;

protected:
   // -----------------------------------------------------------------------
   // Constructor
   IFMEFactoryPipeline() {};

   // -----------------------------------------------------------------------
   // Destructor
   virtual ~IFMEFactoryPipeline() {};

private:
   // -----------------------------------------------------------------------
   // Copy constructor
   IFMEFactoryPipeline(const IFMEFactoryPipeline &other);

   // -----------------------------------------------------------------------
   // Assignment operator
   IFMEFactoryPipeline &operator=(const IFMEFactoryPipeline &other);
};

#endif

⌨️ 快捷键说明

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