📄 fmetypes.h
字号:
#ifndef FMETYPES_H
#define FMETYPES_H
// $Id: fmetypes.h,v 17.10.2.1 2006/03/15 02:40:46 ryan Exp $
/*! \file fmetypes.h
\brief FME DevKit Types
*/
/*! \internal
============================================================================
Name : fmetypes.h
System : FME Developer Kit
Language : C++
Purpose : Declaration of FME Developer Kit types
Author Date Changes made
------------------ ------------ -------------------------------
Dale Lutz Jul 22, 1997 Original definition
Dale Lutz Aug 20, 1997 Use FME_MsgNum as return type
for DLL entry points
Dale Lutz Oct 14, 1997 Added functions and factories
Graeme Hiebert Dec 18, 1997 Upped version number after changing
IFMEStringArray interface.
Dale Lutz Sep 07, 1998 Upped version number after changing
factory bridge interface AND moved
message severity enum in here
Kevin Wiebe Oct 05, 1999 Added CoordSysManager
Kevin Wiebe Oct 07, 1999 Added FME_OrientationRule
Kevin Wiebe Jan 19, 2000 Moved some setconstraints defs in here.
Kevin Wiebe Feb 02, 2000 Added DEFLINE
Juan Chu Chow Mar 15, 2000 Added fme_all_features
Don Murray Apr 29, 2000 Added new types rectangle and
rectangle vector for C interface.
Dale Lutz Apr 20, 2001 Added constants for IFMEFeature::processFeatures
Hieu Nguyen Feb 02, 2002 Made kFME_noCoordinate static
Kevin Wiebe Feb 04, 2002 Added PASSPHRASE and BYTE_ORDER support
Dale Lutz Feb 27, 2002 Added kFMERead_EnvelopeOrderResults
Hieu Nguyen Mar 06, 2002 Added kFME_PolygonDissolve
Hieu Nguyen Mar 12, 2002 Added kFME_PropSpatialIndex
Hieu Nguyen May 28, 2002 Added FME_FEAT_VECT_ON_DISK_HANDLE for C API
Juan Chu Chow Sep 18, 2002 Added constants for the IFMEDialog::getFormatInfoEx() method.
Juan Chu Chow Nov 01, 2002 Added kFMERead_SpecificFeature and kFMERead_Index.
Juan Chu Chow Nov 08, 2002 Added kFME_PropCache,
kFME_CacheEntries,
kFME_CacheMinX, kFME_CacheMaxX,
kFME_CacheMinY, kFME_CacheMaxY,
kFME_CacheMinZ, kFME_CacheMaxZ
Juan Chu Chow Nov 12, 2002 Added kFME_CacheCoordSys
Philipp Svehla Feb 26, 2003 Added the following constants for reading metadata:
kFMERead_Metadata
kFMERead_FeatureIdentifier
kFMERead_GeometryType
kFMERead_ContainsSpatialColumn
kFMERead_Dimension
kFMEMinX
kFMEMinY
kFMEMaxX
kFMEMaxY
kFMEYes
kFMENo
Philipp Svehla Mar 03, 2003 Added the following constants for reading metadata:
kFMEMinZ
kFMEMaxZ
Philipp Svehla Mar 05, 2003 Removed the kFMERead_GeometryType constant and replaced
it with the kFMERead_Geometry constant.
Juan Chu Chow Mar 12, 2003 Added kFME_PersistentCache.
Philipp Svehla Mar 19, 2003 Added kFMERead_NumEntries for reading metadata.
Juan Chu Chow Mar 26, 2003 Added kFME_ReaderName, kFME_CachedSeconds,
kFME_MaxEntries, kFME_NumToClear, kFME_MaxTotalSize.
Juan Chu Chow Apr 09, 2003 Added kFME_PersistentCacheName,
kFME_PropPersistentCacheLoaded.
Removed kFME_PropCache, kFME_CacheEntries, kFME_CacheMinX, kFME_CacheMaxX,
kFME_CacheMinY, kFME_CacheMaxY, kFME_CacheMinZ, kFME_CacheMaxZ, kFME_CacheCoordSys
Don Murray May 21, 2003 Added licensing property for session
Ryan Proulx Jun 17, 2003 Added setConstraints keywords
Ryan Proulx Jun 23, 2003 Added fetchFeatureTypeMode keywords
Ryan Proulx Jun 24, 2003 Added setConstraints fme_db_join keywords
Regan Proulx Jun 25, 2003 Added kFME_gridInvalidDataValue... constants
Hieu Nguyen Jun 26, 2003 Added kFME_PersistentCachePath (PR2694)
Juan Chu Chow Nov 11, 2003 Added kFME_CacheSpatialIndexAttribute,
kFMERead_SpatialIndexSearchKeys.
Juan Chu Chow Nov 12, 2003 Added kFME_InterpolateNonLinearGeometry.
Juan Chu Chow Nov 14, 2003 Added kFME_FileToTrack
Khalid Khan Dec 02, 2003 Added kFME_EntangleAttributes
Juan Chu Chow Dec 12, 2003 Added kFME_True, kFME_False, and kFME_PropCoordSysAware.
Juan Chu Chow Dec 19, 2003 Added kFME_UniqueIDPerTheme
Juan Chu Chow Dec 22, 2003 Added kFME_SessionPropFormats,
kFME_SessionPropFormatInfo and kFME_FormatName.
Khalid Khan Dec 22, 2003 Added kFME_setAliasAttribute
Ryan Proulx Jan 07, 2004 RT8402 - Added kFMEKeywordOnlyFetch keyword
Juan Chu Chow Feb 02, 2004 Added kFME_PropPersistentCacheFeaturesLoaded and
kFME_PropPersistentCacheSchemasLoaded
Juan Chu Chow Feb 05, 2004 Added attribute name constants for some dynamic
reconfiguration for the LabelFactory.
Philipp Svehla Feb 24, 2004 Added constant kFME_text_size.
Ryan Proulx Feb 25, 2004 Added fme_db_writer_mode constants.
Ryan Proulx Mar 03, 2004 Added kFMERead_FMEType constant, kFMERead_Where.
Juan Chu Chow Mar 11, 2004 Removed the attribute name constants for
the LabelFactory. There are no need for
constants, since the attributes carrying
the values for these constants may now
be specified in the LabelFactory clauses.
Tom Weir May 17, 2004 Added type definitions for the part iterator
and persistent cache handles.
Hieu Nguyen Jun 16, 2004 Added disconnected editing related constants
Harbinder Saggu Jun 21, 2004 PR#5086 - Added constant for "fme_prop_persistent_cache_valid"
Hieu Nguyen Jul 22, 2004 Added disconnected editing callback, and status
enumeration
Hieu Nguyen Jul 26, 2004 Added IFMEDEKey directives
Harbinder Saggu Jul 27, 2004 Interop - Added constant for ORIENTATION_RULE.
Zheng Wang Aug 05, 2004 Added more constants for FME License Manager
Hannah Valbonesi Oct 25, 2004 Renamed all instances of 'grid' to 'raster'.
Kaustav Mukherjee Nov 16, 2004 Added the internal tag to hide this revision control part.
Philipp Svehla Dec 08, 2004 PR#5891. Added constants for feature based transactions.
Kevin Wiebe Jan 31, 2005 Added FME_NAN definitions.
Zheng Wang Jan 28, 2005 Added kFME_SharedWriter constant.
Graeme Hiebert Feb 16, 2005 (PR#6333) Added kFMERead_Extents and
kFMERead_CoordSystem.
Zheng Wang Feb 24, 2005 Added kFME_OpenUponWrite.
Philipp Svehla Mar 07, 2005 Removed kFME_OpenUponWrite.
Ryan Proulx Apr 18, 2005 BUG6645: Added kFMEDBInheritFromWriter constant.
Peter Leung May 13, 2005 PR#6650: Added constants for IFMEFeature
Serialize and Deserialize
Peter Leung Jun 16, 2005 Added constants for visualizer transformer workspace.
Zheng Wang Jun 21, 2005 PR#6918: Added kFME_FormatType.
Aaron Cox Jul 21, 2005 PR#6994 -- Removed kFME_SetRaster and kFME_GetRasterInfo.
Peter Leung Aug 08, 2005 PR#6650: Added kFME_FeatureSerializeExcludeAttr
Angus Lau Sep 01, 2005 Moved some public raster types from fmerasterpriv.h to here.
Regan Proulx Sep 07, 2005 Added some consts to methods of color model structs.
Zheng Wang Sep 22, 2005 Added constants for using text stroker in universal
reader.
Aaron Cox Sep 28, 2005 Added C API handles for new geometry classes.
Aaron Cox Oct 06, 2005 Added FMECoord2D and FMECoord3D structs. PR#7931
Hieu Nguyen Nov 02, 2005 Added kFME_TransformerParameterNames and kFME_TransformerRemoveParameterName.
Zheng Wang Nov 23, 2005 Fixed PR# 8515.
Hannah Valbonesi Jan 05, 2005 Moved definitions for machine and flipped endian here from fmerasterpriv.
Brittany Nielsen Feb 2, 2006 PR#8447 - Renamed 'FME_RasterEndianness' to
'FME_ByteOrder'
Brittany Nielsen Feb 23, 2006 PR#8447 - Renamed 'FME_RASTER_MACHINE_ENDIAN' to
'FME_RASTER_MACHINE_BYTE_ORDER'
Hannah Valbonesi Feb 23, 2006 PR#8981: Moved several constants from fmerasterpriv.h, for use in the viewer.
Angus Lau Feb 27, 2006 Added reset() to the color model types.
Ryan Proulx Feb 25, 2006 BUG8711: Depricated rowMajor().
Ryan Proulx Feb 25, 2006 BUG8711: Added getAccessPattern().
Copyright (4) 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.
*/
/* This file contains type definitions which are used throughout the FME
developer kit.
*/
// REG jun16,2003 - added float and limits includes for max, min constants
#include <float.h>
#include <limits.h>
#include <math.h>
#ifdef WIN32
#pragma warning(disable:4711)
#endif
// -------------------------------------------------------------------------
/*! Primitive definitions */
// Use C style enums as they work with both C and C++ (dcm Jun 6 '99)
typedef enum {FME_FALSE=0, FME_TRUE=1} FME_Boolean;
typedef char FME_Int8;
typedef short FME_Int16;
typedef unsigned char FME_UInt8;
typedef unsigned short FME_UInt16;
typedef float FME_Real32;
typedef double FME_Real64;
#ifdef __alpha
// On the alpha, we need a different
// definition of the int32s -- longs on the alpha
// are 64 bits!
typedef unsigned int FME_UInt32;
typedef int FME_Int32;
#else
typedef unsigned long FME_UInt32;
typedef long FME_Int32;
#endif
// -------------------------------------------------------------------------
/*! The type of the "key" to a messages file */
typedef FME_UInt32 FME_MsgNum;
// -------------------------------------------------------------------------
/*! The type of the return value from Plug-in entry points and methods */
typedef FME_MsgNum FME_Status;
#define FME_SUCCESS 0
#define FME_FAILURE 1
// -------------------------------------------------------------------------
/*! Possibilities for log message severity -- this is logged with the message
// to the logfile. Messages of level FME_STATUSREPORT are NOT logged
// to the logfile, but will be displayed in the FME GUI's status bar. */
// Be explicit about the first being zero. No change in value just
// make it explicit.
typedef enum { FME_INFORM = 0,
FME_WARN = 1,
FME_ERROR = 2,
FME_FATAL = 3,
FME_STATISTIC = 4,
FME_STATUSREPORT = 5} FME_MsgLevel;
// -------------------------------------------------------------------------
/*! Geometry type enumeration definition (See description in ifeature.h) */
typedef enum { FME_GEOM_UNDEFINED = 0,
FME_GEOM_POINT = 1,
FME_GEOM_LINE = 2,
FME_GEOM_POLYGON = 4,
FME_GEOM_DONUT= 8,
FME_GEOM_PIP = 256, // point in polygon
FME_GEOM_AGGREGATE = 512 // collection of things!
} FME_GeometryType;
// -------------------------------------------------------------------------
/*! Possibilities for feature dimension */
typedef enum { FME_TWO_D = 2, FME_THREE_D = 3} FME_Dimension;
// -------------------------------------------------------------------------
/*! Possibilities for polygon orientation */
typedef enum { FME_RIGHT_HAND_RULE, FME_LEFT_HAND_RULE } FME_OrientationRule;
// -------------------------------------------------------------------------
/*! This value is returned when a coordinate at an invalid index is
// asked for by the IFMEFeature::get?Coordinate method */
static const FME_Real64 kFME_noCoordinate = -999999.9999999;
// -------------------------------------------------------------------------
/*! Some methods may make use of the concept of a "quiet" NAN */
#include <stdlib.h>
// [GEH 2005/08/16] Only do this part if we are in C++ when on UNIX.
// The whole use of C++ constructs doesn't work right on UNIX, and thus far
// no FME_NAN is needed in any UNIX C programs that I know of.
#if defined(__cplusplus)
#ifdef WIN32
# include <limits>
using std::numeric_limits;
#endif
// Make a definition of NaN that unix and NT can live with
#ifdef __alpha
// This actually makes infinity, but for our purposes
// it is fine.
const double FME_NAN = 1.0/0.0;
#elif defined(NAN)
static const double FME_NAN = NAN;
#elif defined(linux)
const double FME_NAN = fmod(1.0,0.0);
#elif defined(__SUNPRO_CC) || (defined(__GNUC__) && (__GNUC__ >= 3))
#include <sys/time.h> // [GEH 2005/03/09] Needed for Solaris for some reason...
#include <limits>
#ifdef __SUNPRO_CC
// Sun's compiler doesn't like static references inside of template
// instantiations, so we have to make true globals out of things
// like FME_NAN.
extern const double FME_NAN;
#elif defined(__GNUC__) && (__GNUC__ >= 3) && !defined(NAN)
const double FME_NAN = std::numeric_limits<double>::quiet_NaN();
#endif
#elif defined(__GNUC__)
const double FME_NAN = 0.0/0.0;
#elif defined(WIN32)
#if _MSC_VER >= 1300
// On VC++ 2003.NET we use this way of getting NAN
// July 25, 2003 - kevin - don't know any tricky "limits" way to get this. :)
const double FME_NAN = log(-1.0);
#elif _MSC_VER >= 1100
// On VC++ 5 we use this way of getting NAN
const double FME_NAN = std::numeric_limits<double>::quiet_NaN();
#else
// On VC++ 4 we use this way of getting NAN
const double FME_NAN = numeric_limits<double>::quiet_NaN();
#endif
// Now, this way works but it causes GeoExchange to blow up
// const double FME_NAN = fmod(1.0,0.0);
#else
// Non-GNU compilers like fmod better
const double FME_NAN = fmod(1.0,0.0);
#endif
#endif // __cplusplus || WIN32
// -------------------------------------------------------------------------
// REG jun12,2003:
// This value is returned when a grid value at an invalid index is
// asked for by a factory or plugin through the IFMEGrid::getPoint,
// IFMEGrid::getRow, IFMEGrid::getColumn, or IFMEGrid::getBlock methods
// [HV 10/25/2004] Changed 'grid' to 'raster' in constants
static const FME_Real64 kFME_rasterInvalidDataValueReal64 = -1*DBL_MAX;
static const FME_Real32 kFME_rasterInvalidDataValueReal32 = -1*FLT_MAX;
static const FME_Int32 kFME_rasterInvalidDataValueInt32 = INT_MIN;
static const FME_Int16 kFME_rasterInvalidDataValueInt16 = SHRT_MIN;
static const FME_Int8 kFME_rasterInvalidDataValueInt8 = SCHAR_MIN;
static const FME_UInt32 kFME_rasterInvalidDataValueUInt32 = UINT_MAX;
static const FME_UInt16 kFME_rasterInvalidDataValueUInt16 = USHRT_MAX;
static const FME_UInt8 kFME_rasterInvalidDataValueUInt8 = UCHAR_MAX;
// The various handles that are used by the C API.
typedef unsigned long FME_SESSION_HANDLE ;
typedef unsigned long FME_READER_HANDLE;
typedef unsigned long FME_WRITER_HANDLE;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -