📄 ifeature.h
字号:
#ifndef FMEFEAT_H
#define FMEFEAT_H
// $Id: ifeature.h,v 17.1 2005/12/20 18:55:51 geh Exp $
/*! \file ifeature.h
\brief Defines the IFMEFeature interface.
*/
/*! \internal
============================================================================
Name : ifeature.h
System : FME Developer Kit
Language : C++
Purpose : Declaration of IFMEFeature
Author Date Changes made
------------------ ------------ -------------------------------
Dale Lutz Jul 22, 1997 Original definition
Dale Lutz Aug 22, 1997 Added sequenced attribute supply
Kevin Wiebe Oct 30, 1997 Added removeAttribute
Kevin Wiebe Jul 07, 1998 Added more overloaded functions
Don Murray Jun 18, 1999 Added reset method.
Kevin Wiebe Jun 25, 1999 Added the following methods from ifeatproc.h
clone, cloneAttributes, mergeAttributes,
rotate2D, scale, offset, convertArcToPoints,
convertPointsToArc, interpolateSpline,
boundingBox, boundingCube,
generatePointInPolygon, chopUp
Don Murray Jul 09, 1999 Added getListAttribute, and
setListAttribute methods.
Kevin Wiebe Oct 06, 1999 Added getSequencedAttributeList
Kevin Wiebe Oct 07, 1999 Added new set/getAttribute methods to handle
attribute names with embedded nulls. (DBCS)
Kevin Wiebe Oct 07, 1999 Added the recurse option to splitAggregate
Kevin Wiebe Oct 07, 1999 Added orient
Don Murray Dec 24, 1999 Added Reproject, exportGeometryToOGCWKT,
importGeometryFromOGCWKT, exportGeometryToOGCWKB,
buffer, outerShell, and importGeometryFromOGCWKB.
Kevin Wiebe Jun 19, 2000 Added getAllCoordinates and addCoordinates
Dale Lutz Apr 06, 2001 Extended getListAttribute to support
"structured lists" (see docs below)
Dale Lutz Apr 20, 2001 Added IFMEFeature::processFeatures
Hieu Nguyen Feb 21, 2002 Added getBooleanAttribute, setBooleanAttribute
Hieu Nguyen Mar 06, 2002 Updated comments for processFeatures to include
polygon dissolve capability
Kevin Wiebe Mar 28, 2002 Added processFeaturesOnDisk
Khalid Khan Feb 19, 2003 Added matrixTransform
Juan Chu Chow Mar 13, 2003 Fixed scale default. changed to 1 from 0. PR 1796
Don Murray Jun 13, 2003 Added getChainIterator method.
Kevin Wiebe Aug 27, 2003 Renamed getChainIterator to getPartIterator.
Juan Chu Chow Jan 19, 2004 Added removeListAttribute.
Juan Chu Chow Mar 10, 2004 Change comments for the aggregate features, users
should not manually step through the encoded coordinate
values of aggregates, it is error-prone.
Dale Lutz Apr 03, 2004 Moved removeListAttribute to the bottom
of the functions to avoid requiring
existing plugins to be recompiled.
Tom Weir May 17, 2004 Added comment for destroyPartIterator.
Kevin Wiebe Jul 21, 2004 Added serialize/deserialize
Tom Weir Aug 01, 2004 Fixed documentation.
Kaustav Mukherjee Nov 16, 2004 Added the internal tag to hide this revision control part.
Kaustav Mukherjee Feb 17, 2005 Changed serialize and deserialize to take
unsigned char * buffers as parameters
Peter Leung May 09, 2005 Added parameter options for serialize and deserialize (PR 6650)
Rei Thiessen Jun 09, 2005 Added peekGeometry()
Aaron Cox Jun 13, 2005 Added convertAnyArcToPoints()
Kevin Wiebe Jun 24, 2005 Removed access to the GeometryManager
Aaron Cox Aug 18, 2005 Removed peekGeometry(). Added hasRichGeometry().
Aaron Cox Sep 19, 2005 Renamed takeGeometry() to removeGeometry() and added
getGeometry(). PR#7759
NOTE -- ANY NEW METHODS MUST BE ADDED AT THE BOTTOM TO AVOID REQUIRING
RECOMPILATION OF EXISTING PLUGINS OR PROGRAMS THAT USE THIS OBJECT
Copyright (c) 1994 - 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. 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 IFMEFeature
\brief Feature class
This file defines the interface that subclasses of this class MUST
follow.
Developers MUST NOT implement their own subclasses of this, instead,
the FME will ALWAYS provide them with the subclass instance they
should be using.
*/
#include "fmetypes.h"
//===========================================================================
// Abstract Interface Class -- all methods are virtual and it has no data
class IFMEFeatureVector;
class IFMEFeatureVectorOnDisk;
class IFMEPartIterator;
class IFMEGeometry;
class IFMEFeature
{
public:
// -----------------------------------------------------------------------
/*! This method returns the attributes value as a string.
// Returns FME_FALSE if no value could be found. */
virtual FME_Boolean getAttribute(const char* attrName,
IFMEString& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as a string.
// Returns FME_FALSE if no value could be found. */
virtual FME_Boolean getAttribute(const IFMEString& attrName,
IFMEString& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as an int no matter what it
// originally was. Returns FME_FALSE if no integer value could
// be found, or the value found could not be converted. */
virtual FME_Boolean getAttribute(const char* attrName,
FME_Int32& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as an int no matter what it
// originally was. Returns FME_FALSE if no integer value could
// be found, or the value found could not be converted. */
virtual FME_Boolean getAttribute(const char* attrName,
FME_UInt32& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as an int no matter what it
// originally was. Returns FME_FALSE if no integer value could
// be found, or the value found could not be converted. */
virtual FME_Boolean getAttribute(const char* attrName,
FME_Int16& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as an int no matter what it
// originally was. Returns FME_FALSE if no integer value could
// be found, or the value found could not be converted. */
virtual FME_Boolean getAttribute(const char* attrName,
FME_UInt16& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as an int no matter what it
// originally was. Returns FME_FALSE if no integer value could
// be found, or the value found could not be converted. */
virtual FME_Boolean getAttribute(const char* attrName,
FME_UInt8& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as a double precision float
// no matter what it originally was. Returns FME_FALSE if no real value
// could be found, or the value found could not be converted. */
virtual FME_Boolean getAttribute(const char* attrName,
FME_Real64& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method returns the attributes value as a single precision float
// no matter what it originally was. Returns FME_FALSE if no real value
// could be found, or the value found could not be converted. */
virtual FME_Boolean getAttribute(const char* attrName,
FME_Real32& attrValue) const = 0;
// -----------------------------------------------------------------------
/*! This method tests if an attribute exists. Returns
// FME_TRUE if it does, FME_FALSE otherwise. */
virtual FME_Boolean getAttribute(const char* attrName) const = 0;
// -----------------------------------------------------------------------
/*! This method searches for the attribute by name and removes it
// from the feature if it is found. If no such attribute is found,
// this will do nothing. */
virtual void removeAttribute(const char* attrName) = 0;
// -----------------------------------------------------------------------
/*! This method returns a complete, exhaustive list of all the
// attribute names present in the feature. The client can then
// loop through this list, and retrieve the values for the attributes. */
virtual void getAllAttributeNames(IFMEStringArray& attrName) const = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const char* attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const IFMEString& attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const IFMEString& attrName,
const IFMEString& attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const FME_Real64 attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const FME_Real32 attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const FME_Int32 attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const FME_UInt32 attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const FME_Int16 attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const FME_UInt16 attrValue) = 0;
// -----------------------------------------------------------------------
/*! This method supplies a new attribute to the feature.
// If an attribute with the name already exists, it is overwritten. */
virtual void setAttribute(const char* attrName,
const FME_UInt8 attrValue) = 0;
// -----------------------------------------------------------------------
/*! Used to represent a flag attribute. Value is not important for these.
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -