Menu

Core Objects

Nicolas Hainaux
Attachments
all_pics.png (43901 bytes)
all_pics__smaller.png (72870 bytes)
There is a newer version of this page. You can find it here.

/!\ just a draft

Non-instanciable objects :
Clonable --- NamedObject --- Printable --- Drawable
ComposedCalculable
Evaluable --- Calculable --- Signed --- Exponented

Instanciable objects (calculus) :
Value --- Item --- Function --- SquareRoot
Product --- Monomial --- Expandable --- BinomialIdentity
Sum --- Polynomial
Quotient --- Fraction

Instanciable objects (geometry) :
Point --- Segment -- Ray --- Angle
Triangle --- RightTriangle

A memo of all instanciable core calculus objects : (at right the dbg_str() format)

  • All objects of the core are mathematical objects which can be displayed, either as figures or as mathematical formulas
  • Hence, all objects are not conceived according to their mathematical properties in first place, but also especially to the usual "displaying rules" we use.
  • base.py contains the most abstract classes :
  • Copiable, mother class of all objects. Provides a deep_copy() method which ensures to create a new object completely identical to the given one
  • Drawable, mother class of all geometrical objects. Provides the into_pic() method, which creates a picture of the object. All geometrical objects must implement a into_euk() method, which will create the eukleides file (.euk) to draw them. This method is used by Drawable.into_pic() to create the picture.
  • Printable, mother class of all calculus objects. They all must implement the into_str() method, which tells how to display them (independently from the output's format). Note that Drawable was thought to be a Printable too, so that geometrical objects would have to implement into_str() as well. But this feature does not seem to be useful. So probably Drawable will only inherit from Copiable.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.