📄 isession.h
字号:
//-------------------------------------------------------------------
/*! This method creates an FME writer to write data to a format
// or system. Only the writer's type mneumonic, as found in
// the FME Reference Manual Part II, need be passed in.
// Any parameters needed for the writer will be passed
// to it via its `open' call.
//
// The final parameter 'directives' is where the user specifies
// one or more additional directives to the writer. 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.
//
// All the directives applicable to the reader are allowed
// for the writer. However, the writer will ignore the IDLIST directive.
// It also interprets the user pipeline directive in a slightly
// different way -- for the writer, features are sent through the
// user pipeline BEFORE being sent to the output writer. */
virtual IFMEUniversalWriter* createWriter(const char* writerName,
const IFMEStringArray* directives) const = 0;
//-------------------------------------------------------------------
/*! This method is called when the writer is no longer needed.
// IT MUST BE CALLED FOR EACH WRITER RETURNED BY createWriter. */
virtual void destroyWriter(IFMEUniversalWriter*& writer) const = 0;
//-------------------------------------------------------------------
/*! This method Creates a feature vector -- the vector that is returned
// MUST be freed eventually by the destroyFeatureVector function */
virtual IFMEFeatureVector* createFeatureVector() const = 0;
//-------------------------------------------------------------------
/*! This method destroys a feature vector previously created by
// createFeatureVector. This does not delete the features that are in
// the vector. If you want the features in the vector to be deleted
// then you must call the clearAndDestroy() method on IFMEFeatureVector
// before calling this function. */
virtual void destroyFeatureVector(IFMEFeatureVector*& featVect) const = 0;
//-------------------------------------------------------------------
/*! This method creates an instance of a feature which is used
// throughout the system to contain both geometric and attribute
// data. See the IFMEFeature header file for a complete description
// of the services available on a feature object. */
virtual IFMEFeature* createFeature() const = 0;
//-------------------------------------------------------------------
/*! This method is used to delete features. Any feature allocated
// by createFeature must be freed by this function. */
virtual void destroyFeature(IFMEFeature*& feature) const = 0;
//-------------------------------------------------------------------
/*! This method returns a new factory pipeline object.
// Directives can be specified using the directives string array.
//
// An empty string array or a null pointer can be used to specify
// that no directives are present.
//
// The supported directives are:
// <dl>
// <dt><b>"--<macro_name>"</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 pipeline.
// 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 pipeline.
// </dd>
// </dl> */
virtual IFMEFactoryPipeline* createFactoryPipeline(const char* pipelineName,
const IFMEStringArray* directives) const = 0;
//-------------------------------------------------------------------
/*! This method is used to destroy factory pipelines created by .
// createFactoryPipeline */
virtual void destroyFactoryPipeline(IFMEFactoryPipeline*& factoryPipeline) const = 0;
//-------------------------------------------------------------------
/*! This method returns a new factory object. */
virtual IFMEFactory* createFactory() const = 0;
//-------------------------------------------------------------------
/*! This method destroys a factory previously created by createFactory. */
virtual void destroyFactory(IFMEFactory*& factory) const = 0;
//-------------------------------------------------------------------
/*! This method creates a string array -- the array that is returned
// MUST be freed eventually by the destroyStringArray function */
virtual IFMEStringArray* createStringArray() const = 0;
//-------------------------------------------------------------------
/*! This method destroys a string array previously created by
// createStringArray */
virtual void destroyStringArray(IFMEStringArray*& stringArray) const = 0;
//-------------------------------------------------------------------
/*! This method creates an FMEString instance -- the string that is
// returned MUST be freed eventually by the destroyString function.*/
virtual IFMEString* createString() const = 0;
//-------------------------------------------------------------------
/*! This method destroys a string previously created by createString.*/
virtual void destroyString(IFMEString*& string) const = 0;
//-------------------------------------------------------------------
/*! This method creates a dialog object.
// If successful the pointer is set to the new dialog object,
// and zero is returned. If the operation fails then an error
// number is returned and the pointer is set to NULL. */
virtual FME_MsgNum createDialog(IFMEDialog*& dialog) const = 0;
//-------------------------------------------------------------------
/*! This method destroys a previously created dialog object setting
// the dialog object to NULL. */
virtual void destroyDialog(IFMEDialog*& dialog) const = 0;
//-------------------------------------------------------------------
/*! This method returns the logfile object used for the session.
// The caller must not delete it. */
virtual IFMELogFile* logFile() const = 0;
//-------------------------------------------------------------------
/*! This method returns the Coordinate System Manager object used
// for the session. The caller must not delete it. */
virtual IFMECoordSysManager* coordSysManager() const = 0;
//-------------------------------------------------------------------
/*! This method adds a new keyword and value to the session configuration. */
virtual FME_MsgNum updateSettings(const char* keyword,
const char* value) = 0;
//-------------------------------------------------------------------
/*! This method returns a detailed error message that corresponds to
// the last error message of the session. It should only be called
// after any object in FMEObjects returns an error status. */
virtual const char* getLastErrorMsg() const = 0;
//-------------------------------------------------------------------
/*! This method returns the error number associated with the message
// returned by getLastErrorMsg. It should only be called after any
// object in FMEObjects returns an error status. */
virtual FME_MsgNum getLastErrorNum() const = 0;
//-------------------------------------------------------------------
/*! This method has no value to clients and is merely an
// interface for Safe Software as a help in solving problems. It
// should not be called when no error status has been returned. */
virtual const char* getLastErrorStackTrace() const = 0;
//--------------------------------------------------------------------
/*! This method returns the home directory of the FME. That is the
// directory into which the FME was installed. The client must free
// the returned string when finished with it.*/
virtual const char* fmeHome() const = 0;
//--------------------------------------------------------------------
/*! This method returns the current FME version string. */
virtual const char* fmeVersion() const = 0;
//--------------------------------------------------------------------
/*! This method returns the current FME build number. */
virtual FME_UInt32 fmeBuildNumber() const = 0;
//--------------------------------------------------------------------
/*! This method is used to pass configuration information
// the the session. One use of this is to define configuration
// lines for functions. */
virtual FME_MsgNum configure(const IFMEStringArray &configRow) = 0;
//-------------------------------------------------------------------
/*! This method returns a new spatial index object which
// stores the features in a file named fileName so as not
// to keep all features in the index in memory. This enables
// users of FME Objects to work with large datasets in
// an efficient manner.
// If NULL is returned then the index could not be created and the
// application should use the getLastError*() functions
// to retrieve the error.
//
// The fileName indicates which spatial index to open for
// reading or the location of where the new spatial index
// will be created. "fileName" is the full path of the
// file without extension. Each spatial index will have
// two files named:
// <dl><dt><fileName>.ffs</dt>
// <dd> The actual feature coordinates and attributes.</dd>
// <dt><fileName>.fsi</dt>
// <dd> The spatial index also stored on disk.</dd>
// </dl>
//
// The accessMode indicates the intended use of the spatial
// index. Valid values are restricted to:
// <dl>
// <dt><b>"READ"</b></dt>
// <dd>Open an existing spatial index and extract data from it.
// Data cannot be written in this mode.</dd>
// <dt><b>"WRITE"</b></dt>
// <dd>Create a new spatial index. In this case data can be
// written only. Features cannot be updated or deleted however.</dd>
// <dt><b>"UPDATE"</b></dt>
// <dd>For future versions.</dd>
// </dl>
//
// Destruction: The spatial index is destroyed via the session object
// as well.
//
// The final parameter 'directives' is where the user specifies
// one or more additional directives to the spatial index. 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>"PASSPHRASE"</b> (C++ Constant: kFME_SIPassphrase)</dt>
// <dd> This directive takes a spatial index passphrase as input<br>
// The spatial index passphrase allows users to restrict access
// to spatial index files. If a passphrase directive is used when
// a spatial index is created, this passphrase must also be supplied
// in future attempts to open the spatial index. A spatial index
// cannot be opened if it was created with a passphrase and an
// incorrect passphrase is given when reading is attempted.
// If this directive is not provided, no passphrase is applied to
// the spatial index and all future attempts to read the spatial
// index also do not need to specify a passphrase.
// Passphrases may be any character string of any length or content.
// </dd>
// <dt><b>"BYTE_ORDER"</b> (C++ Constant: kFME_SIByteOrder)</dt>
// <dd> Three values are valid for this directive at this time:
//
// <dl><dt>"NATIVE" (C++ Constant: kFME_SINative)</dt>
// <dt>"LITTLE_ENDIAN" (C++ Constant: kFME_SILittleEndian)</dt>
// <dt>"BIG_ENDIAN" (C++ Constant: kFME_SIBigEndian)</dt>
// </dl><br>
// This directive indicates what byte order the spatial index file should
// use when creating a new index. The default value, if this is not
// specified, is NATIVE, which creates a spatial index with the same
// byte ordering as the machine on which it is run. The value of
// LITTLE_ENDIAN will create a little-endian byte ordered spatial index.
// The value of BIG_ENDIAN will create a big-endian byte ordered spatial index.
// Both types of spatial index files can be read back on any machine, but
// there is a significant performance penalty in reading/writing spatial index
// files that do not match the byte order of the machine on which the process
// is running. (This directive is not used when reading an existing spatial index.)
// </dd>
// </dl>
*/
virtual IFMESpatialIndex *createSpatialIndex(const char* fileName,
const char* accessMode,
const IFMEStringArray *directives) = 0;
//-------------------------------------------------------------------
/*! This method destroys a previously created spatial index. */
virtual void destroySpatialIndex(IFMESpatialIndex* &spatInd) = 0;
//-------------------------------------------------------------------
/*! This method returns a new rectangle object. */
virtual IFMERectangle *createRectangle(FME_Real64 minX, FME_Real64 maxX,
FME_Real64 minY, FME_Real64 maxY) = 0;
//-------------------------------------------------------------------
/*! This method destroys a previously created rectangle object. */
virtual void destroyRectangle(IFMERectangle* &rectangle) = 0;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -