#ifdef __cplusplus extern "C" { #endif #pragma once #include "hgdalType.h" #include "STDDeletable.h" #include "stdcxxType.h" #define OGRGEOMETRY_DECL_VIRT(Type) \ unsigned int Type##_getGeometryType ( Type##_p p );\ void Type##_getEnvelope ( Type##_p p, OGREnvelope_p psEnvelope );\ bool Type##_Intersects ( Type##_p p, OGRGeometry_p g );\ bool Type##_Equals ( Type##_p p, OGRGeometry_p g );\ bool Type##_Disjoint ( Type##_p p, OGRGeometry_p g );\ bool Type##_Touches ( Type##_p p, OGRGeometry_p g );\ bool Type##_Crosses ( Type##_p p, OGRGeometry_p g );\ bool Type##_Within ( Type##_p p, OGRGeometry_p g );\ bool Type##_Contains ( Type##_p p, OGRGeometry_p g );\ bool Type##_Overlaps ( Type##_p p, OGRGeometry_p g );\ OGRGeometry_p Type##_Boundary ( Type##_p p );\ double Type##_Distance ( Type##_p p, OGRGeometry_p poOtherGeom );\ OGRGeometry_p Type##_ConvexHull ( Type##_p p );\ OGRGeometry_p Type##_Buffer ( Type##_p p, double dfDist, int nQuadSegs );\ OGRGeometry_p Type##_Intersection ( Type##_p p, OGRGeometry_p poOtherGeom );\ OGRGeometry_p Type##_Union ( Type##_p p, OGRGeometry_p poOtherGeom );\ OGRGeometry_p Type##_UnionCascaded ( Type##_p p );\ OGRGeometry_p Type##_Difference ( Type##_p p, OGRGeometry_p poOtherGeom );\ OGRGeometry_p Type##_SymDifference ( Type##_p p, OGRGeometry_p poOtherGeom );\ int Type##_Centroid ( Type##_p p, OGRPoint_p poPoint );\ OGRGeometry_p Type##_Simplify ( Type##_p p, double dTolerance );\ OGRGeometry_p Type##_DelaunayTriangulation ( Type##_p p, double dfTolerance, int bOnlyEdges );\ OGRGeometry_p Type##_Polygonize ( Type##_p p );\ double Type##_Distance3D ( Type##_p p, OGRGeometry_p poOtherGeom ); #define OGRGEOMETRY_DECL_NONVIRT(Type) \ OGRGeometry_p Type##_oGRGeometry_SimplifyPreserveTopology ( Type##_p p, double dTolerance );\ OGRPolygon_p Type##_oGRGeometry_toPolygon ( Type##_p p );\ OGRMultiPolygon_p Type##_oGRGeometry_toMultiPolygon ( Type##_p p ); #define OGRGEOMETRY_DECL_ACCESSOR(Type) \ #define OGRGEOMETRY_DEF_VIRT(Type) \ unsigned int Type##_getGeometryType ( Type##_p p ) {\ return ((TYPECASTMETHOD(Type, getGeometryType, OGRGeometry))(p))->getGeometryType();\ }\ \ void Type##_getEnvelope ( Type##_p p, OGREnvelope_p psEnvelope ) {\ ((TYPECASTMETHOD(Type, getEnvelope, OGRGeometry))(p))->getEnvelope(from_nonconst_to_nonconst(psEnvelope));\ }\ \ bool Type##_Intersects ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Intersects, OGRGeometry))(p))->Intersects(from_nonconst_to_nonconst(g));\ }\ \ bool Type##_Equals ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Equals, OGRGeometry))(p))->Equals(from_nonconst_to_nonconst(g));\ }\ \ bool Type##_Disjoint ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Disjoint, OGRGeometry))(p))->Disjoint(from_nonconst_to_nonconst(g));\ }\ \ bool Type##_Touches ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Touches, OGRGeometry))(p))->Touches(from_nonconst_to_nonconst(g));\ }\ \ bool Type##_Crosses ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Crosses, OGRGeometry))(p))->Crosses(from_nonconst_to_nonconst(g));\ }\ \ bool Type##_Within ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Within, OGRGeometry))(p))->Within(from_nonconst_to_nonconst(g));\ }\ \ bool Type##_Contains ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Contains, OGRGeometry))(p))->Contains(from_nonconst_to_nonconst(g));\ }\ \ bool Type##_Overlaps ( Type##_p p, OGRGeometry_p g ) {\ return ((TYPECASTMETHOD(Type, Overlaps, OGRGeometry))(p))->Overlaps(from_nonconst_to_nonconst(g));\ }\ \ OGRGeometry_p Type##_Boundary ( Type##_p p ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, Boundary, OGRGeometry))(p))->Boundary());\ }\ \ double Type##_Distance ( Type##_p p, OGRGeometry_p poOtherGeom ) {\ return ((TYPECASTMETHOD(Type, Distance, OGRGeometry))(p))->Distance(from_nonconst_to_nonconst(poOtherGeom));\ }\ \ OGRGeometry_p Type##_ConvexHull ( Type##_p p ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, ConvexHull, OGRGeometry))(p))->ConvexHull());\ }\ \ OGRGeometry_p Type##_Buffer ( Type##_p p, double dfDist, int nQuadSegs ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, Buffer, OGRGeometry))(p))->Buffer(dfDist, nQuadSegs));\ }\ \ OGRGeometry_p Type##_Intersection ( Type##_p p, OGRGeometry_p poOtherGeom ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, Intersection, OGRGeometry))(p))->Intersection(from_nonconst_to_nonconst(poOtherGeom)));\ }\ \ OGRGeometry_p Type##_Union ( Type##_p p, OGRGeometry_p poOtherGeom ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, Union, OGRGeometry))(p))->Union(from_nonconst_to_nonconst(poOtherGeom)));\ }\ \ OGRGeometry_p Type##_UnionCascaded ( Type##_p p ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, UnionCascaded, OGRGeometry))(p))->UnionCascaded());\ }\ \ OGRGeometry_p Type##_Difference ( Type##_p p, OGRGeometry_p poOtherGeom ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, Difference, OGRGeometry))(p))->Difference(from_nonconst_to_nonconst(poOtherGeom)));\ }\ \ OGRGeometry_p Type##_SymDifference ( Type##_p p, OGRGeometry_p poOtherGeom ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, SymDifference, OGRGeometry))(p))->SymDifference(from_nonconst_to_nonconst(poOtherGeom)));\ }\ \ int Type##_Centroid ( Type##_p p, OGRPoint_p poPoint ) {\ return ((TYPECASTMETHOD(Type, Centroid, OGRGeometry))(p))->Centroid(from_nonconst_to_nonconst(poPoint));\ }\ \ OGRGeometry_p Type##_Simplify ( Type##_p p, double dTolerance ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, Simplify, OGRGeometry))(p))->Simplify(dTolerance));\ }\ \ OGRGeometry_p Type##_DelaunayTriangulation ( Type##_p p, double dfTolerance, int bOnlyEdges ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, DelaunayTriangulation, OGRGeometry))(p))->DelaunayTriangulation(dfTolerance, bOnlyEdges));\ }\ \ OGRGeometry_p Type##_Polygonize ( Type##_p p ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, Polygonize, OGRGeometry))(p))->Polygonize());\ }\ \ double Type##_Distance3D ( Type##_p p, OGRGeometry_p poOtherGeom ) {\ return ((TYPECASTMETHOD(Type, Distance3D, OGRGeometry))(p))->Distance3D(from_nonconst_to_nonconst(poOtherGeom));\ } #define OGRGEOMETRY_DEF_NONVIRT(Type) \ OGRGeometry_p Type##_oGRGeometry_SimplifyPreserveTopology ( Type##_p p, double dTolerance ) {\ return from_nonconst_to_nonconst((OGRGeometry*)((TYPECASTMETHOD(Type, oGRGeometry_SimplifyPreserveTopology, OGRGeometry))(p))->SimplifyPreserveTopology(dTolerance));\ }\ \ OGRPolygon_p Type##_oGRGeometry_toPolygon ( Type##_p p ) {\ return from_nonconst_to_nonconst((OGRPolygon*)((TYPECASTMETHOD(Type, oGRGeometry_toPolygon, OGRGeometry))(p))->toPolygon());\ }\ \ OGRMultiPolygon_p Type##_oGRGeometry_toMultiPolygon ( Type##_p p ) {\ return from_nonconst_to_nonconst((OGRMultiPolygon*)((TYPECASTMETHOD(Type, oGRGeometry_toMultiPolygon, OGRGeometry))(p))->toMultiPolygon());\ } #define OGRGEOMETRY_DEF_ACCESSOR(Type) \ DELETABLE_DECL_VIRT(OGRGeometry) OGRGEOMETRY_DECL_VIRT(OGRGeometry) OGRGEOMETRY_DECL_NONVIRT(OGRGeometry) OGRGEOMETRY_DECL_ACCESSOR(OGRGeometry) #ifdef __cplusplus } #endif