ugkfeature.h

来自「linux下一款GIS程序源码」· C头文件 代码 · 共 131 行

H
131
字号
// ugkfeature.h: interface for the UGKFeature class.///************************************************************************//*                              UGKFeature                              *//************************************************************************//** **  对于某一种Feature的具体描述 ,包括字段定义、几何体及Style等的描述 * A simple feature, including geometry and attributes. */#ifndef  UGKFeature_H#define  UGKFeature_H#include "ugkfeaturedefn.h"#include "ugkgeometry.h"#include "ugkglobal.h"#include "ugkstyletable.h"class UGKFeature  {private:	long                nFID;	UGKFeatureDefn      *poDefn; 	UGKGeometry         *poGeometry;	UGKField            *pauFields;protected:	char *              m_pszStyleString;	UGKStyleTable       *m_poStyleTable;public:	UGKFeature( UGKFeatureDefn * );	virtual ~UGKFeature();	UGKFeatureDefn     *GetDefnRef() { return poDefn; }	UGKErr              SetGeometryDirectly( UGKGeometry * );	UGKErr              SetGeometry( UGKGeometry * );	UGKGeometry        *GetGeometryRef() { return poGeometry; }	UGKGeometry        *StealGeometry();	UGKFeature         *Clone();	virtual UGKBool  Equal( UGKFeature * poFeature );	int                 GetFieldCount() { return poDefn->GetFieldCount(); }       UGKFieldDefn       *GetFieldDefnRef( int iField )                                      { return poDefn->GetFieldDefn(iField); }      int                 GetFieldIndex( const char * pszName)                                      { return poDefn->GetFieldIndex(pszName);}      int                 IsFieldSet( int iField )                        { return                              pauFields[iField].Set.nMarker1 != UGKUnsetMarker                           || pauFields[iField].Set.nMarker2 != UGKUnsetMarker;                              }      void                UnsetField( int iField );      UGKField           *GetRawFieldRef( int i ) { return pauFields + i; }     int                 GetFieldAsInteger( int i );     double              GetFieldAsDouble( int i );     const char         *GetFieldAsString( int i );     const int          *GetFieldAsIntegerList( int i, int *pnCount );     const double       *GetFieldAsDoubleList( int i, int *pnCount );     char              **GetFieldAsStringList( int i );     int                 GetFieldAsInteger( const char *pszFName )                       { return GetFieldAsInteger( GetFieldIndex(pszFName) ); }     double              GetFieldAsDouble( const char *pszFName )                       { return GetFieldAsDouble( GetFieldIndex(pszFName) ); }     const char         *GetFieldAsString( const char *pszFName )                       { return GetFieldAsString( GetFieldIndex(pszFName) ); }     const int          *GetFieldAsIntegerList( const char *pszFName,                                                int *pnCount )                       { return GetFieldAsIntegerList( GetFieldIndex(pszFName),                                                       pnCount ); }     const double       *GetFieldAsDoubleList( const char *pszFName,                                               int *pnCount )                       { return GetFieldAsDoubleList( GetFieldIndex(pszFName),                                                      pnCount ); }     char              **GetFieldAsStringList( const char *pszFName )                       { return GetFieldAsStringList(GetFieldIndex(pszFName)); }     void                SetField( int i, int nValue );     void                SetField( int i, double dfValue );     void                SetField( int i, const char * pszValue );     void                SetField( int i, int nCount, int * panValues );     void                SetField( int i, int nCount, double * padfValues );     void                SetField( int i, char ** papszValues );     void                SetField( int i, UGKField * puValue );     void                SetField( const char *pszFName, int nValue )                            { SetField( GetFieldIndex(pszFName), nValue ); }     void                SetField( const char *pszFName, double dfValue )                            { SetField( GetFieldIndex(pszFName), dfValue ); }     void                SetField( const char *pszFName, const char * pszValue)                            { SetField( GetFieldIndex(pszFName), pszValue ); }     void                SetField( const char *pszFName, int nCount,                                   int * panValues )                          { SetField(GetFieldIndex(pszFName),nCount,panValues);}     void                SetField( const char *pszFName, int nCount,                                   double * padfValues )                          {SetField(GetFieldIndex(pszFName),nCount,padfValues);}     void                SetField( const char *pszFName, char ** papszValues )                            { SetField( GetFieldIndex(pszFName), papszValues); }     void                SetField( const char *pszFName, UGKField * puValue )                            { SetField( GetFieldIndex(pszFName), puValue ); }     long                GetFID() { return nFID; }     virtual UGKErr      SetFID( long nFID );     UGKErr              SetFrom( UGKFeature *, int = TRUE);     UGKErr              RemapFields( UGKFeatureDefn *poNewDefn,                                      int *panRemapSource );     virtual const char *GetStyleString();     virtual void        SetStyleString(const char *);     virtual void        SetStyleTable(UGKStyleTable *poStyleTable);     static UGKFeature  *CreateFeature( UGKFeatureDefn * );     static void         DestroyFeature( UGKFeature * );};#endif 

⌨️ 快捷键说明

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