#
source:
mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_conic.py
@
8086

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/mauRepo/MolesManager/trunk/src/ea_model/iso_19107_2003_spatial_schema/geometry/coordinate_geometry/gm_conic.py@8086
Revision 8086, 2.8 KB checked in by mnagni, 8 years ago (diff) |
---|

Line | |
---|---|

1 | |

2 | |

3 | |

4 | |

5 | |

6 | |

7 | |

8 | |

9 | |

10 | |

11 | |

12 | |

13 | |

14 | |

15 | |

16 | |

17 | |

18 | from ea_model.iso_19107_2003_spatial_schema.geometry.geometric_primitive.gm_curvesegment import GM_CurveSegment |

19 | |

20 | ''' |

21 | Created on 03-Feb-2012 10:41:13 |

22 | |

23 | @author: mnagni |

24 | ''' |

25 | |

26 | class GM_Conic(GM_CurveSegment): |

27 | ''' |

28 | Represents a data entity defined in a UML diagram and supposed to |

29 | be persisted in a relational database. |

30 | |

31 | This class has been genererated automatically using the Apache Velocity project. |

32 | ''' |

33 | ''' |

34 | Please note that any access to the inner attributes should be done using |

35 | the given get/set methods and NOT accessing them directly. |

36 | ''' |

37 | def __init__(self): |

38 | self._gm_curvesegment = GM_CurveSegment() |

39 | |

40 | self.startConstrParam = None |

41 | self.numDerivativesAtEnd = None |

42 | self.curve = None |

43 | self.interpolation = None |

44 | self.numDerivativesAtStart = None |

45 | self.endConstrParam = None |

46 | self.numDerivativeInterior = None |

47 | self.shifted = None |

48 | self.position = None |

49 | self.semiLatusRectum = None |

50 | self.eccentricity = None |

51 | super(GM_Conic, self).__init__() |

52 | |

53 | |

54 | |

55 | @property |

56 | def numDerivativesAtEnd(self): |

57 | return self._gm_curvesegment.numDerivativesAtEnd |

58 | |

59 | @numDerivativesAtEnd.setter |

60 | def numDerivativesAtEnd(self, value): |

61 | self._gm_curvesegment.numDerivativesAtEnd = value |

62 | |

63 | @property |

64 | def curve(self): |

65 | return self._gm_curvesegment.curve |

66 | |

67 | @curve.setter |

68 | def curve(self, value): |

69 | self._gm_curvesegment.curve = value |

70 | |

71 | @property |

72 | def interpolation(self): |

73 | return self._gm_curvesegment.interpolation |

74 | |

75 | @interpolation.setter |

76 | def interpolation(self, value): |

77 | self._gm_curvesegment.interpolation = value |

78 | |

79 | @property |

80 | def numDerivativesAtStart(self): |

81 | return self._gm_curvesegment.numDerivativesAtStart |

82 | |

83 | @numDerivativesAtStart.setter |

84 | def numDerivativesAtStart(self, value): |

85 | self._gm_curvesegment.numDerivativesAtStart = value |

86 | |

87 | |

88 | |

89 | @property |

90 | def numDerivativeInterior(self): |

91 | return self._gm_curvesegment.numDerivativeInterior |

92 | |

93 | @numDerivativeInterior.setter |

94 | def numDerivativeInterior(self, value): |

95 | self._gm_curvesegment.numDerivativeInterior = value |

96 | |

97 | |

98 | |

99 | |

100 | |

101 | |

102 | |

103 | |

104 | |

105 | def __key(self): |

106 | return (self.startConstrParam, self.numDerivativesAtEnd, self.curve, self.interpolation, self.numDerivativesAtStart, self.endConstrParam, self.numDerivativeInterior, self.shifted, self.position, self.semiLatusRectum, self.eccentricity) |

107 | |

108 | def __eq__(x, y): |

109 | ''' |

110 | Cannot compare classes which do not define a "__key" attribute |

111 | ''' |

112 | if hasattr(x, '_%s__key' % (type(x).__name__)) and hasattr(y, '_%s__key' % (type(y).__name__)): |

113 | return x.__key() == y.__key() |

114 | return id(x) == id(y) |

115 | |

116 | def __hash__(self): |

117 | return hash(self.__key()) |

**Note:**See TracBrowser for help on using the repository browser.