1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
|
<HTML>
<HEAD>
<TITLE>
mapscript_supp.c</TITLE>
<BODY BGCOLOR="#ffffff">
<H1>mapscriptsupp.tcl</H1>
<HR><H1> Mapscript Supplemental Procedures </H1>
<UL>
<LI> 1. proc mapscript::classObjRef
<LI> 2. proc mapscript::colorObjRef
<LI> 3. proc mapscript::errorObjRef
<LI> 4. proc mapscript::featureListNodeObjRef
<LI> 5. proc mapscript::itemObjRef
<LI> 6. proc mapscript::labelCacheMemberObjRef
<LI> 7. proc mapscript::labelCacheObjRef
<LI> 8. proc mapscript::labelObjRef
<LI> 9. proc mapscript::layerObjRef
<LI> 10. proc mapscript::legendObjRef
<LI> 11. proc mapscript::lineObjRef
<LI> 12. proc mapscript::mapObjRef
<LI> 13. proc mapscript::markerCacheMemberObjRef
<LI> 14. proc mapscript::pointObjRef
<LI> 15. proc mapscript::projectionObjRef
<LI> 16. proc mapscript::queryMapObjRef
<LI> 17. proc mapscript::rectObjRef
<LI> 18. proc mapscript::referenceMapObjRef
<LI> 19. proc mapscript::resultCacheMemberObjRef
<LI> 20. proc mapscript::resultCacheObjRef
<LI> 21. proc mapscript::scalebarObjRef
<LI> 22. proc mapscript::shapeObjRef
<LI> 23. proc mapscript::shapefileObjRef
<LI> 24. proc mapscript::symbolSetObjRef
<LI> 25. proc mapscript::webObjRef
<LI> 26. proc mapscript::DBFInfoRef
</UL>
<H2> Usage </H2>
<P>
These procedures allow methods to be invoked on object references
(i.e., pointers), without having to convert a reference into an object.
A valid object reference is required; procedures check for valid object types.
<P>
General syntax:
<BLOCKQUOTE>
objectRefProc $objectPtr args
</BLOCKQUOTE>
<P>
Sample:
<BLOCKQUOTE>
set map [mapscript::mapObj -args $mapFile]
<BR>
set rectPtr [$map cget -extent]
<BR>
set minx [<B>mapscript::rectObjRef</B> $rectPtr cget -minx]
<BR>
set miny [<B>mapscript::rectObjRef</B> $rectPtr cget -miny]
<BR>
</BLOCKQUOTE>
<P>
Notes: each of the <EM>objectRef</EM> procedures is just a shortcut to invoke a
SWIG generated method name. Method names of:
<UL>
<LI> cget
<LI> configure
<LI> delete
</UL>
invoke that object's cget, configure, and delete method respectively.
<P> Example:
<BLOCKQUOTE>
mapscript::rectObjRef $rectPtr cget -minx
</BLOCKQUOTE>
is equivalent to:
<BLOCKQUOTE>
mapscript::rectObj_minx_get $rectPtr
</BLOCKQUOTE>
<HR><H1> Mapscript Convenience Procedures </H1>
<UL>
<LI> 1. proc mapscript::getDBFNames
<LI> 2. proc mapscript::getDBFTypes
<LI> 3. proc mapscript::getDBFValues
<LI> 4. proc mapscript::getQueryInfo
</UL>
<H2> Usage </H2>
<P><b>mapscript::getDBFNames <em> DBFInfo_handle </em></b><br>
getDBFNames returns a list of field names from a DBF file handle. The
<em> DBFInfo_handle </em> must be a valid DBFInfo handle returned from
the DBFInfo constructor.
<P><b>mapscript::getDBFTypes <em> DBFInfo_handle </em></b><br>
getDBFTypes returns a list of field types and lengths from a DBF file handle.
The <em> DBFInfo_handle </em> must be a valid DBFInfo handle returned from
the DBFInfo constructor. Each list element is itself a list of field type
and field length. Valid field types are returned as: <b>string</b>,
<b>integer</b>, and <b>double</b>.
<P><b>mapscript::getDBFValues <em> DBFInfo_handle record_number </em></b><br>
getDBFValues returns a list of field values from a DBF file handle. The
<em> DBFInfo_handle </em> must be a valid DBFInfo handle returned from
the DBFInfo constructor. <em>Record_number</em> is the record number of the
row to fetch.
<P><b>mapscript::getQueryInfo <em> mapObj_pointer layerObj_pointer
</em></b><br>
getQueryInfo returns a list of name-value
pairs from a layer that map query has generated.
<em> mapObj_pointer</em> and <em>queryObj_pointer</em> must be valid
mapObj and layerObj pointers.
<BR>
<HR>
<H1>See also</H1>
<P>
See <A HREF="mapscript_wrap.html">mapscript_wrap.html</A> for the full
Mapscript Tcl interface.
<P>
Note also that the Mapscript objects described in mapscript_wrap.html are
defined in the <b> mapscript </b> namespace.
<P>
Tom Poindexter
<BR>
tpoindex@nyx.net
<BR>
</BODY>
</HTML>
|