Coverage details for edu.umn.gis.mapscript.imp.shapeObj

LineHitsSource
1 // A Java MapScript module for MapServer.
2 // See <http://mapserver.gis.umn.edu> for information on MapServer.
3 //
4 // Copyright (C) 2003 Andrew Collins <andrewrcollins@yahoo.com>
5 //
6 // This library is free software; you can redistribute it
7 // and/or modify it under the terms of the GNU Lesser General
8 // Public License as published by the Free Software Foundation;
9 // either version 2.1 of the License, or (at your option) any
10 // later version.
11 //
12 // This library is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty
14 // of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
15 // See the GNU Lesser General Public License for more details.
16 //
17 // You should have received a copy of the GNU Lesser General
18 // Public License along with this library; if not, write to
19 // the Free Software Foundation, Inc., 59 Temple Place,
20 // Suite 330, Boston, MA 02111-1307 USA
21 package edu.umn.gis.mapscript.imp;
22  
23 /**
24  * DOCUMENT ME!
25  *
26  * @author <a href="mailto:ADDRESS">NAME</a>
27  *
28  * @todo CLASS_DESCRIPTION
29  */
30 public class shapeObj
31 {
32   /**
33    * DOCUMENT ME!
34    *
35    * @todo FIELD_DESCRIPTION
36    */
37   protected boolean swigCMemOwn;
38  
39   /**
40    * DOCUMENT ME!
41    *
42    * @todo FIELD_DESCRIPTION
43    */
44   private long swigCPtr;
45  
46   /**
47    * Creates a new shapeObj object.
48    *
49    * @param type PARAMETER
50    */
51   public shapeObj(int type)
52   {
530    this(MapScriptJNI.new_shapeObj(type), true);
540  }
55  
56   /**
57    * Creates a new shapeObj object.
58    *
59    * @param cPtr PARAMETER
60    * @param cMemoryOwn PARAMETER
61    */
62   protected shapeObj(long cPtr, boolean cMemoryOwn)
630  {
640    swigCMemOwn = cMemoryOwn;
650    swigCPtr = cPtr;
660  }
67  
68   /**
69    * Creates a new shapeObj object.
70    */
71   protected shapeObj()
72   {
730    this(0, false);
740  }
75  
76   /**
77    * DOCUMENT ME!
78    *
79    * @param bounds PARAMETER
80    *
81    * @todo METHOD_DESCRIPTION
82    */
83   public void setBounds(rectObj bounds)
84   {
850    MapScriptJNI.set_shapeObj_bounds(swigCPtr, rectObj.getCPtr(bounds));
860  }
87  
88   /**
89    * DOCUMENT ME!
90    *
91    * @todo METHOD_DESCRIPTION
92    */
93   public void setBounds()
94   {
950    MapScriptJNI.shapeObj_setBounds(swigCPtr);
960  }
97  
98   /**
99    * DOCUMENT ME!
100    *
101    * @return RETURN
102    *
103    * @todo METHOD_DESCRIPTION
104    */
105   public rectObj getBounds()
106   {
1070    return new rectObj(MapScriptJNI.get_shapeObj_bounds(swigCPtr), false);
108   }
109  
110   /**
111    * DOCUMENT ME!
112    *
113    * @param classindex PARAMETER
114    *
115    * @todo METHOD_DESCRIPTION
116    */
117   public void setClassindex(int classindex)
118   {
1190    MapScriptJNI.set_shapeObj_classindex(swigCPtr, classindex);
1200  }
121  
122   /**
123    * DOCUMENT ME!
124    *
125    * @return RETURN
126    *
127    * @todo METHOD_DESCRIPTION
128    */
129   public int getClassindex()
130   {
1310    return MapScriptJNI.get_shapeObj_classindex(swigCPtr);
132   }
133  
134   /**
135    * DOCUMENT ME!
136    *
137    * @param index PARAMETER
138    *
139    * @todo METHOD_DESCRIPTION
140    */
141   public void setIndex(int index)
142   {
1430    MapScriptJNI.set_shapeObj_index(swigCPtr, index);
1440  }
145  
146   /**
147    * DOCUMENT ME!
148    *
149    * @return RETURN
150    *
151    * @todo METHOD_DESCRIPTION
152    */
153   public int getIndex()
154   {
1550    return MapScriptJNI.get_shapeObj_index(swigCPtr);
156   }
157  
158   /**
159    * DOCUMENT ME!
160    *
161    * @param line PARAMETER
162    *
163    * @todo METHOD_DESCRIPTION
164    */
165   public void setLine(lineObj line)
166   {
1670    MapScriptJNI.set_shapeObj_line(swigCPtr, lineObj.getCPtr(line));
1680  }
169  
170   /**
171    * DOCUMENT ME!
172    *
173    * @return RETURN
174    *
175    * @todo METHOD_DESCRIPTION
176    */
177   public lineObj getLine()
178   {
1790    return new lineObj(MapScriptJNI.get_shapeObj_line(swigCPtr), false);
180   }
181  
182   /**
183    * DOCUMENT ME!
184    *
185    * @param numlines PARAMETER
186    *
187    * @todo METHOD_DESCRIPTION
188    */
189   public void setNumlines(int numlines)
190   {
1910    MapScriptJNI.set_shapeObj_numlines(swigCPtr, numlines);
1920  }
193  
194   /**
195    * DOCUMENT ME!
196    *
197    * @return RETURN
198    *
199    * @todo METHOD_DESCRIPTION
200    */
201   public int getNumlines()
202   {
2030    return MapScriptJNI.get_shapeObj_numlines(swigCPtr);
204   }
205  
206   /**
207    * DOCUMENT ME!
208    *
209    * @param numvalues PARAMETER
210    *
211    * @todo METHOD_DESCRIPTION
212    */
213   public void setNumvalues(int numvalues)
214   {
2150    MapScriptJNI.set_shapeObj_numvalues(swigCPtr, numvalues);
2160  }
217  
218   /**
219    * DOCUMENT ME!
220    *
221    * @return RETURN
222    *
223    * @todo METHOD_DESCRIPTION
224    */
225   public int getNumvalues()
226   {
2270    return MapScriptJNI.get_shapeObj_numvalues(swigCPtr);
228   }
229  
230   /**
231    * DOCUMENT ME!
232    *
233    * @param text PARAMETER
234    *
235    * @todo METHOD_DESCRIPTION
236    */
237   public void setText(String text)
238   {
2390    MapScriptJNI.set_shapeObj_text(swigCPtr, text);
2400  }
241  
242   /**
243    * DOCUMENT ME!
244    *
245    * @return RETURN
246    *
247    * @todo METHOD_DESCRIPTION
248    */
249   public String getText()
250   {
2510    return MapScriptJNI.get_shapeObj_text(swigCPtr);
252   }
253  
254   /**
255    * DOCUMENT ME!
256    *
257    * @param tileindex PARAMETER
258    *
259    * @todo METHOD_DESCRIPTION
260    */
261   public void setTileindex(int tileindex)
262   {
2630    MapScriptJNI.set_shapeObj_tileindex(swigCPtr, tileindex);
2640  }
265  
266   /**
267    * DOCUMENT ME!
268    *
269    * @return RETURN
270    *
271    * @todo METHOD_DESCRIPTION
272    */
273   public int getTileindex()
274   {
2750    return MapScriptJNI.get_shapeObj_tileindex(swigCPtr);
276   }
277  
278   /**
279    * DOCUMENT ME!
280    *
281    * @param type PARAMETER
282    *
283    * @todo METHOD_DESCRIPTION
284    */
285   public void setType(int type)
286   {
2870    MapScriptJNI.set_shapeObj_type(swigCPtr, type);
2880  }
289  
290   /**
291    * DOCUMENT ME!
292    *
293    * @return RETURN
294    *
295    * @todo METHOD_DESCRIPTION
296    */
297   public int getType()
298   {
2990    return MapScriptJNI.get_shapeObj_type(swigCPtr);
300   }
301  
302   /**
303    * DOCUMENT ME!
304    *
305    * @param i PARAMETER
306    *
307    * @return RETURN
308    *
309    * @todo METHOD_DESCRIPTION
310    */
311   public String getValue(int i)
312   {
3130    return MapScriptJNI.shapeObj_getValue(swigCPtr, i);
314   }
315  
316   /**
317    * DOCUMENT ME!
318    *
319    * @param values PARAMETER
320    *
321    * @todo METHOD_DESCRIPTION
322    */
323   public void setValues(SWIGTYPE_p_p_char values)
324   {
3250    MapScriptJNI.set_shapeObj_values(swigCPtr, SWIGTYPE_p_p_char.getCPtr(values));
3260  }
327  
328   /**
329    * DOCUMENT ME!
330    *
331    * @return RETURN
332    *
333    * @todo METHOD_DESCRIPTION
334    */
335   public SWIGTYPE_p_p_char getValues()
336   {
3370    return new SWIGTYPE_p_p_char(MapScriptJNI.get_shapeObj_values(swigCPtr),
338       false);
339   }
340  
341   /**
342    * DOCUMENT ME!
343    *
344    * @param line PARAMETER
345    *
346    * @return RETURN
347    *
348    * @todo METHOD_DESCRIPTION
349    */
350   public int add(lineObj line)
351   {
3520    return MapScriptJNI.shapeObj_add(swigCPtr, lineObj.getCPtr(line));
353   }
354  
355   /**
356    * DOCUMENT ME!
357    *
358    * @param point PARAMETER
359    *
360    * @return RETURN
361    *
362    * @todo METHOD_DESCRIPTION
363    */
364   public int contains(pointObj point)
365   {
3660    return MapScriptJNI.shapeObj_contains(swigCPtr, pointObj.getCPtr(point));
367   }
368  
369   /**
370    * DOCUMENT ME!
371    *
372    * @param dest PARAMETER
373    *
374    * @return RETURN
375    *
376    * @todo METHOD_DESCRIPTION
377    */
378   public int copy(shapeObj dest)
379   {
3800    return MapScriptJNI.shapeObj_copy(swigCPtr, shapeObj.getCPtr(dest));
381   }
382  
383   /**
384    * DOCUMENT ME!
385    *
386    * @todo METHOD_DESCRIPTION
387    */
388   public void delete()
389   {
3900    if ((swigCPtr != 0) && swigCMemOwn)
391     {
3920      MapScriptJNI.delete_shapeObj(swigCPtr);
3930      swigCMemOwn = false;
394     }
395  
3960    swigCPtr = 0;
3970  }
398  
399   /**
400    * DOCUMENT ME!
401    *
402    * @param map PARAMETER
403    * @param layer PARAMETER
404    * @param image PARAMETER
405    *
406    * @return RETURN
407    *
408    * @todo METHOD_DESCRIPTION
409    */
410   public int draw(mapObj map, layerObj layer, imageObj image)
411   {
4120    return MapScriptJNI.shapeObj_draw(swigCPtr, mapObj.getCPtr(map),
413       layerObj.getCPtr(layer), imageObj.getCPtr(image));
414   }
415  
416   /**
417    * DOCUMENT ME!
418    *
419    * @param obj PARAMETER
420    *
421    * @return RETURN
422    *
423    * @todo METHOD_DESCRIPTION
424    */
425   public boolean equals(Object obj)
426   {
4270    boolean equal = false;
428  
4290    if (obj instanceof shapeObj)
430     {
4310      equal = (((shapeObj) obj).swigCPtr == this.swigCPtr);
432     }
433  
4340    return equal;
435   }
436  
437   /**
438    * DOCUMENT ME!
439    *
440    * @param i PARAMETER
441    *
442    * @return RETURN
443    *
444    * @todo METHOD_DESCRIPTION
445    */
446   public lineObj get(int i)
447   {
4480    return new lineObj(MapScriptJNI.shapeObj_get(swigCPtr, i), false);
449   }
450  
451   /**
452    * DOCUMENT ME!
453    *
454    * @param shape PARAMETER
455    *
456    * @return RETURN
457    *
458    * @todo METHOD_DESCRIPTION
459    */
460   public int intersects(shapeObj shape)
461   {
4620    return MapScriptJNI.shapeObj_intersects(swigCPtr, shapeObj.getCPtr(shape));
463   }
464  
465   /**
466    * DOCUMENT ME!
467    *
468    * @param in PARAMETER
469    * @param out PARAMETER
470    *
471    * @return RETURN
472    *
473    * @todo METHOD_DESCRIPTION
474    */
475   public int project(projectionObj in, projectionObj out)
476   {
4770    return MapScriptJNI.shapeObj_project(swigCPtr, projectionObj.getCPtr(in),
478       projectionObj.getCPtr(out));
479   }
480  
481   /**
482    * DOCUMENT ME!
483    *
484    * @param obj PARAMETER
485    *
486    * @return RETURN
487    *
488    * @todo METHOD_DESCRIPTION
489    */
490   protected static long getCPtr(shapeObj obj)
491   {
4920    return obj.swigCPtr;
493   }
494  
495   /**
496    * DOCUMENT ME!
497    *
498    * @todo METHOD_DESCRIPTION
499    */
500   protected void finalize()
501   {
5020    delete();
5030  }
504 }

this report was generated by version 1.0.2 of jcoverage.
visit www.jcoverage.com for updates.

copyright © 2003, jcoverage ltd. all rights reserved.
Java is a trademark of Sun Microsystems, Inc. in the United States and other countries.