[mapserver-commits] r10466 -
sandbox/sdlime/common-expressions/mapserver
svn at osgeo.org
svn at osgeo.org
Mon Aug 23 23:03:18 EDT 2010
Author: sdlime
Date: 2010-08-24 03:03:18 +0000 (Tue, 24 Aug 2010)
New Revision: 10466
Modified:
sandbox/sdlime/common-expressions/mapserver/maplayer.c
sandbox/sdlime/common-expressions/mapserver/mapserver.h
sandbox/sdlime/common-expressions/mapserver/mapshape.c
Log:
Added msLayerSupportsCommonExpressions() vtable function.
Modified: sandbox/sdlime/common-expressions/mapserver/maplayer.c
===================================================================
--- sandbox/sdlime/common-expressions/mapserver/maplayer.c 2010-08-24 02:44:31 UTC (rev 10465)
+++ sandbox/sdlime/common-expressions/mapserver/maplayer.c 2010-08-24 03:03:18 UTC (rev 10466)
@@ -1083,9 +1083,13 @@
int LayerDefaultAutoProjection(layerObj *layer, projectionObj* projection)
{
+ msSetError(MS_MISCERR, "This data driver does not implement AUTO projection support", "LayerDefaultAutoProjection()");
+ return MS_FAILURE;
+}
- msSetError(MS_MISCERR, "This data driver does not implement AUTO projection support", "LayerDefaultAutoProjection()");
- return MS_FAILURE;
+int LayerDefaultSupportsCommonExpressions(layerObj *layer)
+{
+ return MS_FALSE;
}
/*
@@ -1122,6 +1126,7 @@
{
assert(vtable != NULL);
+ vtable->LayerSupportsCommonExpressions = LayerDefaultSupportsCommonExpressions;
vtable->LayerInitItemInfo = LayerDefaultInitItemInfo;
vtable->LayerFreeItemInfo = LayerDefaultFreeItemInfo;
vtable->LayerOpen = LayerDefaultOpen;
Modified: sandbox/sdlime/common-expressions/mapserver/mapserver.h
===================================================================
--- sandbox/sdlime/common-expressions/mapserver/mapserver.h 2010-08-24 02:44:31 UTC (rev 10465)
+++ sandbox/sdlime/common-expressions/mapserver/mapserver.h 2010-08-24 03:03:18 UTC (rev 10466)
@@ -1577,35 +1577,25 @@
/************************************************************************/
#ifndef SWIG
struct layerVTable {
- int (*LayerInitItemInfo)(layerObj *layer);
- void (*LayerFreeItemInfo)(layerObj *layer);
- int (*LayerOpen)(layerObj *layer);
- int (*LayerIsOpen)(layerObj *layer);
- int (*LayerWhichShapes)(layerObj *layer, rectObj rect);
- int (*LayerNextShape)(layerObj *layer, shapeObj *shape);
- int (*LayerResultsGetShape)(layerObj *layer, shapeObj *shape,
- int tile, long record);
- int (*LayerGetShape)(layerObj *layer, shapeObj *shape,
- int tile, long record);
- int (*LayerClose)(layerObj *layer);
- int (*LayerGetItems)(layerObj *layer);
- int (*LayerGetExtent)(layerObj *layer, rectObj *extent);
- int (*LayerGetAutoStyle)(mapObj *map, layerObj *layer, classObj *c,
- int tile, long record);
-
- int (*LayerCloseConnection)(layerObj *layer);
-
- int (*LayerSetTimeFilter)(layerObj *layer,
- const char *timestring,
- const char *timefield);
-
- int (*LayerApplyFilterToLayer)(FilterEncodingNode *psNode, mapObj *map,
- int iLayerIndex,
- int bOnlySpatialFilter);
-
- int (*LayerCreateItems)(layerObj *layer, int nt);
- int (*LayerGetNumFeatures)(layerObj *layer);
- int (*LayerGetAutoProjection)(layerObj *layer, projectionObj *projection);
+ int (*LayerSupportsCommonExpressions)(layerObj *layer);
+ int (*LayerInitItemInfo)(layerObj *layer);
+ void (*LayerFreeItemInfo)(layerObj *layer);
+ int (*LayerOpen)(layerObj *layer);
+ int (*LayerIsOpen)(layerObj *layer);
+ int (*LayerWhichShapes)(layerObj *layer, rectObj rect);
+ int (*LayerNextShape)(layerObj *layer, shapeObj *shape);
+ int (*LayerResultsGetShape)(layerObj *layer, shapeObj *shape, int tile, long record);
+ int (*LayerGetShape)(layerObj *layer, shapeObj *shape, int tile, long record);
+ int (*LayerClose)(layerObj *layer);
+ int (*LayerGetItems)(layerObj *layer);
+ int (*LayerGetExtent)(layerObj *layer, rectObj *extent);
+ int (*LayerGetAutoStyle)(mapObj *map, layerObj *layer, classObj *c, int tile, long record);
+ int (*LayerCloseConnection)(layerObj *layer);
+ int (*LayerSetTimeFilter)(layerObj *layer, const char *timestring, const char *timefield);
+ int (*LayerApplyFilterToLayer)(FilterEncodingNode *psNode, mapObj *map, int iLayerIndex, int bOnlySpatialFilter);
+ int (*LayerCreateItems)(layerObj *layer, int nt);
+ int (*LayerGetNumFeatures)(layerObj *layer);
+ int (*LayerGetAutoProjection)(layerObj *layer, projectionObj *projection);
};
#endif /*SWIG*/
Modified: sandbox/sdlime/common-expressions/mapserver/mapshape.c
===================================================================
--- sandbox/sdlime/common-expressions/mapserver/mapshape.c 2010-08-24 02:44:31 UTC (rev 10465)
+++ sandbox/sdlime/common-expressions/mapserver/mapshape.c 2010-08-24 03:03:18 UTC (rev 10466)
@@ -2585,11 +2585,17 @@
return MS_SUCCESS;
}
+int msShapeFileLayerSupportsCommonExpressions(layerObj *layer)
+{
+ return MS_TRUE;
+}
+
int msShapeFileLayerInitializeVirtualTable(layerObj *layer)
{
assert(layer != NULL);
assert(layer->vtable != NULL);
+ layer->vtable->LayerSupportsCommonExpressions = msShapeFileLayerSupportsCommonExpressions;
layer->vtable->LayerInitItemInfo = msShapeFileLayerInitItemInfo;
layer->vtable->LayerFreeItemInfo = msShapeFileLayerFreeItemInfo;
layer->vtable->LayerOpen = msShapeFileLayerOpen;
More information about the mapserver-commits
mailing list