|
13 | 13 | * |
14 | 14 | *****************************************************************************/ |
15 | 15 |
|
| 16 | + |
16 | 17 | /* fromstring: Factory for mapfile objects */ |
17 | 18 |
|
18 | 19 | %pythoncode %{ |
@@ -222,19 +223,17 @@ def fromstring(data, mappath=None): |
222 | 223 | } |
223 | 224 | } |
224 | 225 |
|
225 | | - def getItemDefinitions(self): |
| 226 | + @property |
| 227 | + def itemdefinitions(self): |
226 | 228 | return self._item_definitions |
227 | 229 |
|
228 | | - def setItemDefinitions(self, item_definitions): |
| 230 | + @itemdefinitions.setter |
| 231 | + def itemdefinitions(self, item_definitions): |
229 | 232 | self._item_definitions = item_definitions |
230 | 233 |
|
231 | | - __swig_getmethods__["itemdefinitions"] = getItemDefinitions |
232 | | - __swig_setmethods__["itemdefinitions"] = setItemDefinitions |
233 | | - |
234 | 234 | %} |
235 | 235 | } |
236 | 236 |
|
237 | | - |
238 | 237 | /****************************************************************************** |
239 | 238 | * Extensions to mapObj |
240 | 239 | *****************************************************************************/ |
@@ -425,25 +424,14 @@ def fromstring(data, mappath=None): |
425 | 424 | memcpy( *argout, self->pattern, sizeof(double) * *pnListSize); |
426 | 425 | } |
427 | 426 |
|
428 | | - void patternlength_set2(int patternlength) |
429 | | - { |
430 | | - msSetError(MS_MISCERR, "pattern is read-only", "patternlength_set()"); |
431 | | - } |
432 | 427 |
|
433 | 428 | %pythoncode %{ |
434 | 429 |
|
435 | | - __swig_setmethods__["patternlength"] = _mapscript.styleObj_patternlength_set2 |
436 | | - __swig_getmethods__["patternlength"] = _mapscript.styleObj_patternlength_get |
437 | | - if _newclass:patternlength = _swig_property(_mapscript.styleObj_patternlength_get, _mapscript.styleObj_patternlength_set2) |
| 430 | +pattern = property(pattern_get, pattern_set) |
438 | 431 |
|
439 | | - __swig_setmethods__["pattern"] = _mapscript.styleObj_pattern_set |
440 | | - __swig_getmethods__["pattern"] = _mapscript.styleObj_pattern_get |
441 | | - if _newclass:pattern = _swig_property(_mapscript.styleObj_pattern_get, _mapscript.styleObj_pattern_set) |
442 | 432 | %} |
443 | | - |
444 | 433 | } |
445 | 434 |
|
446 | | - |
447 | 435 | /****************************************************************************** |
448 | 436 | * Extensions to hashTableObj - add dict methods |
449 | 437 | *****************************************************************************/ |
|
0 commit comments