#ifdef __cplusplus extern "C" { #endif #pragma once #include "hgdalType.h" #include "STDDeletable.h" #include "stdcxxType.h" #define OGRFEATURE_DECL_VIRT(Type) \ #define OGRFEATURE_DECL_NONVIRT(Type) \ int Type##_oGRFeature_GetFID ( Type##_p p );\ int Type##_oGRFeature_GetFieldCount ( Type##_p p );\ int Type##_oGRFeature_GetFieldAsInteger ( Type##_p p, int i );\ int Type##_oGRFeature_GetFieldAsInteger64 ( Type##_p p, int i );\ const char* Type##_oGRFeature_GetFieldAsString ( Type##_p p, int i );\ OGRGeometry_p Type##_oGRFeature_GetGeometryRef ( Type##_p p ); #define OGRFEATURE_DECL_ACCESSOR(Type) \ #define OGRFEATURE_DEF_VIRT(Type) \ #define OGRFEATURE_DEF_NONVIRT(Type) \ int Type##_oGRFeature_GetFID ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, oGRFeature_GetFID, OGRFeature))(p))->GetFID();\ }\ \ int Type##_oGRFeature_GetFieldCount ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, oGRFeature_GetFieldCount, OGRFeature))(p))->GetFieldCount();\ }\ \ int Type##_oGRFeature_GetFieldAsInteger ( Type##_p p, int i ) {\ return ((TYPECASTMETHOD(Type, oGRFeature_GetFieldAsInteger, OGRFeature))(p))->GetFieldAsInteger(i);\ }\ \ int Type##_oGRFeature_GetFieldAsInteger64 ( Type##_p p, int i ) {\ return ((TYPECASTMETHOD(Type, oGRFeature_GetFieldAsInteger64, OGRFeature))(p))->GetFieldAsInteger64(i);\ }\ \ const char* Type##_oGRFeature_GetFieldAsString ( Type##_p p, int i ) {\ return ((TYPECASTMETHOD(Type, oGRFeature_GetFieldAsString, OGRFeature))(p))->GetFieldAsString(i);\ }\ \ OGRGeometry_p Type##_oGRFeature_GetGeometryRef ( Type##_p p ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, oGRFeature_GetGeometryRef, OGRFeature))(p))->GetGeometryRef());\ } #define OGRFEATURE_DEF_ACCESSOR(Type) \ DELETABLE_DECL_VIRT(OGRFeature) OGRFEATURE_DECL_VIRT(OGRFeature) OGRFEATURE_DECL_NONVIRT(OGRFeature) OGRFEATURE_DECL_ACCESSOR(OGRFeature) #ifdef __cplusplus } #endif