Geom Abstract Base Class¶
-
class
mcycle.bases.geom.
Geom
(tuple validClasses, unicode name=u'Geom instance')¶ Bases:
mcycle.bases.mcabstractbase.MCAB
Abstract class for geometries.
Attributes
name
name: unicode validClasses
validClasses: tuple Methods
copy
(self, dict kwargs={})Return a new copy of a class object. summary
(self[, printSummary, propertyKeys])Returns (and prints) a summary of the geometry attributes/properties. update
(self, dict kwargs)Update (multiple) class variables from a dictionary of keyword arguments. validClass
(self, unicode cls)bool: Returns True if geometry is valid for the given class. -
copy
(self, dict kwargs={})¶ Return a new copy of a class object. Kwargs (as dict) are passed to update() as a shortcut of simultaneously copying and updating.
Parameters: kwargs : dict, optional
Dictionary of attributes and their updated value.
-
name
¶ name: unicode
-
summary
(self, printSummary=True, propertyKeys=u'all', unicode name=u'', int rstHeading=0)¶ Returns (and prints) a summary of the geometry attributes/properties.
Parameters: printSummary : bool, optional
If true, the summary string is printed as well as returned. Defaults to True.
propertyKeys : list, optional
Names of component properties to be included. The following strings are also accepted as inputs:
‘all’: all properties in _properties are included,
‘none’: no properties are included.
Defaults to ‘all’.
name : str, optional
Name of instance used in summary heading. If None, the name property of the instance is used. Defaults to None.
rstHeading : int, optional
Level of reStructuredText heading to give the summary, 0 being the top heading. Heading style taken from mcycle.DEFAULTS.RSTHEADINGS. Defaults to 0.
-
update
(self, dict kwargs) → void¶ Update (multiple) class variables from a dictionary of keyword arguments.
Parameters: kwargs : dict
Dictionary of attributes and their updated value; kwargs={‘key’: value}.
-
validClass
(self, unicode cls) → bool¶ bool: Returns True if geometry is valid for the given class.
-
validClasses
¶ validClasses: tuple
-