/[thuban]/branches/WIP-pyshapelib-bramz/Thuban/Model/classification.py
ViewVC logotype

Diff of /branches/WIP-pyshapelib-bramz/Thuban/Model/classification.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 679 by jonathan, Tue Apr 15 19:46:37 2003 UTC revision 681 by jonathan, Tue Apr 15 21:54:32 2003 UTC
# Line 511  class ClassGroupProperties: Line 511  class ClassGroupProperties:
511      def __deepcopy__(self):      def __deepcopy__(self):
512          return ClassGroupProperties(self)          return ClassGroupProperties(self)
513    
514        def __repr__(self):
515            return repr((self.__stroke, self.__strokeWidth, self.__fill))
516    
517  class ClassGroup:  class ClassGroup:
518      """A base class for all Groups within a Classification"""      """A base class for all Groups within a Classification"""
519    
# Line 539  class ClassGroup: Line 542  class ClassGroup:
542          label -- a string representing the Group's label. This must          label -- a string representing the Group's label. This must
543                   not be None.                   not be None.
544          """          """
545          assert isinstance(label, StringType)          assert isinstance(label, StringTypes)
546          self.label = label          self.label = label
547    
548      def GetDisplayText(self):      def GetDisplayText(self):
# Line 578  class ClassGroup: Line 581  class ClassGroup:
581    
582      def __eq__(self, other):      def __eq__(self, other):
583          return isinstance(other, ClassGroup) \          return isinstance(other, ClassGroup) \
584                and self.label == other.label \
585              and self.GetProperties() == other.GetProperties()              and self.GetProperties() == other.GetProperties()
586    
587      def __ne__(self, other):      def __ne__(self, other):
588          return not self.__eq__(other)          return not self.__eq__(other)
589    
590        def __repr__(self):
591            return "'" + self.label + "', " + repr(self.GetProperties())
592            
593  class ClassGroupSingleton(ClassGroup):  class ClassGroupSingleton(ClassGroup):
594      """A Group that is associated with a single value."""      """A Group that is associated with a single value."""
# Line 636  class ClassGroupSingleton(ClassGroup): Line 642  class ClassGroupSingleton(ClassGroup):
642              and isinstance(other, ClassGroupSingleton) \              and isinstance(other, ClassGroupSingleton) \
643              and self.__value == other.__value              and self.__value == other.__value
644    
645        def __repr__(self):
646            return "(" + self.__value + ", " + ClassGroup.__repr__(self) + ")"
647    
648  class ClassGroupDefault(ClassGroup):  class ClassGroupDefault(ClassGroup):
649      """The default Group. When values do not match any other      """The default Group. When values do not match any other
650         Group within a Classification, the properties from this         Group within a Classification, the properties from this
# Line 673  class ClassGroupDefault(ClassGroup): Line 682  class ClassGroupDefault(ClassGroup):
682              and isinstance(other, ClassGroupDefault) \              and isinstance(other, ClassGroupDefault) \
683              and self.GetProperties() == other.GetProperties()              and self.GetProperties() == other.GetProperties()
684    
685        def __repr__(self):
686            return "(" + ClassGroup.__repr__(self) + ")"
687    
688  class ClassGroupRange(ClassGroup):  class ClassGroupRange(ClassGroup):
689      """A Group that represents a range of values that map to the same      """A Group that represents a range of values that map to the same
690         set of properties."""         set of properties."""
# Line 774  class ClassGroupRange(ClassGroup): Line 786  class ClassGroupRange(ClassGroup):
786              and self.__min == other.__min \              and self.__min == other.__min \
787              and self.__max == other.__max              and self.__max == other.__max
788    
789        def __repr__(self):
790            return "(" + str(self.__min) + ", " + str(self.__max) + ", " + \
791                   ClassGroup.__repr__(self) + ")"
792    
793  class ClassGroupMap(ClassGroup):  class ClassGroupMap(ClassGroup):
794      """Currently, this class is not used."""      """Currently, this class is not used."""
795    

Legend:
Removed from v.679  
changed lines
  Added in v.681

[email protected]
ViewVC Help
Powered by ViewVC 1.1.26